JBoss Tools SVN: r11362 - trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-10-30 14:38:24 -0400 (Thu, 30 Oct 2008)
New Revision: 11362
Modified:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBDS-461
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 18:15:36 UTC (rev 11361)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 18:38:24 UTC (rev 11362)
@@ -60,6 +60,7 @@
public static final String SERVERS_FILE = "../../../../studio/application_platforms.properties";
+
// This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core plugin
public static final String JBOSS_AS_RUNTIME_TYPE_ID[] = {
"org.jboss.ide.eclipse.as.runtime.32",
@@ -82,6 +83,8 @@
"JBoss Application Server 4.2",
"JBoss Application Server 5.0"
};
+
+ private static final int installedASIndex = 2;
public static final String JBOSS_AS_HOST = "localhost";
@@ -126,12 +129,14 @@
String jbossASLocation = null;
// server name
- position = str.indexOf("=",position+1);
- if(position < 0) break;
+ int namePosition = str.indexOf("=",position+1);
+ if(namePosition < 0) break;
// server type
- position = str.indexOf(",",position+1);
+ position = str.indexOf(",",namePosition+1);
if(position < 0) break;
+
+ String name = str.substring(namePosition+1,position).trim();
// server version
int versionPosition = str.indexOf(",",position+1);
@@ -169,7 +174,7 @@
runtime = createRuntime(jbossASLocation, progressMonitor, index);
}
if (runtime != null) {
- createServer(progressMonitor, runtime, index);
+ createServer(progressMonitor, runtime, index, name);
}
createDriver(jbossASLocation);
@@ -209,7 +214,7 @@
runtime = createRuntime(jbossASLocation, progressMonitor, 2);
}
if (runtime != null) {
- createServer(progressMonitor, runtime, 2);
+ createServer(progressMonitor, runtime, 2, null);
}
createDriver(jbossASLocation);
@@ -238,7 +243,7 @@
IRuntimeWorkingCopy runtime = createRuntime(jbossASLocation, progressMonitor, 2);
IServerWorkingCopy server = null;
if (runtime != null) {
- server = createServer(progressMonitor, runtime, 2);
+ server = createServer(progressMonitor, runtime, 2, null);
}
createDriver(jbossASLocation);
return server;
@@ -281,12 +286,16 @@
* @return server working copy
* @throws CoreException
*/
- private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index) throws CoreException {
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index, String name) throws CoreException {
IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
server.setHost(JBOSS_AS_HOST);
- server.setName(JBOSS_AS_NAME[2]);
+ if(name != null)
+ server.setName(name);
+ else
+ server.setName(JBOSS_AS_NAME[installedASIndex]);
+
// JBossServer.DEPLOY_DIRECTORY
String deployVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal);
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 18:15:36 UTC (rev 11361)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 18:38:24 UTC (rev 11362)
@@ -60,6 +60,7 @@
public static final String SERVERS_FILE = "../../../../studio/application_platforms.properties";
+
// This constants are made to avoid dependency with org.jboss.ide.eclipse.as.core plugin
public static final String JBOSS_AS_RUNTIME_TYPE_ID[] = {
"org.jboss.ide.eclipse.as.runtime.32",
@@ -82,6 +83,8 @@
"JBoss Application Server 4.2",
"JBoss Application Server 5.0"
};
+
+ private static final int installedASIndex = 2;
public static final String JBOSS_AS_HOST = "localhost";
@@ -126,12 +129,14 @@
String jbossASLocation = null;
// server name
- position = str.indexOf("=",position+1);
- if(position < 0) break;
+ int namePosition = str.indexOf("=",position+1);
+ if(namePosition < 0) break;
// server type
- position = str.indexOf(",",position+1);
+ position = str.indexOf(",",namePosition+1);
if(position < 0) break;
+
+ String name = str.substring(namePosition+1,position).trim();
// server version
int versionPosition = str.indexOf(",",position+1);
@@ -169,7 +174,7 @@
runtime = createRuntime(jbossASLocation, progressMonitor, index);
}
if (runtime != null) {
- createServer(progressMonitor, runtime, index);
+ createServer(progressMonitor, runtime, index, name);
}
createDriver(jbossASLocation);
@@ -209,7 +214,7 @@
runtime = createRuntime(jbossASLocation, progressMonitor, 2);
}
if (runtime != null) {
- createServer(progressMonitor, runtime, 2);
+ createServer(progressMonitor, runtime, 2, null);
}
createDriver(jbossASLocation);
@@ -238,7 +243,7 @@
IRuntimeWorkingCopy runtime = createRuntime(jbossASLocation, progressMonitor, 2);
IServerWorkingCopy server = null;
if (runtime != null) {
- server = createServer(progressMonitor, runtime, 2);
+ server = createServer(progressMonitor, runtime, 2, null);
}
createDriver(jbossASLocation);
return server;
@@ -281,12 +286,16 @@
* @return server working copy
* @throws CoreException
*/
- private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index) throws CoreException {
+ private static IServerWorkingCopy createServer(IProgressMonitor progressMonitor, IRuntimeWorkingCopy runtime, int index, String name) throws CoreException {
IServerType serverType = ServerCore.findServerType(JBOSS_AS_TYPE_ID[index]);
IServerWorkingCopy server = serverType.createServer(null, null, runtime, progressMonitor);
server.setHost(JBOSS_AS_HOST);
- server.setName(JBOSS_AS_NAME[2]);
+ if(name != null)
+ server.setName(name);
+ else
+ server.setName(JBOSS_AS_NAME[installedASIndex]);
+
// JBossServer.DEPLOY_DIRECTORY
String deployVal = runtime.getLocation().append("server").append(JBOSS_AS_DEFAULT_CONFIGURATION_NAME).append("deploy").toOSString();
((ServerWorkingCopy) server).setAttribute("org.jboss.ide.eclipse.as.core.server.deployDirectory", deployVal);
17 years, 2 months
JBoss Tools SVN: r11361 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-30 14:15:36 -0400 (Thu, 30 Oct 2008)
New Revision: 11361
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3009
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-30 17:01:44 UTC (rev 11360)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpePanelGridCreator.java 2008-10-30 18:15:36 UTC (rev 11361)
@@ -370,6 +370,9 @@
rci = 0;
}
for (int j = 0; j < tableSize; j++) {
+ if (i*tableSize+j >= childrenCount) {
+ break;
+ }
nsIDOMElement visualCell = visualDocument
.createElement(HTML.TAG_TD);
if (columnClasses.size() > 0) {
17 years, 2 months
JBoss Tools SVN: r11359 - trunk/struts/docs/struts_tools_tutorial/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 13:01:34 -0400 (Thu, 30 Oct 2008)
New Revision: 11359
Modified:
trunk/struts/docs/struts_tools_tutorial/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/struts/docs/struts_tools_tutorial/en/master.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-10-30 17:01:27 UTC (rev 11358)
+++ trunk/struts/docs/struts_tools_tutorial/en/master.xml 2008-10-30 17:01:34 UTC (rev 11359)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY introduction SYSTEM "modules/introduction.xml">
<!ENTITY struts_application SYSTEM "modules/struts_application.xml">
17 years, 2 months
JBoss Tools SVN: r11357 - trunk/seam/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 13:01:14 -0400 (Thu, 30 Oct 2008)
New Revision: 11357
Modified:
trunk/seam/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/seam/docs/reference/en/master.xml
===================================================================
--- trunk/seam/docs/reference/en/master.xml 2008-10-30 17:01:07 UTC (rev 11356)
+++ trunk/seam/docs/reference/en/master.xml 2008-10-30 17:01:14 UTC (rev 11357)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY intro SYSTEM "modules/intro.xml">
<!ENTITY creating_new_seam SYSTEM "modules/creating_new_seam.xml">
17 years, 2 months
JBoss Tools SVN: r11355 - trunk/jsf/docs/userguide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 13:00:53 -0400 (Thu, 30 Oct 2008)
New Revision: 11355
Modified:
trunk/jsf/docs/userguide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/jsf/docs/userguide/en/master.xml
===================================================================
--- trunk/jsf/docs/userguide/en/master.xml 2008-10-30 17:00:36 UTC (rev 11354)
+++ trunk/jsf/docs/userguide/en/master.xml 2008-10-30 17:00:53 UTC (rev 11355)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.oasis-open.org/docbook/xml/4.3CR3/docbookx.dtd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[
<!ENTITY Visual_Web_Tools SYSTEM "modules/Visual_Web_Tools.xml">
@@ -20,8 +20,8 @@
<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
-<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
-<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
]>
<book>
@@ -52,6 +52,6 @@
&springTools;
&editors;
&palette;
- &web_projects;
- &preferences;
+ &web_projects;
+ &preferences;
</book>
17 years, 2 months
JBoss Tools SVN: r11354 - trunk/jsf/docs/jsf_tools_tutorial/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 13:00:36 -0400 (Thu, 30 Oct 2008)
New Revision: 11354
Modified:
trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/jsf/docs/jsf_tools_tutorial/en/master.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-10-30 17:00:23 UTC (rev 11353)
+++ trunk/jsf/docs/jsf_tools_tutorial/en/master.xml 2008-10-30 17:00:36 UTC (rev 11354)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY introduction SYSTEM "modules/introduction.xml">
<!ENTITY jsf_application SYSTEM "modules/jsf_application.xml">
17 years, 2 months
JBoss Tools SVN: r11352 - trunk/jbpm/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 13:00:14 -0400 (Thu, 30 Oct 2008)
New Revision: 11352
Modified:
trunk/jbpm/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/jbpm/docs/reference/en/master.xml
===================================================================
--- trunk/jbpm/docs/reference/en/master.xml 2008-10-30 17:00:04 UTC (rev 11351)
+++ trunk/jbpm/docs/reference/en/master.xml 2008-10-30 17:00:14 UTC (rev 11352)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"?http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY introduction SYSTEM "modules/Introduction.xml">
17 years, 2 months
JBoss Tools SVN: r11350 - branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-30 12:57:18 -0400 (Thu, 30 Oct 2008)
New Revision: 11350
Modified:
branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
JBIDE-3061
Modified: branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30 16:54:31 UTC (rev 11349)
+++ branches/jbosstools-3.0.0.Beta1/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30 16:57:18 UTC (rev 11350)
@@ -28,10 +28,7 @@
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
@@ -58,8 +55,8 @@
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.editor.preferences.VpeEditorPreferencesPage;
-import org.jboss.tools.vpe.editor.toolbar.VpeDropDownMenu;
import org.jboss.tools.vpe.editor.toolbar.IVpeToolBarManager;
+import org.jboss.tools.vpe.editor.toolbar.VpeDropDownMenu;
import org.jboss.tools.vpe.editor.toolbar.VpeToolBarManager;
import org.jboss.tools.vpe.editor.toolbar.format.FormatControllerManager;
import org.jboss.tools.vpe.editor.toolbar.format.TextFormattingToolBar;
@@ -90,7 +87,6 @@
static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
private XulRunnerEditor xulRunnerEditor;
- private nsIDOMDocument domDocument;
private nsIDOMEventTarget documentEventTarget;
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
@@ -454,19 +450,8 @@
}
public nsIDOMDocument getDomDocument() {
- if (domDocument == null) {
- domDocument = xulRunnerEditor.getDOMDocument();
- }
- return domDocument;
+ return xulRunnerEditor.getDOMDocument();
}
-
- /**
- * @param domDocument the domDocument to set
- */
- protected void setDomDocument(nsIDOMDocument domDocument) {
-
- this.domDocument = domDocument;
- }
public nsIDOMElement getContentArea() {
return contentArea;
@@ -604,7 +589,7 @@
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGOVEREVENT, getContentAreaEventListener(), false);
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DBLCLICK, getContentAreaEventListener(), false);
- if (domDocument != null && documentEventTarget != null) {
+ if (getDomDocument() != null && documentEventTarget != null) {
documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS, getContentAreaEventListener(), false);
}
getContentAreaEventListener().setVisualEditor(null);
17 years, 2 months
JBoss Tools SVN: r11349 - in branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide: en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-30 12:54:31 -0400 (Thu, 30 Oct 2008)
New Revision: 11349
Added:
branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/en/master_output.xml 2008-10-30 16:54:31 UTC (rev 11349)
@@ -0,0 +1,2809 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+[
+<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
+<!ENTITY manage SYSTEM "modules/manage.xml">
+<!ENTITY first_seam SYSTEM "modules/first_seam.xml">
+<!ENTITY jsp_application SYSTEM "modules/jsp_application.xml">
+<!ENTITY rad_jsf_application SYSTEM "modules/rad_jsf_application.xml">
+<!ENTITY gsg_faq SYSTEM "modules/gsg_faq.xml">
+<!ENTITY further_reading SYSTEM "modules/further_reading.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY jbossportallink "../../jboss_portal_tools_ref_guide/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+<!ENTITY wslink "../../ws_ref_guide/html_single/index.html">
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo>Version: 1.1.0.GA</releaseinfo>
+ </bookinfo>
+ <toc></toc>
+
+<chapter id="getting_started" xreflabel="getting_started">
+ <?dbhtml filename="getting_started.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Getting Started with JBoss Developer Studio</title>
+
+ <section id="intro1">
+ <title>What is JBDS?</title>
+ <para><property>JBoss Developer Studio</property> is a set of eclipse-based development tools that
+ are pre-configured for JBoss Enterprise Middleware Platforms and Red Hat Enterprise Linux.
+ Developers are not required to use <property>JBoss Developer Studio</property> to develop on
+ JBoss Enterprise Middleware and/or Red Hat Linux. But, many find these pre-configured tools offer
+ significant time-savings and value, making them more productive and speeding time to deployment.</para>
+ <para>This guide covers the first steps to get started working with <property>JBoss Developer
+ Studio</property>. You will learn how to install and configure necessary software for your OS
+ (currently Linux, Microsoft Windows or Mac OSX).</para>
+ <para>Thus this guide will provide you with detailed info on how to start JDK, JBDS and JBoss
+ Tools.</para>
+ </section>
+
+ <section id="ConfigJavaEnvironment">
+ <?dbhtml filename="ConfigJavaEnvironment.html"?>
+ <title>Configuring Your Java Environment</title>
+ <para>You must have a working installation of JDK 5 before you install <property>JBoss Developer
+ Studio</property>. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a
+ 64-bit JVM the visual editor fails to launch because of feature of OS architecture. Thus in this
+ guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft
+ Windows Platform.</para>
+
+ <section id="InstallJDK50onLinux">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Linux</title>
+ <para>To install 32-bit Sun JDK 5.0 on Linux and configure it, you should follow the next steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select "Red Hat Package Manager in self-extracting" file
+ for Linux. Read the instructions on Sun's website for installing the JDK.</para>
+ </listitem>
+ <listitem>
+ <para>If you don't want to use SysV service scripts you can install the
+ "self-extracting file" for Linux instead of choosing the "RPM in
+ self-extracting" file. In that case you can skip the next step mentioned here. But it
+ is recommended to use the SysV service scripts for production servers.</para>
+ </listitem>
+ <listitem>
+ <para>Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>.
+ Please ensure you choose a matching version of the -compat package to the JDK you've
+ installed.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable that points to the JDK installation directory and call it
+ JAVA_HOME. Add <emphasis>
+ <property>$JAVA_HOME/bin</property>
+ </emphasis> to the system path to be able to run java from the command line. You can do this
+ by adding the following lines to the .bashrc file in your home directory.</para>
+ <programlisting><![CDATA[#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory.
+export JAVA_HOME=/usr/java/jdk1.5.0_11
+export PATH=$PATH:$JAVA_HOME/bin]]></programlisting>
+ </listitem>
+ </itemizedlist>
+
+ <note>
+ <title>Note:</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">If you have JDK already installed and added in your system path, you should add
+ <emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it)
+ so that the new version of JDK can be found first, i. e. <emphasis>
+ <emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
+ </emphasis> This way, the machine will pick up the new JVM first. You only need to run
+ "alternative" as a safe guard for the right JVM.</diffmk:wrapper></para>
+ </note>
+
+ <para>Set this variable for your account doing the installation and also for the user account
+ that will run the server.</para>
+ <itemizedlist>
+ <listitem>
+ <para>If you have more than one version of JVM installed on your machine, make sure you are
+ using the JDK 1.5 installation as the default java and javac. You can do this using the
+ alternatives system. The alternatives system allows different versions of Java from different
+ sources to co-exist on your system.</para>
+ </listitem>
+ </itemizedlist>
+ <section id="SelectAlternativesforJava">
+ <title>Select alternatives for java, javac and java_sdk_1.5.0</title>
+ <itemizedlist>
+ <listitem>
+ <para>As a root user, type the following command at the shell prompt and you should see
+ something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config java
+There are 2 programs that provide 'java'.
+Selection Command
+-----------------------------------------------
+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
+*+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java
+Enter to keep the current selection[+], or type selection number:]]></programlisting>
+ <para>Make sure the Sun version [jre-1.5.0-sun in this case] is selected (marked with a
+ '+' in the output), or select it by entering its number as prompted.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Repeat the same for javac and java_sdk_1.5.0.</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
+There is 1 program that provides 'javac'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac
+Enter to keep the current selection[+], or type selection number:
+
+[root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0
+There is 1 program that provide 'java_sdk_1.5.0'.
+ Selection Command
+-----------------------------------------------
+*+ 1 /usr/lib/jvm/java-1.5.0-sun
+Enter to keep the current selection[+], or type selection number:]]></programlisting>
+ <para>You should verify that java, javac and java_sdk_1.5.0 all point to the same manufacturer
+ and version.</para>
+ <note>
+ <title>Note:</title>
+ <para>You can always override this step by setting the JAVA_HOME environment variable as
+ explained in the previous step.</para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure that the java executable is in your path and that you are using an appropriate
+ version. To verify your Java environment, type "java -version" at the shell
+ prompt and you should see something like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting><![CDATA[[root@vsr ~]$ java -version
+java version "1.5.0_11"
+Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
+Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)]]></programlisting>
+ </section>
+
+ </section>
+ <section id="InstallJDK50onWindows">
+ <title>Installing and Configuring 32-bit Sun JDK 5.0 on Microsoft Windows</title>
+
+ <para>To install and configure 32-bit Sun JDK 5.0 on Microsoft Windows, follow these steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Download the <ulink url="http://java.sun.com/javase/downloads/index_jdk5.jsp">Sun JDK 5.0
+ (Java 2 Development Kit)</ulink> from Sun's website. Choose "JDK 5.0 Update
+ <x>" (where "x" is the latest update number) for
+ download and then select your Windows Platform options to perform the installation.</para>
+ </listitem>
+ <listitem>
+ <para>Create an environment variable called JAVA_HOME that points to the JDK installation
+ directory, for example:
+ <literallayout>
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
+ </literallayout></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>In order to run java from the command line, add the <emphasis>jre\bin</emphasis> directory
+ to your path, for example:</para>
+ <para>
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\jre\bin</emphasis>
+ </para>
+ <para>To do this, open the <emphasis>
+ <property>Control Panel</property>
+ </emphasis> from the <emphasis>
+ <property>Start</property>
+ </emphasis> menu, switch to Classic View if necessary, open the System Control Panel applet (<emphasis>
+ <property>System</property>
+ </emphasis>), select the <emphasis>
+ <property>Advanced</property>
+ </emphasis> Tab, and click on the <emphasis>
+ <property>Environment Variables</property>
+ </emphasis> button.</para>
+ <para>Now, when 32-bit Sun JDK 5.0 has been successfully installed, we can pass on to the next
+ step.</para>
+ </section>
+
+ </section>
+
+ <section id="InstallingJBDS">
+ <?dbhtml filename="InstallingRHDS.html"?>
+ <title>JBoss Developer Studio Installation</title>
+
+ <para>This chapter will provide you with detailed information on how to install <property>JBoss
+ Developer Studio</property>.</para>
+
+ <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse,
+ WTP, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>First of all you need the appropriate installation file for your platform from
+ <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat
+ website</ulink>.</para>
+ </listitem>
+ <listitem>
+ <para>Then run in console:</para>
+ <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.1.0.GA.jar
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Follow the instructions presented by the installation wizard</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>JBoss Developer Studio Installation Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Provide the installation path</para>
+ </listitem>
+ <listitem>
+ <para>Select Java VM</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>By selecting <emphasis>
+ <property>Default Java VM</property>
+ </emphasis> you set default Java VM of your system (to verify your Java environment, type
+ "java -version" in console).</para>
+ </tip>
+
+ <para>Selecting <emphasis>
+ <property>Specific Java VM</property>
+ </emphasis> you can provide the path to non-default Java VM.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>JBoss Developer Studio needs Java 5 and "gij" isn't available on
+ every platform.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Installation process includes <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
+ Platform</ulink>. Select <emphasis>
+ <property>Yes</property>
+ </emphasis> to use it in JBoss Developer Studio.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para/>
+
+ <figure>
+ <title>JBoss Enterprise Application Platform Installing</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para/>
+ <note>
+ <title>Note:</title>
+ <para>The installer installs JBoss Enterprise Application Platform for running your applications
+ if you select this option during the installation process. If you want to use a different server
+ than ours, you can change the setting in JBoss Developer Studio.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Check your installation paths and see the components to install. If you'd like to change
+ something, press <emphasis>
+ <property>Previous</property>
+ </emphasis> button. Click <emphasis>
+ <property>Next</property>
+ </emphasis> to start installation. </para>
+ </listitem>
+ </itemizedlist>
+
+ <para/>
+
+ <figure>
+ <title>Summary Information</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="jbds_jbosstools">
+
+ <title>JBoss Developer Studio and JBoss Tools</title>
+
+ <para>This section uncovers the points on the differences between <property>JBoss Developer
+ Studio</property> and <property>JBoss Tools</property> and provides the steps on <property>JBoss
+ Tools</property> installation as well.</para>
+
+ <section id="WhatDifferenceBetweenJBDSAndJBossTools">
+ <title>What is the difference?</title>
+
+ <para><property>JBoss Tools</property> is what went into our <property>JBoss Developer
+ Studio</property> which comes as an easy-to-install Eclipse based IDE fully configured and ready
+ to run with the bundled <property>JBoss Enterprise Application Platform</property>.</para>
+
+ <para>In short <property>JBoss Tools</property> are just a set of Eclipse plugins and
+ <property>JBoss Developer Studio</property> adds:</para>
+ <itemizedlist>
+ <listitem>
+ <para>An installer</para>
+ </listitem>
+ <listitem>
+ <para>Eclipse and Web Tools preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>3rd party plugins bundled and configured</para>
+ </listitem>
+ <listitem>
+ <para>Access to RHEL and Red Hat Network</para>
+ </listitem>
+ <listitem>
+ <para>Access to the JBoss/Red Hat supported software</para>
+ </listitem>
+ </itemizedlist>
+ <para> For additional information see <ulink url="http://www.jboss.com/products/devstudio"
+ >JBoss.com</ulink></para>
+ </section>
+
+ <section id="JBossToolsInstall">
+ <title>JBoss Tools Installation</title>
+ <para>Here, let's consider the installation of the <property>JBoss Tools</property>
+ modules.</para>
+ <para><property>JBoss Tools</property> is an umbrella project for the JBoss developed plugins
+ that will make it into <property>JBoss Developer Studio</property>. The JBoss Tools modules are:</para>
+ <itemizedlist>
+ <listitem>
+ <para>JBoss AS Tools</para>
+ </listitem>
+ <listitem>
+ <para>Seam Tools</para>
+ </listitem>
+ <listitem>
+ <para>Hibernate Tools</para>
+ </listitem>
+ <listitem>
+ <para>Visual Page Editor</para>
+ </listitem>
+ <listitem>
+ <para>JST Tools</para>
+ </listitem>
+ <listitem>
+ <para>JBPM Tools</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>To install the JBoss Tools plugins for Eclipse, you need the following:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get Eclipse and Web Tools</para>
+ </listitem>
+ </itemizedlist>
+ <para>The currant version of JBoss Tools (3.0.0.beta1) targets at Eclipse 3.4/Ganymede and WTP
+ 3.0.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>We recommend you do not use Eclipse.org update site to go from Eclipse 3.3 to Eclipse 3.4.
+ Instead we suggest that you download the full binary from <ulink url="http://www.eclipse.org/downloads/">here</ulink>.</para>
+ </tip>
+
+ <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ JBoss Tools 2.x will not have any of the new features.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Remember to choose the download that matches your OS and use Java 5 when you run
+ it.</para>
+ </note>
+
+ <itemizedlist>
+ <listitem>
+ <para>Get the <ulink url="http://download.jboss.org/jbosstools/builds/nightly/latestBuild.html"
+ >latest JBoss Tools build</ulink></para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Some of our newer plugins, like TPTP and BIRT, need additional drivers. On the left side of
+ the download page you can find all of the required drivers for chosen build and their versions.</para>
+ <para>Instead of downloading the nightly build version manually, it's also possible to
+ get the latest release of <property>JBoss Tools</property> from one of our update sites: <itemizedlist>
+ <listitem>
+ <para>Stable Updates: <ulink url="http://download.jboss.org/jbosstools/updates/stable"
+ >http://download.jboss.org/jbosstools/updates/stable</ulink></para>
+ </listitem>
+ <listitem>
+ <para> Development Updates: <ulink url="http://download.jboss.org/jbosstools/updates/development"
+ >http://download.jboss.org/jbosstools/updates/development</ulink></para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Finally, install the build</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Unzip the file(s) directly into your Eclipse <emphasis>
+ <property>plugins/features</property>
+ </emphasis> directory and it will be readily available. It might be necessary to start Eclipse
+ with eclipse -clean to make sure it starts clean and rereads the new list of plugins.</para>
+
+ <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
+ about dependencies between standalone plug-ins.</para>
+ </section>
+
+ </section>
+
+ <section id="Welcome">
+ <title>Welcome to JBoss Developer Studio</title>
+ <para>In this section we'll show you how to work with the welcome page of the <property>JBoss
+ Developer Studio</property>.</para>
+ <para>The welcome page is the first page you see when you first launch <property>JBoss Developer
+ Studio</property>. </para>
+
+ <figure>
+ <title>Welcome to JBoss Developer Studio</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>With the help of its page you will be able:</para>
+ <itemizedlist>
+ <listitem>
+ <para>to get quick access to Getting Started Documentation (guides, tutorials and
+ viewlets)</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Getting Started Documentation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to create new Seam projects, jBPM Process, JSF or Struts projects using JBDS
+ wizards</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Create New...</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to get short description of perspectives that JBDS offers for more productive
+ development</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Perspectives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>to visit JBoss Developer Studio web resources.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Web Resources</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_9.png" scale="90"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Start work with <property>JBoss Developer Studio</property> by clicking on <emphasis>
+ <property>Workbench</property>
+ </emphasis> button or simply close the Welcome page.</para>
+
+ </section>
+
+ <section id="Upgrading">
+ <?dbhtml filename="Upgrading.html"?>
+ <title>Upgrading</title>
+ <para>To upgrade, just uninstall your current version and install the new one.</para>
+ </section>
+
+ <section id="Uninstalling">
+ <?dbhtml filename="Uninstalling.html"?>
+ <title>Uninstalling</title>
+ <itemizedlist>
+ <listitem>
+ <para>Make sure <property>JBoss Developer Studio</property> is not running</para>
+ </listitem>
+ <listitem>
+ <para>Uninstall your current version of <property>JBoss Developer Studio</property> by running
+ Uninstaller</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="Support">
+ <?dbhtml filename="Support.html"?>
+ <title>Support</title>
+ <para>If you have comments or questions, you can discuss them at our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Developer Studio Forum</ulink>.</para>
+ <para>When writing to the forum for questions, please include the following information:</para>
+ <orderedlist>
+ <listitem>
+ <para>JBoss Developer Studio version</para>
+ </listitem>
+ <listitem>
+ <para>Exact error message</para>
+ </listitem>
+ <listitem>
+ <para>Steps to reproduce the issue</para>
+ </listitem>
+ </orderedlist>
+
+ <para><property>JBDS</property> subscribers can get necessary support on our <ulink url="https://network.jboss.com/jbossnetwork/login.html">Support Portal</ulink>.</para>
+ </section>
+
+
+ <section id="OtherRelevantResourcesOnTheTopic33">
+ <?dbhtml filename="OtherRelevantResourcesOnTheTopic33.html"?>
+ <title>Other relevant resources on the topic</title>
+ <para>JBDS on JBoss: <ulink url="http://labs.jboss.com/rhdevstudio/">JBoss Developer
+ Studio</ulink></para>
+ <para>Forum: <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Forum</ulink></para>
+ <para>Subscription: <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">JBDS
+ Subscription</ulink></para>
+
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+<chapter diffmk:change="added" id="manage" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml" xreflabel="manage">
+ <?dbhtml filename="manage.html"?>
+ <chapterinfo diffmk:change="added">
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Manage JBoss AS from JBoss Developer Studio</title>
+
+ <para><diffmk:wrapper diffmk:change="added">In this chapter we'll focus more on how to operate the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ AS</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> from </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <para><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> ships with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss EAP
+ v.4.2</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> bundled. When you followed the default installation of </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss
+ Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">, you should already have a JBoss 4.2 Server installed and
+ defined. To run JBoss AS 4.2 you need JDK 1.5, JDK 6 is not formally supported yet, although
+ you may be able to start the server with it.</diffmk:wrapper></para>
+
+ <section id="JBossbundled">
+
+ <title>How to Manage the JBoss AS Bundled in JBDS</title>
+ <para><diffmk:wrapper diffmk:change="added">This section covers the basics of working with the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ supported directly by </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBDS</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> via bundled AS plug-in. To read more
+ about AS plug-in, refer to the </diffmk:wrapper><ulink url="../../as/html_single/index.html">Server Manager guide</ulink>.</para>
+
+ <section id="StartingServer">
+
+ <title><diffmk:wrapper diffmk:change="changed">Starting JBoss Server</diffmk:wrapper></title>
+ <para>Starting <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is quite simple. </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> allows you to control its behaviour with the help of
+ a special toolbar: where you could start it in a regular or debug mode, stop it or
+ restart it.</diffmk:wrapper></para>
+
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">To launch the server click the green-with-white-arrow icon on the
+ </diffmk:wrapper><property moreinfo="none">JBoss Server View </property><diffmk:wrapper diffmk:change="changed">or right click server name in
+ this view and select </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis>. If this view is not open, select <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Window > Show View > Other > Server
+ > JBoss Server View</diffmk:wrapper></property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting from Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Starting from JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">While launching, server output is written to the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Console
+ view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">:</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Console Output</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is started you should see <emphasis>
+ <property moreinfo="none">Started</property>
+ </emphasis> right to its name in <property moreinfo="none">JBoss Server View</property><diffmk:wrapper diffmk:change="changed"> (column
+ "Status").</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Server is Started</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To see event log after the server is started, expand <property moreinfo="none"><diffmk:wrapper diffmk:change="added">Event
+ Log</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> branch beneath </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server View</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Event Log</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="StoppingJBoss">
+
+ <title>Stopping JBoss Server</title>
+ <para>To stop the server, click the <emphasis>
+ <property moreinfo="none">Stop</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> icon in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> or right click the server
+ name and press </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Stop</property>
+ </emphasis>.</para>
+ <figure float="0">
+ <title>Stopping Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the server is stopped you will see <emphasis>
+ <property moreinfo="none">Stopped</property>
+ </emphasis> next to its name in the Status column.</para>
+ </section>
+
+
+ <title>Server Container Preferences</title>
+ <para><diffmk:wrapper diffmk:change="added">You can control how </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> interacts with server containers in the
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. Double-click the server to open it in the editor.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Server Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here you can specify some common settings: host name, server
+ name, runtime as well as settings related to the publishing, timeouts and server ports.</diffmk:wrapper></para>
+
+ </section>
+ <section id="JBossInstances">
+
+ <title>How to Use Your Own JBoss AS Instance with JBDS</title>
+ <para><diffmk:wrapper diffmk:change="changed">Although </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> works closely with </diffmk:wrapper><property diffmk:change="added" moreinfo="none">JBoss EAP 4.2</property><diffmk:wrapper diffmk:change="changed">
+ we do not ultimately tie you to any particular server for deployment. There are some
+ servers that Studio supports directly (via the bundled Eclipse WTP plug-ins). In this
+ section we discuss how to manage self-installed JBoss AS. Suppose you want to deploy the
+ application to </diffmk:wrapper><property moreinfo="none">JBoss 4.2.1 server</property><diffmk:wrapper diffmk:change="changed">. First of all you need to install
+ it.</diffmk:wrapper></para>
+ <section id="JBossInstalling">
+
+ <title>JBoss AS Installation</title>
+ <itemizedlist>
+ <listitem>
+ <para>Download the binary package of <property moreinfo="none">JBoss 4.2.1</property><diffmk:wrapper diffmk:change="changed"> and save
+ it on your computer: </diffmk:wrapper><ulink url="http://labs.jboss.com/jbossas/downloads">http://labs.jboss.com/jbossas/downloads</ulink></para>
+ </listitem>
+ </itemizedlist>
+ <para>It does not matter where on your system you install JBoss server.</para>
+
+ <note>
+ <title>Note:</title>
+ <para><diffmk:wrapper diffmk:change="changed">The installation of JBoss server into a directory that has a name containing
+ spaces provokes problems in some situations with Sun-based VMs. Try to avoid
+ using installation folders that have spaces in their names.</diffmk:wrapper></para>
+ </note>
+
+ <para><diffmk:wrapper diffmk:change="changed">There is no requirement for root access to run JBoss Server on UNIX/Linux systems
+ because none of the default ports are within the 0-1023 privileged port range.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">After you have the binary archive you want to install, use the JDK jar
+ tool (or any other ZIP extraction tool) to extract the jboss-4.2.1.zip
+ archive contents into a location of your choice. The jboss-4.2.1.tgz archive
+ is a gzipped tar file that requires a gnutar compatible tar which can handle
+ the long pathnames in the archive. The extraction process will create a
+ jboss-4.2.1 directory. </diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="AddingJBossServer">
+
+ <title><diffmk:wrapper diffmk:change="changed">Adding and configuring JBoss Server</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">Now we should add just installed server into server manager in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer
+ Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Open the JBoss Server View by selecting <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Window > Show View > Other > Server
+ > JBoss Server View</diffmk:wrapper></property>
+ </emphasis>. You will see JBoss Server view.</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere in this view and select <emphasis>
+ <property moreinfo="none">New Server</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss, a division of Red Hat > JBoss v4.2</property>
+ </emphasis> and click the <emphasis>
+ <property moreinfo="none">Installed Runtimes</property>
+ </emphasis> button to select a new installed runtime.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Selecting Server Type</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> button to add a new JBoss runtime.</diffmk:wrapper></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss, a division of Red Hat > JBoss v4.2</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Installed Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">In the next step make JBoss Developer Studio to know where you have
+ installed the server and define JRE.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Defining JBoss Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para><diffmk:wrapper diffmk:change="changed">When adding a new server you will need to specify what JRE to use. It is
+ important to set this value to a full JDK, not JRE. Again, you need a full JDK
+ to run Web applications, JRE will not be enough.</diffmk:wrapper></para>
+ </note>
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">In the following window leave all settings default or give your name to a
+ new jboss server and press </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Adding New Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A new runtime will now appear in the <emphasis>
+ <property moreinfo="none">Preferences > Server > Installed Runtimes</property>
+ </emphasis> dialog.</para>
+ <figure float="0">
+ <title>Runtime is Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed">. Then select a new added runtime in Server runtime drop down
+ list and click </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button twice.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Choosing Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the next dialog verify a <property moreinfo="none">JBoss</property><diffmk:wrapper diffmk:change="changed"> runtime information
+ and if something is unfair go back and correct it.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">In the last wizard's dialog modify the projects that are
+ configured on the server and click </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Configuring Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A new JBoss server should now appear in JBoss Server View.</para>
+ <figure float="0">
+ <title>New JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/manage/manage_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, we are ready to create the first web application.</para>
+ </section>
+
+ </section>
+ </chapter>
+<chapter id="jsp_application" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml" xreflabel="jsp_application">
+ <?dbhtml filename="jsp_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSP</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Developing a simple JSP web application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use Seam.</para>
+ </note>
+
+ <para>In this chapter you'll find out how to create a simple <ulink url="http://java.sun.com/products/jsp/">JSP</ulink><diffmk:wrapper diffmk:change="added"> application using the
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. The application will show a classic
+ "Hello World!" on the page.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="added">We'll assume that you have already launched </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer
+ Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> and also that the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Web Development</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> perspective is the
+ current perspective. If not, make it active by selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Window > Open Perspective > Web Development</property>
+ </emphasis> from the menu bar or by selecting <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other...</property>
+ </emphasis> from the menu bar and then selecting Web Development from the Select Perspective
+ dialog box.</para>
+
+ <section id="SettingUpTheProject">
+ <?dbhtml filename="SettingUpTheProject.html"?>
+ <title>Setting Up the Project</title>
+ <para><diffmk:wrapper diffmk:change="changed">We are going to start with the creating a Dynamic Web Project with a minimal
+ structure, i.e. with just required facets. Thus this section will perform you all
+ necessary steps on how to do this.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Go to the menu bar and select <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">File > New > Other...</diffmk:wrapper></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Web > Dynamic Web Project</property>
+ </emphasis> in the New Project dialog box</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Enter "jspHello" as a project name</para>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">Then select </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Minimal Configuration</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> from the list of possible configurations and click </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">The </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">jspHello</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> node should appear in the upper-left </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Package Explorer</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ view.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>New Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingJSPPage">
+
+ <title>Creating JSP Page</title>
+ <para>This section covers all the points how to create, edit and then preview JSP page.</para>
+ <para><diffmk:wrapper diffmk:change="added">In our simple application we need to create only one JSP page which displays a
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">"Hello World!"</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> message.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">WebContent > New >
+ JSP</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type "hello.jsp" for a file name and click the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>In the next window you can choose a template for your jsp page and see its preview.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New JSP File (xhtml)</property>
+ </emphasis> template and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">Our </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hello.jsp</diffmk:wrapper></property></emphasis><diffmk:wrapper diffmk:change="added"> page will now appear in
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Explorer</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.
+ </diffmk:wrapper></para>
+ <section id="EditingJSPPage">
+ <?dbhtml filename="EditingJSPPage.html"?>
+ <title>Editing a JSP Page</title>
+ <para><diffmk:wrapper diffmk:change="added">Let's now make a little change so that a jsp page displays
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">"Hello World!"</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> message.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Insert this line inside the <emphasis role="bold">
+ <property moreinfo="none"><body></property>
+ </emphasis><emphasis role="bold">
+ <property moreinfo="none"></body></property>
+ </emphasis> tag: </para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<% System.out.println("Hello World!"); %>]]>
+</programlisting>
+
+ <para>Notice that content assist functionality is always available when you are typing:</para>
+ <figure float="0">
+ <title>Content Assist in JSP Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">After changes made your </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hello.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> page should look like this:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Hello.jsp Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">This line will actually output </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">"Hello
+ World!"</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> message in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Console</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. To make the
+ message displayed in the Browser, just replace this line with the simple
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">Hello World!</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </section>
+
+ <section id="WebXML">
+ <?dbhtml filename="WebXML.html"?>
+ <title>web.xml file</title>
+ <para><diffmk:wrapper diffmk:change="added">When you are creating web project the wizard creates the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> for you automatically. The </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml file editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ provided by </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is available in two modes:
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Tree</diffmk:wrapper></property> and <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Source</diffmk:wrapper></property>.</para>
+ <figure float="0">
+ <title>Web.xml in Design and Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_6.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">Both modes are fully synchronized. Let's add mapping to our </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hello.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> page in </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> file.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Source</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> tab.</diffmk:wrapper></para>
+ </listitem>
+ <listitem>
+ <para>Add the next code into <emphasis role="bold">
+ <property moreinfo="none"><welcome-file-list></property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<welcome-file>hello.jsp</welcome-file>
+]]></programlisting>
+ <para><diffmk:wrapper diffmk:change="added">If you come back to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Tree</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> mode you will see that the changes
+ made are automatically reflected in that mode.</diffmk:wrapper></para>
+ <para>Actually you don't really need to do any configurations right now.</para>
+ </section>
+
+ <section id="DeployTheProject">
+ <?dbhtml filename="DeployTheProject.html"?>
+ <title>Deploying the project</title>
+ <para><diffmk:wrapper diffmk:change="added">While creating any web project you could experience a pain writing ant scripts and
+ managing the packaging even when writing the most trivial web applications. With
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you are saved from such a pain. All
+ you need is to start </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> and launch your application
+ in your favorite browser.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="added">You can also create a war archive with </diffmk:wrapper><ulink diffmk:change="added" url="../../as/html_single/index.html#Project_archivesView"><diffmk:wrapper diffmk:change="added">JBDS's Archive Tools</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">
+ and export it to any web server.</diffmk:wrapper></para>
+ <section id="WarConfig">
+ <?dbhtml filename="WarConfig.html"?>
+ <title>WAR Config</title>
+ <para>Project archives managing is available through <ulink diffmk:change="added" url="../../as/html_single/index.html#Project_archivesView"><diffmk:wrapper diffmk:change="added">Project Archives view</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Window > Show view > Other > JBoss
+ Tools > Project archives</property>
+ </emphasis> from menu bar</para>
+ </listitem>
+ <listitem>
+ <para>Select a project in Package Explorer you want to be archived</para>
+ </listitem>
+ </itemizedlist>
+ <para><diffmk:wrapper diffmk:change="added">In </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Archives</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you will see available archive types
+ for the project:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Project Archives</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click, for example, <emphasis>
+ <property moreinfo="none">WAR</property>
+ </emphasis> option to create war archive</para>
+ </listitem>
+ </itemizedlist>
+ <para><diffmk:wrapper diffmk:change="added">In the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New WAR</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> dialog you can see automatically selected
+ default values.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>New WAR Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> to see a stub archive configuration for your project: <figure float="0">
+ <title>Stub Archive Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="changed"> The
+ </diffmk:wrapper><emphasis>.war</emphasis><diffmk:wrapper diffmk:change="added"> file will appear in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Package
+ Explorer</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> and also in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Archives</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ view as structure tree: </diffmk:wrapper><figure float="0">
+ <title>Archive is Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Archive in Project Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para><diffmk:wrapper diffmk:change="added">Via </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Archives</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> view you could now edit your
+ archive, add new folders, publish to server, and so on:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Configure Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="AutoRedeploy">
+ <?dbhtml filename="AutoRedeploy.html"?>
+ <title>Auto redeploy</title>
+ <para><diffmk:wrapper diffmk:change="added">When you are creating a web application and register it on </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> it is automatically deployed into
+ </diffmk:wrapper><emphasis>/deploy</emphasis><diffmk:wrapper diffmk:change="added"> directory of the server. JBDS comes with the
+ feature of auto-redeploy. It means that you don't need to restart
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. Any changes made in the application in
+ exploded format will trigger a redeployment on the server.</diffmk:wrapper></para>
+ </section>
+ </section>
+
+ <section id="Previewtab">
+ <?dbhtml filename="Previewtab.html"?>
+ <title>JSP Page Preview</title>
+ <para><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBDS</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> comes with JSP design-time preview features. When
+ designing JSP pages you can easily preview how they will look during runtime. You
+ can even </diffmk:wrapper><ulink diffmk:change="added" url="../../jsf/html_single/index.html#el_exp_para"><diffmk:wrapper diffmk:change="added">attach your stylesheet to the
+ Preview</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">Make a little change to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hello.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> page, e.g. put this code snippet:</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%= new java.util.Date() %>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">Switch to Preview page by clicking </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Preview</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> tab at the
+ bottom of the page. You will see how the page will look at runtime.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <!-- <figure>
+ <title>Preview Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_14.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+-->
+ </section>
+ <section id="LaunchingTheProject">
+ <?dbhtml filename="LaunchingTheProject.html"?>
+ <title>Launch JSP Project</title>
+ <para><diffmk:wrapper diffmk:change="added">Let's now launch our project on server. We'll use
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> that is shipped with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer
+ Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. You can do it by performing one of the following actions:</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="added">Start JBoss Server from </diffmk:wrapper><ulink diffmk:change="added" url="../../as/html_single/index.html#JBossServerView"><diffmk:wrapper diffmk:change="added">JBoss
+ Server view</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> by clicking the Start icon.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Starting Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click the Run icon or right click your project folder and select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> If you
+ haven't made any changes in </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">web.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> file or cleared it out you can launch the application by right
+ clicking the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">hello.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> page and selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Run on the Server</property><diffmk:wrapper diffmk:change="changed">. </diffmk:wrapper></emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Run Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">You should see the next page in a Browser :</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Running Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsp_application/jsp_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Thus with the help of this chapter you've learnt how to organize a Dynamic
+ Web Project with a minimal configuration, add any staff to it (in our case it's
+ just one jsp page) and deploy and run it on the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ shipped with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBDS</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.
+ </diffmk:wrapper></para>
+ </section>
+
+ </section>
+</chapter>
+
+
+<chapter id="rad_jsf_application" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/rad_jsf_application.xml" xreflabel="rad_jsf_application">
+ <?dbhtml filename="rad_jsf_application.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JSF</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>RAD</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>RAD development of a simple JSF application</title>
+
+ <note>
+ <title>Note:</title>
+ <para>We highly recommend developing in <property moreinfo="none">Seam</property>. This chapter is for users
+ who for some reason cannot use <property moreinfo="none">Seam</property>.</para>
+ </note>
+
+ <para>In this chapter you will see how to create a simple JSF application being based on
+ <property moreinfo="none">"RAD"</property> philosophy. We will create the familiar
+ Guess Number application. The scenario is the following. You are asked to guess a number
+ between 0 and 100. If the guess is correct, a success page is displayed with a link to play
+ again. If the guess is incorrect, a message is printed notifying that a smaller or a larger
+ number should be entered and the game continues.</para>
+ <para>We'll show you how to create such an application from scratch, along the way
+ demonstrating powerful features of JBoss Developer Studio such as project templating, Visual
+ Page Editor, code completion and others. You will design the JSF application and then run
+ the application from inside JBoss Developer Studio using the bundled JBoss server.</para>
+
+ <section id="SettingUpTheProject12">
+ <?dbhtml filename="SettingUpTheProject12.html"?>
+ <title>Setting up the project</title>
+ <para>First, you should create a JSF 1.2 project using an integrated JBDS's new
+ project wizard and predefined templates. Follow the next steps:</para>
+ <itemizedlist>
+ <listitem>
+ <para>In Web Projects View (if it is not open select <emphasis>
+ <property moreinfo="none">Window > Show View > Others > JBoss Tools Web
+ > Web Projects View</property>) </emphasis> click <emphasis>
+ <property moreinfo="none">Create New JSF Project</property>
+ </emphasis> button. <figure float="0">
+ <title>Create New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure></para>
+ </listitem>
+
+ <listitem>
+ <para>Put <property moreinfo="none">GuessNumber</property> as a project name, in JSF Environment
+ drop down list choose <property moreinfo="none">JSF 1.2</property></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as it is and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Our project will appear in Project Explorer and Web Projects Views. As you can see
+ JBoss Developer Studio has created for us the whole skeleton for the project with all
+ needed libraries, faces-config.xml and web.xml files.</para>
+ <figure float="0">
+ <title>New JSF Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As the project has been set up, new JSP pages should be created now.</para>
+ </section>
+ <section id="CreatingJSPPages">
+ <?dbhtml filename="CreatingJSPPages.html"?>
+ <title>Creating JSP Pages</title>
+
+ <para>Here, we are going to add two pages to our application. The first page is
+ inputnumber.jsp. It prompts you to enter a number. If the guess is incorrect, the same
+ page will be redisplayed with a message indicating whether a smaller or a larger number
+ should be tried. The second page is success.jsp. This page will be shown after you guess
+ the number correctly. From this page you also have the option to play the game again.</para>
+
+ <para>Now, we will guide you through the steps on how to do this.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open <emphasis>
+ <property moreinfo="none">faces-config.xml</property>
+ </emphasis> file</para>
+ </listitem>
+ <listitem>
+ <para>Right click anywhere on the diagram mode</para>
+ </listitem>
+ <listitem>
+ <para>From the context menu select <emphasis>
+ <property moreinfo="none">New View</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Create New View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">pages/inputnumber</property>
+ </emphasis> as the value for <emphasis>
+ <property moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Leave everything else as is and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In the same way create another jsf view. Type <emphasis>
+ <property moreinfo="none">pages/success</property>
+ </emphasis> as the value for <emphasis>
+ <property moreinfo="none">From-view-id</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>On the diagram you will see two created views.</para>
+ <figure float="0">
+ <title>New Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="CreatingTransition">
+ <?dbhtml filename="CreatingTransition.html"?>
+ <title>Creating Transition between two views</title>
+ <para>Then, we should create connection between jsp pages.</para>
+ <itemizedlist>
+ <listitem>
+ <para>In the diagram, select the <emphasis>
+ <property moreinfo="none">Create New Connection</property>
+ </emphasis> icon third from the top along the upper left side of the diagram to
+ get an arrow cursor with a two-pronged plug at the arrow's bottom <figure float="0">
+ <title>Create Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Click on the <emphasis>
+ <property moreinfo="none">pages/inputnumber</property>
+ </emphasis> page icon and then click on the <emphasis>
+ <property moreinfo="none">pages/success</property>
+ </emphasis> page icon</para>
+ </listitem>
+ </itemizedlist>
+ <para>A transition should appear between the two icons of views.</para>
+ <figure float="0">
+ <title>Created Connection</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section id="CreatingResourceFile">
+ <?dbhtml filename="CreatingResourceFile.html"?>
+ <title>Creating Resource File</title>
+ <para>A resource file is just a file with a <emphasis>.properties</emphasis> extension for
+ collecting text messages in one central place. JBoss Developer Studio allows you to
+ create quickly a resource file. The messages stored in resource file can be displayed to
+ you on a Web page during application execution. </para>
+ <para>With resource file first, you don't hard code anything into the JSP pages.
+ And second, it makes it easier to translate your application to other languages. All you
+ have to do is to translate all your messages to the other language and save them in a
+ new properties file with a name that ends with the appropriate ISO-639 language code.</para>
+ <para>It is a good idea to keep your resources inside the <emphasis>
+ <property moreinfo="none">JavaSource</property>
+ </emphasis> folder, where you keep your .java files. Every time you build the project,
+ all <emphasis>.properties</emphasis> files will then be copied to the
+ <emphasis>classes</emphasis> folder by default.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">JavaSource</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">New > Folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">game</property>
+ </emphasis> for Folder name and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>Your resource file and java bean will be stored in this folder.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click on <emphasis>
+ <property moreinfo="none">game folder</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">New > Properties File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">messages</property>
+ </emphasis> as the value for "name" attribute and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>JBoss Developer Studio will automatically open
+ <property moreinfo="none">messages.properties</property> file for editing.</para>
+ <figure float="0">
+ <title>Messages.properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button for adding new attribute to your resource file</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis role="italic">
+ <property moreinfo="none">how_to_play</property>
+ </emphasis> for "name" and <emphasis role="italic">
+ <property moreinfo="none">Please pick a number between 0 and 100.</property>
+ </emphasis> for value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In such a way add the next properties:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[makeguess_button=Make Guess
+trayagain_button=Play Again?
+success_text=How cool.. You have guessed the number, {0} is correct!
+tryagain_smaller=Oops..incorrect guess. Please try a smaller number.
+tryagain_bigger=Oops..incorrect guess. Please try a bigger number.
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">File > Save</property>
+ </emphasis> from the menu bar</para>
+ </listitem>
+ </itemizedlist>
+ <para>Your .properties file should now look like follows:</para>
+ <figure float="0">
+ <title>Properties are Added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><emphasis>
+ <property moreinfo="none">Up</property></emphasis>
+ and <emphasis>
+ <property moreinfo="none">Down</property>
+ </emphasis> buttons allow you to move you attribute on the list. For delete the attribute, choose it and press <emphasis>
+ <property moreinfo="none">Delete</property></emphasis> button.</para>
+ <para>If you want to change a value or a name of your attribute, click on it and than on <emphasis>
+ <property moreinfo="none">Edit</property></emphasis> button.</para>
+ </section>
+
+ <section id="CreatingJavaBean">
+ <?dbhtml filename="CreatingJavaBean.html"?>
+ <title>Creating Java Bean</title>
+ <para>In this section you'll see how to create a Java bean that will hold business
+ logic of our application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">game folder</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">New > Class</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">NumberBean</property>
+ </emphasis> for bean name</para>
+ </listitem>
+ </itemizedlist>
+ <para>A java bean is created.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Declare the variable of your entered number:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[Integer userNumber;
+]]></programlisting>
+ <para>JBDS allows to quickly generate getters and setters for java bean.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">NumberBean.java</property>
+ </emphasis> in Package Explorer</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">Source > Generate Getters and Setters...</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Check <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> box and click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis>
+ <figure float="0">
+ <title>Generate Getters and Setters</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Add the declaration of the second variable</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[int randomNumber;
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>.. other bean methods:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[public NumberBean ()
+{
+ randomNumber = (int)(Math.random()*100);
+ System.out.println ( "Random number: "+randomNumber);
+ }
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+ public String checkGuess ()
+ {
+
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+else
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle = ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>And the import declarations:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+]]></programlisting>
+ <para>The whole java bean should look as follows:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpSession;
+import javax.faces.application.FacesMessage;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+public class NumberBean
+{
+ Integer userNumber;
+ int randomNumber; // random number generated by application
+public Integer getUserNumber ()
+ {
+ return userNumber;
+ }
+ public void setUserNumber (Integer value)
+ {
+ this.userNumber = value;
+ }
+
+ // constructor, generates random number
+ public NumberBean ()
+ {
+ randomNumber = (int)(Math.random()*100);
+ System.out.println (
+ "Random number: " + randomNumber);
+ }
+
+ public String playagain ()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ HttpSession session =
+ (HttpSession) context.getExternalContext().getSession(false);
+ session.invalidate();
+ return "playagain";
+ }
+
+ // check if user guessed the number
+ public String checkGuess ()
+ {
+ // if guessed, return 'success' for navigation
+ if ( userNumber.intValue() == randomNumber )
+ {
+ return "success";
+ }
+ // incorrect guess
+ else
+ {
+ // get a reference to properties file to retrieve messages
+ FacesContext context = FacesContext.getCurrentInstance();
+ ResourceBundle bundle =
+ ResourceBundle.getBundle("game.messages",
+ context.getViewRoot().getLocale());
+ String msg = "";
+ // if number is bigger, get appropriate message
+ if ( userNumber.intValue() > randomNumber )
+ msg = bundle.getString("tryagain_smaller");
+ else // if number smaller, get appropriate message
+ msg = bundle.getString("tryagain_bigger");
+
+ // add message to be displayed on the page via <h:messages> tag
+ context.addMessage (null, new FacesMessage(msg));
+ // return 'tryagain' for navigation
+ return "tryagain";
+ }
+ }
+}
+]]></programlisting>
+ </section>
+
+ <section id="EditingFacesConfig">
+ <?dbhtml filename="EditingFacesConfig.html"?>
+ <title>Editing faces-config.xml File</title>
+ <para>In this section you know about faces-config.xml file.</para>
+ <para>This file holds two navigation rules and defines the backing bean used.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open faces-config.xml file in a source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add here one more navigation rule and a managed bean declarations that the
+ content of the file looks like this:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee
+xmlns:xi="http://www.w3.org/2001/XInclude"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2_.xsd">
+
+ <navigation-rule>
+ <from-view-id>*</from-view-id>
+ <navigation-case>
+ <from-outcome>playagain</from-outcome>
+ <to-view-id>/pages/inputnumber.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <navigation-rule>
+ <from-view-id>/pages/inputnumber.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/pages/success.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <managed-bean>
+ <managed-bean-name>NumberBean</managed-bean-name>
+ <managed-bean-class>game.NumberBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+</faces-config>
+]]></programlisting>
+ <para>The first navigation rule states that from any page (<property moreinfo="none">*</property> stands for
+ any page) an outcome of playagain will take you to <emphasis>
+ <property moreinfo="none">/pages/inputnumber.jsp</property>
+ </emphasis>. Outcome values are returned from backing bean methods in this example. The
+ second navigation rule states that if you are at the page <emphasis>
+ <property moreinfo="none">/pages/inputnumber.jsp</property>
+ </emphasis>, and the outcome is success, then navigate to the <emphasis>
+ <property moreinfo="none">/pages/success.jsp</property>
+ </emphasis> page. </para>
+ </section>
+ <section id="EditingTheJSPViewFiles2">
+ <?dbhtml filename="EditingTheJSPViewFiles2.html"?>
+ <title>Editing the JSP View Files</title>
+ <para>Now, we will continue editing the JSP files for our two "views" using
+ Visual Page Editor.</para>
+ <section id="EditingInputjsp">
+ <?dbhtml filename="EditingInputjsp.html"?>
+ <title>Editing inputnumber.jsp page</title>
+ <para>First, let's dwell on how to edit inputnumber.jsp.</para>
+ <para>On this page we will have an output text component displaying a message, a text
+ field for user's number entering and a button for input submission.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Open inputnumber.jsp by double-clicking on the <emphasis>
+ <property moreinfo="none">/pages/inputnumber. jsp</property>
+ </emphasis> icon</para>
+ </listitem>
+ </itemizedlist>
+ <para>The Visual Page Editor will open in a screen split between source code along the
+ top and a WYSIWIG view along the bottom. You can see that some JSF code will be
+ already generated as we choose a template when creating the page.</para>
+ <para>At the beginning it's necessary to create a <emphasis role="bold">
+ <property moreinfo="none"><h:form></property>
+ </emphasis> component where all others components are put.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Place the mouse cursor inside <emphasis role="bold">
+ <property moreinfo="none"><f:view></property>
+ </emphasis><emphasis role="bold">
+ <property moreinfo="none"></f:view></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to JBoss Tools Palette and expand JSF HTML folder by selecting
+ it</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis role="bold">
+ <property moreinfo="none"><h:form></property>
+ </emphasis> tag <figure float="0">
+ <title>Insert h:form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>In the dialog Insert Tag select <emphasis>
+ <property moreinfo="none">id</property>
+ </emphasis> and click on this line below the value header. A blinking cursor
+ will appear in a input text field inviting to enter a value of id <figure float="0">
+ <title>Define Id of Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">inputNumbers</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+ <para>In source view you can see the declaration of a form.</para>
+ <figure float="0">
+ <title>Created Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First let's declare the properties file in inputnumber.jsp page using the
+ loadBundle JSF tag.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Put this declaration on the top of a page, right after the first two
+ lines:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<f:loadBundle basename="game.messages" var="msg"/>
+]]></programlisting>
+ <para>As always JBDS provides code assist:</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Visual tab, so it could be possible to work with the editor
+ completely in its WYSIWYG mode</para>
+ </listitem>
+ <listitem>
+ <para>Click on <emphasis>
+ <property moreinfo="none">outputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the blue box in the editor</para>
+ </listitem>
+
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ </itemizedlist>
+ <para>JBDS will nicely propose you to choose within available values:</para>
+ <figure float="0">
+ <title>Choose Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles > msg</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">how_to_play</property>
+ </emphasis> value and click <emphasis>
+ <property moreinfo="none">Ok</property>. </emphasis> Then click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis>
+ <figure float="0">
+ <title>Selecting Value</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>The text will appear on the page:</para>
+ <figure float="0">
+ <title>Created OutputText Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Source mode and insert <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis role="bold">
+ <property moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line.</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property moreinfo="none">inputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the editor after the text.</para>
+ </listitem>
+ <listitem>
+ <para>Switch to a Source mode and insert <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tag after <emphasis role="bold">
+ <property moreinfo="none"><h:outputText></property>
+ </emphasis> component to make a new line</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette click on <emphasis>
+ <property moreinfo="none">inputText</property>, </emphasis> drag the cursor over to the
+ editor, and drop it inside the editor after the text</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Managed Beans > NumberBean</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> value and click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Switch <emphasis>
+ <property moreinfo="none">Advanced</property>
+ </emphasis> tab</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">id</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">userNumber</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">required</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Enumeration</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">true</property>
+ </emphasis> as a value</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Add "required" Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Ok</property>, </emphasis> then click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Go to Source mode</para>
+ </listitem>
+ <listitem>
+ <para>Add the validation attribute to <emphasis role="bold">
+ <property moreinfo="none"><f:validateLongRange></property>
+ </emphasis> for user input validation</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+</h:inputText>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Save</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>Again select <emphasis>
+ <property moreinfo="none">Visual</property>
+ </emphasis> mode</para>
+ </listitem>
+ <listitem>
+ <para>On the Palette, click on <emphasis>
+ <property moreinfo="none">commandButton</property>, </emphasis> drag the cursor over to
+ the editor, and drop it inside the editor after the inputText
+ component.</para>
+ </listitem>
+ <listitem>
+ <para>In the editing dialog select <emphasis>
+ <property moreinfo="none">value</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Click <property moreinfo="none">...</property> button next to the value field</para>
+ </listitem>
+ <listitem>
+ <para>Expand <emphasis>
+ <property moreinfo="none">Resource Bundles > msg</property>
+ </emphasis> and select <emphasis>
+ <property moreinfo="none">makeguess_button</property>
+ </emphasis> as a value</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Select <emphasis>
+ <property moreinfo="none">action</property>
+ </emphasis> and click on this line below "value"
+ header</para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">NumberBean.checkGuess</property>
+ </emphasis> in text field</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>In Source mode add <emphasis role="bold">
+ <property moreinfo="none"><br/></property>
+ </emphasis> tags between <emphasis role="bold">
+ <property moreinfo="none"><outputText></property>
+ </emphasis>, <emphasis role="bold">
+ <property moreinfo="none"><inputText></property>
+ </emphasis> and <emphasis role="bold">
+ <property moreinfo="none"><commandButton></property>
+ </emphasis> components to place them on different lines</para>
+ </listitem>
+ </itemizedlist>
+ <para>inputnumber.jsp page should look like this:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="inputNumbers">
+ <h:outputText value="#{msg.how_to_play}"/>
+ <br/>
+ <h:messages style="color: blue"/>
+ <br/>
+ <h:inputText id="userNumber" value="#{NumberBean.userNumber}" required="true">
+ <f:validateLongRange minimum="0" maximum="100"/>
+ </h:inputText>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.makeguess_button}" action="#{NumberBean.checkGuess}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ </section>
+ <section id="EditingSuccessJsp">
+ <?dbhtml filename="EditingSuccessJsp.html"?>
+ <title>Editing success.jsp page</title>
+ <para>In the same way like inputnumber.jsp, edit success.jsp page. Its whole source
+ should be the next:</para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<f:loadBundle basename="game.messages" var="msg"/>
+
+<html>
+ <f:view>
+ <h:form id="result">
+ <h:outputFormat value="#{msg.success_text}">
+ <f:param value="#{NumberBean.userNumber}"/>
+ </h:outputFormat>
+ <br/><br/>
+ <h:commandButton value=
+ "#{msg.trayagain_button}" action="#{NumberBean.playagain}"/>
+ </h:form>
+ </f:view>
+</html>
+]]></programlisting>
+ <para>Again you can use code assist provided by JBDS when editing jsp page:</para>
+ <figure float="0">
+ <title>Code Assist for <f:param></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_18.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page, success.jsp, is shown if you correctly guessed the number. The
+ <emphasis role="bold">
+ <property moreinfo="none"><h:outputFormat></property>
+ </emphasis> tag will get the value of success_text from the properties file. The {0}
+ in success_text will be substituted for by the value of the value attribute within
+ the <emphasis role="bold">
+ <property moreinfo="none"><f:param></property>
+ </emphasis> tag during runtime.</para>
+ <para>At the end, you have a button which allows you to replay the game. The action
+ value references a backing bean method. In this case, the method only terminates the
+ current session so that when you are shown the first page, the input text box is
+ clear and a new random number is generated.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to Preview mode to see how this page will look in a browser:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Success.jsp in Preview Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section id="CreatingIndexjsp">
+ <?dbhtml filename="CreatingIndexjsp.html"?>
+ <title>Creating index.jsp page</title>
+ <para>Now you know how to create index.jsp page.</para>
+ <para>The index.jsp page is the entry point of our application. It's just
+ forwarding to inputnumber.jsp page.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Right click <emphasis>
+ <property moreinfo="none">WebContent > New > JSP File</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Type <emphasis>
+ <property moreinfo="none">index</property>
+ </emphasis> for name field and choose <emphasis>
+ <property moreinfo="none">JSPRedirect</property>
+ </emphasis> as a template</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>The source for this page should be like the following:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+ <body>
+ <jsp:forward page="/pages/inputnumber.jsf" />
+ </body>
+</html>
+
+]]></programlisting>
+ <para>Note the <emphasis>.jsf</emphasis> extension of a page. It means that we trigger the
+ JSF controller servlet to handle the page according the servlet mapping in the
+ faces-config.xml file.</para>
+ </section>
+ <section id="RunningTheApplication33">
+ <?dbhtml filename="RunningTheApplication33.html"?>
+ <title>Running the Application</title>
+ <para>Finally, we have all the pieces needed to run the application.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Start up JBoss server by clicking on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> icon in JBoss Server view. (If JBoss is already running, stop it by
+ clicking on the red icon and then start it again. After the messages in the
+ Console tabbed view stop scrolling, JBoss is available)</para>
+ </listitem>
+ <listitem>
+ <para>Right-click on project <emphasis>
+ <property moreinfo="none">Run AS > Run on Server</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Play with the application by entering correct as well as incorrect
+ values</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>You are Asked to Enter a Number Between 0 and 100</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Your Input is Validated and an Error Message is Displayed if Invalid Input was
+ Entered</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_21.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>After You Enter a Guess, the Application Tells You Whether a Smaller or a Larger
+ Number Should be Tried</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_22.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Your Guess is Correct</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/rad_jsf_application/rad_jsf_application_23.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+
+
+<chapter diffmk:change="added" id="gsg_faq" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml" xreflabel="gsg_faq">
+ <?dbhtml filename="gsg_faq.html"?>
+ <chapterinfo diffmk:change="added">
+ <keywordset diffmk:change="added">
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">Eclipse</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">Java</diffmk:wrapper></keyword>
+ <keyword diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">FAQ</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">For more information on </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> features, refer to the
+ following FAQ to get the answers on the most "popular" questions.</diffmk:wrapper></para>
+
+ <section diffmk:change="added" id="question_1">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">What should I do if Visual Page Editor does not start under Linux</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Linux users may need to do the following to get the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual Page
+ Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to work correctly on their machines.</diffmk:wrapper></para>
+
+ <orderedlist continuation="restarts" diffmk:change="added" inheritnum="ignore">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On Red Hat based Linux distributions install the xpLib.i386 package</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Type</diffmk:wrapper></para>
+ <programlisting diffmk:change="added" format="linespecific" role="JAVA"><diffmk:wrapper diffmk:change="added"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+]]></diffmk:wrapper></programlisting>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">and/or use</diffmk:wrapper></para>
+ <programlisting diffmk:change="added" format="linespecific" role="JAVA"><diffmk:wrapper diffmk:change="added"><![CDATA[yum install libXp
+]]></diffmk:wrapper></programlisting>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Open the JBDS perspective. If you see the Help view open, close it and restart
+ JBDS</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If none of these work, do the following:</diffmk:wrapper></para>
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Clear the Eclipse log file,
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added"><workspace>\.metadata\.log</diffmk:wrapper></emphasis></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Start Eclipse with the -debug option:</diffmk:wrapper></para>
+ <programlisting diffmk:change="added" format="linespecific" role="JAVA"><diffmk:wrapper diffmk:change="added"><![CDATA[eclipse -debug
+]]></diffmk:wrapper></programlisting>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Post the Eclipse log file
+ (</diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added"><workspace>\.metadata\.log</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">) on
+ the forums.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
+ </section>
+
+ <section diffmk:change="added" id="question_2">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Do I need to have JBoss Server installed to run JBoss Developer Studio?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">No. </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> already comes bundled with JBoss
+ Server. We bundle it together so that you don't need to download any additional
+ software and can test your application in a Web browser right away.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you want to use a different JBoss server installation, after </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ is installed open Servers View (select </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Window > Show View
+ > Others > Server > Servers</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">),</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> then
+ right click on this </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">view > New > Server</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> and follow the wizards steps to point to another Jboss Server installation.</diffmk:wrapper></para>
+ <para diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> works with any servlet container, not just JBoss. For more
+ information on deployment, please see the Deploying Your Application section.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="question_3">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">I have an existing Seam 1.2.1 project. Can I migrate/import the
+ project to a JBDS Seam project?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">We highly recommend you to create Seam 1.2.1 project using the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBDS</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. In other case try
+ to do manually:</diffmk:wrapper></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Create a Seam Web project to get the JBoss tools structure</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Then from your Seam 1.2.1 seam-gen project start doing the following:</diffmk:wrapper></para>
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Copy </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">src</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">src</diffmk:wrapper></property></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Copy </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Web content</diffmk:wrapper></property></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Copy resources individual files to where they are in the seam web project
+ etc.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
+ <section diffmk:change="added" id="questio_4">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">I have an existing Struts or JSF project. Can I open the project
+ in JBDS?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Yes. From main menu select </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">File > Import > Other > JSF Project (or Struts
+ Project)</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> and follow wizards steps.</diffmk:wrapper></para>
+
+ </section>
+
+ <section diffmk:change="added" id="question_5">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Can I import a .war file?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Yes. Select </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">File > Import > Web > WAR
+ file</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> then follow importing steps.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="question_6">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Is it possible to increase the performance of Eclipse after
+ installing your product?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> preconfigures eclipse via the eclipse.ini file to allocate
+ extra memory, but if you for some reason need more memory then by default, you can
+ manually make adjustments in this file. For example:</diffmk:wrapper></para>
+ <programlisting diffmk:change="added" format="linespecific" role="XML">
+ <diffmk:wrapper diffmk:change="added"><![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
+]]></diffmk:wrapper></programlisting>
+ </section>
+
+ <section diffmk:change="added" id="question_7">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">How can I add my own tag library to the JBoss Tools
+ Palette?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">See </diffmk:wrapper><ulink diffmk:change="added" url="../../jsf/html_single/index.html#AddingCustomJSFTagsToTheRedHatPalette7433"><diffmk:wrapper diffmk:change="added">Adding Tag
+ Libraries</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> in Visual Web Tools Guide.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="question_8">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">How to get Code Assist for Seam specific resources in an externally generated
+ project?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To get Code Assist for Seam specific resources in an externally generated project, you
+ should enable Seam features in Project Preferences. Right click an imported project and
+ navigate </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties > Seam Settings</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> Check </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Seam support</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> box to enable all available </diffmk:wrapper><ulink diffmk:change="added" url="../../seam/html_single/index.html#project_pref"><diffmk:wrapper diffmk:change="added">Seam
+ Settings</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="question_9">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">How to import an example Seam project from jboss-eap directory?</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To import an example Seam project from </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">jboss-eap</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> into your working directory, you should perform the following steps:</diffmk:wrapper></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Go to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New > Other > Java Project from Existing Buildfile</diffmk:wrapper></property>
+ </emphasis></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Point to the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">build.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> of any chosen project by pressing </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Browse</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Hit </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to open the project</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">As these seam examples are non WTP projects, next you should enable Seam support for
+ them. To do that, right click the project and go to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties > Seam Settings</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+ </section>
+
+</chapter>
+
+
+<chapter diffmk:change="added" id="further_reading" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml" xreflabel="further_reading">
+ <?dbhtml filename="further_reading.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Further Reading</title>
+
+ <para>
+ <emphasis role="bold">JSF Tools Reference Guide</emphasis>
+ <ulink url="../../jsf_tools_ref_guide/html_single/index.html">(html)</ulink>
+
+ </para>
+ <para> From this guide you'll discover all peculiarities of work at a JSF project. You'll
+ learn all shades that cover the process of project creation and take a closer look at the JSF
+ configuration file. Also you'll get to know managed beans and how to work with them and
+ find out, how to create and register a custom converter, custom validator and referenced beans
+ in a JSF project. </para>
+
+<itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">JSF Tools Tutorial</emphasis>
+ <ulink url="../../jsf_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This tutorial will describe how to deal with classic/old style of JSF development and how
+ to create a simple JSF application using the JBoss Developer Studio. </para>
+ </listitem>
+
+ <listitem diffmk:change="added"> <para>
+ <emphasis role="bold">Struts Tools Reference Guide</emphasis>
+ <ulink url="../../struts_tools_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para> In Struts Tools Reference Guide you will learn how to create and work with a new struts
+ project. This guide also provides information about graphical editor for struts configuration
+ files, tiles files, and struts validation files. </para>
+ </listitem>
+
+<listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">Struts Tools Tutorial</emphasis>
+ <ulink url="../../struts_tools_tutorial/html_single/index.html">(html)</ulink>
+ </para>
+ <para><diffmk:wrapper diffmk:change="changed"> This tutorial will describe the classical style of Struts development, and will
+ step-by-step show you how to create a simple Struts application in JBoss Developer Studio.</diffmk:wrapper></para>
+</listitem>
+
+<listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">Seam Dev Tools Reference Guide</emphasis>
+ <ulink url="../../seam/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide helps you to understand what Seam is and how to install Seam plug-in into
+ Eclipse. It tells you the necessary steps to start working with Seam Framework and assists in a
+ simple Seam Project creation. Also you will learn how to create and run the CRUD Database
+ Application with Seam as well as find out what Seam Editors Features and Seam Components are. </para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">Visual Web Tools Reference Guide</emphasis>
+ <ulink url="../../jsf/html_single/index.html">(html)</ulink>
+ </para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">JBoss Server Manager Reference Guide</emphasis>
+ <ulink url="../../as/html_single/index.html">(html)</ulink>
+ </para>
+ <para> This guide covers the basics of working with the JBoss server manager. You will read how to
+ install runtimes and servers and quickly learn how to configure, start, stop the server and know
+ how deployment and archiving process. You will find out how to manage installed JBoss Servers
+ via JBoss AS Perspective. You will also read how to deploy modules onto the server. </para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">jBPM Tools Reference Guide</emphasis>
+ <ulink url="../../jbpm/html_single/index.html">(html)</ulink>
+ </para>
+ <para>With jBPM Tools Reference Guide we'll help you to facilitate a cross-product
+ learning and know how you can speed your development using special editors and visual designers.
+ We'll also guide you through the steps on how to create a simple process and test it
+ within jBPM jPDL perspective.</para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">Hibernate Tools Reference Guide</emphasis>
+ <ulink url="../../hibernatetools/html_single/index.html">(html)</ulink>
+ </para>
+ <para>Throughout this guide you will learn how to install and use Hibernate Tools bath via Ant and
+ through Eclipse. We'll supply you with the information on how to create mapping files,
+ configuration file as well as a file for controlling reverse engineering by using specific
+ wizards that Hibernate tooling provides. Also you will know about Code Generation and
+ peculiarities of work within Hibernate Console Perspective.</para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">ESB Editor Reference Guide</emphasis>
+ <ulink url="../../esb_ref_guide/html_single/index.html">(html)</ulink>
+ </para>
+ <para><diffmk:wrapper diffmk:change="changed">This guide provides you with the information on ESB Editor which allows you to develop ESB
+ file.</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added">
+ <emphasis diffmk:change="added" role="bold"><diffmk:wrapper diffmk:change="added">JBoss Portal Tools Reference Guide</diffmk:wrapper></emphasis>
+ <ulink diffmk:change="added" url="../../jboss_portal_tools_ref_guide/html_single/index.html"><diffmk:wrapper diffmk:change="added">(html)</diffmk:wrapper></ulink>
+ </para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The guide gives a detail look at how you can easily build a Portlet Web Application with
+ JBoss Tools and deploy it onto JBoss Portal.</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added">
+ <emphasis diffmk:change="added" role="bold"><diffmk:wrapper diffmk:change="added">JBoss WS User Guide</diffmk:wrapper></emphasis>
+ <ulink diffmk:change="added" url="../../ws_ref_guide/html_single/index.html"><diffmk:wrapper diffmk:change="added">(html)</diffmk:wrapper></ulink>
+ </para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">This guide gives you practical help on JBossWS usage.</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para>
+ <emphasis role="bold">Exadel Studio Migration Guide</emphasis>
+ <ulink url="../../Exadel-migration/html_single/index.html">(html)</ulink>
+ </para>
+ <para>This document is intended to help you to migrate an existing Exadel JSF or Struts projects
+ from Exadel Studio into JBoss Developer Studio. </para>
+ </listitem>
+
+</itemizedlist>
+</chapter>
+
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml 2008-10-30 16:53:28 UTC (rev 11348)
+++ branches/jbosstools-3.0.0.Beta1/documentation/guides/GettingStartedGuide/pom.xml 2008-10-30 16:54:31 UTC (rev 11349)
@@ -41,7 +41,7 @@
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11348 - trunk/esb/docs/esb_ref_guide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 12:53:28 -0400 (Thu, 30 Oct 2008)
New Revision: 11348
Modified:
trunk/esb/docs/esb_ref_guide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/esb/docs/esb_ref_guide/en/master.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-30 16:52:59 UTC (rev 11347)
+++ trunk/esb/docs/esb_ref_guide/en/master.xml 2008-10-30 16:53:28 UTC (rev 11348)
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"?http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
-[
-<!ENTITY introduction SYSTEM "modules/introduction.xml">
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
<!ENTITY esb_support SYSTEM "modules/esb_support.xml">
<!ENTITY esb_editor SYSTEM "modules/esb_editor.xml">
@@ -21,9 +20,9 @@
]>
<book>
+
<bookinfo>
<title>ESB Tools Reference Guide</title>
-
<author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
<author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
@@ -47,8 +46,8 @@
</bookinfo>
<toc/>
- &introduction;
- &esb_support;
- &esb_editor;
+ &introduction;
+ &esb_support;
+ &esb_editor;
</book>
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r11347 - trunk/documentation/guides/GettingStartedGuide/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 12:52:59 -0400 (Thu, 30 Oct 2008)
New Revision: 11347
Modified:
trunk/documentation/guides/GettingStartedGuide/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/documentation/guides/GettingStartedGuide/en/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-10-30 16:52:44 UTC (rev 11346)
+++ trunk/documentation/guides/GettingStartedGuide/en/master.xml 2008-10-30 16:52:59 UTC (rev 11347)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"?http://www.docbook.org/xsd/4.3/docbook.xsd"
-
-[<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+[
+<!ENTITY getting_started SYSTEM "modules/getting_started.xml">
<!ENTITY manage SYSTEM "modules/manage.xml">
<!ENTITY first_seam SYSTEM "modules/first_seam.xml">
<!ENTITY jsp_application SYSTEM "modules/jsp_application.xml">
@@ -20,12 +20,10 @@
<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
-<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
-<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
<!ENTITY jbossportallink "../../jboss_portal_tools_ref_guide/html_single/index.html">
<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
<!ENTITY wslink "../../ws_ref_guide/html_single/index.html">
-
]>
<book>
@@ -38,17 +36,9 @@
<holder>JBoss, a division of Red Hat Inc.</holder>
</copyright>
<releaseinfo>Version: 1.1.0.GA</releaseinfo>
-
-<abstract>
- <title/>
- <para>
- <ulink url="http://download.jboss.org/jbosstools/nightly-docs/en/GettingStartedGuide/...">PDF version</ulink>
- </para>
-</abstract>
-
</bookinfo>
<toc/>
-
+
&getting_started;
&manage;
&first_seam;
@@ -57,5 +47,4 @@
&gsg_faq;
&further_reading;
-
</book>
17 years, 2 months
JBoss Tools SVN: r11346 - trunk/documentation/guides/Exadel-migration/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 12:52:44 -0400 (Thu, 30 Oct 2008)
New Revision: 11346
Modified:
trunk/documentation/guides/Exadel-migration/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the dtd validation schema url;
Modified: trunk/documentation/guides/Exadel-migration/en/master.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/master.xml 2008-10-30 16:50:07 UTC (rev 11345)
+++ trunk/documentation/guides/Exadel-migration/en/master.xml 2008-10-30 16:52:44 UTC (rev 11346)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY jsf_struts SYSTEM "modules/jsf_struts.xml">
<!ENTITY jsf_struts_war SYSTEM "modules/jsf_struts_war.xml">
17 years, 2 months
JBoss Tools SVN: r11345 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-30 12:50:07 -0400 (Thu, 30 Oct 2008)
New Revision: 11345
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/cleanEarth.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/largeMap.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/mapType.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/scale.png
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2924, attributes for navigation controls were added, template was updated.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/cleanEarth.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/cleanEarth.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/largeMap.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/largeMap.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/mapType.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/mapType.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/scale.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/gmap/scale.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-10-30 16:28:11 UTC (rev 11344)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-10-30 16:50:07 UTC (rev 11345)
@@ -203,7 +203,7 @@
* @param fileImageName the file image name
*/
public static void setImg(nsIDOMElement img, String fileImageName) {
- img.setAttribute(HTML.ATTR_SRC, "file://" //$NON-NLS-1$//$NON-NLS-2$
+ img.setAttribute(HTML.ATTR_SRC, "file://" //$NON-NLS-1$
+ getAbsoluteResourcePath(fileImageName).replace('\\', '/'));
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java 2008-10-30 16:28:11 UTC (rev 11344)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesGMapTemplate.java 2008-10-30 16:50:07 UTC (rev 11345)
@@ -11,13 +11,13 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
-import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
-import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -29,47 +29,24 @@
*/
public class RichFacesGMapTemplate extends VpeAbstractTemplate {
- private String IMAGE_NAME = "/gmap/gmap.gif";
+ private static final String CLEAN_EARTH_IMG = "gmap/cleanEarth.png"; //$NON-NLS-1$
+ private static final String GMAP_TYPE_CONTROL_IMG = "gmap/mapType.png"; //$NON-NLS-1$
+ private static final String GLARGE_MAP_CONTROL_IMG = "gmap/largeMap.gif"; //$NON-NLS-1$
+ private static final String GSCALE_CONTROL_IMG = "gmap/scale.png"; //$NON-NLS-1$
- private String STYLE_CLASS_ATTR_NAME="styleClass";
+ private static final String SHOW_LARGE_MAP = "showGLargeMapControl"; //$NON-NLS-1$
+ private static final String SHOW_MAP_TYPE = "showGMapTypeControl"; //$NON-NLS-1$
+ private static final String SHOW_SCALE = "showGScaleControl"; //$NON-NLS-1$
+ private static final String FALSE = "false"; //$NON-NLS-1$
+ private static final String VISIBILITY_HIDDEN = "visibility: hidden;"; //$NON-NLS-1$
+
+// private static final String gmapWrapperStyle ="width: 400px; height: 398px; "; //$NON-NLS-1$
+ private String gmapWrapperStyle ="display: block; overflow: hidden; /*width: 400px; height: 398px;*/ float: left; position: relative; "; //$NON-NLS-1$
+ private String cleanEarthImgStyle ="float: left; position: relative; width: 400px; height: 398px; "; //$NON-NLS-1$
+ private String mapTypeImgStyle ="float: left; position: relative; width: 202px; height: 19px; top: 3px; left: -206px; "; //$NON-NLS-1$
+ private String largeMapImgStyle ="float: left; position: relative; width: 57px; height: 270px; top: 5px; left: -596px; "; //$NON-NLS-1$
+ private String scaleImgStyle ="float: left; position: relative; width: 85px; height: 27px; top: 366px; left: -592px;"; //$NON-NLS-1$
- /*
- * (non-Javadoc)
- *
- * @see com.exadel.vpe.editor.template.VpeAbstractTemplate#removeAttribute(com.exadel.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.Node,
- * java.lang.Object, java.lang.String)
- */
- @Override
- public void removeAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name) {
- super.removeAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name);
- nsIDOMElement img = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- if(STYLE_CLASS_ATTR_NAME.equals(name)){
- img.removeAttribute(HtmlComponentUtil.HTML_CLASS_ATTR);
- } else{
- img.removeAttribute(name);
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.exadel.vpe.editor.template.VpeAbstractTemplate#setAttribute(com.exadel.vpe.editor.context.VpePageContext,
- * org.w3c.dom.Element, org.w3c.dom.Document, org.w3c.dom.Node,
- * java.lang.Object, java.lang.String, java.lang.String)
- */
- @Override
- public void setAttribute(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMNode visualNode, Object data, String name, String value) {
- super.setAttribute(pageContext, sourceElement, visualDocument, visualNode, data, name, value);
- nsIDOMElement img = (nsIDOMElement) visualNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
- img.setAttribute(name, value);
- if(STYLE_CLASS_ATTR_NAME.equals(name)){
- img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,value);
- } else{
- img.setAttribute(name,value);
- }
- }
-
/**
* Create html instead of rich:faces component.
*
@@ -82,19 +59,56 @@
* @return The information on the created node of the visual tree.
*/
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- nsIDOMElement img = visualDocument.createElement("img");
- ComponentUtil.setImg(img, IMAGE_NAME);
- ComponentUtil.copyAttributes(sourceNode, img);
- if(((Element)sourceNode).getAttribute(STYLE_CLASS_ATTR_NAME)!=null){
- img.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,((Element)sourceNode).getAttribute("styleClass"));
- }
- VpeCreationData creationData = new VpeCreationData(img);
+
+ Element sourceElement = (Element) sourceNode;
+
+ String showGLargeMapControl = sourceElement.getAttribute(SHOW_LARGE_MAP);
+ String showGMapTypeControl = sourceElement.getAttribute(SHOW_MAP_TYPE);
+ String showGScaleControl = sourceElement.getAttribute(SHOW_SCALE);
+
+ nsIDOMElement gmapWrapperElement = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement gmapCleanEarhtImg = visualDocument.createElement(HTML.TAG_IMG);
+ nsIDOMElement gmapGMapTypeControlImg = visualDocument.createElement(HTML.TAG_IMG);
+ nsIDOMElement gmapGLargeMapControlImg = visualDocument.createElement(HTML.TAG_IMG);
+ nsIDOMElement gmapGScaleControlImg = visualDocument.createElement(HTML.TAG_IMG);
+
+ ComponentUtil.setImg(gmapCleanEarhtImg, CLEAN_EARTH_IMG);
+ ComponentUtil.setImg(gmapGMapTypeControlImg, GMAP_TYPE_CONTROL_IMG);
+ ComponentUtil.setImg(gmapGLargeMapControlImg, GLARGE_MAP_CONTROL_IMG);
+ ComponentUtil.setImg(gmapGScaleControlImg, GSCALE_CONTROL_IMG);
+
+
+ gmapWrapperElement.appendChild(gmapCleanEarhtImg);
+ gmapWrapperElement.appendChild(gmapGMapTypeControlImg);
+ gmapWrapperElement.appendChild(gmapGLargeMapControlImg);
+ gmapWrapperElement.appendChild(gmapGScaleControlImg);
+
+ if (FALSE.equalsIgnoreCase(showGMapTypeControl)) {
+ mapTypeImgStyle += VISIBILITY_HIDDEN;
+ }
+ if (FALSE.equalsIgnoreCase(showGLargeMapControl)) {
+ largeMapImgStyle += VISIBILITY_HIDDEN;
+ }
+ if (FALSE.equalsIgnoreCase(showGScaleControl)) {
+ scaleImgStyle += VISIBILITY_HIDDEN;
+ }
+
+ gmapWrapperElement.setAttribute(HTML.ATTR_STYLE, gmapWrapperStyle);
+ gmapCleanEarhtImg.setAttribute(HTML.ATTR_STYLE, cleanEarthImgStyle);
+ gmapGMapTypeControlImg.setAttribute(HTML.ATTR_STYLE, mapTypeImgStyle);
+ gmapGLargeMapControlImg.setAttribute(HTML.ATTR_STYLE, largeMapImgStyle);
+ gmapGScaleControlImg.setAttribute(HTML.ATTR_STYLE, scaleImgStyle);
+
+ VpeCreationData creationData = new VpeCreationData(gmapWrapperElement);
return creationData;
}
- @Override
- public void resize(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Object data, int resizerConstrains, int top, int left, int width, int height) {
- super.resize(pageContext, sourceElement, visualDocument, visualElement, data, resizerConstrains, top, left, width, height);
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
}
+
+
}
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r11344 - branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-10-30 12:28:11 -0400 (Thu, 30 Oct 2008)
New Revision: 11344
Modified:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBDS-461
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 16:03:10 UTC (rev 11343)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 16:28:11 UTC (rev 11344)
@@ -117,8 +117,8 @@
return;
}
JstFirstRunPlugin.getDefault().getPreferenceStore().setValue(FIRST_START_PREFERENCE_NAME, false);
-
- File serversFile = new File(SERVERS_FILE);
+ String pluginLocation = FileLocator.resolve(JstFirstRunPlugin.getDefault().getBundle().getEntry("/")).getPath();
+ File serversFile = new File(pluginLocation, SERVERS_FILE);
if(serversFile.exists()){
String str = FileUtil.readFile(serversFile);
int position = 0;
@@ -177,7 +177,7 @@
}
String jbossASLocation = null;
- String pluginLocation = FileLocator.resolve(JstFirstRunPlugin.getDefault().getBundle().getEntry("/")).getPath();
+
File jbossASDir = new File(pluginLocation, JBOSS_AS_HOME);
if (jbossASDir.isDirectory()) {
jbossASLocation = jbossASDir.getAbsolutePath();
17 years, 2 months
JBoss Tools SVN: r11343 - in branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide: en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-30 12:03:10 -0400 (Thu, 30 Oct 2008)
New Revision: 11343
Added:
branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/en/master_output.xml 2008-10-30 16:03:10 UTC (rev 11343)
@@ -0,0 +1,3986 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY Visual_Web_Tools SYSTEM "modules/Visual_Web_Tools.xml">
+<!ENTITY springTools SYSTEM "modules/spring_tools.xml">
+<!ENTITY editors SYSTEM "modules/editors.xml">
+<!ENTITY palette SYSTEM "modules/palette.xml">
+<!ENTITY web_projects SYSTEM "modules/web_projects.xml">
+<!ENTITY preferences SYSTEM "modules/preferences.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Visual Web Tools Reference Guide</title>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo>
+ Version: 1.1.0.GA
+ </releaseinfo>
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/jsf/pdf/Visual_Web_T..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+<toc></toc><chapter id="Visual_Web_Tools" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml" xreflabel="Visual_Web_Tools">
+ <?dbhtml filename="Visual_Web_Tools.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Java</keyword>
+ <keyword>Web Tools</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Visual Web Tools</title>
+
+ <para>This guide covers the usage of Visual Web Tools in <property moreinfo="none">JBoss Developer
+ Studio</property> and <property moreinfo="none">JBoss Tools</property>. The difference between these products is
+ that JBoss Tools are just a set of Eclipse plugins where JBoss Developer Studio adds the following functionality:</para>
+ <itemizedlist>
+ <listitem>
+ <para>an installer</para>
+ </listitem>
+ <listitem>
+ <para>Eclipse and Web Tools preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>JBoss EAP with JBoss AS and Seam preconfigured</para>
+ </listitem>
+ <listitem>
+ <para>3rd party plugins bundled and configured</para>
+ </listitem>
+ <listitem>
+ <para>access to RHEL and Red Hat Network</para>
+ </listitem>
+ <listitem>
+ <para>access to the JBoss/Red Hat supported software</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>For additional information, please visit the JBoss Developer Studio home page at: <ulink url="http://www.jboss.com/products/devstudio">http://www.jboss.com/products/devstudio</ulink>.</para>
+
+ <para>In JBoss Tools there is an extensive collection of specialized wizards, editors and views
+ that can be used in various scenarios while developing Web applications. The following chapters
+ walk through these features.</para>
+
+ <section id="key_features">
+ <title>Key Features of Visual Web Tools</title>
+ <para>Here is the table of the main features of Visual Web Tools:</para>
+
+ <table>
+
+ <title>Key Functionality for Visual Web Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1" colwidth="2*"></colspec>
+ <colspec colnum="2" colwidth="4*"></colspec>
+ <colspec align="left" colnum="3" colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>Visual Page Editor</entry>
+ <entry>Powerful and customizable visual page editor. Possibility to develop an application
+ using any web technology: jsf, seam, struts, jsp, html and others. Developing using four
+ tabs: visual/source, visual, source and preview. Fast and easy switching between these tabs.
+ Split screen design of visual and source views. Full and instant synchronization between
+ source and visual views. Integration with properties and outline views. Graphical toolbar to
+ add inline styling to any tag.</entry>
+ <entry>
+ <link linkend="visual_page">visual page editor</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>JBoss Tools Palette</entry>
+ <entry>Organizing various tags by groups, inserting tags into a jsp or xhtml page with one
+ click, adding custom or 3rd party tag libraries into the palette, easy controling the number
+ of tag groups shown on the palette.</entry>
+ <entry>
+ <link linkend="palette">jboss tools palette</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Web Projects View</entry>
+ <entry>Visualizing and displaying projects by function. Easy selecting of different kinds of
+ items and dropping them into jsp pages. Using context menus to develop the application. Using
+ icon shortcuts to create and import JSF and Struts projects. Expanding and inspecting tag
+ library files. Selecting custom and third-party tag libraries to drag and drop onto the JBoss
+ Tools Palette.</entry>
+ <entry>
+ <link linkend="web_projects">web projects view</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>OpenOn</entry>
+ <entry>Easy navigation between views and other parts of your projects.</entry>
+ <entry>
+ <link linkend="OpenOnSelection4Hyperlinknavigation">openOn</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Content Assist</entry>
+ <entry><diffmk:wrapper diffmk:change="changed">Code completion proposals while working with html, java, JavaScript , xml, jsp, xhtml, xhtml, seam project
+ and jsf configuration files. Content assist based on project data (dynamic code assist); with
+ graphical editor. Code completion for values from property files, beans attributes and
+ methods, navigation rule outcomes and jsf variables.</diffmk:wrapper></entry>
+ <entry>
+ <link linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">content assist</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>Drag-and-Drop</entry>
+ <entry>Possibility of inserting any tag onto the page you are editing by just drag-and-droping
+ it from the palette to this page. Adding any properties, managed bean attributes, navigation
+ rules, tag library file declarations, jsp files from web projects view by clicking them and
+ draging to source code.</entry>
+ <entry>
+ <link linkend="visual_page">visual page editor</link>
+ <link linkend="DragAndDrop">drag-and-drop</link>
+ </entry>
+ </row>
+
+ <row>
+ <entry>RichFaces Support</entry>
+ <entry>Tight integration between JBDS and <ulink url="http://www.jboss.org/jbossrichfaces">RichFaces</ulink> frameworks. Easy managing RichFaces
+ components in any web application. Support for RichFaces and Ajax4jsf libraries in JBoss
+ Tools Palette. Rendering RichFaces components in Visual Page Editor.</entry>
+ <entry>
+ <link linkend="RichFacesSupport">RichFaces support</link>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+<section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+</section>
+
+</chapter><chapter id="springTools" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/spring_tools.xml">
+ <?dbhtml filename="springTools.html"?>
+ <title>Spring Tools</title>
+
+ <para>JBoss Developer Studio is bundled with <ulink url="http://springide.org/project">Spring IDE</ulink> for Eclipse.
+ Visit Spring IDE site for the latest versions and documentation.</para>
+
+
+ <section>
+ <title><ulink url="http://springide.org/project/wiki/SpringideGuide">Spring IDE guide</ulink></title>
+
+ <para><ulink url="http://springide.org/project">Spring IDE</ulink> is a graphical user interface for the configuration files used by the <ulink url="http://www.springframework.org/">Spring Framework</ulink>. It's built as a set of plugins for the Eclipse platform.</para>
+
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectNature">Add Spring Project Nature</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateNewProject">Create New Spring Project</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectReferences">Add References To Other Spring Projects</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddBeansConfigs">Add Spring Beans Config Files</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateBeansConfigSets">Create Spring Beans Config Sets</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenSpringExplorer">Open Spring Explorer</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#ValidateBeansConfig">Validate Spring Beans Config</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenBeansGraph">Open Spring Beans Graph</ulink></title><para></para></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#SearchBeans">Search Spring Beans</ulink></title><para></para></section>
+
+ </section>
+
+</chapter><chapter id="jbds_editors" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/editors.xml" xreflabel="jbds_editors">
+ <?dbhtml filename="editors.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Editor</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Editors</title>
+
+ <para>In the <ulink url="../../jsf_tools_ref_guide/html_single/index.html">JSF Tools Reference Guide</ulink> and <ulink url="../../struts_tools_ref_guide/html_single/index.html">Struts Tools Reference Guide</ulink> you had possibility to
+ read about Graphical Editor for <ulink url="../../jsf_tools_ref_guide/html_single/index.html#jsf_config_file">JSF</ulink>
+ and <ulink url="../../struts_tools_ref_guide/html_single/index.html#struts_config_editor">Struts</ulink> configuration
+ files, <ulink url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForTilesFiles132">Graphical Editor for
+ Tiles Files</ulink>, <ulink url="../../struts_tools_ref_guide/html_single/index.html#GraphicalEditorForStrutsValidationFiles86">Graphical Editor for
+ Struts Validation Files</ulink>. All these editors have <link linkend="OpenOnSelection4Hyperlinknavigation">
+ <property moreinfo="none">OpenOn</property>
+ </link> and <link linkend="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
+ <property moreinfo="none">Content Assist</property>
+ </link> features, which are described in more details in this document. In addition you get
+ to know a <link linkend="visual_page">Visual Page Editor</link> for combined visual and
+ source editing of Web pages and many <link linkend="more_editors">other editors</link> for
+ different types of files.</para>
+
+ <section id="editors_features">
+
+ <title>Editors Features</title>
+ <para>JBoss Developer Studio has powerful editor features that help you easily navigate
+ within your application and make use of content and code assist no matter what project
+ file (jsp, xhtml, xml, css, etc...) you are working on.</para>
+
+ <section id="OpenOnSelection4Hyperlinknavigation">
+
+ <title>OpenOn</title>
+
+ <para><property moreinfo="none">OpenOn</property> lets you easily link directly from one resource to
+ another in your project without using the Package Explorer view (project tree). With
+ OpenOn, you can simply click on a reference to another file and the file will be
+ opened.</para>
+
+ <para>OpenOn is available for the following files:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link linkend="XMLFiles232">XML files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSPPages223">JSP/XHTML Pages</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>Java files</para>
+ </listitem>
+ </itemizedlist>
+ <section id="XMLFiles232">
+
+ <title>XML Files</title>
+
+ <para>Press and hold down the Ctrl key. As you move the mouse cursor over different
+ file references in the file, they display an underline. When you hover the name
+ of the file you want to open, click and the file will open in its own editor. In
+ this example the managed bean NameBean will open.</para>
+ <figure float="0">
+ <title>NameBean Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This is the result of using OpenOn.</para>
+ <figure float="0">
+ <title>NameBean Java Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also use OpenOn with defined attributes.</para>
+ <figure float="0">
+ <title>OpenOn With Defined Attributes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also open any JSP pages.</para>
+ <figure float="0">
+ <title>JSP Page OpenOn</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="JSPPages223">
+
+ <title>JSP Pages</title>
+
+ <para><property moreinfo="none">OpenOn</property> is also very useful in JSP pages. It will allow
+ you to quickly jump to the reference instead of having to hunt around in the
+ project structure.</para>
+
+ <para>You can easily open the imported property files.</para>
+ <figure float="0">
+ <title>OpenOn With Imported Property Files</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Use OpenOn to open a CSS file used with a JSP page:</para>
+ <figure float="0">
+ <title>OpenOn With CSS File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Open managed beans:</para>
+ <figure float="0">
+ <title>OpenOn With Managed Beans</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>For JSP files in a JSF project, you can also easily open the navigation rules
+ by applying <property moreinfo="none">OpenOn</property> to the JSF tag for the navigation
+ outcome:</para>
+ <figure float="0">
+ <title>OpenOn With JSF Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="CodeAssistAndDynamicCodeAssist42BasedOnProjectData">
+
+ <title>Content Assist</title>
+ <para><property moreinfo="none">Content assist</property> is available when working with</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="../../seam/html_single/index.html#ContentAssist">Seam project files</ulink>
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSFProjectFiles3087">JSF project files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="StrutsProjectFile46s3">Struts project files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="JSPPages434">JSP files</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="ContentAssistForRF">RichFaces components</link>
+ </para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="../../esb_ref_guide/html_single/index.html#ESBContentAssist"><diffmk:wrapper diffmk:change="added">ESB XML files</diffmk:wrapper></ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+
+ <section id="JSFProjectFiles3087">
+
+ <title>JSF Project Files</title>
+
+ <para>When working with JSF project in JBoss Developer Studio, you can use various
+ <property moreinfo="none">Content Assist features</property> while developing:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Content Assist for XML, JSP and JSF configuration files</para>
+ </listitem>
+ <listitem>
+ <para>Content Assist based on project data</para>
+ </listitem>
+ <listitem>
+ <para>Content Assist with graphical JSF editor</para>
+ </listitem>
+ </itemizedlist>
+ <section id="ContentAssistForXMLJSPAndJSFConfigurationFiles865">
+
+ <title>Content Assist for XML, JSP and JSF configuration files</title>
+
+ <para>At any point when working with any XML, JSP and JSF configuration files
+ Content Assist is available to help you. Simply type <emphasis>
+ <property moreinfo="none">Ctrl-Space</property>
+ </emphasis> to see what is available.</para>
+
+ <para>Content Assist for JSF configuration file:</para>
+ <figure float="0">
+ <title>Content Assist in JSF Configuration File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_9.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content Assist for JSF JSP file:</para>
+ <figure float="0">
+ <title>Content Assist in JSP File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_10.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content Assist for other JSF XML project files (web.xml shown):</para>
+ <figure float="0">
+ <title>Content Assist in web.xml File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_11.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistBasedOnProjectData86">
+
+ <title>Content Assist Based on Project Data</title>
+
+ <para>JBoss Developer Studio takes Content Assist to the next level. Studio will
+ constantly scan your project and you will be able to insert code into the
+ JSP page from your project that includes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Values from Property files</para>
+ </listitem>
+ <listitem>
+ <para><emphasis role="italic">
+ <property moreinfo="none">"Managed beans"</property>
+ </emphasis> attributes and methods</para>
+ </listitem>
+ <listitem>
+ <para>Navigation Rule Outcomes</para>
+ </listitem>
+ <listitem>
+ <para>JSF variables (context, request etc...)</para>
+ </listitem>
+ </itemizedlist>
+ <para>The figure below shows how to insert message from a Properties files. You
+ simply put the cursor inside the <emphasis role="italic">
+ <property moreinfo="none">"value"</property>
+ </emphasis> attribute and press <emphasis>
+ <property moreinfo="none">Ctrl-Space</property>. </emphasis> JBoss Developer Studio will
+ scan your project and show a list of possible values to insert.</para>
+ <figure float="0">
+ <title>Inserting Message</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the following screenshot we are inserting a <emphasis role="italic">
+ <property moreinfo="none">"Managed bean"</property>
+ </emphasis> attribute value. Again, by simply clicking
+ <emphasis><property moreinfo="none">Ctrl-Space</property>,</emphasis> JBoss
+ Developer Studio will show a list of all possible values that you can
+ insert.</para>
+
+ <para>Once you select a Managed bean, it will show you a list of all available
+ attributes for the selected Managed bean (userBean).</para>
+ <figure float="0">
+ <title>Attributes List</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Code Assist based on project data will also prompt you for navigation
+ rules that exist in your JSF configuration file.</para>
+ <figure float="0">
+ <title>Code Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistWithinJSFGraphicalEditor44">
+
+ <title>Content Assist within Tree JSF Editor</title>
+
+ <para>JBoss Developer Studio also provides Content Assist when working within
+ the Tree JSF configuration editor. Just click <emphasis>
+ <property moreinfo="none">Ctrl-Space</property>. </emphasis></para>
+ <figure float="0">
+ <title>Content Assist in Tree JSF Configuration Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_15.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!--
+
+ <para>If a field contains right class name and you click a link near the
+ field you will come to the file with this class otherwise a new Java
+ Class dialog will be shown:</para>
+ <figure>
+ <title>New Java Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/editors_features/editors_features_16.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If you entered an incorrect name in the field error markers will be
+ shown for field labels and tree items:</para>
+ <figure>
+ <title>Error Markers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/editors_features/editors_features_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To add a new property to a managed bean expand <emphasis>
+ <property>Managed Beans</property>
+ </emphasis> and select <emphasis role="bold">
+ <property><name_of_bean></property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Add</property>
+ </emphasis> button in the Properties panel</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog Add Property define a new property. From here
+ also you can generate setters and getters methods:</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Create New Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/editors_features/editors_features_18.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Here you can also add an additional navigation rule to the
+ faces-config.xml file.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis>
+ <property>Navigation Rules</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>Add</property>
+ </emphasis> button</para>
+ </listitem>
+ <listitem>
+ <para>In the dialog <emphasis>
+ <property>Add Rule</property>
+ </emphasis> define a view and give a name to the rule. Click
+ Finish:</para>
+ </listitem>
+ </itemizedlist>
+ <figure>
+ <title>Add New Navigation Rule</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/editors_features/editors_features_19.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ -->
+ </section>
+ </section>
+
+ <section id="StrutsProjectFile46s3">
+ <title>Struts Project Files</title>
+ <para>Content Assist features are available when you work with Struts projects.</para>
+
+
+ <section id="ContentAssistForStrutsConfigurationFile75">
+
+
+ <title>Content Assist for Struts Configuration File</title>
+
+ <para>Content Assist helps you in Struts Configuration file.</para>
+
+ <figure float="0">
+ <title>Struts Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForStrutsJSPFile07">
+
+ <title>Content Assist for Struts JSP File</title>
+
+ <para>Using Code Assist in Struts JSP file is shown below.</para>
+
+ <figure float="0">
+ <title>Struts JSP Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_21.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ <section id="JSPPages434">
+
+ <title>JSP Pages</title>
+
+
+ <section id="ContentAssistForJSFTags96">
+
+ <title>Content Assist for JSF Tags</title>
+ <para>JBDS provides full code completion for JSF tags:</para>
+
+ <figure float="0">
+ <title>JSF Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_22.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the tag is selected the required attributes, if there any, are
+ already inserted and the cursor is located to the first attribute. At this
+ point you can ask for attribute proposals.</para>
+ <figure float="0">
+ <title>Attributes Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_23.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="ContentAssistForJSTLTags6332">
+
+ <title>Content Assist for JSTL Tags</title>
+ <figure float="0">
+ <title>JSTL Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_24.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForHTMLTags7454">
+
+ <title>Content Assist for HTML Tags</title>
+ <para>Content assist for HTML tags has the same mechanism as for JSF tags:</para>
+ <figure float="0">
+ <title>HTML Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_25.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can use as well attributes proposals for HTML tags:</para>
+ <figure float="0">
+ <title>HTML Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_26.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssistForJavaScriptTags67433">
+
+ <title>Content Assist for JavaScript Tags</title>
+ <figure float="0">
+ <title>JavaScript Tags Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/ediors_features/editors_features_27.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+ </section>
+ <section id="ContentAssistForRF">
+
+ <title>RichFaces components</title>
+ <para>JBDS indeed provides code completion for <ulink url="http://www.jboss.org/jbossrichfaces">RichFaces</ulink> framework
+ components. All you have to do is to install RichFaces libraries into your
+ project. See <ulink url="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone...">here</ulink> how to install it.</para>
+ <figure float="0">
+ <title>Content Assist for RichFaces Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_29.png" scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>To insert a RichFaces component on a page expand <emphasis>
+ <property moreinfo="none">JBoss RichFaces</property>
+ </emphasis> group on the palette</para>
+ </listitem>
+ <listitem>
+ <para>Click on some component</para>
+ </listitem>
+ <listitem>
+ <para>Put the needed attributes in the <emphasis>
+ <property moreinfo="none">Insert Tag</property>
+ </emphasis> dialog and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button <figure float="0">
+ <title>Insert Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_30.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>The RichFaces tag will be inserted on your page displayed in source and visual
+ modes: </para>
+ <figure float="0">
+ <title>RichFaces Component</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_31.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+ <section id="AddingDynamicCodeAssistToCustomComponents8745">
+
+ <title>Adding dynamic code assist to custom components that were added to JBoss
+ Tools Palette</title>
+ <para>Here is what you need to do to add project based code assist to a custom
+ component added in <property moreinfo="none">JBoss Developer Studio</property>:</para>
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem>
+ <para>Create a new xml file in <emphasis>
+ <property moreinfo="none"><JBDS_home>studio/eclipse/plugins/org.jboss.tools.common.kb_***/schemas/tld/</property>.
+ </emphasis>For example call it <emphasis>
+ <property moreinfo="none"> JeniaFaces.xml</property>
+ </emphasis>. The file should be written according to <emphasis>
+ <property moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.tools.common.kb/kb.jar/org/jboss/tools/common/kb/kb-schema_1.0.dtd</property>
+ </emphasis></para>
+ </listitem>
+ </orderedlist>
+ <para>Follow these steps to set what is available for code assist:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Adds code assist for JSF pre-defined objects, such as <![CDATA[value=]]><emphasis role="italic">
+ <property moreinfo="none">"#{param}"</property>
+ </emphasis>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="jsfVariables"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add bundle resource (property file) <property moreinfo="none">code
+ assist</property>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="bundleProperty"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean property <property moreinfo="none">code assist</property>:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanProperty"/>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean property but of a specified type:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanProperty">
+ <param name="type" value="java.lang.Boolean"/>
+ </proposal>
+</AttributeType>
+]]></programlisting>
+ <itemizedlist>
+ <listitem>
+ <para>Add managed bean method with a signature:</para>
+ </listitem>
+ </itemizedlist>
+ <programlisting format="linespecific" role="XML"><![CDATA[<AttributeType ...>
+ <proposal type="beanMethodBySignature">
+ <param name="paramType" value="javax.faces.context.FacesContext"/>
+ <param name="paramType" value="javax.faces.component.UIComponent"/>
+ <param name="paramType" value="java.lang.Object"/>
+ <param name="returnType" value="void"/>
+ </proposal>
+</AttributeType>
+]]></programlisting>
+ <orderedlist continuation="restarts" inheritnum="ignore">
+ <listitem>
+ <para>Add information on your xml file in <emphasis>
+ <property moreinfo="none"><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
+ </emphasis></para>
+ <programlisting format="linespecific" role="XML"><![CDATA[
+ <tld
+ jsf="true"
+ name="Jenia Faces"
+ schema-location="schemas/tld/myJSF.xml"
+ uri="http://www.jenia.org/jsf/dataTools"/>]]>
+ </programlisting>
+ </listitem>
+
+ <listitem>
+ <para>Restart Eclipse. You should now have code assist for the
+ component.</para>
+ </listitem>
+ </orderedlist>
+
+ </section>
+ </section>
+ <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing74">
+
+ <title>Synchronized Source and Visual Editing</title>
+
+ <para><property moreinfo="none">JBoss Developer Studio</property> offers the flexibility to edit any
+ files in either source or extra visual modes at the same time.</para>
+
+ <para>The project is yours and so is the source. <property moreinfo="none">JBoss Developer
+ Studio</property> provides you many different graphical editors to speed your
+ application development. At the same time, you always have a full control over all
+ project source files. Any changes you make in the source view immediately appear in
+ the graphical view.</para>
+
+ <para>The JSF configuration file editor has three views: <property moreinfo="none">Diagram</property>,
+ <property moreinfo="none">Tree</property> and <property moreinfo="none">Source</property>. All views are
+ synchronized, you can edit the file in any view.</para>
+ <figure float="0">
+ <title>Three Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_32.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same is relevant to all other <property moreinfo="none">JBoss Developer Studio</property>
+ editors.</para>
+
+ <para>Web XML editor is shown. Web XML editor has a graphical view (Tree) and source
+ (Source).</para>
+
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_35.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><property moreinfo="none">JBoss Developer Studio</property> TLD file editor is shown in Tree view.
+ At any point you can edit the source by switching to Source view.</para>
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors_features/editors_features_37.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+ <section id="visual_page">
+
+ <title>Visual Page Editor</title>
+
+ <para><property moreinfo="none">JBoss Developer Studio</property> comes with a powerful and customizable
+ <property moreinfo="none">Visual Page Editor</property> (VPE). You can use the Visual Page Editor to
+ develop an application using any technology: JSF, Struts, JSP, HTML and others.</para>
+
+ <para><diffmk:wrapper diffmk:change="changed">Current VPE version has three tabs: </diffmk:wrapper><property moreinfo="none">Visual/Source</property><diffmk:wrapper diffmk:change="added">,
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Source</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><property moreinfo="none">Preview</property><diffmk:wrapper diffmk:change="changed">. To switch between the
+ views you can use tabs at the bottom of the VPE or the shortcuts </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Ctrl + PageUp/Ctrl + PageDown</property><diffmk:wrapper diffmk:change="changed">.</diffmk:wrapper></emphasis></para>
+
+ <figure float="0">
+ <title>Visual Page Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_1.png" scale="95"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="visual_source">
+ <title>Visual/Source View</title>
+
+ <para>Using the <property moreinfo="none">Visual/Source view</property> you can edit your pages in the
+ Source and Visual modes simultaneously having an instant synchronization between
+ them:</para>
+ <figure float="0">
+ <title>Visual/Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_2.png" scale="95"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The view is designed in the form of a split pane with toggle buttons for quickly
+ moving between Source, Visual or Source/Visual modes as shown on the figure above.</para>
+
+ <para>One more way to toggle between the various states of the split pane is using the
+ shortcuts <emphasis>
+ <property moreinfo="none">Shift + F6</property>
+ </emphasis> for maximizing/restoring the Source part and <emphasis>
+ <property moreinfo="none">Shift + Alt + F6</property>
+ </emphasis> for maximizing/restoring the Visual part.</para>
+ <tip>
+ <title>Tip:</title>
+ <para>When editing large documents hiding the Visual part will speed up the
+ editing.</para>
+ </tip>
+
+ <para><diffmk:wrapper diffmk:change="changed">It should be pointed out that, no matter in what mode you are working, you get a
+ full integration with </diffmk:wrapper><property moreinfo="none">Properties</property> and <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Outline
+ views</diffmk:wrapper></property>:</para>
+ <figure float="0">
+ <title>Integration with Properties and Outline Views</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_3.png" scale="55"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It's also possible to use the <link linkend="palette">JBoss Tools
+ Palette</link><diffmk:wrapper diffmk:change="changed"> to insert any tag from the list of tag libraries to the page you are
+ editing with just a click or drag-and-drop.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Inserting Tag From the Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_4.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="JSPsyntaxvalidation84">
+
+ <title>JSP Syntax Validation</title>
+ <para>When working in JBoss Tools JSP editor you are constantly provided with
+ feedback and contextual error checking as you type.</para>
+ </section>
+ </section>
+
+ <section diffmk:change="added" id="pages_styling">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Pages Styling</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Most web pages use the cascading style sheets (CSS) to control the way they look.
+ With </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual Page Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you can easily stylise your pages. In
+ this section we are going to introduce you to a powerful mechanism that </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">VPE</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> provides for
+ a complete control over pages styling. </diffmk:wrapper></para>
+
+ <section id="inline_styling">
+ <title>Inline Style Editing</title>
+
+ <para><diffmk:wrapper diffmk:change="added">In the Visual part of the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">VPE</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> there is a graphical
+ toolbar, use it to add inline styling to JSF and Struts tags on your page. The
+ toolbar can be hidden by clicking on arrow sign in the upper left corner.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Text Formatting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">For editing inline styles for DOM elements </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">VPE</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> also
+ provides </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">CSS Dialog</diffmk:wrapper></property>. It can be called from <emphasis>
+ <property moreinfo="none">style</property>
+ </emphasis> line in the <property moreinfo="none">Properties view</property> for a currently
+ selected element.</para>
+
+ <figure float="0">
+ <title>Call the CSS Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para id="css_dialog"><property moreinfo="none">CSS Dialog</property><diffmk:wrapper diffmk:change="changed"> has four tabs where css
+ properties for text, background, borders and others can be specified. A simple
+ preview which is generated at the top of the </diffmk:wrapper><property moreinfo="none">CSS Dialog</property><diffmk:wrapper diffmk:change="changed">
+ allows you to see the changes before you apply them.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>CSS Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="external_stylesheets">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">External Stylesheets</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The pages you are working with in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">VPE</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> can use external
+ stylesheets. </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">VPE</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> allows you to create new style classes in
+ existing stylesheets and/or edit them as well. For these purposes </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">CSS
+ Style Class Dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> is provided.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Select the element for which you need to create or edit style class and press
+ button next to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">styleClass</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Calling the CSS Style Class Dialog</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">It'll pick up the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">CSS Style Class Dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> which
+ looks like on the figure below.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">CSS Style Class Dialog</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">First, you should specify the CSS file where you are going to put your style
+ class. Do this by pressing button next to the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">CSS file</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">CSS File Selection</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To create new CSS class write its name in the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Style class</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field and then configure style settings switching between the tabs: </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Text/Font</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper></emphasis>
+ <emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Background</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper></emphasis>
+ <emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Boxes</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper></emphasis>
+ <emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Property Sheet</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">To add existing styling to
+ the chosen element expand the list of the existed style classes and point to the
+ necessary one.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Style Class Selection</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><emphasis diffmk:change="added">
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Quick Edit</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> gives a preview of the properties which are set for the existing
+ style class. You can easily modify them with the help of this wizard.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Quick Edit</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Preview at the top of the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">CSS Style Class Dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed">
+ visualizes the result.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="added">The dialog for creating a new CSS class, which is called from </diffmk:wrapper><emphasis diffmk:change="added">
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">New > Other... > JBoss Tools Web > CSS Class</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">,
+ </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> looks the same.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">New CSS Class Dialog</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section diffmk:change="added" id="vpe_templating">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Templating</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The VPE also makes it possible to create templates for unknown tags.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To call the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Template dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> for a tag, right-click on it in
+ Visual mode and select </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Template</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> option.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Calling Template Dialog</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_7a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added" id="template_dialog"><diffmk:wrapper diffmk:change="added">Here is what the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Template dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> looks
+ like.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Template Dialog</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_7b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Tag for Display</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Template dialog</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> requires specifying a
+ type of tag. It can be SPAN, DIV, TABLE or any other html element. Here
+ it's also possible to mark weather the tag is children or not (by checking </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Children</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">), whether it contains an IMG tag (by checking </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Icon</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">) and specify a value for it.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">What comes to the </diffmk:wrapper><emphasis>
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Style</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field, you can fill it out manually or make use of the button next to
+ the field to bring the </diffmk:wrapper><link diffmk:change="added" linkend="css_dialog"><diffmk:wrapper diffmk:change="added">CSS Dialog</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> for editing
+ styles.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can observe all defined templates in the </diffmk:wrapper><link diffmk:change="added" linkend="VisualPageEditor2"><diffmk:wrapper diffmk:change="added">VPE
+ Preferences</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> on the Templates tab which you can quickly access by pressing
+ </diffmk:wrapper><link diffmk:change="added" linkend="AdvancedSettings954"><diffmk:wrapper diffmk:change="added">Preferences button</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Templates Tab of the VPE Preferences Page</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_7c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here it's possible to edit or remove any listed in the table template.</diffmk:wrapper></para>
+
+ </section>
+
+ <section diffmk:change="added" id="AdvancedSettings954">
+
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Advanced Settings</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In the left vertical pane of the Visual part there are three buttons: </diffmk:wrapper><emphasis diffmk:change="added">
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="added">Preferences</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper></emphasis><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Refresh</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> and </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Page Design Options</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Buttons on the Visual Part of VPE</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added" id="vpe_preferences">
+ <para><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Preferences</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button provides a quick access to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual Page
+ Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> preferences.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Visual Page Editor Preferences Window</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para><diffmk:wrapper diffmk:change="added">Clicking on </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Refresh</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button you refresh the displayed information.</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Page Design Options</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button leads to window which helps you to specify necessary
+ references to resources. Here is what this window looks like.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Page Design Options</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">This dialog lets you set resources which are usually only resolved in
+ runtime. Let's look at what functionality it proposes.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">The first two sections of the window let you define actual runtime
+ folders. The example below will help you to clarify how this can be used.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Suppose you have the following project structure:</diffmk:wrapper></para>
+
+ <programlisting format="linespecific" role="XML"><![CDATA[WebContent/
+ pages/
+ img/
+ a.gif
+ header.jsp
+ main.jsp
+ ]]></programlisting>
+
+ <para><diffmk:wrapper diffmk:change="added">The content of the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">header.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> is:</diffmk:wrapper></para>
+ <programlisting format="linespecific" role="XML"><![CDATA[My Header
+<img src="img/a.gif"/>
+]]></programlisting>
+ <para><diffmk:wrapper diffmk:change="added">and </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">main.jsp</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> content is:</diffmk:wrapper></para>
+ <programlisting format="linespecific" role="XML"><![CDATA[<jsp:include page="pages/header.jsp" />
+]]></programlisting>
+ <para> When you open <emphasis>
+ <property moreinfo="none">main.jsp</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual Page Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, it will not be able
+ to resolve the image from the header, however, it will work fine in runtime.
+ To fix this in design time, click the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Page Design Options</property>
+ </emphasis> button and set <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Actual Run-Time Relative Folder</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> to </diffmk:wrapper><emphasis><diffmk:wrapper diffmk:change="added">'projectName > WebContent >
+ pages'</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> and you will see the image appeared.</diffmk:wrapper></para>
+ <para diffmk:change="added"></para>
+
+ <para diffmk:change="added" id="el_exp_para"><diffmk:wrapper diffmk:change="added">In the bottom part of the window you can set a path to
+ included css files, tag libs and substituted EL expressions.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Bottom Part of the Page Design Options</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Let's consider an example. For instance, the definition of your
+ CSS on the page is the next:</diffmk:wrapper></para>
+
+ <programlisting diffmk:change="added" format="linespecific" role="XML"><diffmk:wrapper diffmk:change="added"><![CDATA[<link rel="stylesheet" type="text/css"
+ href="#{facesContext.externalContext.requestContextPath}/style.css"/>
+]]></diffmk:wrapper></programlisting>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">This will work fine in runtime, but the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Visual Page
+ Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> doesn't know what
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">requestContextPath</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> in design time is. In order to see
+ the necessary styles applied in design time your should add a path to your
+ stylesheet in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">CSS File Path</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> section.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="added">The next </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">URI</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> section lets you add URI taglibs so that
+ the editor knows where to find the tag libraries.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">And the last </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Substituted EL expressions</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> section is
+ provided to specify the values for specific EL variables. It can be useful
+ for a preview generation.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">As an example look at the figure below:</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">EL Expression</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here bath in Source and Visual modes you see the EL expression
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">#{user.name}</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added">. When you switch to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Preview
+ view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, you'll also see this expression. Now press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Page Design Options</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button and set the value for the
+ </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">#{user.name}</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> as
+ </diffmk:wrapper><emphasis diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">World</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></emphasis></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Setting the Value for the EL Expression</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">As a result in Visual mode and Preview view the word </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">World</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> is displayed.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">The EL Expression Value</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+
+ </itemizedlist>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">You can find useful one more functionality provided by VPE. At the bottom of the
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual/Source view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> there is a </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Selection Tag
+ Bar</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. It allows to see tags tree for a current component selected in
+ Visual or Source mode.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selection Tag Bar</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/visual_page/visual_page_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you want to hide the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Selection Tag Bar</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, use the button in
+ the form of a red cross on the lower right side. To reset it again you should check
+ the proper option in the </diffmk:wrapper><link diffmk:change="added" linkend="vpe_preferences"><diffmk:wrapper diffmk:change="added">VPE
+ Preferences</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </section>
+
+ <section id="page_preview">
+ <title>Page Preview</title>
+
+ <para><property moreinfo="none">VPE</property> comes with design-time preview feature which is available
+ for:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Struts Pages</para>
+ </listitem>
+ <listitem>
+ <para>JSF Pages</para>
+ </listitem>
+ </itemizedlist>
+
+ <para><property moreinfo="none">Preview view</property> is read-only, it shows how the page will look
+ like in a browser.</para>
+ <figure float="0">
+ <title>Preview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/visual_page/visual_page_16.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!--para>You can even
+ attach your stylesheet to the preview.</para-->
+ </section>
+
+ <section id="SetupnotesforLinu895x">
+
+ <title>Setup notes for Linux</title>
+
+ <para>Linux users may need to do the following to get the <property moreinfo="none">Visual Page
+ Editor</property> to work correctly on their machines.</para>
+
+ <para> The Visual Page Editor requires the library libstdc++.so.5. This library is
+ contained in the compat-libstdc++-33.i386 package.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>To install this package on Fedora Core or Red Hat Enterprise Linux run the
+ following command:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[yum install compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+
+ <listitem>
+ <para>On any other rpm based distributions download libstdc++.so.5 and run the
+ following command:</para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[rpm -Uvh compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+
+ <listitem>
+ <para>On Debian based distributives run the following command: </para>
+ <programlisting format="linespecific" role="JAVA"><![CDATA[apt-get install compat-libstdc++-33.i386
+]]></programlisting>
+ </listitem>
+
+ </itemizedlist>
+
+ <para> In case you have the library installed and you still have issue with starting the
+ visual page editor then close all browser views/editors and leave one visual page
+ editor open and restart eclipse. This should force a load of the right XULRunner
+ viewer.</para>
+
+ </section>
+
+ <!-- <section id="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents41">
+<?dbhtml filename="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents.html"?>
+<title>JSP Visual Page Editor - Design Time Look and Feel for Custom Components</title>
+
+<itemizedlist>
+<listitem><ulink url="http://www.jboss.org/404.html">Template definition for design-time representation of custom tags</ulink> (pdf)
+<para></para>
+ <note>
+ <title>Note:</title>
+ <para>The templates files are now saved in <emphasis><RedHatDeveloperStudio>\eclipse\plugins\com.exadel.vpe_1.1.1\plugin.xml</emphasis>. The PDF files show the old location.</para>
+ </note>
+<para></para></listitem>
+
+<listitem><ulink url="http://www.jboss.org/404.html">Steps to Create Plug-in</ulink> (pdf)</listitem>
+<listitem><ulink url="index.html">How to use create(..) method</ulink> (pdf)</listitem>
+<listitem>API
+<itemizedlist>
+<listitem><ulink url="http://www.jboss.org/404.html">VpeAbstractTemplate</ulink></listitem>
+<listitem><ulink url="http://www.jboss.org/404.html">VpeTemplate</ulink></listitem></itemizedlist></listitem>
+<listitem><ulink url="http://www.jboss.org/404.html">Download</ulink> examples. The examples.zip file contains two
+ applications. The first application transforms the JSP source tag into visual tag (HTML). This application
+ is an Eclipse plug-in. Import as an Eclipse project. The second application is a Web applications which
+ uses the custom component (project with JSF Nature).</listitem>
+</itemizedlist>
+<para>Please send us an email to <ulink url="mailto:support@exadel.com">support(a)exadel.com</ulink> if you have
+ questions about this feature.</para>
+</section>
+
+
+<section id="HTML401Suppor421t">
+<?dbhtml filename="HTML4.01Support.html"?>
+<title>HTML 4.01 Support</title>
+</section>
+
+<section id="JSP2.0JSTL1.0And1.1Suppor52t">
+<?dbhtml filename="JSP2.0JSTL1.0And1.1Support.html"?>
+<title>JSP 2.0, JSTL 1.0/1.1 support</title>
+</section>
+-->
+
+ </section>
+
+ <section id="more_editors">
+
+ <title>More Editors</title>
+
+ <para>Besides Visual Page Editor JBDS is supplied with a huge range of various editors for
+ different file types: properties, TLD, web.xml, tiles, and so on.</para>
+ <section id="GraphicalPropertiesEditor">
+
+ <title>Graphical Properties Editor</title>
+
+ <para><property moreinfo="none">The Properties editor</property> allows you to work in two different
+ modes and also supports unicode characters.</para>
+
+ <para>To create a new properties file, in the Package Explorer view, select<emphasis>
+ <property moreinfo="none"> New > Properties File</property>
+ </emphasis> from the right-click context menu on the folder where you want to create
+ the file.</para>
+ <figure float="0">
+ <title>Selecting Properties File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can edit the file using a table-oriented "Properties"
+ viewer:</para>
+
+ <figure float="0">
+ <title>"Properties" Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use a Source viewer for editing the file:</para>
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="GraphicalTLDEditor">
+
+ <title>Graphical TLD Editor</title>
+
+ <para><property moreinfo="none">The TLD editor</property> comes with same features you will find in all
+ other JBoss Developer Studio editors:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Graphical and source edit modes</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+ <section id="TreeView2">
+
+ <title>Tree view</title>
+
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="SourceView1">
+
+ <title>Source view</title>
+
+ <para>You can easily switch from Tree to Source by selecting the Source tab at the
+ bottom of the editor.</para>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can easily add a <property moreinfo="none">new tag</property>:</para>
+
+ <figure float="0">
+ <title>Adding a New Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_6.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also easily add a <property moreinfo="none">new attribute</property> to an existing
+ tag:</para>
+ <figure float="0">
+ <title>Adding a New Attribute</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_7.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Content assist is available when editing the file using the Source viewer:</para>
+
+ <figure float="0">
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_8.png" scale="65"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Source viewer, if at any point a tag is incorrect or incomplete, an
+ error will be indicated next to the line and also in the Problems view below.</para>
+
+ <figure float="0">
+ <title>Error Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+
+ <section id="GraphicalWebApplicationFileEditor">
+
+ <title>Graphical Web Application File (web.xml) Editor</title>
+
+ <para>The Web Application File editor comes with the same features you will find in all
+ other JBoss Developer Studio editors:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Graphical and source edit modes</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+ <section id="TreeView1">
+ <title>Tree View</title>
+
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can add any new elements right in the <property moreinfo="none">Tree viewer</property>:</para>
+
+ <figure float="0">
+ <title>Adding New Elements</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="SourceView2">
+
+ <title>Source View</title>
+
+ <para>Switch to the <property moreinfo="none">Source viewer </property>to edit the web.xml file by
+ hand at any time:</para>
+
+ <figure float="0">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ContentAssist">
+
+ <title>Content Assist</title>
+
+ <para>Content assist is available in the Source viewer. Simply click <emphasis>
+ <property moreinfo="none">CTRL-Space</property>
+ </emphasis> anywhere in the file.</para>
+
+ <figure float="0">
+ <title>Content Assist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_13.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ErrorCheckingAndValidation">
+
+ <title>Errors Checking and Validation</title>
+
+ <para>If errors occur anywhere in the file, small red dots will appear next to the
+ lines where the errors occurred. Also, note that the file is marked by a small x
+ in the Package Explorer view.</para>
+
+ <figure float="0">
+ <title>Errors Reporting</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="CSSEditor">
+
+ <title>CSS Editor</title>
+
+ <para>The <property moreinfo="none">CSS editor</property> comes with the same features you will find in
+ all other JBoss Developer Studio editors.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Content assist</para>
+ </listitem>
+ <listitem>
+ <para>Validation and error checking</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>With the CSS (Cascading Style Sheet) editor, you can take advantage of code
+ prompting:</para>
+
+ <figure float="0">
+ <title>CSS Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_41.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <!-- <para>You can also use the Outline view next to the editor to navigate through the CSS
+ file:</para>
+
+ <figure>
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_42.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ -->
+
+ <para>And you can also use the Properties view next to the editor to edit existing
+ stylesheet declaration properties:</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_43.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="JavaScriptEditor">
+
+ <title>JavaScript Editor</title>
+
+ <para>The <property moreinfo="none">JavaScript editor</property> includes a Preview viewer and a Source
+ viewer. In the Source viewer, you can use code assist:</para>
+
+ <figure float="0">
+ <title>JavaScript Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_44.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Source viewer with the Outline view to navigate around the
+ file:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_45.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <!-- <section id="ImageViewer">
+
+ <title>Image Viewer</title>
+ <para>This simple image viewer allows you to view GIF and JPEG files individually in a
+ separate window:</para>
+
+ <figure>
+ <title>Image Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_46.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section> -->
+ <section id="XSDEditor">
+
+ <title>XSD Editor</title>
+
+ <para>JBoss Developer Studio comes with an <property moreinfo="none">XSD Editor</property> for XML
+ Schema files. This editor comes from the Web Tools Project (WTP) (see <ulink url="http://www.eclipse.org/webtools/testtutorials/gettingstarted/GettingStart...">WTP Getting Started</ulink>).</para>
+
+ <para>To create a new XSD file, right-click a folder in the Package Explorer view,
+ select <emphasis>
+ <property moreinfo="none">New > Other...</property>
+ </emphasis> from the context menu and then select <emphasis>
+ <property moreinfo="none">XML > XML Schema</property>
+ </emphasis> in the dialog box.</para>
+
+ <figure float="0">
+ <title>Creating New XSD file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_47.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The XSD Editor includes two viewers for working on the file, a Design viewer and a
+ Source viewer:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_48.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the Design viewer, you can drill down on an element by double-clicking on it:</para>
+
+ <figure float="0">
+ <title>Design Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_49.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Various edit options are available when you right-click an element in the diagram:</para>
+
+ <figure float="0">
+ <title>Edit Options</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_50.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use the Properties view to edit a selected element:</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_51.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also use a Source viewer for the file. In this viewer, along with direct
+ editing of the source code, you can also edit the file by using the Properties view
+ on the right:</para>
+
+ <figure float="0">
+ <title>Source Viewer</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_52.png" scale="85"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section id="SupportforXMLSchema">
+
+ <title>Support for XML Schema</title>
+
+ <para>JBoss Developer Studio fully supports XML files based on schemas as well as DTDs:</para>
+ <figure float="0">
+ <title>XML File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/more_editors/more_editors_53.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+</chapter><chapter id="palette">
+ <?dbhtml filename="palette.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>Jboss Tools palette</keyword>
+ <keyword>tags</keyword>
+ <keyword>JSP page</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss Tools Palette</title>
+ <para>This chapter will introduce you to the functionality provided by <property moreinfo="none">JBoss Tools
+ Palette</property>. The Palette allows you to quickly and easily create your JSP or JSF
+ pages. Now you can do it more faster without additional knowledge.</para>
+ <para>The <property moreinfo="none">JBoss Tools Palette</property> allows you to:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Insert tags into a JSP or JSF page with one click</para>
+ </listitem>
+ <listitem>
+ <para>Add custom and 3rd party tags</para>
+ </listitem>
+ </itemizedlist>
+ <para>The JBoss Tools Palette contains a developer's project tag libraries and provides
+ possibility to add any tag libraries to it. Also you can choose a necessary one from the
+ list of already existed tag libraries:</para>
+ <itemizedlist>
+ <listitem>
+ <para>HTML</para>
+ </listitem>
+ <listitem>
+ <para>JBoss</para>
+ </listitem>
+ <listitem>
+ <para>JSF</para>
+ </listitem>
+ <listitem>
+ <para>JSTL</para>
+ </listitem>
+ <listitem>
+ <para>MyFaces</para>
+ </listitem>
+ <listitem>
+ <para>Oracle ADF Faces</para>
+ </listitem>
+ <listitem>
+ <para>Struts</para>
+ </listitem>
+ <listitem>
+ <para>XHTML</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Default View of The JBoss Tools Palette</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By default the Palette is represented in Web Development Perspective with four groups. If
+ you can't see it, select <emphasis>
+ <property moreinfo="none">Window > Show View Other... > JBoss Tools Web > JBoss
+ Tools Palette</property>
+ </emphasis> from the menu bar.</para>
+
+ <section id="PaletteOptions">
+ <?dbhtml filename="PaletteOptions.html"?>
+ <title>Palette Options</title>
+ <para>To facilitate your work, you can configure the Palette in your own way, by selecting
+ the corresponding icon on the Palette toolbar.</para>
+ <para>There is a possibility to configure the JBoss Tools Palette:</para>
+ <itemizedlist>
+ <listitem>
+ <para> to <property moreinfo="none">edit the palette</property> content by adding, removing or
+ changing the palette elements</para>
+ </listitem>
+ <listitem>
+ <para> to <property moreinfo="none">show/hide groups</property>, subgroups</para>
+ </listitem>
+ <listitem>
+ <para>to <property moreinfo="none">import groups</property>, subgroups</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Palette Buttons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <section id="PaletteEditor">
+ <?dbhtml filename="PaletteEditor.html"?>
+ <title>Palette Editor</title>
+ <para>JBoss Tools Palette contains existing libraries of tags, thus the
+ <property moreinfo="none">Palette editor</property> is intended to work with them or create your
+ new one, as well.</para>
+ <para>To open the editor, click on the <emphasis>
+ <property moreinfo="none">Palette Editor</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> icon: </diffmk:wrapper><figure float="0">
+ <title>Palette Editor Icon</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+ <para><diffmk:wrapper diffmk:change="changed">The window has two parts. There is a reflected grouped list of components on the
+ left side of the palette editor. Each group is divided into multiple groups, every
+ of which is a tag library. The right side of the palette editor is an editing window
+ where it's possible to change values of group or tag library attributes
+ that you've chosen on the left part of the window. </diffmk:wrapper></para>
+ <para>It can also be done by right click and using <emphasis>
+ <property moreinfo="none">Edit…</property>
+ </emphasis> option.</para>
+ <literallayout class="normal" format="linespecific"></literallayout>
+ <para> For example, <property moreinfo="none">JSF</property><diffmk:wrapper diffmk:change="changed"> group consists of
+ </diffmk:wrapper><property moreinfo="none">Core</property>, <property moreinfo="none">Facelets</property><diffmk:wrapper diffmk:change="changed">, </diffmk:wrapper><property moreinfo="none">HTML</property><diffmk:wrapper diffmk:change="changed">
+ tag libraries and the attributes as </diffmk:wrapper><property moreinfo="none">name</property><diffmk:wrapper diffmk:change="changed">,
+ </diffmk:wrapper><property moreinfo="none">description</property><diffmk:wrapper diffmk:change="changed"> and </diffmk:wrapper><property moreinfo="none">hidden</property><diffmk:wrapper diffmk:change="changed"> which are available
+ for editing: </diffmk:wrapper></para>
+ <figure float="0">
+ <title>Tag Libraries of the JSF Group</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">The Palette Editor provides the following possibilities when working with existing
+ tags or icons:</diffmk:wrapper></para>
+ <itemizedlist>
+ <listitem>
+ <para>to work with a set of icons</para>
+ <para><emphasis>
+ <property moreinfo="none">Icons</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> is the root folder for the icon sets. The first step is creating
+ the icon set. Right click on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Icons</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">Create > Create Set...</property>
+ </emphasis></para>
+ <para>Set the value of the name in the <emphasis>
+ <property moreinfo="none">Add Icons</property>
+ </emphasis> window and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button. A new element will appear in the list.</para>
+ <figure float="0">
+ <title>Creating a Set of Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">Also you can delete the set. Right click on the set of icons that you wish
+ to remove and chose the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Delete Set</property>
+ </emphasis> option from the pop-up menu or click the <emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ </listitem>
+ <listitem>
+ <para>to edit icons in the chosen set</para>
+ <para><diffmk:wrapper diffmk:change="changed">When the set of icons is created, new icons can be imported to it. Choose
+ the required set and select the option </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Create > Import Icon... </property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> from the pop-up menu that appears after you right-click on a
+ folder.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Creating Icons</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Set the name of the icon and the path and click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ </listitem>
+ <listitem>
+ <para>to work with a group of tag libraries</para>
+ <para><diffmk:wrapper diffmk:change="changed">The first step in work with the editor is creating a group of libraries.
+ It's very easy to do, right mouse button click on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Palette</property>
+ </emphasis> folder and select <emphasis>
+ <property moreinfo="none">Create > Create Group…</property>
+ </emphasis></para>
+ <para>Set a name of a group in the <property moreinfo="none">Create Group</property><diffmk:wrapper diffmk:change="changed"> window and
+ click </diffmk:wrapper><emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> button. A new element will appear at the end of the list.</para>
+ <figure float="0">
+ <title>Creating a Group of Tag Libraries</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">You are allowed to edit or delete a group, as well. If you'd like
+ to change attributes of a group, use the right editing window of the palette
+ editor or the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Edit...</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> option, like it was mentioned before. In order to remove the
+ group, right click on the group that you wish to remove and chose the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para>The removal option is enabled only for custom folders.</para>
+ </important>
+ </listitem>
+ <listitem>
+ <para>to work with a tag library</para>
+ <para><diffmk:wrapper diffmk:change="changed">The group maintains a list of tag libraries. If you'd like to
+ create your own library, click right mouse button on the group and choose </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Create Group…</property>
+ </emphasis> option.</para>
+ <figure float="0">
+ <title>Creating a tag library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After setting the attribute name and the path of the icon, click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> button.</para>
+ <note>
+ <title>Note:</title>
+ <para><diffmk:wrapper diffmk:change="changed">If you do not choose an icon the default one will be assigned.</diffmk:wrapper></para>
+ </note>
+ <para><diffmk:wrapper diffmk:change="changed">You are allowed to edit or delete the tag library, as well. If
+ you'd like to change attributes of the library or choose another
+ icon, use the right editing window of the palette editor or the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Edit...</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> option. In order to remove the tag library, right click on the
+ library that you wish to remove and chose the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para><diffmk:wrapper diffmk:change="changed">The removal option is enabled only for custom tag libraries.</diffmk:wrapper></para>
+ </important>
+ </listitem>
+ <listitem>
+ <para>to work with a tag element</para>
+ <para><diffmk:wrapper diffmk:change="changed">When the library folder is created, new tags can be added to it. Choose
+ the required library and select the option </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Create > Create Macro…</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> from the pop-up menu that appears after you right-click on a
+ folder.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Creating a tag element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the <property moreinfo="none">Add Palette Macro</property><diffmk:wrapper diffmk:change="changed"> window, you can configure
+ the tag element. Attribute </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Name</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> is mandatory to fill and it will be the name of the tag element.
+ Other settings are optional. You can choose the icon and set the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Start Text</property>
+ </emphasis> and the <emphasis>
+ <property moreinfo="none">End Text</property>
+ </emphasis> for your tag element. If your tag text is too long, use the <emphasis>
+ <property moreinfo="none">Change...</property>
+ </emphasis> button to see it all. For <emphasis>
+ <property moreinfo="none">start text</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">end text</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> there is a possibility to control the cursor position by using
+ "|" symbol.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Parameters of the Palette element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After all the attributes are set, click <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button.</para>
+ <note>
+ <title>Note:</title>
+ <para>If you do not choose an icon the default one will be assigned.</para>
+ </note>
+ <para><diffmk:wrapper diffmk:change="changed">You are also allowed to edit or delete the tag. If you'd like to
+ change the attributes of the tag or choose another icon for it, use the
+ right editing window of the palette editor or the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Edit...</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> option from the pop-up menu. In order to remove the tag, right
+ click on the tag that you wish to remove and chose the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> option or click the <emphasis>
+ <property moreinfo="none">Delete</property>
+ </emphasis> keyboard button.</para>
+ <important>
+ <title>Important:</title>
+ <para><diffmk:wrapper diffmk:change="changed">The removal option is enabled only for custom tags. JBoss Palette tags
+ can not be removed but can be modified.</diffmk:wrapper></para>
+ </important>
+ </listitem>
+
+ </itemizedlist>
+ </section>
+ <section id="show_hide">
+ <?dbhtml filename="Show/Hide.html"?>
+ <title>Show/Hide</title>
+ <para><emphasis>
+ <property moreinfo="none">Show/Hide</property>
+ </emphasis> is a very useful feature that allows you to control the number of tag
+ groups that are shown on the palette.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">Show/Hide</property>
+ </emphasis> button, at the top right side of the JBoss Tools Palette.</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Show/Hide Button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>In the dialog Show/Hide Drawers check the groups the libraries of which
+ you want to be shown on the palette:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>Show/Hide Drawers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>If libraries are not displayed in the palette, check whether they are selected.
+ Click the plus sign to expand the libraries of the group and make sure that a tick
+ is put next to the wanted libraries.</para>
+ <!-- <para>(When you deactivate the group(s), the JBoss Palette remembers your last chose.
+ The libraries… )</para>
+ -->
+ <itemizedlist>
+ <listitem>
+ <para>Click <emphasis><property moreinfo="none">OK</property>.</emphasis> The new groups will
+ now be shown on the palette:</para>
+ </listitem>
+ </itemizedlist>
+ <figure float="0">
+ <title>New Added Groups</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The names of the elements are compound. The first part is the group name and the
+ second is the library name.</para>
+ </section>
+ <section id="Import">
+ <?dbhtml filename="Import.html"?>
+ <title>Import</title>
+ <para>The Import button lets you add a custom or 3rd party tag library to JBoss Tools
+ Palette. Find out more information on how to add particular tags see the <link linkend="ImportButton521">Adding Custom JSF Tags</link> section.
+ <!--<link linkend="CreatingAndWorkingCustomCapability">Learn how to import</link>. --></para>
+ </section>
+ </section>
+ <section id="UsingThePaletteIncludingOneClickTagInsertion">
+ <?dbhtml filename="UsingThePaletteIncludingOneClickTagInsertion.html"?>
+ <title>Using the Palette</title>
+ <section id="InsertingTagsIntoAJSPFile">
+ <?dbhtml filename="InsertingTagsIntoAJSPFile.html"?>
+ <title>Inserting Tags into a JSP File</title>
+ <para>A new tag can be added into any text file including jsp, htm, html and xhtml.</para>
+ <para>Let's do it. Open your JSP file and place the cursor in a place where
+ you'd like to add a tag and then click that tag in the palette. In the
+ <property moreinfo="none">Insert Tag</property> window, that appears, you can set the value of<emphasis>
+ <property moreinfo="none">general</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">advanced</property>
+ </emphasis> attributes of the tag that you chose.</para>
+ <figure float="0">
+ <title>Inserting Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>In the example below, the <emphasis>
+ <property moreinfo="none">commandButton</property>
+ </emphasis> tag has been inserted.</para>
+ <figure float="0">
+ <title>Inserting Tag</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_2.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>if you place the cursor over any tag, a balloon hint is shown with all the
+ <emphasis role="italic">
+ <property moreinfo="none">"tag"</property>
+ </emphasis> attributes.</para>
+ </tip>
+ <para>The cursor position after adding a tag into a file is specified by
+ "|" symbol in the tag template on the right in the Palette Editor
+ window. </para>
+ <figure float="0">
+ <title>Palette Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Above you can see where the cursor position for <emphasis>
+ <property moreinfo="none">HTML > Form > input</property>
+ </emphasis> is set. Thus, after adding this tag into your file the cursor will be in
+ the attribute "type". Then, you can straight use the combination
+ of buttons <property moreinfo="none">Ctrl + Space</property> to inquire about a prompting. </para>
+ <figure float="0">
+ <title>Cursor position</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_16.png" scale="50"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="AddingCustomJSFTagsToTheRedHatPalette7433">
+ <?dbhtml filename="AddingCustomJSFTagsToTheJBossToolsPalette.html"?>
+ <title>Adding Custom JSF Tags to the JBoss Tools Palette</title>
+
+ <para>There are two ways to add any custom or 3rd party tag library to the
+ <property moreinfo="none">JBoss Tools Palette</property>:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Drag-and-drop from the Web Projects view</para>
+ </listitem>
+ <listitem>
+ <para>The Import button on the JBoss Tools Palette</para>
+ </listitem>
+ </itemizedlist>
+ <para>Before you can add your custom component library, you need to make sure it is
+ included in your project. Either place the <emphasis role="italic">
+ <property moreinfo="none">".tld"</property>
+ </emphasis> file or the <emphasis role="italic">
+ <property moreinfo="none">".jar"</property>
+ </emphasis> that includes your tag library under the lib folder in your project. </para>
+ <section id="Drag_and_Drop65332">
+ <?dbhtml filename="DragAndDrop.html"?>
+ <title>Drag-and-Drop</title>
+ <para>Switch to the Web Projects view and expand the Tag Libraries folder. If the
+ view is not active, select <emphasis>
+ <property moreinfo="none">Window > Show View > Web Projects</property>
+ </emphasis> from the menu bar.</para>
+ <figure float="0">
+ <title>Web Projects View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Also make sure that the JBoss Tools Palette is open. Select the tag library
+ that you want to add and simply drag-and-drop it on to the JBoss Tools Palette.</para>
+ <para>You will see the following dialog window. As you can see JBoss Developer
+ Studio takes care of all the details. Chosen <emphasis>
+ <property moreinfo="none">TLD file</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">prefix</property>
+ </emphasis> of the library and <emphasis>
+ <property moreinfo="none">Library URL</property>
+ </emphasis> are detected, thus just need to set the <emphasis>
+ <property moreinfo="none">Group</property>
+ </emphasis> name to which you wish to place this tag library. You can either add
+ this tag library to an existing Group or just create a new one.</para>
+ <figure float="0">
+ <title>Import Tags From TLD File Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once you are finished, you will see the new tag library added to the JBoss
+ Tools Palette.</para>
+ <figure float="0">
+ <title>JBoss Tools Palette with New Tag Library</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="ImportButton521">
+ <?dbhtml filename="ImportButton.html"?>
+ <title>Import Button</title>
+ <para>The same you can do with <emphasis>
+ <property moreinfo="none">Import</property>
+ </emphasis> button. You can see this button at the top right side of the JBoss
+ Tools Palette.</para>
+ <figure float="0">
+ <title>Import Button</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By clicking on the <emphasis>
+ <property moreinfo="none">Import button</property>
+ </emphasis> you will see the Import Tag window a similar like in the <link linkend="Drag_and_Drop65332"> Drag-and-Drop</link> method. Set the name and
+ prefix of the library and Library URL. Also you need to set the Group name to
+ which you'd like to add your tag library. And like in the previous
+ method you can add it to an existing Group or create a new one. On this Import
+ Tag form you can use <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis>button to locate the tag library that you want to add:</para>
+ <figure float="0">
+ <title>Select TLD File</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+ </section>
+ <section id="RichFacesSupport" role="updated">
+ <?dbhtml filename="RichFacesSupport.html"?>
+ <title>RichFaces Support</title>
+ <para><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> comes with a tight integration with </diffmk:wrapper><ulink url="http://labs.jboss.com/jbossrichfaces/"><diffmk:wrapper diffmk:change="changed">RichFaces component framework</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.
+ RichFaces and Ajax4jsf tag libraries in </diffmk:wrapper><link diffmk:change="added" linkend="palette"><diffmk:wrapper diffmk:change="added">JBoss Tools
+ Palette</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> always exist.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>RichFaces Components</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/palette/palette_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">To start using </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">RichFaces</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> components as well as
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Ajax4jsf</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> ones in JBDS you should first put </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">richfaces-*.jar</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> files into the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">/lib</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> folder of your project.</diffmk:wrapper></para>
+ <!-- this palette is not dynamic and is not changed from file to file. -->
+
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Currant version of </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> (i. e. 1.1.0GA)
+ includes </diffmk:wrapper><ulink diffmk:change="added" url="http://www.jboss.org/jbossrichfaces/downloads/"><diffmk:wrapper diffmk:change="added">RichFaces
+ 3.2.2</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">. The JBoss Tools 3.0.0.beta1 comes with </diffmk:wrapper><ulink diffmk:change="added" url="http://www.jboss.org/jbossrichfaces/downloads/"><diffmk:wrapper diffmk:change="added">RichFaces 3.1.3</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> and
+ partly support 3.2 version of the component framework. If you need to use the latest
+ version of the component framework you should import it into the Palette like any
+ other </diffmk:wrapper><link diffmk:change="added" linkend="AddingCustomJSFTagsToTheRedHatPalette7433"><diffmk:wrapper diffmk:change="added">custom tag
+ library</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </note>
+
+ <section diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Relevant Resources Links</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">It may be helpful for you to look through the </diffmk:wrapper><ulink diffmk:change="added" url="http://docs.jboss.org/tools/movies/demos/rich_faces_demo/rich_faces_demo.htm"><diffmk:wrapper diffmk:change="added">movie</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> which covers a creation of a jsf application with simple content
+ using the RichFaces components.</diffmk:wrapper></para>
+ </section>
+
+ </section>
+</chapter>
+
+
+
+
+
+
+
+
+
+
+
+<chapter id="web_projects" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/web_projects.xml" xreflabel="web_projects">
+ <?dbhtml filename="web_projects.html"?>
+<title>Web Projects View</title>
+<para><property moreinfo="none">Web Projects</property> is a special view that comes with JBoss Developer Studio.</para>
+<para>If the Web Projects view's tab is not visible next to the Package Explorer tab, select <emphasis><property moreinfo="none">Window > Show View > Other > JBoss Tools Web > Web Projects</property></emphasis> from the menu bar.</para>
+<para>With the Web Projects view, you can:</para>
+
+<itemizedlist>
+<listitem><para>Visualize the project better because the project artifacts for JSF and Struts projects are organized and displayed by function.</para></listitem>
+<listitem>
+ <para>Select these kinds of items to drag and drop into JSP pages:</para>
+ <itemizedlist>
+ <listitem><para>JSF managed bean attributes</para></listitem>
+<listitem><para>JSF navigation rules outcomes</para></listitem>
+<listitem><para>Property file values</para></listitem>
+<listitem><para>Tag library files</para></listitem>
+<listitem><para>Tags from tag libraries</para></listitem>
+<listitem><para>JSP page links</para></listitem>
+</itemizedlist>
+</listitem>
+<listitem><para>Use context menus to develop the application (all create and edit functions are available)</para></listitem>
+<listitem><para>Use icon shortcuts to create and import JSF and Struts projects</para></listitem>
+<listitem><para>Expand and inspect tag library files</para></listitem>
+<listitem><para><link linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Select custom and third-party tag libraries to drag and drop onto
+the JBoss Tools Palette</link></para></listitem>
+</itemizedlist>
+
+<section id="ProjectOrganization">
+
+<title>Project Organization</title>
+<para>The Web Projects view organizes your project in a different way. The physical structure of course stays the same. The new organization combines common project artifacts together which makes it simpler to
+locate what you are looking for and develop.</para>
+
+<para>The screen shot below shows a JSF project and a Struts project in Web Projects view.</para>
+<figure float="0">
+ <title>Web Projects View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+</section>
+<section id="DragAndDrop">
+
+<title>Drag and Drop</title>
+ <para>Web Projects View has a drag and drop option that can be used for property, managed bean attributes, navigation rules, tag library file declaration and JSP Pages.</para>
+<section id="ForAProperty">
+
+<title>For a Property</title>
+ <para>Expand the <property moreinfo="none">Resources Bundles</property> folder that holds all the Property files in your project. Select the file from which you want to add the property and then select the property.</para>
+<para>We will be dragging and dropping a property file value inside the outputText tag for the <emphasis role="italic"><property moreinfo="none">"value"</property></emphasis> attribute.</para>
+<figure float="0">
+<title>OutputText Tag</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_2.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Select the property:</para>
+<figure float="0">
+<title>Selecting Property</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_3.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+ <para>Drag the property and drop it between the quotes for the value attribute in the JSP file. Notice that JBoss Developer Studio added the correctly formatted expression for referring to the property value <emphasis><property moreinfo="none">#{Message.header}</property></emphasis> automatically.</para>
+ <figure float="0">
+<title>Inserted Property</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_4.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>You can actually place the tag anywhere in the page, not just inside an existing tag. In this case,
+ JBoss Developer Studio will place the complete tag <emphasis><property moreinfo="none"><h:outputText value="#{Message.header}"/></property></emphasis> in the page.</para>
+ </section>
+<section id="ForManagedBeanAttributes">
+
+<title>For Managed Bean Attributes</title>
+
+<para>Select a <emphasis role="italic"><property moreinfo="none">"managed bean"</property></emphasis> attribute and then drag and drop it onto the JSP page. We are going to place it inside the <emphasis role="italic"><property moreinfo="none">"value"</property></emphasis> attribute of the inputText tag.</para>
+<figure float="0">
+<title>Selecting Managed Bean Attribute</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_5.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Once again, JBoss Developer Studio adds the correct expression, <emphasis>#{user.name}</emphasis>.</para>
+<figure float="0">
+<title>Added Expression</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_6.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="NavigationRules">
+
+<title>Navigation Rules</title>
+
+<para>Select the navigation rule under <emphasis><property moreinfo="none">Configuration > faces-config.xml > Navigation Rules</property></emphasis>:</para>
+<figure float="0">
+<title>Selecting Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_7.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Drag and drop it inside the commandButton tag:</para>
+<figure float="0">
+<title>Naviagation Rule in CommandButton Tag</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_8.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>You could do the same if the navigation rule was defined inside an action method:</para>
+<figure float="0">
+<title>Navigation Rule in Action Method</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_9.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Here is how it would look after drag and drop:</para>
+<figure float="0">
+<title>Inserted Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_10.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ForATagLibraryFileDeclaration">
+
+<title>For a Tag Library File Declaration</title>
+
+<para>Select a TLD file:</para>
+<figure float="0">
+<title>Selecting TLD File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_11.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+<para>Then drag and drop it onto the JSP page to add a declaration at the top of the page:</para>
+<figure float="0">
+<title>Inserted TLD File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_12.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ForJSPPages">
+
+<title>For JSP Pages</title>
+
+<para>You can also drag and drop a JSP page path to a JSP page to create a forward as shown:</para>
+<figure float="0">
+<title>Creating JSP Forward</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_13.png" scale="80"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+</section>
+<section id="DevelopingTheApplication">
+
+<title>Developing the Application</title>
+
+<para>It is also possible to develop your application right from the Web Projects view.
+Simply right-click any node in the tree and select an appropriate action from the context menu. For instance, this screen capture shows creating a new navigation rule.</para>
+<figure float="0">
+<title>Creating New Navigation Rule</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_14.png" scale="90"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="ExpandingTagLibraryFiles">
+
+<title>Expanding Tag Library Files</title>
+
+<para>You can easily expand any TLD file in the project. Browse to the Tag Libraries folder. Right-click a TLD file and select <emphasis><property moreinfo="none">Expand</property></emphasis>. The TLD file will now be expanded.</para>
+
+<para>You can then select any tag and drag it onto a JSP page.</para>
+<figure float="0">
+<title>Expanding Tag Library File</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_15.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+<section id="DragAndDropTagLibrariesOnToRedHatPalette">
+
+<title>Drag and Drop Tag Libraries on to JBoss Tools Palette</title>
+
+ <para>Read <link linkend="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag Libraries</link> to learn about this.</para>
+</section>
+<section id="CreateAndImportJSFAndStrutsProjects">
+<title>Create and Import JSF and Struts Projects</title>
+
+<para>You can also create and import JSF and Struts project from Web Projects view by selecting the
+buttons below.</para>
+
+<para>From left to right:</para>
+
+<orderedlist continuation="restarts" inheritnum="ignore">
+<listitem><para>Create New JSF Project</para></listitem>
+<listitem><para>Import JSF Project</para></listitem>
+<listitem><para>Create New Struts Project</para></listitem>
+<listitem><para>Import Struts Project</para></listitem>
+</orderedlist>
+<figure float="0">
+<title>Web Projects View Buttons</title>
+<mediaobject>
+ <imageobject>
+ <imagedata fileref="images/web_projects/web_projects_16.png"></imagedata>
+ </imageobject>
+</mediaobject>
+</figure>
+</section>
+
+
+
+
+
+ <section diffmk:change="added" id="Plug-inInsets">
+ <?dbhtml filename="Plug-inInsets.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Plug-in Insets</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">By selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Web > Struts > Automation > Plug-in Insets</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> on tab Tiles you can define a default text for tiles plugin.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Plug-in Insets</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">The same is done but for validator plugin on the tab Validators.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Plug-in Insets of Validators</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="ResourceInsets">
+ <?dbhtml filename="ResourceInsets.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Resource Insets</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">To see Resource Insets preference page select </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Strats > Automation > Resource Insets</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed">.</diffmk:wrapper></para>
+ <para>On <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Resource Insets</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> panel you determine default error messages for error resource files.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Resource Insets</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="StrutsCustomization">
+ <?dbhtml filename="StrutsCustomization"?>
+ <title><diffmk:wrapper diffmk:change="changed">Struts Customization</diffmk:wrapper></title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Struts > Customization</diffmk:wrapper></property>
+ </emphasis> page.</para>
+ <para><diffmk:wrapper diffmk:change="changed">In the</diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Customization</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> screen you configure Link Recognizer for Struts tags.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Struts Customization</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="StrutsProject">
+ <?dbhtml filename="StrutsProject.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Struts Project</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">You can change the following preferences on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Struts > Project</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> preference page:</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">On </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Project</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> panel you define a template for a new Struts created project: servlet
+ version, page template and so on.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Struts Project</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_27.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">Selecting the Import Project tab in the Struts Project screen allows you to determine
+ the default servlet version and whether to register Web Context in server.xml.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Import Struts Pages</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_28.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="StrutsSupport">
+ <?dbhtml filename="StrutsSupport.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Struts Support</diffmk:wrapper></title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Struts > Project > Struts Support</diffmk:wrapper></property>
+ </emphasis> page.</para>
+ <para><diffmk:wrapper diffmk:change="changed">Select </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Struts Support</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> screen if you want to configure Struts versions support settings.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Struts Support</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_29.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="StrutsPages">
+ <?dbhtml filename="StrutsPages.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Struts Pages</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">You can change the following preferences on the JBoss Tools > Web > Struts > Struts
+ Pages preference page.</diffmk:wrapper></para>
+ <para>On <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Struts Pages</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> panel you can add or remove Struts pages.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Struts Pages</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_30.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="StrutsFlowDiagram">
+ <?dbhtml filename="StrutsFlowDiagram.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Struts Flow Diagram</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">Similarly to the JSF Flow Diagram screen, selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Editor > Struts Flow Diagram</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> page allows you to specify aspects of the Diagram mode of the Struts
+ configuration file editor. The Struts Flow Diagram screen adds an option to hide the
+ Diagram tab and labeling settings for additional artifacts. </diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Struts Flow Diagram</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_31.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">Selecting the Add Page tab in the Struts Flow Diagram screen allows you to determine
+ the default template and file extension for views (pages) you add directly into the
+ diagram using a context menu or the view-adding mode of the diagram cursor.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Adding Page</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_32.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="tiles_diagram">
+ <?dbhtml filename="titles_diagram.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Tiles Diagram</diffmk:wrapper></title>
+ <para><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Editors > Title Diagram</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> screen allows you control some settings for the placement of Tiles
+ definitions in the Diagram mode of the JBoss Tools Tiles editor.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Title Diagram</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_33.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="Verification">
+ <?dbhtml filename="Verification.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Verification</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">The following preferences can be changed on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Verification</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> page.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="added">On Rules Configuration tab of </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Verifcation</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> panel you can determine JSF and Struts rules.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Verification</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_34.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="changed">On Options tab you can define a limit for the reported errors number.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Options of Verification</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_35.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In summary, this document should guide you to those parts of </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> which you specifically need to develop Web Applications. It coves different
+ aspects of visual components such as editors, views, etc. for browsing, representing and
+ editing web resources you are working with.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If there's anything we didn't cover or you can't figure out,
+ please feel free to visit our </diffmk:wrapper><ulink diffmk:change="added" url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258"><diffmk:wrapper diffmk:change="added">JBoss
+ Developer Studio Forum</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> to ask questions. There we are also looking for your
+ suggestions and comments.</diffmk:wrapper></para>
+ </section>
+
+ <!--section id="View">
+ <?dbhtml filename="View.html"?>
+ <title>View</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property>JBoss Tools > JBoss Servers > View</property>
+ </emphasis> page.</para>
+ <para>The <emphasis>
+ <property>View</property>
+ </emphasis> shows you preferences for JBoss Servers view.</para>
+ <figure>
+ <title>View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_28.png" scale="70"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="XDoclet">
+ <?dbhtml filename="XDoclet.html"?>
+ <title>XDoclet</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property>JBoss Tools > XDoclet</property>
+ </emphasis> page.</para>
+ <para>On <emphasis>
+ <property>XDoclet</property>
+ </emphasis> screen you determine XDoclet module versions.</para>
+ <figure>
+ <title>XDoclet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_31.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="XDocletTemplates">
+ <?dbhtml filename="XDocletTemplates.html"?>
+ <title>XDoclet Templates</title>
+ <para>To see what XDoclet tags templates available for completion select <emphasis>
+ <property>JBoss Tools > XDoclet > Code Assist > Templates</property>
+ </emphasis>.</para>
+ <figure>
+ <title>XDoclet Templates</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_32.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By right clicking on any tree element you can add a new template, remove or rename it
+ and also add a new tree.</para>
+ <para>Select, for example, <emphasis>
+ <property>Add</property>
+ </emphasis> and you'll be prompted by a list of available elements to add.</para>
+ <figure>
+ <title>Add New XDoclet Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_33.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By double-clicking some element a new list will be shown: now for available methods.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_34.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Choose any element from the list, then select an attribute.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_35.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>It will be added to the available templates.</para>
+ <figure>
+ <title>Select New Element</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="XDocletsVariables">
+ <?dbhtml filename="XDocletsVariables.html"?>
+ <title>XDoclets Variables</title>
+ <para>By selecting <emphasis>
+ <property>JBoss Tools > XDoclet > Variables</property>
+ </emphasis> you define variables used in templates.</para>
+ <figure>
+ <title>XDoclets Variables</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="ChangingDefaultEnvironmentDuringProjectCreation">
+ <?dbhtml filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
+ <title>Changing Default Environment During Project Creation</title>
+
+ <para>To change the default environment and project template for either JSF or Struts new
+ project creation:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property> Window > Preferences > JBoss Tools > Web
+ > {JSF or Struts} > Project</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Version set the environment you want to be the default one</para>
+ </listitem>
+ <listitem>
+ <para>For Project Template set the template you want to be the default one</para>
+ </listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Changing Enviroment Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="ChangingDefaultProjectTemplateDuringProjectCreatio8n">
+ <?dbhtml filename="ChangingDefaultEnvironmentDuringProjectCreation.html"?>
+ <title>Changing Default Project Template During Project Creation</title>
+
+ <para>To change the default project template for either JSF or Struts new project creation:</para>
+
+ <orderedlist>
+ <listitem>
+ <para>Select<emphasis>
+ <property> Window > Preferences > JBoss Tools > Web > {JSF or Struts} >
+ Project</property>
+ </emphasis></para>
+ </listitem>
+ <listitem>
+ <para>For Project Template set the template you want to be the default one</para>
+ </listitem>
+ </orderedlist>
+
+ <figure>
+ <title>Changing Project Template</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ -->
+</chapter><chapter id="preferences" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jsf/docs/userguide/en/modules/preferences.xml" xreflabel="preferences">
+ <?dbhtml filename="preferences.html"?>
+ <title>JBoss Tools Preferences</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">Configuring the various </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> features is done via
+ the </diffmk:wrapper><property diffmk:change="added" moreinfo="none">Preferences</property><diffmk:wrapper diffmk:change="changed"> screen by selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss Tools</property>
+ </emphasis> from the menu bar.</para>
+ <figure float="0">
+ <title>Preferences are included in this dialog.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>From this screen, you can select these more specific sets of <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools
+ preferences</diffmk:wrapper></property>:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="PackagingArchives"><diffmk:wrapper diffmk:change="added">Packaging Archives</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Editors">Editors</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="VisualPageEditor2"><diffmk:wrapper diffmk:change="added">Visual Page Editor</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added">
+ <link diffmk:change="added" linkend="el_variables"><diffmk:wrapper diffmk:change="added">El Variables</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSF">JSF</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSFPage">JSF Page</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="JSFPropject">JSF Propject</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="JSFFlowDiagram"><diffmk:wrapper diffmk:change="added">JSF Flow Diagram</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Seam">Seam</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link linkend="SeamValidator">Seam Validator</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="Struts">Struts</link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="struts_automation">Struts Automatic</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="Plug-inInsets"><diffmk:wrapper diffmk:change="added">Plug-in Insets</diffmk:wrapper></link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="ResourceInsets"><diffmk:wrapper diffmk:change="added">Resource Insets</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="StrutsCustomization"><diffmk:wrapper diffmk:change="added">Struts Customization</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>
+ <link linkend="StrutsProject">Struts Project</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link linkend="StrutsSupport">Struts Support</link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="StrutsPages"><diffmk:wrapper diffmk:change="added">Struts Pages</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="StrutsFlowDiagram"><diffmk:wrapper diffmk:change="added">Struts Flow Diagram</diffmk:wrapper></link>
+ </para>
+ </listitem>
+
+
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="tiles_diagram"><diffmk:wrapper diffmk:change="added">Tiles Diagram</diffmk:wrapper></link>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <link diffmk:change="added" linkend="Verification"><diffmk:wrapper diffmk:change="added">Verification</diffmk:wrapper></link>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="PackagingArchives">
+
+ <title><diffmk:wrapper diffmk:change="changed">Packaging Archives</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="changed">Fallow to </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Packaging Archives</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> to open the page for changing Packaging Archives preferences.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">Here you can determine settings for Project Packages view and core preferences.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Packaging Archives</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The next table lists all available preferences for Packaging Archives and their
+ description.</diffmk:wrapper></para>
+
+ <table diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Packaging Archives Preferences</diffmk:wrapper></title>
+
+ <tgroup cols="3" diffmk:change="added">
+
+ <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
+ <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
+ <colspec colnum="3" colwidth="2*" diffmk:change="added"></colspec>
+
+ <thead diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Option</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Description</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Default</diffmk:wrapper></entry>
+ </row>
+ </thead>
+
+ <tbody diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Enable incremental builder</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Uncheck this option if you don't want to enable incremental
+ builder for your resources</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show full output path next to packages</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">This option allows you to show or hide an output path next to
+ packages
+ </diffmk:wrapper><!--(<link linkend="full_outputpath_for_packages">See the
+ figure</link>)--><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show the full root directory of filesets</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">If on, the full root directory is displayed next to filesets.
+ Otherwise, it's hidden
+ </diffmk:wrapper><!--(<link
+ linkend="full_rootdir_for_filesets">See the figure</link>)--><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show project at the root</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">This option allows you to choose whether to display a project name at
+ the root of the packages or not. When checked, 'Show all
+ projects that contain packages' is enabled
+ </diffmk:wrapper><!--(<link
+ linkend="project_at_the_root">See the figure</link>)--><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show all projects that contain packages</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selecting this setting enables the Projects Archiving view to show or
+ hide all projects that contain packages. The option is available when
+ the previous one is checked.</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Off</diffmk:wrapper></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ <!--
+ <figure id="full_outputpath_for_packages">
+ <title>Show Full Output Path next to Packages</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure id="full_rootdir_for_filesets">
+ <title>Show the Full Root Directory of Filesets</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure id="project_at_the_root">
+ <title>Show Project at the root</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+-->
+
+ </section>
+
+ <!--section id="CodeAssist">
+ <?dbhtml filename="CodeAssist.html"?>
+ <title>CodeAssist</title>
+ <para>Select <emphasis>
+ <property>JBoss Tools > XDoclet > Code Assist</property>
+ </emphasis> to see Code Assist preference page.</para>
+ <para>Here is what the Code Assist preference page looks like: </para>
+ <figure>
+ <title>CodeAssist</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section-->
+
+ <section diffmk:change="added" id="Editors">
+ <?dbhtml filename="Editors.html"?>
+ <title>Editors</title>
+ <para><diffmk:wrapper diffmk:change="added">To adjust settings common for all editors supplied with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Developer
+ Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you should select </diffmk:wrapper><emphasis>
+ <property moreinfo="none">JBoss Tools > Web > Editors</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">On the Editors page the following preferences are available:</diffmk:wrapper></para>
+
+ <table diffmk:change="added">
+
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Editors Preferences</diffmk:wrapper></title>
+ <tgroup cols="3" diffmk:change="added">
+
+ <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
+ <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
+ <colspec colnum="3" colwidth="2*" diffmk:change="added"></colspec>
+
+ <thead diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Option</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Description</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Default</diffmk:wrapper></entry>
+ </row>
+ </thead>
+
+ <tbody diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Always use JBoss Tools editors with Open option</diffmk:wrapper></entry>
+ <entry diffmk:change="added"></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show warning when project has no JBoss Tools capabilities</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Check this option to be sure that any JBoss Tools editor fully
+ available for a particular type of file. If no, you'll be
+ warned about this.</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Use Source tab as a default for multi-tab editors</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">If on, an editor will open the files in the Source view by default</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Off</diffmk:wrapper></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section diffmk:change="added" id="VisualPageEditor2">
+ <?dbhtml filename="VisualPageEditor.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">Visual Page Editor</diffmk:wrapper></title>
+ <para><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Editors > Visual Page
+ Editor</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> screen allows you to control some aspects of the behavior of the
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Visual Page Editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> (VPE) for JSF/HTML files.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Visual Page Editor</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The next table lists the possible settings that you can adjust on the
+ </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">General tab</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> of the VPE Preferences page.</diffmk:wrapper></para>
+
+
+ <table diffmk:change="added">
+
+ <title><diffmk:wrapper diffmk:change="changed">VPE Preferences</diffmk:wrapper></title>
+ <tgroup cols="3" diffmk:change="added">
+
+ <colspec align="left" colnum="1" colwidth="2*" diffmk:change="added"></colspec>
+ <colspec colnum="2" colwidth="4*" diffmk:change="added"></colspec>
+ <colspec colnum="3" colwidth="2*" diffmk:change="added"></colspec>
+
+ <thead diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Option</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Description</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Default</diffmk:wrapper></entry>
+ </row>
+ </thead>
+
+ <tbody diffmk:change="added">
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show Border for Unknown Tags</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">The option allows to place the border around unknown tags or undo
+ this</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show Non-Visual Tags</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Check this box, if you want the editor shows non-visual elements on
+ the page you're editing</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Off</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show Resource Bundles Usage as EL Expressions </diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">If the option is checked, the editor will show EL expressions instead
+ of the resource values</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Off</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Always Prompts for Tag Attributes During Tag Insert </diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Having this option off, the dialog with possible attributes for
+ inserting tag won't appear if all its attributes are optional</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Show Selection Tag Bar</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">This option allows to show or hide the Selection Bar</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Always Hide Selection Bar Without Prompt</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Check this box if you don't want the confirmation window
+ appears when closing the Selection Bar</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Off</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Default Editor Tab</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">The option provides with a possibility to choose one of the following
+ views - Visual/Source, Source or Preview, as default when opening the
+ editor</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Visual/Source</diffmk:wrapper></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">Size of Visual Editor Pane 0 – 100% </diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">With the help of this scroll bar you can adjust the percentage rating
+ between the Source and Visual modes of the Visual/Source view</diffmk:wrapper></entry>
+ <entry diffmk:change="added"><diffmk:wrapper diffmk:change="added">50%</diffmk:wrapper></entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para><diffmk:wrapper diffmk:change="added">On the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Templates tab</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you can edit or remove </diffmk:wrapper><link diffmk:change="added" linkend="vpe_templating"><diffmk:wrapper diffmk:change="added">VPE templates</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Visual Page Editor Templates</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Select a template for editing from the available list and press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Edit</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button. It will pick up the </diffmk:wrapper><link diffmk:change="added" linkend="template_dialog"><diffmk:wrapper diffmk:change="added">Template
+ dialog</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> where you can adjust new settings.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="el_variables">
+ <?dbhtml filename="el_variables.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">El Variables</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">To specify necessary EL variables globally, i. e. for all projects and resources in
+ your workspace, you should go to </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > El Variables</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">El Variables</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Click </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Add...</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to set value for a new EL variable. In the appeared wizard you should
+ specify the global values and press </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Finish</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Adding a Global El Variable</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Tip:</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="added">If you specify an equal variable in </diffmk:wrapper><link diffmk:change="added" linkend="el_exp_para"><diffmk:wrapper diffmk:change="added">VPE EL
+ dialog</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added"> and in Preference EL dialog, variable from preference dialog will have
+ priority.</diffmk:wrapper></para>
+ </tip>
+ </section>
+ <!--section id="JBossServers">
+ <?dbhtml filename="JBossServers.html"?>
+ <title>JBoss Servers</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property>JBoss Tools > JBoss Servers</property>
+ </emphasis> preference page.</para>
+ <para>Here is what the JBoss Servers preference page looks like:</para>
+ <figure>
+ <title>JBoss Servers</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/preferences/preferences_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section-->
+
+ <section diffmk:change="added" id="JSF">
+ <?dbhtml filename="JSF.html"?>
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">JSF</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Select </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools > Web > JSF</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to get to the JSF Project specific preferences.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">JSF</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_11.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="JSFPage">
+ <?dbhtml filename="JSF Page.html"?>
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">JSF Pages</diffmk:wrapper></title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > JSF > JSF Pages</diffmk:wrapper></property>
+ </emphasis> you can add jsf pages or remove existing ones.</para>
+ <figure float="0">
+ <title>JSF Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="JSFPropject">
+
+ <title><diffmk:wrapper diffmk:change="changed">JSF Project</diffmk:wrapper></title>
+ <para>Select <emphasis>
+ <property moreinfo="none">JBoss Tools > Web > JSF > Project</property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> to see JSF Project preferences page.</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New Project</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> tab you can set default values for </diffmk:wrapper><ulink diffmk:change="added" url=" ../../jsf_tools_ref_guide/html_single/index.html#new_jsf_project"><diffmk:wrapper diffmk:change="added">New JSF Project</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added"> wizard:</diffmk:wrapper></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Version</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> for setting the default JSF Environment</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Template</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> so as </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New JSF Project wizard</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> shows this
+ template as default for the chosen JSF Environment</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Root</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> for specifying default location for a new JSF project</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="added">If you check </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Use Default Path</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> here, this box will be also checked in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New JSF Project
+ wizard</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </listitem>
+
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Servlet Version</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> for setting the default Servlet version of a new JSF project</diffmk:wrapper></para>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here it's also possible to define whether to register Web Context in </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">server.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> while organizing a new project or not. Check the proper box in order
+ to do that.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title><diffmk:wrapper diffmk:change="changed">New JSF Propject Preferences</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">On the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Import Project</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> tab in the JSF Project screen you can determine the default Servlet version
+ for the </diffmk:wrapper><ulink diffmk:change="added" url=" ../../Exadel-migration/html_single/index.html#import_jsf_screen"><diffmk:wrapper diffmk:change="added">Import JSF Project</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">
+ wizard and also whether to register Web Context in </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">server.xml</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> or not.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Import JSF Propject Preferences</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section diffmk:change="added" id="JSFFlowDiagram">
+ <?dbhtml filename="JSFFlowDiagram.html"?>
+ <title><diffmk:wrapper diffmk:change="changed">JSF Flow Diagram</diffmk:wrapper></title>
+ <para><diffmk:wrapper diffmk:change="changed">Selecting </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Editors > JSF Flow Diagram</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> allows you to specify some aspects of the Diagram mode of the JSF
+ configuration file editor.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">JSF Flow Diagram</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_15.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The first two items control the background grid for the diagram. The next two items
+ allow you to control the appearance of the labels for views (pages) and the transitions
+ between views. For these two items, clicking the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Change... </diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">button allows you to assign a font with a dialog box.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">The first check box determines whether a view in the diagram that doesn't have a
+ transition connecting it to another view yet should be written to the source code as a
+ partial navigation rule. The next check box determines whether the diagram cursor
+ reverts immediately to the standard selection mode after it's used in the
+ transition-drawing mode to draw a transition. Finally, the last two check boxes concern
+ shortcuts. A shortcut is a transition that is there but isn't actually displayed in the
+ diagram as going all the way to the target view it's connected to, in order to make the
+ diagram clearer. With the check boxes, you can decide whether to display a small
+ shortcut icon as part of the shortcut and also whether to display the target view as a
+ label or not.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Add View</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_16.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Selecting the Add Page tab in the JSF Flow Diagram screen allows you to determine the
+ default template and file extension for views (pages) you add directly into the diagram
+ using a context menu or the view-adding mode of the diagram cursor.</diffmk:wrapper></para>
+ </section>
+
+ <section diffmk:change="added" id="label_decorations">
+ <title><diffmk:wrapper diffmk:change="changed">Label Decorations</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="changed">The Label Decorations page is opened from </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">JBoss Tools > Web > Label Decorations</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Label Decorations</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">On this page you can determine the format for a text output near the decoration label
+ for different Web resources. To change the value for selected element, click </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Add Variable...</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button next to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Format</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> field. Appeared wizard will prompt you to select one from the available
+ list.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Label Decoration for Validator</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="Seam">
+
+ <title>Seam</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web > Seam</property>
+ </emphasis> page.</para>
+ <para>On <emphasis>
+ <property moreinfo="none">Seam</property>
+ </emphasis> screen you can add and remove Seam runtimes.</para>
+ <para>Here is what Seam preference page looks like:</para>
+ <figure float="0">
+ <title>Seam</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="SeamValidator">
+
+ <title>Seam Validator</title>
+ <para>The following preferences can be changed on the <emphasis>
+ <property moreinfo="none">JBoss Tools > Web > Seam > Validator</property>
+ </emphasis> page.</para>
+ <para>In <emphasis>
+ <property moreinfo="none">Validator</property>
+ </emphasis> panel you configure seam problems that will be processed by validator.</para>
+ <figure float="0">
+ <title>Seam Validator</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="Struts">
+
+ <title>Struts</title>
+ <para>By selecting <emphasis>
+ <property moreinfo="none">JBoss Tools > Web > Struts</property>
+ </emphasis> you can configure Struts projects specific preferences.</para>
+ <figure float="0">
+ <title>Struts</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+
+
+ <title><diffmk:wrapper diffmk:change="changed">Struts Automation</diffmk:wrapper></title>
+ <para>On <emphasis>
+ <property moreinfo="none">Automation</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> panel you can modify default text for the Tilel Struts plug-in element, the
+ Validator Struts plug-in element, and error message resource files.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Struts Automatic</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata diffmk:change="added" fileref="images/preferences/preferences_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </chapter>
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/pom.xml 2008-10-30 16:03:06 UTC (rev 11342)
+++ branches/jbosstools-3.0.0.Beta1/jsf/docs/userguide/pom.xml 2008-10-30 16:03:10 UTC (rev 11343)
@@ -39,7 +39,7 @@
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11342 - in trunk: seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-10-30 12:03:06 -0400 (Thu, 30 Oct 2008)
New Revision: 11342
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/figures/ConnectionFigure.java
trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java
trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/editor/figures/ConnectionFigure.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3065
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/figures/ConnectionFigure.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/figures/ConnectionFigure.java 2008-10-30 16:02:17 UTC (rev 11341)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/figures/ConnectionFigure.java 2008-10-30 16:03:06 UTC (rev 11342)
@@ -17,7 +17,7 @@
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
-
+import org.eclipse.swt.SWT;
import org.jboss.tools.jsf.ui.editor.edit.LinkEditPart;
import org.jboss.tools.jsf.ui.editor.model.ILink;
@@ -84,77 +84,91 @@
editPart.clear();
}
- PointList points;
- Point point;
- Point beg = new Point(0, 0), end = new Point(0, 0);
- Point corner = new Point(0, 0);
- boolean horiz;
-
protected void outlineShape(Graphics g) {
- points = getPoints();
- point = points.getPoint(0);
+ g.setLineCap(SWT.CAP_ROUND);
+
+ PointList points = getPoints();
+ Point point = points.getPoint(0);
+ Point beg = new Point();
+ Point end = new Point();
+ Point eCorner = new Point();
+ Point bCorner = new Point();
+ boolean horiz;
beg.x = point.x;
beg.y = point.y;
-
+
if (points.getFirstPoint().y == points.getLastPoint().y) {
super.outlineShape(g);
return;
}
-
+ if (Math.abs(points.getFirstPoint().y - points.getLastPoint().y) < 4) {
+ int delta = Math.abs(points.getFirstPoint().y - points.getLastPoint().y);
+ if(points.size() == 4){
+ Point point1 = points.getPoint(0);
+ Point point2 = points.getPoint(1);
+ Point point3 = points.getPoint(2);
+ Point point4 = points.getPoint(3);
+ if(point1.x < point4.x){
+ point2.x -= delta/2;
+ point3.x += delta/2;
+ }else{
+ point2.x += delta/2;
+ point3.x -= delta/2;
+ }
+ g.drawLine(point1, point2);
+ g.drawLine(point2, point3);
+ g.drawLine(point3, point4);
+ return;
+ }
+ }
+
for (int i = 1; i < points.size(); i++) {
point = points.getPoint(i);
end.x = point.x;
end.y = point.y;
-
+
if (beg.y == end.y)
horiz = true;
else
horiz = false;
-
+
+ eCorner.x = 0;
if (i != 1) {
if (horiz) {
- if (end.x > beg.x) {
- corner.x = beg.x + 1;
+ if (end.x > beg.x)
beg.x += 2;
- } else {
- corner.x = beg.x - 1;
+ else
beg.x -= 2;
- }
} else {
- if (end.y > beg.y) {
- corner.y = beg.y + 1;
+ if (end.y > beg.y)
beg.y += 2;
- } else {
- corner.y = beg.y - 1;
+ else
beg.y -= 2;
- }
}
+ eCorner.x = beg.x;
+ eCorner.y = beg.y;
}
- if (corner.x != 0)
- g.drawLine(corner, corner);
- corner.x = 0;
-
- if (i != points.size() - 1) {
+
+ if (bCorner.x != 0 && eCorner.x != 0)
+ g.drawLine(bCorner, eCorner);
+
+ bCorner.x = 0;
+ if (i != (points.size() - 1)) {
if (horiz) {
- if (end.x > beg.x) {
- corner.x = end.x - 1;
+ if (end.x > beg.x)
end.x -= 2;
-
- } else {
- corner.x = end.x + 1;
+ else
end.x += 2;
- }
} else {
- if (end.y > beg.y) {
- corner.y = end.y - 1;
+ if (end.y > beg.y)
end.y -= 2;
- } else {
- corner.y = end.y + 1;
+ else
end.y += 2;
- }
}
+ bCorner.x = end.x;
+ bCorner.y = end.y;
}
-
+
g.drawLine(beg, end);
point = points.getPoint(i);
beg.x = point.x;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java 2008-10-30 16:02:17 UTC (rev 11341)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui.pages/src/org/jboss/tools/seam/ui/pages/editor/figures/ConnectionFigure.java 2008-10-30 16:03:06 UTC (rev 11342)
@@ -87,15 +87,8 @@
}
protected void outlineShape(Graphics g) {
- Page page=null;
- if(link != null && link.getFromElement() instanceof Page)
- page = (Page)link.getFromElement();
+ g.setLineCap(SWT.CAP_ROUND);
- if(page != null && !page.isConfirmed()){
- g.setLineDash(new int[]{3,3});
- g.setLineStyle(SWT.LINE_CUSTOM);
- }
-
PointList points = getPoints();
Point point = points.getPoint(0);
Point beg = new Point();
@@ -144,17 +137,15 @@
eCorner.x = 0;
if (i != 1) {
if (horiz) {
- if (end.x > beg.x) {
+ if (end.x > beg.x)
beg.x += 2;
- } else {
+ else
beg.x -= 2;
- }
} else {
- if (end.y > beg.y) {
+ if (end.y > beg.y)
beg.y += 2;
- } else {
+ else
beg.y -= 2;
- }
}
eCorner.x = beg.x;
eCorner.y = beg.y;
@@ -162,21 +153,19 @@
if (bCorner.x != 0 && eCorner.x != 0)
g.drawLine(bCorner, eCorner);
+
bCorner.x = 0;
-
- if (i != points.size() - 1) {
+ if (i != (points.size() - 1)) {
if (horiz) {
- if (end.x > beg.x) {
+ if (end.x > beg.x)
end.x -= 2;
- } else {
+ else
end.x += 2;
- }
} else {
- if (end.y > beg.y) {
+ if (end.y > beg.y)
end.y -= 2;
- } else {
+ else
end.y += 2;
- }
}
bCorner.x = end.x;
bCorner.y = end.y;
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/editor/figures/ConnectionFigure.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/editor/figures/ConnectionFigure.java 2008-10-30 16:02:17 UTC (rev 11341)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/src/org/jboss/tools/struts/ui/editor/figures/ConnectionFigure.java 2008-10-30 16:03:06 UTC (rev 11342)
@@ -16,7 +16,7 @@
import org.eclipse.draw2d.PolylineConnection;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.PointList;
-
+import org.eclipse.swt.SWT;
import org.jboss.tools.struts.ui.editor.edit.LinkEditPart;
import org.jboss.tools.struts.ui.editor.model.ILink;
@@ -89,73 +89,90 @@
public void clear(){
if(editPart != null)editPart.clear();
}
- PointList points;
- Point point;
- Point beg = new Point(0,0), end = new Point(0,0);
- Point corner = new Point(0,0);
- boolean horiz;
protected void outlineShape(Graphics g) {
- points = getPoints();
- point = points.getPoint(0);
+ g.setLineCap(SWT.CAP_ROUND);
+
+ PointList points = getPoints();
+ Point point = points.getPoint(0);
+ Point beg = new Point();
+ Point end = new Point();
+ Point eCorner = new Point();
+ Point bCorner = new Point();
+ boolean horiz;
beg.x = point.x;
beg.y = point.y;
-
-
- if(points.getFirstPoint().y == points.getLastPoint().y){
+
+ if (points.getFirstPoint().y == points.getLastPoint().y) {
super.outlineShape(g);
return;
}
-
- for(int i=1;i<points.size();i++){
+ if (Math.abs(points.getFirstPoint().y - points.getLastPoint().y) < 4) {
+ int delta = Math.abs(points.getFirstPoint().y - points.getLastPoint().y);
+ if(points.size() == 4){
+ Point point1 = points.getPoint(0);
+ Point point2 = points.getPoint(1);
+ Point point3 = points.getPoint(2);
+ Point point4 = points.getPoint(3);
+ if(point1.x < point4.x){
+ point2.x -= delta/2;
+ point3.x += delta/2;
+ }else{
+ point2.x += delta/2;
+ point3.x -= delta/2;
+ }
+ g.drawLine(point1, point2);
+ g.drawLine(point2, point3);
+ g.drawLine(point3, point4);
+ return;
+ }
+ }
+
+ for (int i = 1; i < points.size(); i++) {
point = points.getPoint(i);
end.x = point.x;
end.y = point.y;
-
- if(beg.y == end.y)horiz = true;
- else horiz = false;
-
- if(i != 1){
- if(horiz){
- if(end.x > beg.x){
- corner.x = beg.x+1;
- beg.x+=2;
- }else{
- corner.x = beg.x-1;
- beg.x-=2;
- }
- }else{
- if(end.y > beg.y){
- corner.y = beg.y+1;
- beg.y+=2;
- }else{
- corner.y = beg.y-1;
- beg.y-=2;
- }
+
+ if (beg.y == end.y)
+ horiz = true;
+ else
+ horiz = false;
+
+ eCorner.x = 0;
+ if (i != 1) {
+ if (horiz) {
+ if (end.x > beg.x)
+ beg.x += 2;
+ else
+ beg.x -= 2;
+ } else {
+ if (end.y > beg.y)
+ beg.y += 2;
+ else
+ beg.y -= 2;
}
+ eCorner.x = beg.x;
+ eCorner.y = beg.y;
}
- if(corner.x != 0)g.drawLine(corner, corner);
- corner.x = 0;
- if(i != points.size()-1){
- if(horiz){
- if(end.x > beg.x){
- corner.x = end.x-1;
- end.x-=2;
-
- }else{
- corner.x = end.x+1;
- end.x+=2;
- }
- }else{
- if(end.y > beg.y){
- corner.y = end.y-1;
- end.y-=2;
- }else{
- corner.y = end.y+1;
- end.y+=2;
- }
+ if (bCorner.x != 0 && eCorner.x != 0)
+ g.drawLine(bCorner, eCorner);
+
+ bCorner.x = 0;
+ if (i != (points.size() - 1)) {
+ if (horiz) {
+ if (end.x > beg.x)
+ end.x -= 2;
+ else
+ end.x += 2;
+ } else {
+ if (end.y > beg.y)
+ end.y -= 2;
+ else
+ end.y += 2;
}
+ bCorner.x = end.x;
+ bCorner.y = end.y;
}
g.drawLine(beg, end);
17 years, 2 months
JBoss Tools SVN: r11341 - in branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide: en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-30 12:02:17 -0400 (Thu, 30 Oct 2008)
New Revision: 11341
Added:
branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/en/master_output.xml 2008-10-30 16:02:17 UTC (rev 11341)
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY esb_support SYSTEM "modules/esb_support.xml">
+<!ENTITY esb_editor SYSTEM "modules/esb_editor.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>ESB Tools Reference Guide</title>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+ <author><firstname>Tatyana</firstname><surname>Romanovich</surname></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo><diffmk:wrapper diffmk:change="changed">
+ Version: 3.0.0.beta1
+ </diffmk:wrapper></releaseinfo>
+
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/esb_ref_guide/pdf/ES..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+</bookinfo>
+ <toc></toc>
+
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/introduction.xml">
+ <?dbhtml filename="introduction.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>JBoss Tools</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction</title>
+
+ <section>
+
+ <title>What is ESB?</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">ESB (Enterprise Service Bus) - an abstraction layer on top of an implementation of an
+ enterprise messaging system that provides the features with which Service Oriented
+ Architectures may be implemented.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">If you want to develop applications using ESB technology JBoss ESB also meet your
+ needs. The JBoss Tools provide ESB editor and all necessary wizards for creating ESB
+ file.</diffmk:wrapper></para>
+ <para><diffmk:wrapper diffmk:change="changed">In this guide we provide you with the information on ESB Editor which allows you to
+ develop ESB file much faster and with far fewer errors so sparing your time.</diffmk:wrapper></para>
+
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>You can find a set of benefits and other extra information on:</para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb">JBoss ESB</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://wiki.jboss.org/wiki/JBossESB">JBoss Wiki</ulink>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <ulink url="http://www.jboss.org/jbossesb/docs/index.html"><diffmk:wrapper diffmk:change="changed">JBoss ESB
+ Documentation Library</diffmk:wrapper></ulink>
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para><diffmk:wrapper diffmk:change="added">The latest </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools/JBoss Developer Studio</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> documentation
+ builds are available </diffmk:wrapper><ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+</chapter>
+
+
+<chapter id="esb_support" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml">
+ <?dbhtml filename="esb_support.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>ESB</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Support</title>
+
+ <para><diffmk:wrapper diffmk:change="added">In this section we will focus on all concepts that </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ integrates for working with JBoss ESB.</diffmk:wrapper></para>
+
+ <section>
+ <title><diffmk:wrapper diffmk:change="changed">ESB Tools Installation</diffmk:wrapper></title>
+
+ <para><diffmk:wrapper diffmk:change="changed">This chapter will provide you with the information on how to install
+ JBoss ESB plugin into Eclipse.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
+ dependence on other JBoss Tools modules we recommend you to install a bundle
+ of all </diffmk:wrapper><ulink url="http://labs.jboss.com/tools/download/index.html"><diffmk:wrapper diffmk:change="changed">JBoss
+ Tools plug-ins</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="changed"> installation instruction on which you can find on
+ JBoss Wiki in </diffmk:wrapper><ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
+ </section>
+
+ <section>
+ <title>Creating a ESB File</title>
+ <para><diffmk:wrapper diffmk:change="changed">In this chapter we suggest a step-by-step walk-through of creating your own
+ simple file. Let's try to organize a new ESB file.</diffmk:wrapper></para>
+
+ <para>We will show you how to use the Creation wizard for creating a new ESB file.</para>
+
+ <para>At first you should open any project. Select <emphasis>
+ <property moreinfo="none">File >New > Other...</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> in the main menu bar or context menu for selected project and
+ then </diffmk:wrapper><emphasis>
+ <property moreinfo="none">ESB > ESB File</property>
+ </emphasis> in the New dialog:</para>
+
+ <figure float="0">
+ <title>New Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/01_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> brings us to the wizard page where it's necessary to
+ specify the folder, name and version for the file. We choose, for example, </diffmk:wrapper><emphasis>
+ <property moreinfo="none">jboss-esb.xml</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> as the name and accept the selected projects folder and default
+ version.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Folder, Name and Version</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_support/02_create_esb.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Thus, our file will be created in the selected projects folder by default. If
+ you want to change the folder for your future file click </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed folder or simply type it.</para>
+
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis><diffmk:wrapper diffmk:change="changed"> results in the file being generated. The wizard creates one xml
+ file.</diffmk:wrapper></para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="esb_editor" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml" xreflabel="esb_editor">
+ <?dbhtml filename="esbEditor.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss ESB</keyword>
+ <keyword>Editor</keyword>
+ <keyword>ESB</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>ESB Editor</title>
+
+ <para><diffmk:wrapper diffmk:change="added"> ESB editor has lots of useful features, they are described in details in this chapter. In
+ addition you'll get to know with how </diffmk:wrapper><property diffmk:change="added" moreinfo="none">ESB Editor</property><diffmk:wrapper diffmk:change="added"> uses combined
+ visual and source editing of esb files.</diffmk:wrapper></para>
+
+
+
+ <title>ESB File Editor</title>
+ <para><property moreinfo="none">ESB File Editor</property><diffmk:wrapper diffmk:change="changed"> is a powerful and customizable tool. ESB File
+ Editor allows developing an application using ESB technology.</diffmk:wrapper></para>
+
+ <para>ESB file editor has two tabs: Tree and Source.</para>
+
+ <para><diffmk:wrapper diffmk:change="changed">You can switch to Tree. The Tree view for the editor displays all ESB artifacts in a
+ tree format. By selecting any node you can see and edit its properties which will appear
+ in the right-hand area. For example, a Provider:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Tree View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/01_esb_tree_view.png" scale="90"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">You can easily switch from Tree to Source by selecting the Source tab at the bottom of
+ the editor and work in </diffmk:wrapper><property diffmk:change="added" moreinfo="none">Source view</property>.</para>
+
+ <figure float="0" id="sourceView">
+ <title>Source View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/02_esb_source_view.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">The Source view for the editor displays a text content of the ESB file. It is always
+ synchronized with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Tree view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">, so any changes made in one of the
+ views will immediately appear in the other.</diffmk:wrapper></para>
+
+ <para>No matter what view you select, you get full integration with <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Outline
+ view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. For example, you can work in the Source view with the help of the
+ Outline view. The Outline view shows a tree structure of the ESB file. Simply select any
+ element in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none">Outline view</property><diffmk:wrapper diffmk:change="added"> and it will jump to the same place in
+ the Source editor, so you can navigate through the source code with Outline view.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Outline View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/03_esb_outline_view.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">Adding, editing or deleting of some artifacts operations are available right in the
+ </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Tree view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> . Right-click any node and select one of the
+ available actions in the context menu. For example, you can easily add a new Provider:</diffmk:wrapper></para>
+ <para></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Adding New Provider</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/04_esb_add_provider.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="changed">You can easily add a new Service too:</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Adding New Service</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/05_esb_add_service.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The same way you can create a listener for service and other elements of ESB:</para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Adding New Listener for Service</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/06_esb_add_listener.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The same actions can be done in the right part of <property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Tree view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="changed"> tab
+ (Form editor) using </diffmk:wrapper><property moreinfo="none">Add</property>, <property moreinfo="none">Edit</property><diffmk:wrapper diffmk:change="changed"> and
+ </diffmk:wrapper><property moreinfo="none">Remove</property> buttons.</para>
+
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">In order to add a new generic Action to your ESB XML file you should select the
+ Actions node under the Services, then right-click and choose </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New > Generic Action</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Adding New Action in the Tree View</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_editor/11_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Or instead make use of </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Add...</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> button in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Form editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> on the left.</diffmk:wrapper></para>
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Adding New Action in the Form Editor</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_editor/12_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">As you can see on the bath figures above, the context menu will also prompt you to
+ insert one of the Actions that are supplied out-of-the-box with </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss
+ ESB</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. After choosing one an appeared </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New Action wizard</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">
+ will ask you to fill out a name field and other fields specific for each Action
+ property. For example, for </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Content Based Router</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> Action the wizard looks as follows:</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">New Action Wizard</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_editor/13_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">After confirming creating the Action you can see it in the Tree under the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Actions</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> node and preview as well as edit its settings in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Form
+ editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> on the left.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Form Editor for Content Based Router</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/esb_editor/14_esb_editor.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">ESB editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> can recognize some specific objects. On the figure you
+ can see </diffmk:wrapper><emphasis diffmk:change="added"><diffmk:wrapper diffmk:change="added">org.jboss.soa.esb.actions.ContentBasedRouter</diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="added"> in the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Class</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added"> section.</diffmk:wrapper></para>
+
+ <section id="esb_editors_features">
+
+ <title>ESB Editors Features</title>
+ <para><diffmk:wrapper diffmk:change="changed">JBoss ESB tooling has powerful editor features that help you easily make use of
+ content and code assist.</diffmk:wrapper></para>
+
+ <section id="ESBsyntaxvalidation84">
+
+ <title>ESB syntax validation</title>
+ <para><diffmk:wrapper diffmk:change="added">When working in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss ESB editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> you are constantly provided
+ with feedback and contextual error checking as you type. In the Source viewer, if at
+ any point a tag is incorrect or incomplete, an error will be indicated next to the
+ line and also in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Problems view</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added"> below.</diffmk:wrapper></para>
+ </section>
+
+ <section id="ESBSupportXMLSchema">
+ <title>Support for XML Schema</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">JBoss ESB Framework fully </diffmk:wrapper><link linkend="sourceView"><diffmk:wrapper diffmk:change="changed">supports XML files based on
+ schemas as well as DTDs</diffmk:wrapper></link>.</para>
+ </section>
+
+
+
+ <section id="ESBContentAssist">
+
+ <title>Content Assist for ESB XML file</title>
+
+ <para>When you work with any ESB XML file <property moreinfo="none">Content Assist</property><diffmk:wrapper diffmk:change="changed"> is
+ available to help you. It provides pop-up tip to help you complete your code
+ statements. It allows you to write your code faster and with more accuracy. Content
+ assist is always available in the Source mode. Simply type </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Ctrl-Space</property>
+ </emphasis> to see what is available.</para>
+
+ <para>Content Assist for ESB XML file:</para>
+ <figure float="0">
+ <title>Content Assist for ESB XML file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/08_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Content Assist for attributes:</para>
+ <figure float="0">
+ <title>Content Assist for attributes:</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/09_esb_features.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="FullControlOverSourceFiles-SynchronizedSourcAndVisualEditing">
+
+ <title>Synchronized Source and Visual Editing</title>
+
+ <para><diffmk:wrapper diffmk:change="changed">ESB file can be edited in either source or extra visual modes at the same time.</diffmk:wrapper></para>
+
+ <para><diffmk:wrapper diffmk:change="changed">JBoss Tools provide you two different editors to speed your development: a
+ graphical view (</diffmk:wrapper><property moreinfo="none">Tree</property><diffmk:wrapper diffmk:change="changed">) and source (</diffmk:wrapper><property moreinfo="none">Source</property><diffmk:wrapper diffmk:change="changed">).
+ At the same time, you always have full control over esb source file. Any changes you
+ make in the source view will immediately appear in the tree view. Both views are
+ synchronized, you can edit the file in any view.</diffmk:wrapper></para>
+
+ <figure float="0">
+ <title>Two Views are Synchronized</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/esb_editor/10_esb_features.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The last chapter covers capabilities on how you can use ESB editor.</para>
+
+ <para><diffmk:wrapper diffmk:change="changed">In summary, this reference supplies you with all necessary information on the
+ functionality that JBoss ESB Editor provides for work with JBoss ESB.</diffmk:wrapper></para>
+ </section>
+ </section>
+</chapter>
+
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/pom.xml 2008-10-30 15:27:28 UTC (rev 11340)
+++ branches/jbosstools-3.0.0.Beta1/esb/docs/esb_ref_guide/pom.xml 2008-10-30 16:02:17 UTC (rev 11341)
@@ -33,7 +33,7 @@
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11340 - trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-10-30 11:27:28 -0400 (Thu, 30 Oct 2008)
New Revision: 11340
Modified:
trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
Log:
https://jira.jboss.org/jira/browse/JBDS-461
Modified: trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 14:11:38 UTC (rev 11339)
+++ trunk/jst/plugins/org.jboss.tools.jst.firstrun/src/org/jboss/tools/jst/firstrun/JBossASAdapterInitializer.java 2008-10-30 15:27:28 UTC (rev 11340)
@@ -117,8 +117,8 @@
return;
}
JstFirstRunPlugin.getDefault().getPreferenceStore().setValue(FIRST_START_PREFERENCE_NAME, false);
-
- File serversFile = new File(SERVERS_FILE);
+ String pluginLocation = FileLocator.resolve(JstFirstRunPlugin.getDefault().getBundle().getEntry("/")).getPath();
+ File serversFile = new File(pluginLocation, SERVERS_FILE);
if(serversFile.exists()){
String str = FileUtil.readFile(serversFile);
int position = 0;
@@ -177,7 +177,7 @@
}
String jbossASLocation = null;
- String pluginLocation = FileLocator.resolve(JstFirstRunPlugin.getDefault().getBundle().getEntry("/")).getPath();
+
File jbossASDir = new File(pluginLocation, JBOSS_AS_HOME);
if (jbossASDir.isDirectory()) {
jbossASLocation = jbossASDir.getAbsolutePath();
17 years, 2 months
JBoss Tools SVN: r11339 - in trunk/documentation/whatsnew: as and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-30 10:11:38 -0400 (Thu, 30 Oct 2008)
New Revision: 11339
Added:
trunk/documentation/whatsnew/examples/
trunk/documentation/whatsnew/examples/examples-news-1.0.0.Beta1.html
trunk/documentation/whatsnew/images/example_wizard_select.png
trunk/documentation/whatsnew/images/project_example_wizard.png
trunk/documentation/whatsnew/images/serveres_beta_view.png
Modified:
trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html
trunk/documentation/whatsnew/index.html
Log:
added description about project examples and beta server view
Modified: trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html 2008-10-30 14:01:13 UTC (rev 11338)
+++ trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html 2008-10-30 14:11:38 UTC (rev 11339)
@@ -15,6 +15,33 @@
<tr>
<td colspan="2">
<hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>New Servers View (Beta)</b></td>
+ <td valign="top">
+ <p>We have always had an extra servers view since Eclipse WTP's
+ server view does not provide any form of extension points to add
+ server specific info.</p>
+
+ <p>In this release we have added a beta/preview of a Servers
+view that is built on Common Navigator Framework allowing extensions
+and is using label decorators instead of extra columns to make the UI
+more compact without loosing the vital information.</p>
+
+ <p>We have suggested to WTP that they incorporate a view based
+on this. You can provide feedback on this
+at <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=247934">bugs.eclipse.org</a>
+and the related bugs.</p>
+
+ <p><img src="../images/serveres_beta_view.png"/></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr>
<h3>Servers</h3>
<hr>
</td>
@@ -31,6 +58,8 @@
+
+
</table>
</body>
Added: trunk/documentation/whatsnew/examples/examples-news-1.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/examples/examples-news-1.0.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/examples/examples-news-1.0.0.Beta1.html 2008-10-30 14:11:38 UTC (rev 11339)
@@ -0,0 +1,45 @@
+<?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>Examples 1.1.0.Beta1 What's New</title>
+</head>
+<body>
+<h1>Examples 1.1.0.Beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.2.1.beta1.html">Hibernate Tools News ></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="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Project Examples</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>We have added an experimental feature called Project Example wizard that is intended to allow users to download example projects from a remote site and have it working out of the box.</p>
+
+ <p><img src="../images/example_wizard_select.png"/></p>
+
+ <p>The wizard provides a categorized list of projects that can be downloaded and configured in JBoss Tools.</p>
+ <p><p><img src="../images/project_example_wizard.png"/></p></p>
+
+ <p>We are still experimenting with the projects thus some of them might need to be manually configured after download to set the right datasource, runtime etc.</p>
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/images/example_wizard_select.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/example_wizard_select.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/project_example_wizard.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/project_example_wizard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/serveres_beta_view.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/serveres_beta_view.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2008-10-30 14:01:13 UTC (rev 11338)
+++ trunk/documentation/whatsnew/index.html 2008-10-30 14:11:38 UTC (rev 11339)
@@ -31,6 +31,7 @@
<p><a href="vpe/vpe-news-3.0.0.Beta1.html">Visual Page Editor</a></p>
<p><a href="esb/esb-news-1.1.0.Beta1.html">JBoss ESB Tools</a></p>
<p><a href="smooks/smooks-news-1.0.0.Beta1.html">Smooks Tools</a></p>
+ <p><a href="examples/examples-news-1.0.0.Beta1.html">Examples</a></p>
</td>
</tr>
17 years, 2 months
JBoss Tools SVN: r11338 - in branches/jbosstools-3.0.0.Beta1/jsf: tests/org.jboss.tools.jsf.vpe.jsf.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-30 10:01:13 -0400 (Thu, 30 Oct 2008)
New Revision: 11338
Modified:
branches/jbosstools-3.0.0.Beta1/jsf/plugins/org.jboss.tools.jsf.text.ext.richfaces/
branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/
Log:
svn ignore bin
Property changes on: branches/jbosstools-3.0.0.Beta1/jsf/plugins/org.jboss.tools.jsf.text.ext.richfaces
___________________________________________________________________
Name: svn:ignore
+ bin
Property changes on: branches/jbosstools-3.0.0.Beta1/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test
___________________________________________________________________
Name: svn:ignore
+ bin
17 years, 2 months
JBoss Tools SVN: r11337 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-30 09:18:05 -0400 (Thu, 30 Oct 2008)
New Revision: 11337
Modified:
workspace/snjeza/seam-examples/booking.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/snjeza/seam-examples/booking.zip
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Tools SVN: r11336 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-30 09:04:55 -0400 (Thu, 30 Oct 2008)
New Revision: 11336
Modified:
workspace/snjeza/seam-examples/booking-ejb.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/snjeza/seam-examples/booking-ejb.zip
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Tools SVN: r11335 - branches/jbosstools-3.0.0.Beta1/jbpm/plugins/org.jboss.tools.jbpm.convert.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-30 09:04:06 -0400 (Thu, 30 Oct 2008)
New Revision: 11335
Modified:
branches/jbosstools-3.0.0.Beta1/jbpm/plugins/org.jboss.tools.jbpm.convert/
Log:
svn ignore bin
Property changes on: branches/jbosstools-3.0.0.Beta1/jbpm/plugins/org.jboss.tools.jbpm.convert
___________________________________________________________________
Name: svn:ignore
+ bin
17 years, 2 months
JBoss Tools SVN: r11334 - branches/jbosstools-3.0.0.Beta1/examples/plugins/org.jboss.tools.project.examples.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-30 09:03:36 -0400 (Thu, 30 Oct 2008)
New Revision: 11334
Modified:
branches/jbosstools-3.0.0.Beta1/examples/plugins/org.jboss.tools.project.examples/
Log:
svn ignore bin
Property changes on: branches/jbosstools-3.0.0.Beta1/examples/plugins/org.jboss.tools.project.examples
___________________________________________________________________
Name: svn:ignore
+ bin
17 years, 2 months
JBoss Tools SVN: r11333 - in branches/jbosstools-3.0.0.Beta1/common/tests: org.jboss.tools.common.text.ext.test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-30 09:02:54 -0400 (Thu, 30 Oct 2008)
New Revision: 11333
Modified:
branches/jbosstools-3.0.0.Beta1/common/tests/org.jboss.tools.common.el.core.test/
branches/jbosstools-3.0.0.Beta1/common/tests/org.jboss.tools.common.text.ext.test/
Log:
svn ignore bin
Property changes on: branches/jbosstools-3.0.0.Beta1/common/tests/org.jboss.tools.common.el.core.test
___________________________________________________________________
Name: svn:ignore
+ bin
Property changes on: branches/jbosstools-3.0.0.Beta1/common/tests/org.jboss.tools.common.text.ext.test
___________________________________________________________________
Name: svn:ignore
+ bin
17 years, 2 months
JBoss Tools SVN: r11332 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-30 08:41:43 -0400 (Thu, 30 Oct 2008)
New Revision: 11332
Modified:
workspace/snjeza/seam-examples/booking-ear.zip
workspace/snjeza/seam-examples/booking-ejb.zip
workspace/snjeza/seam-examples/booking.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/snjeza/seam-examples/booking-ear.zip
===================================================================
(Binary files differ)
Modified: workspace/snjeza/seam-examples/booking-ejb.zip
===================================================================
(Binary files differ)
Modified: workspace/snjeza/seam-examples/booking.zip
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Tools SVN: r11331 - in branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference: en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-30 07:42:31 -0400 (Thu, 30 Oct 2008)
New Revision: 11331
Added:
branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/en/master_output.xml
Removed:
branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/en/master_output.xml 2008-10-30 11:42:31 UTC (rev 11331)
@@ -0,0 +1,1302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+
+[<!ENTITY introduction SYSTEM "modules/Introduction.xml">
+<!ENTITY jboss_jbpm_runtime_installation SYSTEM "modules/jboss_jbpm_runtime_installation.xml">
+<!ENTITY guided_tour_jboss_jbpmgpd SYSTEM "modules/guided_tour_jboss_jbpmgpd.xml">
+<!ENTITY the_views SYSTEM "modules/the_views.xml">
+<!ENTITY Test_Drive_Proc SYSTEM "modules/Test_Drive_Proc.xml">
+<!ENTITY The_JBoss_jBPM_Int_Mech SYSTEM "modules/The_JBoss_jBPM_Int_Mech.xml">
+<!ENTITY Quick_Howto_Guide SYSTEM "modules/Quick_Howto_Guide.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+ ]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>jBPM Tools Reference Guide</title>
+
+ <author>
+ <firstname>Anatoly</firstname>
+ <surname>Fedosik</surname>
+ </author>
+ <author>
+ <firstname>Koen</firstname>
+ <surname>Aers</surname>
+ <email>koen.aers(a)jboss.com</email>
+ </author>
+ <author>
+ <firstname>Olga</firstname>
+ <surname>Chikvina</surname>
+ </author>
+ <author>
+ <firstname>Svetlana</firstname>
+ <surname>Mukhina</surname>
+ <email>smukhina(a)exadel.com</email>
+ </author>
+ <author>
+ <firstname>Tom</firstname>
+ <surname>Baeyens</surname>
+ <email>tom.baeyens(a)jboss.com</email>
+ </author>
+
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo> Version: <diffmk:wrapper diffmk:change="added">3.0.0.beta1</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">3.0.0.alpha </diffmk:wrapper></releaseinfo>
+
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/jbpm/pdf/JBPM_Refere..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="Introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Introduction.xml" xreflabel="Introduction">
+ <?dbhtml filename="TargetAudience.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>Target</keyword>
+ <keyword>developers</keyword>
+ <keyword>Audience</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>All developers and process analysts who are beginning to use JBoss jBPM should read this
+ Getting Started guide. It will give them a jumpstart showing how to create a process definition.</para>
+ <section id="Preface">
+ <?dbhtml filename="Preface.html"?>
+ <title>Preface</title>
+ <para>This document introduces the use of the JBoss jBPM Graphical Process Designer (GPD) to
+ create workflow processes. It will help first time users with the following tasks :</para>
+ <itemizedlist>
+ <listitem>
+ <para>Install the JBoss jBPM GPD Eclipse plugin available from the JBoss jBPM download
+ area</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Using the creation wizard to create an empty process definition</para>
+ </listitem>
+ <listitem>
+ <para>Use the designer palette to draw the first processdefinition</para>
+ </listitem>
+ <listitem>
+ <para>Show how the xml processdefinition can be inspected as an xml file</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Write an example process test case</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you have questions, please feel free to contact <ulink url="mailto:koen.aers@jboss.com">Koen Aers</ulink> or <ulink url="mailto:tom.baeyens@jboss.com">Tom Baeyens</ulink> for more
+ information.</para>
+ </section>
+
+ <section id="feature_list">
+
+ <title>Feature list</title>
+
+ <para> JBoss jBPM is a workflow that enables creating and automatization business processes. Look
+ at the list of features below to understand its main functionality.</para>
+ <table>
+ <title>Key Functionality for JBoss jBPM</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">jBDL support</link>
+ </entry>
+ <entry>Enables managing workflow processes as well as human tasks and interactions between
+ them. jBDL combines the best both Java and declarative process techniques.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="GuidedTourJBossjBPMGPD">Support of Graphical Process Designer (GPD)</link>
+ </entry>
+ <entry>Is used for simplifying declarative process development and visualizations of all
+ actions.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="CreatingjBPMProject">Project Creation wizard</link>
+ </entry>
+ <entry>Allows to create a new jBPM template project that already includes all advanced
+ artifacts and core jBPM libraries.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">Rich palette of pre-build process nodes</link>
+ </entry>
+ <entry>Provides process-building functionality and gives opportunity even non-programmers to
+ develop processes.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="source_mode">Support of XML code view</link>
+ </entry>
+ <entry>Shows the corresponding XML that's generated automatically in the Source view
+ of the process definition editor when developing the process.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="the_properties_view">Properties view</link>
+ </entry>
+ <entry>Facilitates configuring and editing of all nodes properties.</entry>
+ </row>
+
+ <row>
+ <entry>Interaction with all of the J2EE based integration technologies including Web Services,
+ Java Messaging, J2EE Connectors, JBDC, EJBs.</entry>
+ <entry>Enables implementation, provides better functionality and flexibility.</entry>
+ </row>
+
+ <row>
+ <entry>Integration with jBoss Seam</entry>
+ <entry>Allows to write applications with complex workflows and provides easier interactions
+ between them.</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="jboss_jbpm_runtime_installation" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/jboss_jbpm_runtime_installation.xml" xreflabel="jboss_jbpm_runtime_installation">
+ <?dbhtml filename="jboss_jbpm_runtime_installation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>designer</keyword>
+ <keyword>process</keyword>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>jBPM runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss jBPM Runtime Installation</title>
+ <para>The main purpose of this chapter is to let you know how to launch the <property moreinfo="none">JBoss
+ jBPM</property> (business process management).</para>
+ <para>The jBPM plugin (jBPM Designer) is already included in the <property moreinfo="none">JBoss Tools</property>.
+ To make it work, you should only download the jBPM runtime (<ulink url="http://sourceforge.net/project/showfiles.php?group_id=70542&package_i...">jbpm-jpdl-3.2.2</ulink> currently) and specify the directory where you extracted the runtime
+ either when you create a jBPM project or by using the jBPM preference pages.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Try to avoid using spaces in the names of installation folders. It can provoke problems in
+ some situations with Sun-based VMs.</para>
+ </note>
+
+ <para>Navigate to <emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss jBPM > Runtime Locations</property>.
+ </emphasis> Here you can add, edit and remove JBoss jBPM installation locations. Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button. In the dialog that appeared enter a name for a newly added jBPM runtime and
+ point to the correct location of this package on your harddrive. Click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> then click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> again.</para>
+
+ <figure float="0">
+ <title>Adding jBPM Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtime_installation/runtime_installation_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, when you have a runtime installed, we are going to demonstrate some powerful features of
+ the jBPM.</para>
+</chapter>
+
+
+<chapter id="GuidedTourJBossjBPMGPD" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml" xreflabel="GuidedTourJBossjBPMGPD">
+ <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>Process</keyword>
+ <keyword>Definition</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>A Guided Tour of JBoss jBPM GPD</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating and configuring your
+ own simple process. Let's try to organize a new jBPM project.</para>
+ <para>A wizard for creating a jBPM project is included in the GPD plugin. We have opted to
+ create a project based on a template already containing a number of advanced artifacts that
+ we will ignore for this section. In the future we will elaborate this wizard and offer the
+ possibility to create an empty jBPM project as well as projects based on templates taken
+ from the jBPM tutorial.</para>
+ <section id="CreatingjBPMProject">
+ <?dbhtml filename="CreatingjBPMProject.html"?>
+ <title>Creating a jBPM Project</title>
+ <para>This section will show you how to use the Creation wizard for creating a new jBPM
+ project with already included source folders.</para>
+ <para>At first you should select <emphasis>
+ <property moreinfo="none">File >New Project...</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">JBoss jBPM > Process Project</property>
+ </emphasis> in the New Project dialog:</para>
+ <figure float="0">
+ <title>New Project Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings us to the wizard page where it's necessary to specify the
+ name and location for the project. We choose, for example, <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> as the name and accept the default location. </para>
+ <figure float="0">
+ <title>Process Name and Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, our project will be created in the workspace root directory by default. If you
+ want to change the directory for your future project, deselect <emphasis>
+ <property moreinfo="none">Use default location</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed location or simply type it.</para>
+ <para>On the next screen you'll be prompted to select the core jBPM location that
+ we have defined in the previous chapter.</para>
+ <figure float="0">
+ <title>Core jBPM Location Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> results in the project being generated. The wizard creates four source
+ folders: one for the processes (<emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis>), one for the java sources (<emphasis>
+ <property moreinfo="none">src/main/java</property>
+ </emphasis>), one for the unit tests (<emphasis>
+ <property moreinfo="none">src/test/java</property>
+ </emphasis>) and one for the resources such as the jbpm.properties and the
+ hibernate.properties files (<emphasis>
+ <property moreinfo="none">src/main/config</property>
+ </emphasis>). In addition a classpath container with all the core jBPM libraries is
+ added to the project</para>
+ <figure float="0">
+ <title>Layout of the Process Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Looking inside the different source folders will reveal a number of other artifacts
+ that were generated, but we will leave these untouched for the moment. Instead, we will
+ look at another wizard that enables us to create an empty process definition.</para>
+ </section>
+ <section id="creating_an_empty_process_definition">
+ <?dbhtml filename="creating_an_empty_process_definition.html"?>
+ <title>Creating an Empty Process Definition</title>
+ <para>Now when the project is set up, we can use a Creation wizard to create an empty
+ process definition. Bring up the <emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> wizard by clicking the <emphasis>
+ <property moreinfo="none">File > New > Other...</property>
+ </emphasis> menu item. The wizard opens on the <emphasis>
+ <property moreinfo="none">Select Wizard</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Select Wizard Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the <emphasis>
+ <property moreinfo="none">JBoss jBPM</property>
+ </emphasis> category, then the <emphasis>
+ <property moreinfo="none">Process Definition</property>
+ </emphasis> item and clicking on the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button brings us to the <emphasis>
+ <property moreinfo="none">Create Process Definition</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Create New Process Definion Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>We choose <emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> as the name of the process archive file. Click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to end the wizard and open the process definition editor.</para>
+ <figure float="0">
+ <title>The Process Definition Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can see in the Package Explorer that creating a process definition involves
+ creating a folder with the name of the process definition and populating this folder
+ with two .xml files : <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>. </emphasis></para>
+ <para>The <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> contains the graphical information used by the process definition editor.
+ The <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>
+ </emphasis> file contains the actual process definition info without the graphical
+ rendering info. At present, the GPD assumes that these two files are siblings. More
+ sophisticated configuration will be supported later.</para>
+
+ <section id="minimal_process_definition">
+ <?dbhtml filename="minimal_process_definition.html"?>
+ <title>A Minimal Process Definition</title>
+ <para>Now we are ready to create a very simple process definition consisting of a begin
+ state, an intermediate state and an end state.</para>
+ <para>To make the configuration of actions much easier it's better to use the
+ jPDL perspective. It provides the tabbed Properties Editor which allows to configure
+ all the relevant properties of the current selected item. </para>
+
+ <section id="adding_the_nodes">
+ <?dbhtml filename="adding_the_nodes.html"?>
+ <title>Adding the Nodes</title>
+ <para>At first select respectively <emphasis>
+ <property moreinfo="none">Start</property>,
+ </emphasis>
+ <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> on the tools palette and click on the canvas to add these nodes to
+ the process definition. The result should look similar to this:</para>
+ <figure float="0">
+ <title>A Simple Process With Three Nodes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="adding_transitions">
+ <?dbhtml filename="adding_transitions.html"?>
+ <title>Adding Transitions</title>
+ <para>Then, we will connect the nodes with transitions. To do that select the <emphasis>
+ <property moreinfo="none">Transition</property>
+ </emphasis> tool in the tools palette and click on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> node, then move to the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node and click again to see the transition being drawn. Perform the
+ same steps to create a transition from the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node to the <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> node. The result will look like:</para>
+ <figure float="0">
+ <title>A Simple Process With Transitions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>Now, when you've got background knowledge of simple project creation,
+ let's move to more advanced tools.</para>
+ </section>
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="the_views" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/the_views.xml" xreflabel="the_views">
+ <?dbhtml filename="the_views.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>The views</title>
+
+ <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
+ <para>The views are used for representation and navigation the resources you are working on at
+ the moment. One of the advantages of all the views is that all modifications made in the
+ currant-active file are immediately displayed in them. Let’s get acquainted more closely
+ with those that the <property moreinfo="none">jPDL perspective</property> provides. </para>
+
+ <figure float="0">
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_0.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the <property moreinfo="none">jPDL perspective</property> contains a
+ complete set of functionality that's necessary for working on the jBPM project.</para>
+
+ <section id="the_outline_view">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Outline View</title>
+ <para>To have a way to quickly see an outline of the process use the <emphasis>
+ <property moreinfo="none">Outline view</property>
+ </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
+ <property moreinfo="none">Window > Show view > Outline</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>The Overview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_overview">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Overview</title>
+ <para>The main advantage of this view is that it gives visual representation of the whole
+ currant-developing process. Besides, the <emphasis>
+ <property moreinfo="none">Overview</property>
+ </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
+ process structure if it's too large.</para>
+
+ <figure float="0">
+ <title>The Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_properties_view">
+ <?dbhtml filename="the_properties_view.html"?>
+ <title>The Properties View</title>
+ <para> Here, we dwell on the JBDS <property moreinfo="none">Properties view</property>.</para>
+ <para>Notice if it's not visible you can access it by navigating <emphasis>
+ <property moreinfo="none">Window > Show view > Properties</property>. </emphasis></para>
+ <para>The view shows the relevant properties of the selected item in the tabbed form. Every
+ item has its own set of properties, which can be directly editable in the Properties
+ view or by brining up the context menu.</para>
+
+ <figure float="0">
+ <title>The Properties View of selected Transition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For example, on the picture above the Properties view displays all the properties for
+ a selected transition. Its name has been changed to <emphasis>
+ <property moreinfo="none">to_auction</property>. </emphasis> We've done it directly in
+ active General tab of the view. The same way let's change the name for the
+ second transition to <emphasis>
+ <property moreinfo="none">to_end</property>. </emphasis></para>
+ <para>If no one item is selected, the view represents the properties of the whole process
+ definition. </para>
+
+ <figure float="0">
+ <title>The Properties View of Process Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case, it contains six tabs. The first one is the <emphasis>
+ <property moreinfo="none">General</property>.</emphasis> It allows to specify a process name and add
+ necessary description. To illustrate let's change the process definition name
+ to <emphasis>
+ <property moreinfo="none">jbay</property>. </emphasis></para>
+ </section>
+
+ <section id="jbpm_gpd_editor">
+ <?dbhtml filename="direct_editing.html"?>
+ <title>The jBPM Graphical Process Designer editor.</title>
+ <para>The <property moreinfo="none">jBPM GPD editor</property> includes four modes: Diagram, Deployment,
+ Design and Source, which are available as switchable tabs at the bottom of the editor.
+ Let's dwell on each of them.</para>
+
+ <section id="the_diagram_mode">
+ <title>The Diagram mode</title>
+ <para> In this mode we define the process in the form of a diagram by means of tools
+ provided on the left-hand side of the jBPM GPD. </para>
+
+ <figure float="0">
+ <title>The Diagram mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Besides, some properties can be directly edited in the <property moreinfo="none">Diagram
+ mode</property> of the graphical editor. One example of this is the <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> property of nodes. You can edit this directly by selecting the node of
+ which you want to change the name and then click once inside this node. This enables
+ an editor in the node. We change the name of the node to <emphasis>
+ <property moreinfo="none">auction</property>. </emphasis></para>
+ </section>
+
+ <section id="source_mode">
+ <?dbhtml filename="the_source_view.html"?>
+ <title>The Source Mode</title>
+ <para>Now, that we have defined a simple process definition, we can have a look at the
+ XML that is being generated under the covers. To see this XML click on the Source
+ tab of the graphical process designer editor.</para>
+
+ <figure float="0">
+ <title>The Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property moreinfo="none">Source mode</property> enables to easily manipulate our XML. That is
+ manually inserting and editing necessary elements or attributes. In addition, here
+ you can take advantage of content assist.</para>
+ </section>
+
+ <section id="design_mode">
+ <?dbhtml filename="the_design_view.html"?>
+ <title>The Design Mode</title>
+ <para>One more way to edit your file is to use <property moreinfo="none">Design mode</property>. You can
+ see it in the next picture:</para>
+ <figure float="0">
+ <title>The Design Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see above, this mode looks like a table in the first column of which
+ the process structure is performed. Here, you can also insert, remove and edit
+ elements or attributes, moreover add comments and instructions. Their values can be
+ directly edited in the second column of the Design mode table.</para>
+ <para>For instance, let’s add a comment on the second transition. For that, you should
+ bring up the context menu for it and choose <emphasis>
+ <property moreinfo="none">Add Before > Comment</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Adding a Comment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then, we can put the text <emphasis>This transition leads to the end
+ state</emphasis> in the right column as its value.</para>
+
+ <figure float="0">
+ <title>Comment is added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="deployment_mode">
+ <?dbhtml filename="the_deployment_view.html"?>
+ <title>The Deployment Mode</title>
+ <para>Finally, to adjust the deployment settings of the project you should switch on to
+ the tab that opens the <property moreinfo="none">Deployment mode</property>. On the picture below
+ the <property moreinfo="none">Deployment mode</property> is performed with default settings. Here,
+ you can easily modify them or, if the settings won't match your needs, to
+ reset defaults. </para>
+ <figure float="0">
+ <title>The Deployment Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The button <emphasis>
+ <property moreinfo="none">Test Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are valid before
+ deploying the process.</para>
+
+
+
+
+
+ <para>Now that we've seen how to work with <property moreinfo="none">jPDL
+ perspective</property>, let's pass on to the project testing.</para>
+ </section>
+ </section>
+</chapter>
+
+<chapter id="Test_Drive_Proc_Development" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml" xreflabel="Test_Drive_Proc_Development">
+ <?dbhtml filename="Test_Drive_Proc_Development.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Test Driven Process Development</title>
+
+ <para> One of the most important advantages of JBoss jBPM's lightweight approach to BPM
+ and workflow management is that developers can easily leverage their usual programming
+ skills and techniques. One of these well-known techniques is Unit Testing and Test Driven
+ Development. </para>
+ <para>In this chapter we will show how developers, making use of the JBoss jBPM GPD, can use a
+ technique we have baptized <property moreinfo="none">Test Driven Process Development</property> to create
+ process definitions and test their correctness. </para>
+
+ <para> When creating the <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> project the Project Creation wizard has already put in place all the library
+ requirements we need to start writing the jBPM unit tests. They are contained in the jBPM
+ Library container and the most important of them is the <emphasis>
+ <property moreinfo="none">.jar</property>
+ </emphasis> file containing the core jBPM classes. While working on the project you could
+ find them all in the <property moreinfo="none">Package Explorer</property>.</para>
+
+ <figure float="0">
+ <title>The jBPM Libraries</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It must be noted that it is possible to change the location of the core jBPM installation
+ by changing the preference settings. More on this <link linkend="change_core_jbpm_inst">see
+ later</link> in this book.</para>
+
+ <para> With that extra knowledge on the project settings, you can create your first test. To do
+ this, we create the <emphasis>
+ <property moreinfo="none">com.jbay</property>
+ </emphasis> package in the <emphasis>
+ <property moreinfo="none">test/java</property>
+ </emphasis> source folder. Then we bring up the context menu on this package and select <emphasis>
+ <property moreinfo="none">New > Other...</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> And then <emphasis>
+ <property moreinfo="none">Java > JUnit > JUnit Test Case</property>
+ </emphasis> to call the specialized JUnite Test case creation wizard.</para>
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard looks as follows:</para>
+
+ <figure float="0">
+ <title>Create Test Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By default JUnite 3 version of testing framework is selected. Of course, you can choose
+ new advanced JUnit 4 version. In this case you'll be prompted to add new JUnit
+ Library to your build path. To add it automatically just click on the appropriate link. In
+ the <emphasis>
+ <property moreinfo="none">Class under test</property>
+ </emphasis> section you can specify the class to test.</para>
+
+ <figure float="0">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then, we call the test class <emphasis>
+ <property moreinfo="none">HelloTest</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to complete.</para>
+
+ <para> Next, we should write a simple test scenario as shown on the next figure. Let's
+ study the code of this test case. </para>
+
+ <figure float="0" id="hello_test">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_6.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the first line of the method, a jBPM process archive object is created. We use a
+ constructor accepting the filename of the archive. In our case it is the <emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> file we created earlier and which lives in the <emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis> folder of our project. After asserting that this object is really created, we
+ extract a process definition object from it. This object is fed to the constructor of a
+ process instance object. We have a process instance object, but this process is not yet
+ started, so we can safely assert that its root token still resides in the start node. After
+ signalling the token will move to the next state and the process will be in the <emphasis>
+ <property moreinfo="none">auction</property>
+ </emphasis> state. Finally another signal will end the process. </para>
+
+
+ <para> After writing this test we can check whether it works as expected by running it .</para>
+
+ <figure float="0">
+ <title>Running the Process Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_7.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>All went well as we have a green light:</para>
+
+ <figure float="0">
+ <title>Successful Test Run</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_8.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Of course, this simple scenario was not very interesting, but the purpose of it was to
+ show how you can reuse your development skills in a very straightforward way when doing
+ process development. To see how more interesting processes and process test
+ scenario's can be developed, we suggest you to read the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink> and to
+ study the API reference. You can find it in the jBPM download folder. (To get started we
+ downloaded jbpm-jpdl-3.2.2 in <link linkend="jboss_jbpm_runtime_installation">the second
+ chapter</link>. You should just remember where you extracted it.) All we've mentioned are in the 'javadoc- *' subfolders of the 'doc' folder.
+ Moreover, some more examples will be given later in this book.</para>
+
+</chapter>
+
+
+<chapter id="The_JBoss_jBPM_Int_Mech" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/The_JBoss_jBPM_Int_Mech.xml" xreflabel="The_JBoss_jBPM_Int_Mech">
+ <?dbhtml filename="The_JBoss_jBPM_Int_Mech.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Actions : The JBoss jBPM Integration Mechanism</title>
+
+ <para> In this chapter we will show how to do software integration with <property moreinfo="none">JBoss
+ jBPM</property>. The standard mechanism to implement this is to wrap the functionality you
+ want to integrate in a class that implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface. In order to demonstrate it let's specify Hello World action for our
+ process.</para>
+
+ <section>
+ <title>Creating a Hello World Action</title>
+
+ <para>Each Hello World process should integrate one or more Hello World actions, so this is
+ what we will be doing. We can integrate custom code at different points in the process
+ definition. To do this we have to specify an action handler, represented by an
+ implementation of the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface, and attach this piece of code to a particular event. These events
+ are amongst others, going over a transition, leaving or entering nodes, after and before
+ signalling. </para>
+
+ <para> To make things a little bit more concrete, let's create a new class called <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>.
+ </emphasis> For that firstly we'll create a new package <emphasis>
+ <property moreinfo="none">com.jbay.action</property>
+ </emphasis> in the <emphasis>
+ <property moreinfo="none">src/java/main</property>
+ </emphasis> folder of our project. Then, we should call New Class Creation wizard as
+ usual by right-clicking and navigating <emphasis>
+ <property moreinfo="none">New > Class</property>.
+ </emphasis> </para>
+
+ <figure float="0">
+ <title>Creating HelloActionHendler Class</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice that two first gaps have been filled automatically. Here, instead of <emphasis>
+ <property moreinfo="none">Package</property>
+ </emphasis> option <emphasis>
+ <property moreinfo="none">Enclose type</property>
+ </emphasis> option can be selected where a type in which to enclose a new class should
+ be specified.</para>
+
+ <para>In our case, we leave everything as it is, just type <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> as a name of new class and add <emphasis>
+ <property moreinfo="none">org.jbpm.graph.ActionHendler</property>
+ </emphasis> interface as it's shown in the picture above.</para>
+
+ <para>Thus, our <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface including the <emphasis>
+ <property moreinfo="none">execute</property>
+ </emphasis> method as shown in the next figure. Here, we add a variable named <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> to the collection of process variables and put a message in it :
+ <emphasis>"Hello from ActionHandler"</emphasis>. </para>
+
+ <figure float="0">
+ <title>A Simple Hello Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_2.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, as we have <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> class defined, let's explore how we can handle it.</para>
+ </section>
+
+ <section>
+ <title>Integrating the Hello World Action</title>
+
+ <para>The main purpose of this chapter is to provide you with the steps associating our
+ Hello World action with a particular event and test the correctness of our actions as
+ well.</para>
+
+ <para> As good Testcity citizens we will first create a Unit Test that proves the behaviour
+ we want to achieve by adding the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> to the process. So we implement another test.</para>
+
+ <para>At first, let's return to the
+ code we already saw <link linkend="hello_test">in the previous chapter</link> and add new test method <emphasis>
+ <property moreinfo="none">testActionHendler</property></emphasis> to it. </para>
+
+ <figure float="0">
+ <title>Create the Hello Action Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_3.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We assert
+ that no variable called <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> exist. Then we give the process a signal to move it to the auction state. We
+ want to associate the execution of the action with the event of going over the
+ transition from the start state to the auction state. So after the signal, the process
+ should be in the auction state as in the previous scenario. But moreover, the <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> variable should exist and contain the string <emphasis>"Hello from
+ ActionHandler"</emphasis>. That's what we assert in the last lines of the test
+ method.</para>
+
+
+
+ <para> Running the tests now results in a failure. The point is that we did not associate
+ the action with any particular event in the process definition, so the process variable
+ did not get set. </para>
+
+ <figure float="0">
+ <title>Test Results Before Integration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_4.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Let's do something about it and add an action to the first transition of our
+ sample process. To do this you can use the Actions tab in the Properties Editor that is
+ under the graphical canvas. Bring up the popup menu of the action element container and
+ chose New Action as it's shown on the figure below. The other way to add an action
+ to the transition is simply to use the dropdown menu that is available under the action
+ icon in the right upper corner of the Properties View.</para>
+
+ <figure float="0">
+ <title>Adding an Action to a Transition</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After adding the action a tabbed view with three pages will appear.</para>
+
+ <figure float="0">
+ <title>Configuration Dialog for an Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first of these three pages allows you to give the Action a name. The last page
+ contains some advanced attributes such as whether the Action is asynchronous. The
+ Details page is the most important. It allows to choose and configure the actual action
+ handler implementation. </para>
+
+ <figure float="0">
+ <title>The Details page of an Action Configuration Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_7.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Clicking on the <emphasis>
+ <property moreinfo="none">Search...</property>
+ </emphasis> button brings us to a Choose Class dialog.</para>
+
+
+ <figure float="0">
+ <title>The Choose Action Handler Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para> We choose our previously created 'HelloActionHandler' class and
+ push the <property moreinfo="none">OK</property> button. After the selection of the action handler for
+ the action, we can run the test and observe it gives us a green light.</para>
+
+ <figure float="0">
+ <title>Test Results</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_9.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Tere we are. The above objective has been achieved.</para>
+ </section>
+
+ <section>
+ <title> Integration Points</title>
+
+ <para> The different integration points in a process definition are thoroughly documented in
+ the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink>. Instance nodes can contain many action
+ elements. Each of these will appear in the Action element list of the Actions tab. But
+ each Action also has a properties view of itself. You can navigate to this view by
+ selecting the added Action in the outline view. </para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="Quick_Howto_Guide" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml" xreflabel="Quick_Howto_Guide">
+ <?dbhtml filename="Quick_Howto_Guide.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Quick Howto Guide</title>
+
+ <para>This chapter contains additional information related to the <property moreinfo="none">JBoss
+ jBPM</property>.</para>
+
+ <section id="change_core_jbpm_inst">
+ <title>Change the Default Core jBPM Installation</title>
+
+ <para> You can change the default <property moreinfo="none">jBPM</property> installation by means of the
+ Eclipse preference mechanism. Open the Preferences dialog by selecting <emphasis>
+ <property moreinfo="none">Window > Preferences</property>
+ </emphasis> and select the <emphasis>
+ <property moreinfo="none">JBoss jBPM > Runtime Location</property>
+ </emphasis> category. Using this page you can add multiple <property moreinfo="none">jBPM</property>
+ installation locations and change the default one. The default installation is used for
+ the classpath settings when creating a new Process Project. Changing the preferences has
+ no influence on already created projects. Getting rid of a <property moreinfo="none">jBPM</property>
+ installation that's being referenced by a project however will cause the
+ classpath to contain errors. </para>
+
+
+ <figure float="0">
+ <title>The jBPM Preferences Page</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Configuring Task Nodes</title>
+
+ <para>Here, we'll examine how you can configure the Task nodes in jBPM jPDL GPD.</para>
+
+ <para> You can add Tasks to Task nodes and then configure them in a similar manner as the
+ Action configuration mechanism. Let's consider the process definition similar
+ to the previous one that contains three nodes: Start state, Task node and End state. The
+ <property moreinfo="none">Properties view</property> for selected Task node includes several tabs. </para>
+
+ <figure float="0">
+ <title>The Properties View of the selected Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_2.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We should choose the Task tab and then bring up the context menu or click the button
+ in the top right corner of the view to add a Task to our Task node.</para>
+
+ <figure float="0">
+ <title>Adding a Task to the Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_3.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Every added Task has its own configuration possibilities. You can access them through
+ the <property moreinfo="none">Properties view</property> as well.</para>
+
+ <figure float="0">
+ <title>The Task properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_4.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property moreinfo="none">General page</property> is a place where you can specify the name of a
+ Task and its description. For instance, let it be <emphasis>
+ <property moreinfo="none">approve oder</property>
+ </emphasis> with appropriate description that you can see in the figure below.</para>
+
+ <figure float="0">
+ <title>The Task General Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, look at <property moreinfo="none">Details page</property>. First, you should specify the due date
+ that is a mandatory property for the Task. The due date is the date on which the task
+ should be accomplished. Here you can also set a Task priority as well as signalling,
+ notifying or blocking. The <emphasis>
+ <property moreinfo="none">Blocking</property>
+ </emphasis> attribute indicates that the process will not be able to continue if this
+ task is still unaccomplished. The <emphasis>
+ <property moreinfo="none">Generate Form...</property>
+ </emphasis> button is for creating a simple task form that can be rendered by the jBPM
+ console.</para>
+
+ <figure float="0">
+ <title>The Task Details Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For our example, we specify the due date as 2 business days, choose the high priority
+ and also check the <emphasis>
+ <property moreinfo="none">Signalling</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Notify</property>
+ </emphasis> attributes. It means that the Task should be accomplished in 2 business days
+ and the assignee will be notified by email when the task is assigned. To specify how the
+ Task should be assigned switch on to the <property moreinfo="none">Assignment page</property>.</para>
+
+ <figure float="0">
+ <title>The Task Assignment Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_7.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the <property moreinfo="none">Reminder page</property> you can specify whether the assignee will be reminded of the task
+ that awaits him.</para>
+
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_8.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In our case, the assignee will be reminded by email after two business hours and
+ continue to get reminding every business hour after that.</para>
+ <para>In the next figure you can see our configuring generated into XML.</para>
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_9.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <para>We hope, our guide will help you to get started with the jPDL process language and jBPM
+ workflow on the whole. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=217">our forum</ulink>.</para>
+ </section>
+</chapter>
+
+
+ <!-- TODO: drools used in this section is not available for eclipse .3.3 &AddBusinessProcess; -->
+</book>
Deleted: branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml 2008-10-30 11:35:01 UTC (rev 11330)
+++ branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml 2008-10-30 11:42:31 UTC (rev 11331)
@@ -1,1302 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xml/4.3/docbookx.dtd"
-
-
-[<!ENTITY introduction SYSTEM "modules/Introduction.xml">
-<!ENTITY jboss_jbpm_runtime_installation SYSTEM "modules/jboss_jbpm_runtime_installation.xml">
-<!ENTITY guided_tour_jboss_jbpmgpd SYSTEM "modules/guided_tour_jboss_jbpmgpd.xml">
-<!ENTITY the_views SYSTEM "modules/the_views.xml">
-<!ENTITY Test_Drive_Proc SYSTEM "modules/Test_Drive_Proc.xml">
-<!ENTITY The_JBoss_jBPM_Int_Mech SYSTEM "modules/The_JBoss_jBPM_Int_Mech.xml">
-<!ENTITY Quick_Howto_Guide SYSTEM "modules/Quick_Howto_Guide.xml">
-
-<!ENTITY seamlink "../../seam/html_single/index.html">
-<!ENTITY aslink "../../as/html_single/index.html">
-<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
-<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
-<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
-<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
-<!ENTITY jsflink "../../jsf/html_single/index.html">
-<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
-<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
-<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
-<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
-
- ]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
- <bookinfo>
- <title>jBPM Tools Reference Guide</title>
-
- <author>
- <firstname>Anatoly</firstname>
- <surname>Fedosik</surname>
- </author>
- <author>
- <firstname>Koen</firstname>
- <surname>Aers</surname>
- <email>koen.aers(a)jboss.com</email>
- </author>
- <author>
- <firstname>Olga</firstname>
- <surname>Chikvina</surname>
- </author>
- <author>
- <firstname>Svetlana</firstname>
- <surname>Mukhina</surname>
- <email>smukhina(a)exadel.com</email>
- </author>
- <author>
- <firstname>Tom</firstname>
- <surname>Baeyens</surname>
- <email>tom.baeyens(a)jboss.com</email>
- </author>
-
-
- <pubdate>April 2008</pubdate>
- <copyright>
- <year>2007</year>
- <year>2008</year>
- <holder>JBoss, a division of Red Hat Inc.</holder>
- </copyright>
- <releaseinfo> Version: <diffmk:wrapper diffmk:change="added">3.0.0.beta1</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">3.0.0.alpha </diffmk:wrapper></releaseinfo>
-
-<abstract diffmk:change="added">
- <title diffmk:change="added"></title>
- <para diffmk:change="added">
- <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/jbpm/pdf/JBPM_Refere..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
- </para>
-</abstract>
-
-
- </bookinfo>
-
- <toc></toc>
-
-<chapter id="Introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Introduction.xml" xreflabel="Introduction">
- <?dbhtml filename="TargetAudience.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>Target</keyword>
- <keyword>developers</keyword>
- <keyword>Audience</keyword>
- </keywordset>
- </chapterinfo>
- <title>Introduction</title>
- <para>All developers and process analysts who are beginning to use JBoss jBPM should read this
- Getting Started guide. It will give them a jumpstart showing how to create a process definition.</para>
- <section id="Preface">
- <?dbhtml filename="Preface.html"?>
- <title>Preface</title>
- <para>This document introduces the use of the JBoss jBPM Graphical Process Designer (GPD) to
- create workflow processes. It will help first time users with the following tasks :</para>
- <itemizedlist>
- <listitem>
- <para>Install the JBoss jBPM GPD Eclipse plugin available from the JBoss jBPM download
- area</para>
- </listitem>
- <listitem>
- <para>Set up a Java project in Eclipse and prepare it to do test driven process
- development</para>
- </listitem>
- <listitem>
- <para>Using the creation wizard to create an empty process definition</para>
- </listitem>
- <listitem>
- <para>Use the designer palette to draw the first processdefinition</para>
- </listitem>
- <listitem>
- <para>Show how the xml processdefinition can be inspected as an xml file</para>
- </listitem>
- <listitem>
- <para>Set up a Java project in Eclipse and prepare it to do test driven process
- development</para>
- </listitem>
- <listitem>
- <para>Write an example process test case</para>
- </listitem>
- </itemizedlist>
- <para>If you have questions, please feel free to contact <ulink url="mailto:koen.aers@jboss.com">Koen Aers</ulink> or <ulink url="mailto:tom.baeyens@jboss.com">Tom Baeyens</ulink> for more
- information.</para>
- </section>
-
- <section id="feature_list">
-
- <title>Feature list</title>
-
- <para> JBoss jBPM is a workflow that enables creating and automatization business processes. Look
- at the list of features below to understand its main functionality.</para>
- <table>
- <title>Key Functionality for JBoss jBPM</title>
- <tgroup cols="2">
- <thead>
- <row>
- <entry>Feature</entry>
- <entry>Benefit</entry>
- </row>
- </thead>
- <tbody>
-
- <row>
- <entry>
- <link linkend="minimal_process_definition">jBDL support</link>
- </entry>
- <entry>Enables managing workflow processes as well as human tasks and interactions between
- them. jBDL combines the best both Java and declarative process techniques.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="GuidedTourJBossjBPMGPD">Support of Graphical Process Designer (GPD)</link>
- </entry>
- <entry>Is used for simplifying declarative process development and visualizations of all
- actions.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="CreatingjBPMProject">Project Creation wizard</link>
- </entry>
- <entry>Allows to create a new jBPM template project that already includes all advanced
- artifacts and core jBPM libraries.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="minimal_process_definition">Rich palette of pre-build process nodes</link>
- </entry>
- <entry>Provides process-building functionality and gives opportunity even non-programmers to
- develop processes.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="source_mode">Support of XML code view</link>
- </entry>
- <entry>Shows the corresponding XML that's generated automatically in the Source view
- of the process definition editor when developing the process.</entry>
- </row>
-
- <row>
- <entry>
- <link linkend="the_properties_view">Properties view</link>
- </entry>
- <entry>Facilitates configuring and editing of all nodes properties.</entry>
- </row>
-
- <row>
- <entry>Interaction with all of the J2EE based integration technologies including Web Services,
- Java Messaging, J2EE Connectors, JBDC, EJBs.</entry>
- <entry>Enables implementation, provides better functionality and flexibility.</entry>
- </row>
-
- <row>
- <entry>Integration with jBoss Seam</entry>
- <entry>Allows to write applications with complex workflows and provides easier interactions
- between them.</entry>
- </row>
-
- </tbody>
- </tgroup>
- </table>
- </section>
-
- <section>
- <title>Other relevant resources on the topic</title>
- <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink>.</para>
- <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
- </section>
-
-</chapter>
-
-
-<chapter id="jboss_jbpm_runtime_installation" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/jboss_jbpm_runtime_installation.xml" xreflabel="jboss_jbpm_runtime_installation">
- <?dbhtml filename="jboss_jbpm_runtime_installation.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>designer</keyword>
- <keyword>process</keyword>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>jBPM runtime</keyword>
- </keywordset>
- </chapterinfo>
- <title>JBoss jBPM Runtime Installation</title>
- <para>The main purpose of this chapter is to let you know how to launch the <property moreinfo="none">JBoss
- jBPM</property> (business process management).</para>
- <para>The jBPM plugin (jBPM Designer) is already included in the <property moreinfo="none">JBoss Tools</property>.
- To make it work, you should only download the jBPM runtime (<ulink url="http://sourceforge.net/project/showfiles.php?group_id=70542&package_i...">jbpm-jpdl-3.2.2</ulink> currently) and specify the directory where you extracted the runtime
- either when you create a jBPM project or by using the jBPM preference pages.</para>
-
- <note>
- <title>Note:</title>
- <para>Try to avoid using spaces in the names of installation folders. It can provoke problems in
- some situations with Sun-based VMs.</para>
- </note>
-
- <para>Navigate to <emphasis>
- <property moreinfo="none">Window > Preferences > JBoss jBPM > Runtime Locations</property>.
- </emphasis> Here you can add, edit and remove JBoss jBPM installation locations. Click <emphasis>
- <property moreinfo="none">Add</property>
- </emphasis> button. In the dialog that appeared enter a name for a newly added jBPM runtime and
- point to the correct location of this package on your harddrive. Click <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> then click <emphasis>
- <property moreinfo="none">OK</property>
- </emphasis> again.</para>
-
- <figure float="0">
- <title>Adding jBPM Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/runtime_installation/runtime_installation_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Now, when you have a runtime installed, we are going to demonstrate some powerful features of
- the jBPM.</para>
-</chapter>
-
-
-<chapter id="GuidedTourJBossjBPMGPD" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml" xreflabel="GuidedTourJBossjBPMGPD">
- <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>JBoss</keyword>
- <keyword>Process</keyword>
- <keyword>Definition</keyword>
- </keywordset>
- </chapterinfo>
- <title>A Guided Tour of JBoss jBPM GPD</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating and configuring your
- own simple process. Let's try to organize a new jBPM project.</para>
- <para>A wizard for creating a jBPM project is included in the GPD plugin. We have opted to
- create a project based on a template already containing a number of advanced artifacts that
- we will ignore for this section. In the future we will elaborate this wizard and offer the
- possibility to create an empty jBPM project as well as projects based on templates taken
- from the jBPM tutorial.</para>
- <section id="CreatingjBPMProject">
- <?dbhtml filename="CreatingjBPMProject.html"?>
- <title>Creating a jBPM Project</title>
- <para>This section will show you how to use the Creation wizard for creating a new jBPM
- project with already included source folders.</para>
- <para>At first you should select <emphasis>
- <property moreinfo="none">File >New Project...</property>
- </emphasis> and then <emphasis>
- <property moreinfo="none">JBoss jBPM > Process Project</property>
- </emphasis> in the New Project dialog:</para>
- <figure float="0">
- <title>New Project Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Clicking <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> brings us to the wizard page where it's necessary to specify the
- name and location for the project. We choose, for example, <emphasis>
- <property moreinfo="none">HellojBPM</property>
- </emphasis> as the name and accept the default location. </para>
- <figure float="0">
- <title>Process Name and Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus, our project will be created in the workspace root directory by default. If you
- want to change the directory for your future project, deselect <emphasis>
- <property moreinfo="none">Use default location</property>
- </emphasis> and click <emphasis>
- <property moreinfo="none">Browse...</property>
- </emphasis> button to set needed location or simply type it.</para>
- <para>On the next screen you'll be prompted to select the core jBPM location that
- we have defined in the previous chapter.</para>
- <figure float="0">
- <title>Core jBPM Location Specifying</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Clicking on <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> results in the project being generated. The wizard creates four source
- folders: one for the processes (<emphasis>
- <property moreinfo="none">src/main/jpdl</property>
- </emphasis>), one for the java sources (<emphasis>
- <property moreinfo="none">src/main/java</property>
- </emphasis>), one for the unit tests (<emphasis>
- <property moreinfo="none">src/test/java</property>
- </emphasis>) and one for the resources such as the jbpm.properties and the
- hibernate.properties files (<emphasis>
- <property moreinfo="none">src/main/config</property>
- </emphasis>). In addition a classpath container with all the core jBPM libraries is
- added to the project</para>
- <figure float="0">
- <title>Layout of the Process Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Looking inside the different source folders will reveal a number of other artifacts
- that were generated, but we will leave these untouched for the moment. Instead, we will
- look at another wizard that enables us to create an empty process definition.</para>
- </section>
- <section id="creating_an_empty_process_definition">
- <?dbhtml filename="creating_an_empty_process_definition.html"?>
- <title>Creating an Empty Process Definition</title>
- <para>Now when the project is set up, we can use a Creation wizard to create an empty
- process definition. Bring up the <emphasis>
- <property moreinfo="none">New</property>
- </emphasis> wizard by clicking the <emphasis>
- <property moreinfo="none">File > New > Other...</property>
- </emphasis> menu item. The wizard opens on the <emphasis>
- <property moreinfo="none">Select Wizard</property>
- </emphasis> page.</para>
- <figure float="0">
- <title>The Select Wizard Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the <emphasis>
- <property moreinfo="none">JBoss jBPM</property>
- </emphasis> category, then the <emphasis>
- <property moreinfo="none">Process Definition</property>
- </emphasis> item and clicking on the <emphasis>
- <property moreinfo="none">Next</property>
- </emphasis> button brings us to the <emphasis>
- <property moreinfo="none">Create Process Definition</property>
- </emphasis> page.</para>
- <figure float="0">
- <title>The Create New Process Definion Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>We choose <emphasis>
- <property moreinfo="none">hello</property>
- </emphasis> as the name of the process archive file. Click on the <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to end the wizard and open the process definition editor.</para>
- <figure float="0">
- <title>The Process Definition Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png" scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can see in the Package Explorer that creating a process definition involves
- creating a folder with the name of the process definition and populating this folder
- with two .xml files : <emphasis>
- <property moreinfo="none">gpd.xml</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">processdefinition.xml</property>. </emphasis></para>
- <para>The <emphasis>
- <property moreinfo="none">gpd.xml</property>
- </emphasis> contains the graphical information used by the process definition editor.
- The <emphasis>
- <property moreinfo="none">processdefinition.xml</property>
- </emphasis> file contains the actual process definition info without the graphical
- rendering info. At present, the GPD assumes that these two files are siblings. More
- sophisticated configuration will be supported later.</para>
-
- <section id="minimal_process_definition">
- <?dbhtml filename="minimal_process_definition.html"?>
- <title>A Minimal Process Definition</title>
- <para>Now we are ready to create a very simple process definition consisting of a begin
- state, an intermediate state and an end state.</para>
- <para>To make the configuration of actions much easier it's better to use the
- jPDL perspective. It provides the tabbed Properties Editor which allows to configure
- all the relevant properties of the current selected item. </para>
-
- <section id="adding_the_nodes">
- <?dbhtml filename="adding_the_nodes.html"?>
- <title>Adding the Nodes</title>
- <para>At first select respectively <emphasis>
- <property moreinfo="none">Start</property>,
- </emphasis>
- <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">End</property>
- </emphasis> on the tools palette and click on the canvas to add these nodes to
- the process definition. The result should look similar to this:</para>
- <figure float="0">
- <title>A Simple Process With Three Nodes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png" scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="adding_transitions">
- <?dbhtml filename="adding_transitions.html"?>
- <title>Adding Transitions</title>
- <para>Then, we will connect the nodes with transitions. To do that select the <emphasis>
- <property moreinfo="none">Transition</property>
- </emphasis> tool in the tools palette and click on the <emphasis>
- <property moreinfo="none">Start</property>
- </emphasis> node, then move to the <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> node and click again to see the transition being drawn. Perform the
- same steps to create a transition from the <emphasis>
- <property moreinfo="none">State</property>
- </emphasis> node to the <emphasis>
- <property moreinfo="none">End</property>
- </emphasis> node. The result will look like:</para>
- <figure float="0">
- <title>A Simple Process With Transitions</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png" scale="60"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
- <para>Now, when you've got background knowledge of simple project creation,
- let's move to more advanced tools.</para>
- </section>
- </section>
- </section>
-
-</chapter>
-
-
-<chapter id="the_views" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/the_views.xml" xreflabel="the_views">
- <?dbhtml filename="the_views.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>The views</title>
-
- <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
- <para>The views are used for representation and navigation the resources you are working on at
- the moment. One of the advantages of all the views is that all modifications made in the
- currant-active file are immediately displayed in them. Let’s get acquainted more closely
- with those that the <property moreinfo="none">jPDL perspective</property> provides. </para>
-
- <figure float="0">
- <title>The jPDL Perspective Views and Editors</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_0.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see in the picture above, the <property moreinfo="none">jPDL perspective</property> contains a
- complete set of functionality that's necessary for working on the jBPM project.</para>
-
- <section id="the_outline_view">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Outline View</title>
- <para>To have a way to quickly see an outline of the process use the <emphasis>
- <property moreinfo="none">Outline view</property>
- </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
- <property moreinfo="none">Window > Show view > Outline</property>. </emphasis></para>
-
- <figure float="0">
- <title>The Overview View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_overview">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Overview</title>
- <para>The main advantage of this view is that it gives visual representation of the whole
- currant-developing process. Besides, the <emphasis>
- <property moreinfo="none">Overview</property>
- </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
- process structure if it's too large.</para>
-
- <figure float="0">
- <title>The Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_properties_view">
- <?dbhtml filename="the_properties_view.html"?>
- <title>The Properties View</title>
- <para> Here, we dwell on the JBDS <property moreinfo="none">Properties view</property>.</para>
- <para>Notice if it's not visible you can access it by navigating <emphasis>
- <property moreinfo="none">Window > Show view > Properties</property>. </emphasis></para>
- <para>The view shows the relevant properties of the selected item in the tabbed form. Every
- item has its own set of properties, which can be directly editable in the Properties
- view or by brining up the context menu.</para>
-
- <figure float="0">
- <title>The Properties View of selected Transition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For example, on the picture above the Properties view displays all the properties for
- a selected transition. Its name has been changed to <emphasis>
- <property moreinfo="none">to_auction</property>. </emphasis> We've done it directly in
- active General tab of the view. The same way let's change the name for the
- second transition to <emphasis>
- <property moreinfo="none">to_end</property>. </emphasis></para>
- <para>If no one item is selected, the view represents the properties of the whole process
- definition. </para>
-
- <figure float="0">
- <title>The Properties View of Process Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In this case, it contains six tabs. The first one is the <emphasis>
- <property moreinfo="none">General</property>.</emphasis> It allows to specify a process name and add
- necessary description. To illustrate let's change the process definition name
- to <emphasis>
- <property moreinfo="none">jbay</property>. </emphasis></para>
- </section>
-
- <section id="jbpm_gpd_editor">
- <?dbhtml filename="direct_editing.html"?>
- <title>The jBPM Graphical Process Designer editor.</title>
- <para>The <property moreinfo="none">jBPM GPD editor</property> includes four modes: Diagram, Deployment,
- Design and Source, which are available as switchable tabs at the bottom of the editor.
- Let's dwell on each of them.</para>
-
- <section id="the_diagram_mode">
- <title>The Diagram mode</title>
- <para> In this mode we define the process in the form of a diagram by means of tools
- provided on the left-hand side of the jBPM GPD. </para>
-
- <figure float="0">
- <title>The Diagram mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Besides, some properties can be directly edited in the <property moreinfo="none">Diagram
- mode</property> of the graphical editor. One example of this is the <emphasis>
- <property moreinfo="none">name</property>
- </emphasis> property of nodes. You can edit this directly by selecting the node of
- which you want to change the name and then click once inside this node. This enables
- an editor in the node. We change the name of the node to <emphasis>
- <property moreinfo="none">auction</property>. </emphasis></para>
- </section>
-
- <section id="source_mode">
- <?dbhtml filename="the_source_view.html"?>
- <title>The Source Mode</title>
- <para>Now, that we have defined a simple process definition, we can have a look at the
- XML that is being generated under the covers. To see this XML click on the Source
- tab of the graphical process designer editor.</para>
-
- <figure float="0">
- <title>The Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <property moreinfo="none">Source mode</property> enables to easily manipulate our XML. That is
- manually inserting and editing necessary elements or attributes. In addition, here
- you can take advantage of content assist.</para>
- </section>
-
- <section id="design_mode">
- <?dbhtml filename="the_design_view.html"?>
- <title>The Design Mode</title>
- <para>One more way to edit your file is to use <property moreinfo="none">Design mode</property>. You can
- see it in the next picture:</para>
- <figure float="0">
- <title>The Design Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_7.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see above, this mode looks like a table in the first column of which
- the process structure is performed. Here, you can also insert, remove and edit
- elements or attributes, moreover add comments and instructions. Their values can be
- directly edited in the second column of the Design mode table.</para>
- <para>For instance, let’s add a comment on the second transition. For that, you should
- bring up the context menu for it and choose <emphasis>
- <property moreinfo="none">Add Before > Comment</property>. </emphasis></para>
-
- <figure float="0">
- <title>Adding a Comment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then, we can put the text <emphasis>This transition leads to the end
- state</emphasis> in the right column as its value.</para>
-
- <figure float="0">
- <title>Comment is added</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_9.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="deployment_mode">
- <?dbhtml filename="the_deployment_view.html"?>
- <title>The Deployment Mode</title>
- <para>Finally, to adjust the deployment settings of the project you should switch on to
- the tab that opens the <property moreinfo="none">Deployment mode</property>. On the picture below
- the <property moreinfo="none">Deployment mode</property> is performed with default settings. Here,
- you can easily modify them or, if the settings won't match your needs, to
- reset defaults. </para>
- <figure float="0">
- <title>The Deployment Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_10.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The button <emphasis>
- <property moreinfo="none">Test Connections</property>
- </emphasis> is necessary to make sure whether all your settings are valid before
- deploying the process.</para>
-
-
-
-
-
- <para>Now that we've seen how to work with <property moreinfo="none">jPDL
- perspective</property>, let's pass on to the project testing.</para>
- </section>
- </section>
-</chapter>
-
-<chapter id="Test_Drive_Proc_Development" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml" xreflabel="Test_Drive_Proc_Development">
- <?dbhtml filename="Test_Drive_Proc_Development.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Test Driven Process Development</title>
-
- <para> One of the most important advantages of JBoss jBPM's lightweight approach to BPM
- and workflow management is that developers can easily leverage their usual programming
- skills and techniques. One of these well-known techniques is Unit Testing and Test Driven
- Development. </para>
- <para>In this chapter we will show how developers, making use of the JBoss jBPM GPD, can use a
- technique we have baptized <property moreinfo="none">Test Driven Process Development</property> to create
- process definitions and test their correctness. </para>
-
- <para> When creating the <emphasis>
- <property moreinfo="none">HellojBPM</property>
- </emphasis> project the Project Creation wizard has already put in place all the library
- requirements we need to start writing the jBPM unit tests. They are contained in the jBPM
- Library container and the most important of them is the <emphasis>
- <property moreinfo="none">.jar</property>
- </emphasis> file containing the core jBPM classes. While working on the project you could
- find them all in the <property moreinfo="none">Package Explorer</property>.</para>
-
- <figure float="0">
- <title>The jBPM Libraries</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>It must be noted that it is possible to change the location of the core jBPM installation
- by changing the preference settings. More on this <link linkend="change_core_jbpm_inst">see
- later</link> in this book.</para>
-
- <para> With that extra knowledge on the project settings, you can create your first test. To do
- this, we create the <emphasis>
- <property moreinfo="none">com.jbay</property>
- </emphasis> package in the <emphasis>
- <property moreinfo="none">test/java</property>
- </emphasis> source folder. Then we bring up the context menu on this package and select <emphasis>
- <property moreinfo="none">New > Other...</property>
- </emphasis></para>
-
- <figure float="0">
- <title>Call the JUnit Test Case Creation wizard</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> And then <emphasis>
- <property moreinfo="none">Java > JUnit > JUnit Test Case</property>
- </emphasis> to call the specialized JUnite Test case creation wizard.</para>
- <figure float="0">
- <title>Call the JUnit Test Case Creation wizard</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The wizard looks as follows:</para>
-
- <figure float="0">
- <title>Create Test Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>By default JUnite 3 version of testing framework is selected. Of course, you can choose
- new advanced JUnit 4 version. In this case you'll be prompted to add new JUnit
- Library to your build path. To add it automatically just click on the appropriate link. In
- the <emphasis>
- <property moreinfo="none">Class under test</property>
- </emphasis> section you can specify the class to test.</para>
-
- <figure float="0">
- <title>A First Test Scenario</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Then, we call the test class <emphasis>
- <property moreinfo="none">HelloTest</property>
- </emphasis> and press <emphasis>
- <property moreinfo="none">Finish</property>
- </emphasis> button to complete.</para>
-
- <para> Next, we should write a simple test scenario as shown on the next figure. Let's
- study the code of this test case. </para>
-
- <figure float="0" id="hello_test">
- <title>A First Test Scenario</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_6.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the first line of the method, a jBPM process archive object is created. We use a
- constructor accepting the filename of the archive. In our case it is the <emphasis>
- <property moreinfo="none">hello</property>
- </emphasis> file we created earlier and which lives in the <emphasis>
- <property moreinfo="none">src/main/jpdl</property>
- </emphasis> folder of our project. After asserting that this object is really created, we
- extract a process definition object from it. This object is fed to the constructor of a
- process instance object. We have a process instance object, but this process is not yet
- started, so we can safely assert that its root token still resides in the start node. After
- signalling the token will move to the next state and the process will be in the <emphasis>
- <property moreinfo="none">auction</property>
- </emphasis> state. Finally another signal will end the process. </para>
-
-
- <para> After writing this test we can check whether it works as expected by running it .</para>
-
- <figure float="0">
- <title>Running the Process Test</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_7.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>All went well as we have a green light:</para>
-
- <figure float="0">
- <title>Successful Test Run</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_8.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Of course, this simple scenario was not very interesting, but the purpose of it was to
- show how you can reuse your development skills in a very straightforward way when doing
- process development. To see how more interesting processes and process test
- scenario's can be developed, we suggest you to read the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink> and to
- study the API reference. You can find it in the jBPM download folder. (To get started we
- downloaded jbpm-jpdl-3.2.2 in <link linkend="jboss_jbpm_runtime_installation">the second
- chapter</link>. You should just remember where you extracted it.) All we've mentioned are in the 'javadoc- *' subfolders of the 'doc' folder.
- Moreover, some more examples will be given later in this book.</para>
-
-</chapter>
-
-
-<chapter id="The_JBoss_jBPM_Int_Mech" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/The_JBoss_jBPM_Int_Mech.xml" xreflabel="The_JBoss_jBPM_Int_Mech">
- <?dbhtml filename="The_JBoss_jBPM_Int_Mech.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Actions : The JBoss jBPM Integration Mechanism</title>
-
- <para> In this chapter we will show how to do software integration with <property moreinfo="none">JBoss
- jBPM</property>. The standard mechanism to implement this is to wrap the functionality you
- want to integrate in a class that implements the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface. In order to demonstrate it let's specify Hello World action for our
- process.</para>
-
- <section>
- <title>Creating a Hello World Action</title>
-
- <para>Each Hello World process should integrate one or more Hello World actions, so this is
- what we will be doing. We can integrate custom code at different points in the process
- definition. To do this we have to specify an action handler, represented by an
- implementation of the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface, and attach this piece of code to a particular event. These events
- are amongst others, going over a transition, leaving or entering nodes, after and before
- signalling. </para>
-
- <para> To make things a little bit more concrete, let's create a new class called <emphasis>
- <property moreinfo="none">HelloActionHandler</property>.
- </emphasis> For that firstly we'll create a new package <emphasis>
- <property moreinfo="none">com.jbay.action</property>
- </emphasis> in the <emphasis>
- <property moreinfo="none">src/java/main</property>
- </emphasis> folder of our project. Then, we should call New Class Creation wizard as
- usual by right-clicking and navigating <emphasis>
- <property moreinfo="none">New > Class</property>.
- </emphasis> </para>
-
- <figure float="0">
- <title>Creating HelloActionHendler Class</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Notice that two first gaps have been filled automatically. Here, instead of <emphasis>
- <property moreinfo="none">Package</property>
- </emphasis> option <emphasis>
- <property moreinfo="none">Enclose type</property>
- </emphasis> option can be selected where a type in which to enclose a new class should
- be specified.</para>
-
- <para>In our case, we leave everything as it is, just type <emphasis>
- <property moreinfo="none">HelloActionHandler</property>
- </emphasis> as a name of new class and add <emphasis>
- <property moreinfo="none">org.jbpm.graph.ActionHendler</property>
- </emphasis> interface as it's shown in the picture above.</para>
-
- <para>Thus, our <emphasis>
- <property moreinfo="none">HelloActionHandler</property>
- </emphasis> implements the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> interface including the <emphasis>
- <property moreinfo="none">execute</property>
- </emphasis> method as shown in the next figure. Here, we add a variable named <emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> to the collection of process variables and put a message in it :
- <emphasis>"Hello from ActionHandler"</emphasis>. </para>
-
- <figure float="0">
- <title>A Simple Hello Action</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_2.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, as we have <emphasis>
- <property moreinfo="none">HelloActionHandler</property>
- </emphasis> class defined, let's explore how we can handle it.</para>
- </section>
-
- <section>
- <title>Integrating the Hello World Action</title>
-
- <para>The main purpose of this chapter is to provide you with the steps associating our
- Hello World action with a particular event and test the correctness of our actions as
- well.</para>
-
- <para> As good Testcity citizens we will first create a Unit Test that proves the behaviour
- we want to achieve by adding the <emphasis>
- <property moreinfo="none">ActionHandler</property>
- </emphasis> to the process. So we implement another test.</para>
-
- <para>At first, let's return to the
- code we already saw <link linkend="hello_test">in the previous chapter</link> and add new test method <emphasis>
- <property moreinfo="none">testActionHendler</property></emphasis> to it. </para>
-
- <figure float="0">
- <title>Create the Hello Action Test</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_3.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We assert
- that no variable called <emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> exist. Then we give the process a signal to move it to the auction state. We
- want to associate the execution of the action with the event of going over the
- transition from the start state to the auction state. So after the signal, the process
- should be in the auction state as in the previous scenario. But moreover, the <emphasis>
- <property moreinfo="none">greeting</property>
- </emphasis> variable should exist and contain the string <emphasis>"Hello from
- ActionHandler"</emphasis>. That's what we assert in the last lines of the test
- method.</para>
-
-
-
- <para> Running the tests now results in a failure. The point is that we did not associate
- the action with any particular event in the process definition, so the process variable
- did not get set. </para>
-
- <figure float="0">
- <title>Test Results Before Integration</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_4.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> Let's do something about it and add an action to the first transition of our
- sample process. To do this you can use the Actions tab in the Properties Editor that is
- under the graphical canvas. Bring up the popup menu of the action element container and
- chose New Action as it's shown on the figure below. The other way to add an action
- to the transition is simply to use the dropdown menu that is available under the action
- icon in the right upper corner of the Properties View.</para>
-
- <figure float="0">
- <title>Adding an Action to a Transition</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_5.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After adding the action a tabbed view with three pages will appear.</para>
-
- <figure float="0">
- <title>Configuration Dialog for an Action</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_6.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The first of these three pages allows you to give the Action a name. The last page
- contains some advanced attributes such as whether the Action is asynchronous. The
- Details page is the most important. It allows to choose and configure the actual action
- handler implementation. </para>
-
- <figure float="0">
- <title>The Details page of an Action Configuration Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_7.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>Clicking on the <emphasis>
- <property moreinfo="none">Search...</property>
- </emphasis> button brings us to a Choose Class dialog.</para>
-
-
- <figure float="0">
- <title>The Choose Action Handler Dialog</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_8.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para> We choose our previously created 'HelloActionHandler' class and
- push the <property moreinfo="none">OK</property> button. After the selection of the action handler for
- the action, we can run the test and observe it gives us a green light.</para>
-
- <figure float="0">
- <title>Test Results</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_9.png" scale="70"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Tere we are. The above objective has been achieved.</para>
- </section>
-
- <section>
- <title> Integration Points</title>
-
- <para> The different integration points in a process definition are thoroughly documented in
- the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink>. Instance nodes can contain many action
- elements. Each of these will appear in the Action element list of the Actions tab. But
- each Action also has a properties view of itself. You can navigate to this view by
- selecting the added Action in the outline view. </para>
-
- </section>
-
-</chapter>
-
-
-<chapter id="Quick_Howto_Guide" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml" xreflabel="Quick_Howto_Guide">
- <?dbhtml filename="Quick_Howto_Guide.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- <keyword></keyword>
- </keywordset>
- </chapterinfo>
- <title>Quick Howto Guide</title>
-
- <para>This chapter contains additional information related to the <property moreinfo="none">JBoss
- jBPM</property>.</para>
-
- <section id="change_core_jbpm_inst">
- <title>Change the Default Core jBPM Installation</title>
-
- <para> You can change the default <property moreinfo="none">jBPM</property> installation by means of the
- Eclipse preference mechanism. Open the Preferences dialog by selecting <emphasis>
- <property moreinfo="none">Window > Preferences</property>
- </emphasis> and select the <emphasis>
- <property moreinfo="none">JBoss jBPM > Runtime Location</property>
- </emphasis> category. Using this page you can add multiple <property moreinfo="none">jBPM</property>
- installation locations and change the default one. The default installation is used for
- the classpath settings when creating a new Process Project. Changing the preferences has
- no influence on already created projects. Getting rid of a <property moreinfo="none">jBPM</property>
- installation that's being referenced by a project however will cause the
- classpath to contain errors. </para>
-
-
- <figure float="0">
- <title>The jBPM Preferences Page</title>
-
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section>
- <title>Configuring Task Nodes</title>
-
- <para>Here, we'll examine how you can configure the Task nodes in jBPM jPDL GPD.</para>
-
- <para> You can add Tasks to Task nodes and then configure them in a similar manner as the
- Action configuration mechanism. Let's consider the process definition similar
- to the previous one that contains three nodes: Start state, Task node and End state. The
- <property moreinfo="none">Properties view</property> for selected Task node includes several tabs. </para>
-
- <figure float="0">
- <title>The Properties View of the selected Task Node</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_2.png" scale="75"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>We should choose the Task tab and then bring up the context menu or click the button
- in the top right corner of the view to add a Task to our Task node.</para>
-
- <figure float="0">
- <title>Adding a Task to the Task Node</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_3.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Every added Task has its own configuration possibilities. You can access them through
- the <property moreinfo="none">Properties view</property> as well.</para>
-
- <figure float="0">
- <title>The Task properties</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_4.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The <property moreinfo="none">General page</property> is a place where you can specify the name of a
- Task and its description. For instance, let it be <emphasis>
- <property moreinfo="none">approve oder</property>
- </emphasis> with appropriate description that you can see in the figure below.</para>
-
- <figure float="0">
- <title>The Task General Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_5.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Now, look at <property moreinfo="none">Details page</property>. First, you should specify the due date
- that is a mandatory property for the Task. The due date is the date on which the task
- should be accomplished. Here you can also set a Task priority as well as signalling,
- notifying or blocking. The <emphasis>
- <property moreinfo="none">Blocking</property>
- </emphasis> attribute indicates that the process will not be able to continue if this
- task is still unaccomplished. The <emphasis>
- <property moreinfo="none">Generate Form...</property>
- </emphasis> button is for creating a simple task form that can be rendered by the jBPM
- console.</para>
-
- <figure float="0">
- <title>The Task Details Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_6.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For our example, we specify the due date as 2 business days, choose the high priority
- and also check the <emphasis>
- <property moreinfo="none">Signalling</property>
- </emphasis> and <emphasis>
- <property moreinfo="none">Notify</property>
- </emphasis> attributes. It means that the Task should be accomplished in 2 business days
- and the assignee will be notified by email when the task is assigned. To specify how the
- Task should be assigned switch on to the <property moreinfo="none">Assignment page</property>.</para>
-
- <figure float="0">
- <title>The Task Assignment Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_7.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the <property moreinfo="none">Reminder page</property> you can specify whether the assignee will be reminded of the task
- that awaits him.</para>
-
- <figure float="0">
- <title>The Task Reminder Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_8.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In our case, the assignee will be reminded by email after two business hours and
- continue to get reminding every business hour after that.</para>
- <para>In the next figure you can see our configuring generated into XML.</para>
- <figure float="0">
- <title>The Task Reminder Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_9.png" scale="80"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
-
-
-
-
- <para>We hope, our guide will help you to get started with the jPDL process language and jBPM
- workflow on the whole. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=217">our forum</ulink>.</para>
- </section>
-</chapter>
-
-
- <!-- TODO: drools used in this section is not available for eclipse .3.3 &AddBusinessProcess; -->
-</book>
17 years, 2 months
JBoss Tools SVN: r11330 - in branches/jbosstools-3.0.0.Beta1: jbpm/docs/reference and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-30 07:35:01 -0400 (Thu, 30 Oct 2008)
New Revision: 11330
Added:
branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml
branches/jbosstools-3.0.0.Beta1/ws/docs/reference/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/documentation/jboss-tools-docs/pom.xml
branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/pom.xml
branches/jbosstools-3.0.0.Beta1/ws/docs/reference/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Modified: branches/jbosstools-3.0.0.Beta1/documentation/jboss-tools-docs/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/documentation/jboss-tools-docs/pom.xml 2008-10-30 11:12:00 UTC (rev 11329)
+++ branches/jbosstools-3.0.0.Beta1/documentation/jboss-tools-docs/pom.xml 2008-10-30 11:35:01 UTC (rev 11330)
@@ -12,18 +12,18 @@
<modules>
<module>../guides/Exadel-migration</module>
- <!--module>../guides/GettingStartedGuide</module-->
+ <module>../guides/GettingStartedGuide</module>
<module>../../as/docs/reference</module>
<module>../../hibernatetools/docs/reference</module>
- <!--module>../../jbpm/docs/reference</module>
- <module>../../jsf/docs/userguide</module-->
+ <module>../../jbpm/docs/reference</module>
+ <module>../../jsf/docs/userguide</module>
<module>../../jsf/docs/jsf_tools_ref_guide</module>
<module>../../jsf/docs/jsf_tools_tutorial</module>
<module>../../seam/docs/reference</module>
<module>../../struts/docs/struts_tools_ref_guide</module>
<module>../../struts/docs/struts_tools_tutorial</module>
<module>../../esb/docs/esb_ref_guide</module>
- <!--module>../../ws/docs/reference</module-->
+ <module>../../ws/docs/reference</module>
<module>../../portlet/docs/reference</module>
<module>../../birt/docs</module>
Added: branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/master_output.xml 2008-10-30 11:35:01 UTC (rev 11330)
@@ -0,0 +1,1302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+
+[<!ENTITY introduction SYSTEM "modules/Introduction.xml">
+<!ENTITY jboss_jbpm_runtime_installation SYSTEM "modules/jboss_jbpm_runtime_installation.xml">
+<!ENTITY guided_tour_jboss_jbpmgpd SYSTEM "modules/guided_tour_jboss_jbpmgpd.xml">
+<!ENTITY the_views SYSTEM "modules/the_views.xml">
+<!ENTITY Test_Drive_Proc SYSTEM "modules/Test_Drive_Proc.xml">
+<!ENTITY The_JBoss_jBPM_Int_Mech SYSTEM "modules/The_JBoss_jBPM_Int_Mech.xml">
+<!ENTITY Quick_Howto_Guide SYSTEM "modules/Quick_Howto_Guide.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+ ]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>jBPM Tools Reference Guide</title>
+
+ <author>
+ <firstname>Anatoly</firstname>
+ <surname>Fedosik</surname>
+ </author>
+ <author>
+ <firstname>Koen</firstname>
+ <surname>Aers</surname>
+ <email>koen.aers(a)jboss.com</email>
+ </author>
+ <author>
+ <firstname>Olga</firstname>
+ <surname>Chikvina</surname>
+ </author>
+ <author>
+ <firstname>Svetlana</firstname>
+ <surname>Mukhina</surname>
+ <email>smukhina(a)exadel.com</email>
+ </author>
+ <author>
+ <firstname>Tom</firstname>
+ <surname>Baeyens</surname>
+ <email>tom.baeyens(a)jboss.com</email>
+ </author>
+
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo> Version: <diffmk:wrapper diffmk:change="added">3.0.0.beta1</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">3.0.0.alpha </diffmk:wrapper></releaseinfo>
+
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/jbpm/pdf/JBPM_Refere..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="Introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Introduction.xml" xreflabel="Introduction">
+ <?dbhtml filename="TargetAudience.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>Target</keyword>
+ <keyword>developers</keyword>
+ <keyword>Audience</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Introduction</title>
+ <para>All developers and process analysts who are beginning to use JBoss jBPM should read this
+ Getting Started guide. It will give them a jumpstart showing how to create a process definition.</para>
+ <section id="Preface">
+ <?dbhtml filename="Preface.html"?>
+ <title>Preface</title>
+ <para>This document introduces the use of the JBoss jBPM Graphical Process Designer (GPD) to
+ create workflow processes. It will help first time users with the following tasks :</para>
+ <itemizedlist>
+ <listitem>
+ <para>Install the JBoss jBPM GPD Eclipse plugin available from the JBoss jBPM download
+ area</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Using the creation wizard to create an empty process definition</para>
+ </listitem>
+ <listitem>
+ <para>Use the designer palette to draw the first processdefinition</para>
+ </listitem>
+ <listitem>
+ <para>Show how the xml processdefinition can be inspected as an xml file</para>
+ </listitem>
+ <listitem>
+ <para>Set up a Java project in Eclipse and prepare it to do test driven process
+ development</para>
+ </listitem>
+ <listitem>
+ <para>Write an example process test case</para>
+ </listitem>
+ </itemizedlist>
+ <para>If you have questions, please feel free to contact <ulink url="mailto:koen.aers@jboss.com">Koen Aers</ulink> or <ulink url="mailto:tom.baeyens@jboss.com">Tom Baeyens</ulink> for more
+ information.</para>
+ </section>
+
+ <section id="feature_list">
+
+ <title>Feature list</title>
+
+ <para> JBoss jBPM is a workflow that enables creating and automatization business processes. Look
+ at the list of features below to understand its main functionality.</para>
+ <table>
+ <title>Key Functionality for JBoss jBPM</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ </row>
+ </thead>
+ <tbody>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">jBDL support</link>
+ </entry>
+ <entry>Enables managing workflow processes as well as human tasks and interactions between
+ them. jBDL combines the best both Java and declarative process techniques.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="GuidedTourJBossjBPMGPD">Support of Graphical Process Designer (GPD)</link>
+ </entry>
+ <entry>Is used for simplifying declarative process development and visualizations of all
+ actions.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="CreatingjBPMProject">Project Creation wizard</link>
+ </entry>
+ <entry>Allows to create a new jBPM template project that already includes all advanced
+ artifacts and core jBPM libraries.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="minimal_process_definition">Rich palette of pre-build process nodes</link>
+ </entry>
+ <entry>Provides process-building functionality and gives opportunity even non-programmers to
+ develop processes.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="source_mode">Support of XML code view</link>
+ </entry>
+ <entry>Shows the corresponding XML that's generated automatically in the Source view
+ of the process definition editor when developing the process.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <link linkend="the_properties_view">Properties view</link>
+ </entry>
+ <entry>Facilitates configuring and editing of all nodes properties.</entry>
+ </row>
+
+ <row>
+ <entry>Interaction with all of the J2EE based integration technologies including Web Services,
+ Java Messaging, J2EE Connectors, JBDC, EJBs.</entry>
+ <entry>Enables implementation, provides better functionality and flexibility.</entry>
+ </row>
+
+ <row>
+ <entry>Integration with jBoss Seam</entry>
+ <entry>Allows to write applications with complex workflows and provides easier interactions
+ between them.</entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA/">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="jboss_jbpm_runtime_installation" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/jboss_jbpm_runtime_installation.xml" xreflabel="jboss_jbpm_runtime_installation">
+ <?dbhtml filename="jboss_jbpm_runtime_installation.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>designer</keyword>
+ <keyword>process</keyword>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>jBPM runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss jBPM Runtime Installation</title>
+ <para>The main purpose of this chapter is to let you know how to launch the <property moreinfo="none">JBoss
+ jBPM</property> (business process management).</para>
+ <para>The jBPM plugin (jBPM Designer) is already included in the <property moreinfo="none">JBoss Tools</property>.
+ To make it work, you should only download the jBPM runtime (<ulink url="http://sourceforge.net/project/showfiles.php?group_id=70542&package_i...">jbpm-jpdl-3.2.2</ulink> currently) and specify the directory where you extracted the runtime
+ either when you create a jBPM project or by using the jBPM preference pages.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Try to avoid using spaces in the names of installation folders. It can provoke problems in
+ some situations with Sun-based VMs.</para>
+ </note>
+
+ <para>Navigate to <emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss jBPM > Runtime Locations</property>.
+ </emphasis> Here you can add, edit and remove JBoss jBPM installation locations. Click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button. In the dialog that appeared enter a name for a newly added jBPM runtime and
+ point to the correct location of this package on your harddrive. Click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> then click <emphasis>
+ <property moreinfo="none">OK</property>
+ </emphasis> again.</para>
+
+ <figure float="0">
+ <title>Adding jBPM Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtime_installation/runtime_installation_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, when you have a runtime installed, we are going to demonstrate some powerful features of
+ the jBPM.</para>
+</chapter>
+
+
+<chapter id="GuidedTourJBossjBPMGPD" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml" xreflabel="GuidedTourJBossjBPMGPD">
+ <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>Process</keyword>
+ <keyword>Definition</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>A Guided Tour of JBoss jBPM GPD</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating and configuring your
+ own simple process. Let's try to organize a new jBPM project.</para>
+ <para>A wizard for creating a jBPM project is included in the GPD plugin. We have opted to
+ create a project based on a template already containing a number of advanced artifacts that
+ we will ignore for this section. In the future we will elaborate this wizard and offer the
+ possibility to create an empty jBPM project as well as projects based on templates taken
+ from the jBPM tutorial.</para>
+ <section id="CreatingjBPMProject">
+ <?dbhtml filename="CreatingjBPMProject.html"?>
+ <title>Creating a jBPM Project</title>
+ <para>This section will show you how to use the Creation wizard for creating a new jBPM
+ project with already included source folders.</para>
+ <para>At first you should select <emphasis>
+ <property moreinfo="none">File >New Project...</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">JBoss jBPM > Process Project</property>
+ </emphasis> in the New Project dialog:</para>
+ <figure float="0">
+ <title>New Project Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Clicking <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> brings us to the wizard page where it's necessary to specify the
+ name and location for the project. We choose, for example, <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> as the name and accept the default location. </para>
+ <figure float="0">
+ <title>Process Name and Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, our project will be created in the workspace root directory by default. If you
+ want to change the directory for your future project, deselect <emphasis>
+ <property moreinfo="none">Use default location</property>
+ </emphasis> and click <emphasis>
+ <property moreinfo="none">Browse...</property>
+ </emphasis> button to set needed location or simply type it.</para>
+ <para>On the next screen you'll be prompted to select the core jBPM location that
+ we have defined in the previous chapter.</para>
+ <figure float="0">
+ <title>Core jBPM Location Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Clicking on <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> results in the project being generated. The wizard creates four source
+ folders: one for the processes (<emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis>), one for the java sources (<emphasis>
+ <property moreinfo="none">src/main/java</property>
+ </emphasis>), one for the unit tests (<emphasis>
+ <property moreinfo="none">src/test/java</property>
+ </emphasis>) and one for the resources such as the jbpm.properties and the
+ hibernate.properties files (<emphasis>
+ <property moreinfo="none">src/main/config</property>
+ </emphasis>). In addition a classpath container with all the core jBPM libraries is
+ added to the project</para>
+ <figure float="0">
+ <title>Layout of the Process Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Looking inside the different source folders will reveal a number of other artifacts
+ that were generated, but we will leave these untouched for the moment. Instead, we will
+ look at another wizard that enables us to create an empty process definition.</para>
+ </section>
+ <section id="creating_an_empty_process_definition">
+ <?dbhtml filename="creating_an_empty_process_definition.html"?>
+ <title>Creating an Empty Process Definition</title>
+ <para>Now when the project is set up, we can use a Creation wizard to create an empty
+ process definition. Bring up the <emphasis>
+ <property moreinfo="none">New</property>
+ </emphasis> wizard by clicking the <emphasis>
+ <property moreinfo="none">File > New > Other...</property>
+ </emphasis> menu item. The wizard opens on the <emphasis>
+ <property moreinfo="none">Select Wizard</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Select Wizard Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the <emphasis>
+ <property moreinfo="none">JBoss jBPM</property>
+ </emphasis> category, then the <emphasis>
+ <property moreinfo="none">Process Definition</property>
+ </emphasis> item and clicking on the <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button brings us to the <emphasis>
+ <property moreinfo="none">Create Process Definition</property>
+ </emphasis> page.</para>
+ <figure float="0">
+ <title>The Create New Process Definion Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>We choose <emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> as the name of the process archive file. Click on the <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to end the wizard and open the process definition editor.</para>
+ <figure float="0">
+ <title>The Process Definition Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can see in the Package Explorer that creating a process definition involves
+ creating a folder with the name of the process definition and populating this folder
+ with two .xml files : <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>. </emphasis></para>
+ <para>The <emphasis>
+ <property moreinfo="none">gpd.xml</property>
+ </emphasis> contains the graphical information used by the process definition editor.
+ The <emphasis>
+ <property moreinfo="none">processdefinition.xml</property>
+ </emphasis> file contains the actual process definition info without the graphical
+ rendering info. At present, the GPD assumes that these two files are siblings. More
+ sophisticated configuration will be supported later.</para>
+
+ <section id="minimal_process_definition">
+ <?dbhtml filename="minimal_process_definition.html"?>
+ <title>A Minimal Process Definition</title>
+ <para>Now we are ready to create a very simple process definition consisting of a begin
+ state, an intermediate state and an end state.</para>
+ <para>To make the configuration of actions much easier it's better to use the
+ jPDL perspective. It provides the tabbed Properties Editor which allows to configure
+ all the relevant properties of the current selected item. </para>
+
+ <section id="adding_the_nodes">
+ <?dbhtml filename="adding_the_nodes.html"?>
+ <title>Adding the Nodes</title>
+ <para>At first select respectively <emphasis>
+ <property moreinfo="none">Start</property>,
+ </emphasis>
+ <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> on the tools palette and click on the canvas to add these nodes to
+ the process definition. The result should look similar to this:</para>
+ <figure float="0">
+ <title>A Simple Process With Three Nodes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="adding_transitions">
+ <?dbhtml filename="adding_transitions.html"?>
+ <title>Adding Transitions</title>
+ <para>Then, we will connect the nodes with transitions. To do that select the <emphasis>
+ <property moreinfo="none">Transition</property>
+ </emphasis> tool in the tools palette and click on the <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis> node, then move to the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node and click again to see the transition being drawn. Perform the
+ same steps to create a transition from the <emphasis>
+ <property moreinfo="none">State</property>
+ </emphasis> node to the <emphasis>
+ <property moreinfo="none">End</property>
+ </emphasis> node. The result will look like:</para>
+ <figure float="0">
+ <title>A Simple Process With Transitions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png" scale="60"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+ <para>Now, when you've got background knowledge of simple project creation,
+ let's move to more advanced tools.</para>
+ </section>
+ </section>
+ </section>
+
+</chapter>
+
+
+<chapter id="the_views" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/the_views.xml" xreflabel="the_views">
+ <?dbhtml filename="the_views.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>The views</title>
+
+ <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
+ <para>The views are used for representation and navigation the resources you are working on at
+ the moment. One of the advantages of all the views is that all modifications made in the
+ currant-active file are immediately displayed in them. Let’s get acquainted more closely
+ with those that the <property moreinfo="none">jPDL perspective</property> provides. </para>
+
+ <figure float="0">
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_0.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the <property moreinfo="none">jPDL perspective</property> contains a
+ complete set of functionality that's necessary for working on the jBPM project.</para>
+
+ <section id="the_outline_view">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Outline View</title>
+ <para>To have a way to quickly see an outline of the process use the <emphasis>
+ <property moreinfo="none">Outline view</property>
+ </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
+ <property moreinfo="none">Window > Show view > Outline</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>The Overview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_overview">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Overview</title>
+ <para>The main advantage of this view is that it gives visual representation of the whole
+ currant-developing process. Besides, the <emphasis>
+ <property moreinfo="none">Overview</property>
+ </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
+ process structure if it's too large.</para>
+
+ <figure float="0">
+ <title>The Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_properties_view">
+ <?dbhtml filename="the_properties_view.html"?>
+ <title>The Properties View</title>
+ <para> Here, we dwell on the JBDS <property moreinfo="none">Properties view</property>.</para>
+ <para>Notice if it's not visible you can access it by navigating <emphasis>
+ <property moreinfo="none">Window > Show view > Properties</property>. </emphasis></para>
+ <para>The view shows the relevant properties of the selected item in the tabbed form. Every
+ item has its own set of properties, which can be directly editable in the Properties
+ view or by brining up the context menu.</para>
+
+ <figure float="0">
+ <title>The Properties View of selected Transition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For example, on the picture above the Properties view displays all the properties for
+ a selected transition. Its name has been changed to <emphasis>
+ <property moreinfo="none">to_auction</property>. </emphasis> We've done it directly in
+ active General tab of the view. The same way let's change the name for the
+ second transition to <emphasis>
+ <property moreinfo="none">to_end</property>. </emphasis></para>
+ <para>If no one item is selected, the view represents the properties of the whole process
+ definition. </para>
+
+ <figure float="0">
+ <title>The Properties View of Process Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case, it contains six tabs. The first one is the <emphasis>
+ <property moreinfo="none">General</property>.</emphasis> It allows to specify a process name and add
+ necessary description. To illustrate let's change the process definition name
+ to <emphasis>
+ <property moreinfo="none">jbay</property>. </emphasis></para>
+ </section>
+
+ <section id="jbpm_gpd_editor">
+ <?dbhtml filename="direct_editing.html"?>
+ <title>The jBPM Graphical Process Designer editor.</title>
+ <para>The <property moreinfo="none">jBPM GPD editor</property> includes four modes: Diagram, Deployment,
+ Design and Source, which are available as switchable tabs at the bottom of the editor.
+ Let's dwell on each of them.</para>
+
+ <section id="the_diagram_mode">
+ <title>The Diagram mode</title>
+ <para> In this mode we define the process in the form of a diagram by means of tools
+ provided on the left-hand side of the jBPM GPD. </para>
+
+ <figure float="0">
+ <title>The Diagram mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Besides, some properties can be directly edited in the <property moreinfo="none">Diagram
+ mode</property> of the graphical editor. One example of this is the <emphasis>
+ <property moreinfo="none">name</property>
+ </emphasis> property of nodes. You can edit this directly by selecting the node of
+ which you want to change the name and then click once inside this node. This enables
+ an editor in the node. We change the name of the node to <emphasis>
+ <property moreinfo="none">auction</property>. </emphasis></para>
+ </section>
+
+ <section id="source_mode">
+ <?dbhtml filename="the_source_view.html"?>
+ <title>The Source Mode</title>
+ <para>Now, that we have defined a simple process definition, we can have a look at the
+ XML that is being generated under the covers. To see this XML click on the Source
+ tab of the graphical process designer editor.</para>
+
+ <figure float="0">
+ <title>The Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property moreinfo="none">Source mode</property> enables to easily manipulate our XML. That is
+ manually inserting and editing necessary elements or attributes. In addition, here
+ you can take advantage of content assist.</para>
+ </section>
+
+ <section id="design_mode">
+ <?dbhtml filename="the_design_view.html"?>
+ <title>The Design Mode</title>
+ <para>One more way to edit your file is to use <property moreinfo="none">Design mode</property>. You can
+ see it in the next picture:</para>
+ <figure float="0">
+ <title>The Design Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see above, this mode looks like a table in the first column of which
+ the process structure is performed. Here, you can also insert, remove and edit
+ elements or attributes, moreover add comments and instructions. Their values can be
+ directly edited in the second column of the Design mode table.</para>
+ <para>For instance, let’s add a comment on the second transition. For that, you should
+ bring up the context menu for it and choose <emphasis>
+ <property moreinfo="none">Add Before > Comment</property>. </emphasis></para>
+
+ <figure float="0">
+ <title>Adding a Comment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then, we can put the text <emphasis>This transition leads to the end
+ state</emphasis> in the right column as its value.</para>
+
+ <figure float="0">
+ <title>Comment is added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="deployment_mode">
+ <?dbhtml filename="the_deployment_view.html"?>
+ <title>The Deployment Mode</title>
+ <para>Finally, to adjust the deployment settings of the project you should switch on to
+ the tab that opens the <property moreinfo="none">Deployment mode</property>. On the picture below
+ the <property moreinfo="none">Deployment mode</property> is performed with default settings. Here,
+ you can easily modify them or, if the settings won't match your needs, to
+ reset defaults. </para>
+ <figure float="0">
+ <title>The Deployment Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The button <emphasis>
+ <property moreinfo="none">Test Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are valid before
+ deploying the process.</para>
+
+
+
+
+
+ <para>Now that we've seen how to work with <property moreinfo="none">jPDL
+ perspective</property>, let's pass on to the project testing.</para>
+ </section>
+ </section>
+</chapter>
+
+<chapter id="Test_Drive_Proc_Development" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Test_Drive_Proc.xml" xreflabel="Test_Drive_Proc_Development">
+ <?dbhtml filename="Test_Drive_Proc_Development.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Test Driven Process Development</title>
+
+ <para> One of the most important advantages of JBoss jBPM's lightweight approach to BPM
+ and workflow management is that developers can easily leverage their usual programming
+ skills and techniques. One of these well-known techniques is Unit Testing and Test Driven
+ Development. </para>
+ <para>In this chapter we will show how developers, making use of the JBoss jBPM GPD, can use a
+ technique we have baptized <property moreinfo="none">Test Driven Process Development</property> to create
+ process definitions and test their correctness. </para>
+
+ <para> When creating the <emphasis>
+ <property moreinfo="none">HellojBPM</property>
+ </emphasis> project the Project Creation wizard has already put in place all the library
+ requirements we need to start writing the jBPM unit tests. They are contained in the jBPM
+ Library container and the most important of them is the <emphasis>
+ <property moreinfo="none">.jar</property>
+ </emphasis> file containing the core jBPM classes. While working on the project you could
+ find them all in the <property moreinfo="none">Package Explorer</property>.</para>
+
+ <figure float="0">
+ <title>The jBPM Libraries</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It must be noted that it is possible to change the location of the core jBPM installation
+ by changing the preference settings. More on this <link linkend="change_core_jbpm_inst">see
+ later</link> in this book.</para>
+
+ <para> With that extra knowledge on the project settings, you can create your first test. To do
+ this, we create the <emphasis>
+ <property moreinfo="none">com.jbay</property>
+ </emphasis> package in the <emphasis>
+ <property moreinfo="none">test/java</property>
+ </emphasis> source folder. Then we bring up the context menu on this package and select <emphasis>
+ <property moreinfo="none">New > Other...</property>
+ </emphasis></para>
+
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> And then <emphasis>
+ <property moreinfo="none">Java > JUnit > JUnit Test Case</property>
+ </emphasis> to call the specialized JUnite Test case creation wizard.</para>
+ <figure float="0">
+ <title>Call the JUnit Test Case Creation wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The wizard looks as follows:</para>
+
+ <figure float="0">
+ <title>Create Test Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By default JUnite 3 version of testing framework is selected. Of course, you can choose
+ new advanced JUnit 4 version. In this case you'll be prompted to add new JUnit
+ Library to your build path. To add it automatically just click on the appropriate link. In
+ the <emphasis>
+ <property moreinfo="none">Class under test</property>
+ </emphasis> section you can specify the class to test.</para>
+
+ <figure float="0">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Then, we call the test class <emphasis>
+ <property moreinfo="none">HelloTest</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to complete.</para>
+
+ <para> Next, we should write a simple test scenario as shown on the next figure. Let's
+ study the code of this test case. </para>
+
+ <figure float="0" id="hello_test">
+ <title>A First Test Scenario</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_6.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In the first line of the method, a jBPM process archive object is created. We use a
+ constructor accepting the filename of the archive. In our case it is the <emphasis>
+ <property moreinfo="none">hello</property>
+ </emphasis> file we created earlier and which lives in the <emphasis>
+ <property moreinfo="none">src/main/jpdl</property>
+ </emphasis> folder of our project. After asserting that this object is really created, we
+ extract a process definition object from it. This object is fed to the constructor of a
+ process instance object. We have a process instance object, but this process is not yet
+ started, so we can safely assert that its root token still resides in the start node. After
+ signalling the token will move to the next state and the process will be in the <emphasis>
+ <property moreinfo="none">auction</property>
+ </emphasis> state. Finally another signal will end the process. </para>
+
+
+ <para> After writing this test we can check whether it works as expected by running it .</para>
+
+ <figure float="0">
+ <title>Running the Process Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_7.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>All went well as we have a green light:</para>
+
+ <figure float="0">
+ <title>Successful Test Run</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Test_Drive_Proc/test_driv_proc_8.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Of course, this simple scenario was not very interesting, but the purpose of it was to
+ show how you can reuse your development skills in a very straightforward way when doing
+ process development. To see how more interesting processes and process test
+ scenario's can be developed, we suggest you to read the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink> and to
+ study the API reference. You can find it in the jBPM download folder. (To get started we
+ downloaded jbpm-jpdl-3.2.2 in <link linkend="jboss_jbpm_runtime_installation">the second
+ chapter</link>. You should just remember where you extracted it.) All we've mentioned are in the 'javadoc- *' subfolders of the 'doc' folder.
+ Moreover, some more examples will be given later in this book.</para>
+
+</chapter>
+
+
+<chapter id="The_JBoss_jBPM_Int_Mech" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/The_JBoss_jBPM_Int_Mech.xml" xreflabel="The_JBoss_jBPM_Int_Mech">
+ <?dbhtml filename="The_JBoss_jBPM_Int_Mech.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Actions : The JBoss jBPM Integration Mechanism</title>
+
+ <para> In this chapter we will show how to do software integration with <property moreinfo="none">JBoss
+ jBPM</property>. The standard mechanism to implement this is to wrap the functionality you
+ want to integrate in a class that implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface. In order to demonstrate it let's specify Hello World action for our
+ process.</para>
+
+ <section>
+ <title>Creating a Hello World Action</title>
+
+ <para>Each Hello World process should integrate one or more Hello World actions, so this is
+ what we will be doing. We can integrate custom code at different points in the process
+ definition. To do this we have to specify an action handler, represented by an
+ implementation of the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface, and attach this piece of code to a particular event. These events
+ are amongst others, going over a transition, leaving or entering nodes, after and before
+ signalling. </para>
+
+ <para> To make things a little bit more concrete, let's create a new class called <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>.
+ </emphasis> For that firstly we'll create a new package <emphasis>
+ <property moreinfo="none">com.jbay.action</property>
+ </emphasis> in the <emphasis>
+ <property moreinfo="none">src/java/main</property>
+ </emphasis> folder of our project. Then, we should call New Class Creation wizard as
+ usual by right-clicking and navigating <emphasis>
+ <property moreinfo="none">New > Class</property>.
+ </emphasis> </para>
+
+ <figure float="0">
+ <title>Creating HelloActionHendler Class</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Notice that two first gaps have been filled automatically. Here, instead of <emphasis>
+ <property moreinfo="none">Package</property>
+ </emphasis> option <emphasis>
+ <property moreinfo="none">Enclose type</property>
+ </emphasis> option can be selected where a type in which to enclose a new class should
+ be specified.</para>
+
+ <para>In our case, we leave everything as it is, just type <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> as a name of new class and add <emphasis>
+ <property moreinfo="none">org.jbpm.graph.ActionHendler</property>
+ </emphasis> interface as it's shown in the picture above.</para>
+
+ <para>Thus, our <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> implements the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> interface including the <emphasis>
+ <property moreinfo="none">execute</property>
+ </emphasis> method as shown in the next figure. Here, we add a variable named <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> to the collection of process variables and put a message in it :
+ <emphasis>"Hello from ActionHandler"</emphasis>. </para>
+
+ <figure float="0">
+ <title>A Simple Hello Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_2.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, as we have <emphasis>
+ <property moreinfo="none">HelloActionHandler</property>
+ </emphasis> class defined, let's explore how we can handle it.</para>
+ </section>
+
+ <section>
+ <title>Integrating the Hello World Action</title>
+
+ <para>The main purpose of this chapter is to provide you with the steps associating our
+ Hello World action with a particular event and test the correctness of our actions as
+ well.</para>
+
+ <para> As good Testcity citizens we will first create a Unit Test that proves the behaviour
+ we want to achieve by adding the <emphasis>
+ <property moreinfo="none">ActionHandler</property>
+ </emphasis> to the process. So we implement another test.</para>
+
+ <para>At first, let's return to the
+ code we already saw <link linkend="hello_test">in the previous chapter</link> and add new test method <emphasis>
+ <property moreinfo="none">testActionHendler</property></emphasis> to it. </para>
+
+ <figure float="0">
+ <title>Create the Hello Action Test</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_3.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We assert
+ that no variable called <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> exist. Then we give the process a signal to move it to the auction state. We
+ want to associate the execution of the action with the event of going over the
+ transition from the start state to the auction state. So after the signal, the process
+ should be in the auction state as in the previous scenario. But moreover, the <emphasis>
+ <property moreinfo="none">greeting</property>
+ </emphasis> variable should exist and contain the string <emphasis>"Hello from
+ ActionHandler"</emphasis>. That's what we assert in the last lines of the test
+ method.</para>
+
+
+
+ <para> Running the tests now results in a failure. The point is that we did not associate
+ the action with any particular event in the process definition, so the process variable
+ did not get set. </para>
+
+ <figure float="0">
+ <title>Test Results Before Integration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_4.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para> Let's do something about it and add an action to the first transition of our
+ sample process. To do this you can use the Actions tab in the Properties Editor that is
+ under the graphical canvas. Bring up the popup menu of the action element container and
+ chose New Action as it's shown on the figure below. The other way to add an action
+ to the transition is simply to use the dropdown menu that is available under the action
+ icon in the right upper corner of the Properties View.</para>
+
+ <figure float="0">
+ <title>Adding an Action to a Transition</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After adding the action a tabbed view with three pages will appear.</para>
+
+ <figure float="0">
+ <title>Configuration Dialog for an Action</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first of these three pages allows you to give the Action a name. The last page
+ contains some advanced attributes such as whether the Action is asynchronous. The
+ Details page is the most important. It allows to choose and configure the actual action
+ handler implementation. </para>
+
+ <figure float="0">
+ <title>The Details page of an Action Configuration Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_7.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>Clicking on the <emphasis>
+ <property moreinfo="none">Search...</property>
+ </emphasis> button brings us to a Choose Class dialog.</para>
+
+
+ <figure float="0">
+ <title>The Choose Action Handler Dialog</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para> We choose our previously created 'HelloActionHandler' class and
+ push the <property moreinfo="none">OK</property> button. After the selection of the action handler for
+ the action, we can run the test and observe it gives us a green light.</para>
+
+ <figure float="0">
+ <title>Test Results</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/The_JBoss_jBPM_Int_Mech/jboss_jbpm_int_mech_9.png" scale="70"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Tere we are. The above objective has been achieved.</para>
+ </section>
+
+ <section>
+ <title> Integration Points</title>
+
+ <para> The different integration points in a process definition are thoroughly documented in
+ the <ulink url="http://docs.jboss.com/jbpm/v3/userguide/">JBoss jBPM User Guide</ulink>. Instance nodes can contain many action
+ elements. Each of these will appear in the Action element list of the Actions tab. But
+ each Action also has a properties view of itself. You can navigate to this view by
+ selecting the added Action in the outline view. </para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="Quick_Howto_Guide" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml" xreflabel="Quick_Howto_Guide">
+ <?dbhtml filename="Quick_Howto_Guide.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ <keyword></keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Quick Howto Guide</title>
+
+ <para>This chapter contains additional information related to the <property moreinfo="none">JBoss
+ jBPM</property>.</para>
+
+ <section id="change_core_jbpm_inst">
+ <title>Change the Default Core jBPM Installation</title>
+
+ <para> You can change the default <property moreinfo="none">jBPM</property> installation by means of the
+ Eclipse preference mechanism. Open the Preferences dialog by selecting <emphasis>
+ <property moreinfo="none">Window > Preferences</property>
+ </emphasis> and select the <emphasis>
+ <property moreinfo="none">JBoss jBPM > Runtime Location</property>
+ </emphasis> category. Using this page you can add multiple <property moreinfo="none">jBPM</property>
+ installation locations and change the default one. The default installation is used for
+ the classpath settings when creating a new Process Project. Changing the preferences has
+ no influence on already created projects. Getting rid of a <property moreinfo="none">jBPM</property>
+ installation that's being referenced by a project however will cause the
+ classpath to contain errors. </para>
+
+
+ <figure float="0">
+ <title>The jBPM Preferences Page</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Configuring Task Nodes</title>
+
+ <para>Here, we'll examine how you can configure the Task nodes in jBPM jPDL GPD.</para>
+
+ <para> You can add Tasks to Task nodes and then configure them in a similar manner as the
+ Action configuration mechanism. Let's consider the process definition similar
+ to the previous one that contains three nodes: Start state, Task node and End state. The
+ <property moreinfo="none">Properties view</property> for selected Task node includes several tabs. </para>
+
+ <figure float="0">
+ <title>The Properties View of the selected Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_2.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>We should choose the Task tab and then bring up the context menu or click the button
+ in the top right corner of the view to add a Task to our Task node.</para>
+
+ <figure float="0">
+ <title>Adding a Task to the Task Node</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_3.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Every added Task has its own configuration possibilities. You can access them through
+ the <property moreinfo="none">Properties view</property> as well.</para>
+
+ <figure float="0">
+ <title>The Task properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_4.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <property moreinfo="none">General page</property> is a place where you can specify the name of a
+ Task and its description. For instance, let it be <emphasis>
+ <property moreinfo="none">approve oder</property>
+ </emphasis> with appropriate description that you can see in the figure below.</para>
+
+ <figure float="0">
+ <title>The Task General Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now, look at <property moreinfo="none">Details page</property>. First, you should specify the due date
+ that is a mandatory property for the Task. The due date is the date on which the task
+ should be accomplished. Here you can also set a Task priority as well as signalling,
+ notifying or blocking. The <emphasis>
+ <property moreinfo="none">Blocking</property>
+ </emphasis> attribute indicates that the process will not be able to continue if this
+ task is still unaccomplished. The <emphasis>
+ <property moreinfo="none">Generate Form...</property>
+ </emphasis> button is for creating a simple task form that can be rendered by the jBPM
+ console.</para>
+
+ <figure float="0">
+ <title>The Task Details Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For our example, we specify the due date as 2 business days, choose the high priority
+ and also check the <emphasis>
+ <property moreinfo="none">Signalling</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Notify</property>
+ </emphasis> attributes. It means that the Task should be accomplished in 2 business days
+ and the assignee will be notified by email when the task is assigned. To specify how the
+ Task should be assigned switch on to the <property moreinfo="none">Assignment page</property>.</para>
+
+ <figure float="0">
+ <title>The Task Assignment Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_7.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>On the <property moreinfo="none">Reminder page</property> you can specify whether the assignee will be reminded of the task
+ that awaits him.</para>
+
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_8.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In our case, the assignee will be reminded by email after two business hours and
+ continue to get reminding every business hour after that.</para>
+ <para>In the next figure you can see our configuring generated into XML.</para>
+ <figure float="0">
+ <title>The Task Reminder Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Quick_Howto_Guide/quick_howto_guide_9.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <para>We hope, our guide will help you to get started with the jPDL process language and jBPM
+ workflow on the whole. Besides, for additional information you are welcome on <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=217">our forum</ulink>.</para>
+ </section>
+</chapter>
+
+
+ <!-- TODO: drools used in this section is not available for eclipse .3.3 &AddBusinessProcess; -->
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/pom.xml 2008-10-30 11:12:00 UTC (rev 11329)
+++ branches/jbosstools-3.0.0.Beta1/jbpm/docs/reference/pom.xml 2008-10-30 11:35:01 UTC (rev 11330)
@@ -31,7 +31,7 @@
</dependency>
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
Added: branches/jbosstools-3.0.0.Beta1/ws/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/ws/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/ws/docs/reference/en/master_output.xml 2008-10-30 11:35:01 UTC (rev 11330)
@@ -0,0 +1,556 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3CR3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY overview SYSTEM "modules/overview.xml">
+<!ENTITY topdown SYSTEM "modules/topdown.xml">
+<!ENTITY preference SYSTEM "modules/preference.xml">
+<!ENTITY webproject SYSTEM "modules/webproject.xml">
+<!ENTITY client SYSTEM "modules/client.xml">
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JBoss WS User Guide</title>
+ <author><firstname>Denny</firstname><surname>Xu</surname><email>dxu(a)redhat.com</email></author>
+ <author><firstname>Grid</firstname><surname>Qian</surname><email>fqian(a)redhat.com</email></author>
+ <pubdate>July 2008</pubdate>
+ <copyright>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo>
+ Version: <diffmk:wrapper diffmk:change="changed">3.0.0.beta1
+ </diffmk:wrapper></releaseinfo>
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/ws_ref_guide/pdf/WS_..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="overview" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/overview.xml">
+ <title>JBossWS Runtime Overview</title>
+
+ <para>JBossWS is a web service framework developed as <diffmk:wrapper diffmk:change="added">a </diffmk:wrapper>part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE <diffmk:wrapper diffmk:change="changed">5).</diffmk:wrapper></para>
+
+</chapter>
+
+<chapter id="create_ws_topdown" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/topdown.xml">
+ <?dbhtml filename="topdown.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Web Service</keyword>
+ <keyword>JBossWS Web Service runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Web Service using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service using
+ JBossWS runtime.</para>
+
+ <section id="createproject">
+ <title>Creating a Dynamic Web project</title>
+
+ <para>Before <diffmk:wrapper diffmk:change="changed">creating </diffmk:wrapper>a web service, you <diffmk:wrapper diffmk:change="changed">should </diffmk:wrapper>have a Dynamic Web Project <diffmk:wrapper diffmk:change="added">created:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Create <diffmk:wrapper diffmk:change="added">a</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">the service </diffmk:wrapper>Web project by selecting <emphasis>
+ <property moreinfo="none">New > Project... > Dynamic Web project</property>
+ </emphasis>. Enter the following information: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Project Name: enter a project name</para>
+ </listitem>
+ <listitem>
+ <para>Target runtime: any server depending on <diffmk:wrapper diffmk:change="changed">your installation. </diffmk:wrapper>If it is not listed, <diffmk:wrapper diffmk:change="deleted">click
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">click </diffmk:wrapper>New and browse to the location where it is <diffmk:wrapper diffmk:change="changed">installed </diffmk:wrapper><diffmk:wrapper diffmk:change="added">to. </diffmk:wrapper>You may set <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> to <emphasis>
+ <property moreinfo="none">None</property>
+ </emphasis>, in this case, you <diffmk:wrapper diffmk:change="changed">should </diffmk:wrapper>add <link diffmk:change="added" linkend="addfacet">JBoss Web Service
+ facet to the project</link> .</para>
+ <figure float="0">
+ <title>Dynamic Web Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">Configure </diffmk:wrapper>Web Module <diffmk:wrapper diffmk:change="changed">values:</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="deleted">Configures </diffmk:wrapper>Web Module Settings <diffmk:wrapper diffmk:change="added">Configuration</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>Click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><property moreinfo="none">Finish</property> button.</para>
+ </section>
+
+ <section id="addfacet">
+ <title>Configure JBoss Web Service facet settings</title>
+ <para>If you have already <diffmk:wrapper diffmk:change="changed">created </diffmk:wrapper>a <diffmk:wrapper diffmk:change="changed">new </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Dynamic Web</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">web </diffmk:wrapper>project, the next step is to add JBoss Web
+ Service facet to the <diffmk:wrapper diffmk:change="added">project:</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">project </diffmk:wrapper></para>
+ <figure float="0" id="figure_addfacet">
+ <title>Configure JBoss Web Service Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_facet.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the
+ project's target runtime, you may choose <emphasis>
+ <property moreinfo="none">Server Supplied JBossWS Runtime</property>
+ </emphasis> and then click <emphasis>
+ <property moreinfo="none">Ok</property>
+ </emphasis> to finish the configuration of JBoss Web Service facet.
+ </para>
+ <para>If the project has no <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> settings, you <diffmk:wrapper diffmk:change="changed">should </diffmk:wrapper>check the second radio button and specify a JBossWS <diffmk:wrapper diffmk:change="deleted">runtime
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">runtime </diffmk:wrapper>from the list. You also can create a new JBossWS runtime, click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">New...</property>
+ </emphasis> button will bring you to another dialog <diffmk:wrapper diffmk:change="changed">to configure </diffmk:wrapper>new JBossWS runtime.</para>
+ <figure float="0" id="figure_addfacet1">
+ <title>Configure JBossWS Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_newruntime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>See how to configure a new JBossWS runtime <link diffmk:change="added" linkend="preference"><diffmk:wrapper diffmk:change="added">here</diffmk:wrapper></link><diffmk:wrapper diffmk:change="changed">:</diffmk:wrapper></para>
+
+ </section>
+
+
+ <section id="topdownwebservice">
+ <title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service from a
+ WSDL document using JBossWS runtime.</para>
+ <para>At first, please make sure that you have already <diffmk:wrapper diffmk:change="changed">created </diffmk:wrapper>a dynamic Web project with <diffmk:wrapper diffmk:change="deleted">JBoss
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">JBoss </diffmk:wrapper>Web Service facet <diffmk:wrapper diffmk:change="deleted">get </diffmk:wrapper>installed. </para>
+ <para><diffmk:wrapper diffmk:change="added">See how to</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">To </diffmk:wrapper>make it <diffmk:wrapper diffmk:change="deleted">see </diffmk:wrapper><link linkend="createproject"><diffmk:wrapper diffmk:change="added">here</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">create dynamic Web project</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">> </diffmk:wrapper>and <link linkend="addfacet"><diffmk:wrapper diffmk:change="added">here</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">add JBoss Web Service facet</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <para>To create <diffmk:wrapper diffmk:change="added">a </diffmk:wrapper>Web Service using JBossWS runtime select<emphasis>
+ <property moreinfo="none">File > New > Other > Web Services > Web Service</property>
+ </emphasis> to run Web Service creation wizard.
+ </para>
+ <para>Let's get through the wizard <diffmk:wrapper diffmk:change="changed">step-by-step:</diffmk:wrapper></para>
+ <figure float="0" id="figure_create_ws_topdown">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First, please select <property moreinfo="none">Top down Java bean Web Service</property> from <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper>Web
+ Service type list, and select a WSDL document from workspace, click <diffmk:wrapper diffmk:change="changed">on the
+ </diffmk:wrapper>Server <diffmk:wrapper diffmk:change="added">name
+ lilnk </diffmk:wrapper>on the page will bring you to another dialog. Here you can specify the server to a
+ JBoss Server and Web Service runtime to JBossWS <diffmk:wrapper diffmk:change="changed">runtime:</diffmk:wrapper></para>
+ <figure float="0" id="figure_create_ws_topdown_setserver">
+ <title>Select Server and Web Service runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">button</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Button you </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">to see </diffmk:wrapper>the <diffmk:wrapper diffmk:change="changed">next </diffmk:wrapper>wizard <diffmk:wrapper diffmk:change="added">view opened:</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">view.</diffmk:wrapper></para>
+
+ <figure float="0" id="figure_create_ws_topdown1">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button to <diffmk:wrapper diffmk:change="added">proceed:</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">next step</diffmk:wrapper></para>
+ <figure float="0" id="figure_create_ws_topdown_codegen">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page, the default package name comes from the namespace of the WSDL document,
+ you also can change it to any valid package name you want. JAX-WS specification should be
+ set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
+ specify a catalog file and binding files if you <diffmk:wrapper diffmk:change="added">have them.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">have. </diffmk:wrapper>If you want the wizard <diffmk:wrapper diffmk:change="added">to
+ </diffmk:wrapper>generate empty implementation classes for the Web Service, check the <emphasis>
+ <property moreinfo="none">Generate default Web Service implementation classes</property>
+ </emphasis> check <diffmk:wrapper diffmk:change="added">box.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">box . </diffmk:wrapper>If you want <diffmk:wrapper diffmk:change="added">to </diffmk:wrapper>update the default Web.xml file with the Web Service
+ servlets <diffmk:wrapper diffmk:change="deleted">get </diffmk:wrapper>configured, check <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Update the default Web.xml</property>
+ </emphasis> check box. Click on <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> or <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> button to generate <diffmk:wrapper diffmk:change="added">code.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">code </diffmk:wrapper></para>
+
+ <para>Once the Web Service code is generated, you can view the implementation class and add
+ business logic to each method.</para>
+ <figure float="0" id="figure_impl_code">
+ <title>The generated implementation Java code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_Impl_code_view.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>View <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper>Web.xml <diffmk:wrapper diffmk:change="added">file:</diffmk:wrapper></para>
+ <figure float="0" id="figure_webxml">
+ <title>Web.xml</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_webxml.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="bottomupws">
+ <title>Creating a Web service from a Java bean using JBossWS runtime</title>
+ <para>The Web Service wizard assists you in creating a new Web service, configuring it for
+ deployment, and <diffmk:wrapper diffmk:change="added">then</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">deploying the </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">deploying it </diffmk:wrapper>to <diffmk:wrapper diffmk:change="changed">the </diffmk:wrapper>server.</para>
+ <para>To create a Web service from a bean using JBoss WS:</para>
+ <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
+ <para><diffmk:wrapper diffmk:change="added">Create</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Creating </diffmk:wrapper><link diffmk:change="added" linkend="createproject">a Dynamic Web project</link>.</para>
+ <para>Add <link diffmk:change="added" linkend="addfacet">JBossWS Facet</link> to Web <diffmk:wrapper diffmk:change="added">project.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">project.</diffmk:wrapper></para>
+ <para>Create a Web Service from a java bean: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Java EE perspective <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Java EE</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>In the Project Explorer view, select the bean that you created or imported into
+ the source folder of your Web project.</para>
+ <figure float="0">
+ <title>Create a new Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property moreinfo="none">File > New > Other</property>
+ </emphasis><diffmk:wrapper diffmk:change="added">. Select</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">.Select </diffmk:wrapper>Web Services in order to display <diffmk:wrapper diffmk:change="deleted">the </diffmk:wrapper>various Web service wizards.
+ Select the Web Service wizard. Click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><property moreinfo="none">Next</property> button.</para>
+ <figure float="0">
+ <title>New Web Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">On </diffmk:wrapper>the first Web Service wizard page: select <property moreinfo="none">Bottom up Java bean Web
+ service</property> as your Web service type, and select the Java bean from which
+ the service will be <diffmk:wrapper diffmk:change="changed">created:</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Set Web Service Common values</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select the stages of Web service development that you want to complete using
+ the slider: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Develop: this will develop the WSDL definition and implementation of
+ the Web service. This includes such tasks as creating <diffmk:wrapper diffmk:change="deleted">the </diffmk:wrapper>modules <diffmk:wrapper diffmk:change="added">that</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">which
+ will </diffmk:wrapper><diffmk:wrapper diffmk:change="added">will
+ </diffmk:wrapper>contain <diffmk:wrapper diffmk:change="deleted">the </diffmk:wrapper>generated code, WSDL files, deployment descriptors, and
+ <diffmk:wrapper diffmk:change="deleted">Java </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Java
+ </diffmk:wrapper>files when appropriate.</para>
+ </listitem>
+ <listitem>
+ <para>Assemble: this ensures the project that will host the Web service or
+ client gets associated to an EAR when required by the target application
+ server.</para>
+ </listitem>
+ <listitem>
+ <para>Deploy: this will create the deployment code for the service.</para>
+ </listitem>
+ <listitem>
+ <para>Install: this will install and configure the Web module and EARs on
+ the target server.</para>
+ </listitem>
+ <listitem>
+ <para>Start: this will start the server once the service has been installed
+ on it. The server-config.wsdd file will be generated.</para>
+ </listitem>
+ <listitem>
+ <para>Test: this will provide various options for testing the service, such
+ as using the Web Service Explorer or sample <diffmk:wrapper diffmk:change="changed">JSPs.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Select your server: the default server is displayed. If you want to deploy
+ your service to a different server click the link to specify a different server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select your runtime: ensure the JBoss WS runtime is selected.</para>
+ </listitem>
+ <listitem>
+ <para>Select the service project: the project selected in your workspace is
+ displayed. To select a different project click on the project link. If you are
+ deploying to JBoss Application Server you will also be asked to select the EAR
+ associated with the project. Ensure that the project selected as the Client Web
+ Project is different from the Service Web Project, or the service will be
+ overwritten by the client's generated artifacts.</para>
+ </listitem>
+ <listitem>
+ <para>If you want to create a client, select the type of proxy to be generated
+ and repeat the above steps for the client. The better way is to create a web
+ service client project <diffmk:wrapper diffmk:change="changed">separately.</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+ <para>Click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">On </diffmk:wrapper>the JBoss Web Service Code Generation Configuration page, <diffmk:wrapper diffmk:change="deleted">you </diffmk:wrapper>set <diffmk:wrapper diffmk:change="added">the following
+ </diffmk:wrapper>values:</para>
+ <figure float="0">
+ <title>Set Web Service values <diffmk:wrapper diffmk:change="changed">for </diffmk:wrapper>Code Generation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Generate WSDL file: select it, you will get a generated WSDL file in your
+ project. But this wsdl's services' address location values are not <diffmk:wrapper diffmk:change="added">a </diffmk:wrapper>real
+ address. </para>
+ </listitem>
+ <listitem>
+ <para>After the Web service has been created, the following <diffmk:wrapper diffmk:change="changed">option can become
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">available depending </diffmk:wrapper>on the options you selected: Update the default <diffmk:wrapper diffmk:change="added">web.xm
+ file.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">web.xml. </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">If selected, </diffmk:wrapper>you may test the web service by Explorer.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><property moreinfo="none">Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para><diffmk:wrapper diffmk:change="changed">On </diffmk:wrapper>this page, the project is deployed to the server. <diffmk:wrapper diffmk:change="changed">You </diffmk:wrapper>can start <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper>server and <diffmk:wrapper diffmk:change="deleted">test
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">test </diffmk:wrapper>the web service. If you want to publish the web service to a UDDI registry, you <diffmk:wrapper diffmk:change="deleted">may
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">may </diffmk:wrapper>click <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper><property moreinfo="none">Next</property> button to publish it. If not, you may click
+ <diffmk:wrapper diffmk:change="added">the
+ </diffmk:wrapper><property moreinfo="none">Finish</property> button.</para>
+ <figure float="0">
+ <title>Start a Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>After the Web Service has been created, the following <diffmk:wrapper diffmk:change="added">options </diffmk:wrapper>may <diffmk:wrapper diffmk:change="changed">become </diffmk:wrapper><diffmk:wrapper diffmk:change="added">available
+ </diffmk:wrapper>depending on the options
+ <diffmk:wrapper diffmk:change="deleted">you </diffmk:wrapper>selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para> the generated web services <diffmk:wrapper diffmk:change="changed">code</diffmk:wrapper></para>
+ </listitem>
+ <listitem>
+ <para>If <diffmk:wrapper diffmk:change="changed">you </diffmk:wrapper>selected to generate <diffmk:wrapper diffmk:change="added">a </diffmk:wrapper>WSDL file, you will get the file in your project's
+ WebContent > wsdl folder.</para>
+ <figure float="0">
+ <title>The generated WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_6.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>If <diffmk:wrapper diffmk:change="changed">you </diffmk:wrapper>selected to update the default web.xml, you will test the web service in
+ <diffmk:wrapper diffmk:change="added">the browser.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">browser.Open </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Open </diffmk:wrapper>the Explorer, input the url for the web service according to <diffmk:wrapper diffmk:change="deleted">web.xml
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">web.xml </diffmk:wrapper>plus <property moreinfo="none">?wsdl.</property>, you will get the WSDL file from Explorer. </para>
+ <figure float="0">
+ <title>The Updated web.xml <diffmk:wrapper diffmk:change="added">file</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_5.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+</chapter>
+
+
+<chapter id="client" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/client.xml">
+ <title>Creating a Web Service Client from a WSDL Document using JBoss WS</title>
+ <para>To create a Web Service Client from a WSDL Document using JBoss WS:</para>
+ <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
+ <para><link linkend="createproject">Creating a Dynamic Web project</link>.</para>
+ <para><link linkend="addfacet">Add JBossWS Facet to Web project</link>.</para>
+ <para>Create a Web Service Client from a WSDL document: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Java EE perspective <emphasis><property moreinfo="none">Window > Open Perspective > Java EE</property></emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>In the Project Explorer view, select the bean that you created or imported into the source folder of your Web project.</para>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis><property moreinfo="none">File > New > Other</property></emphasis>.Select Web Services in order to display the various Web service wizards. Select the Web Service Client wizard. Click <property moreinfo="none">Next</property> button.</para>
+ <figure float="0">
+ <title>New Web Service Client</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_client.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>The first and second Web Service Client wizard page are same to <link linkend="topdownwebservice">Web Service from a WSDL document</link>.</para>
+ <figure float="0">
+ <title>Set Web Service Common values</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_client_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure float="0">
+ <title>Set Web Service values about WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_client_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The differences are:</para>
+ <itemizedlist>
+ <listitem>
+ <para><property moreinfo="none">Client Type:</property> Now only support Java Proxy.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click <property moreinfo="none">Finish</property> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>After the Web Service Client has been created, the following may occur depending on the options you selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para> the generated web service and client codes</para>
+ </listitem>
+ <listitem>
+ <para>a client sample class.</para>
+ <figure float="0">
+ <title>Client Sample Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_client_3.png" scale="80"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>JBoss WS use a Java class to test Web Service. A client sample class will be generated, you may run this client as a java application to call a web service.</para>
+</chapter>
+
+
+<chapter id="preference" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/ws/docs/reference/en/modules/preference.xml">
+<title>JBoss WS and development environment</title>
+ <section id="jbosswspreference">
+ <title>JBossWS Preferences</title>
+
+<para>In this section you <diffmk:wrapper diffmk:change="added">will</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">get to </diffmk:wrapper>know how JBossWS preferences can be modified during the development process.</para>
+
+ <para>JBossWS preferences can be set <diffmk:wrapper diffmk:change="changed">on </diffmk:wrapper>the JBossWS preference page. Click on <emphasis><property moreinfo="none">Window > Preferences > JBoss Tools > Web > JBossWS <diffmk:wrapper diffmk:change="changed">Preferences</diffmk:wrapper></property>.</emphasis></para>
+
+ <para>On this page you can manage the JBossWS Runtime. Use the appropriate buttons to <property moreinfo="none">Add</property> more runtimes or to <property moreinfo="none">Remove</property> those that are not needed.</para>
+
+ <figure float="0">
+ <title>JBossWS Preferences Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Jbossws_preference.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Clicking on <emphasis><property moreinfo="none">Add</property></emphasis> or <emphasis><property moreinfo="none">Edit</property></emphasis> button <diffmk:wrapper diffmk:change="deleted">you </diffmk:wrapper>will <diffmk:wrapper diffmk:change="changed">open </diffmk:wrapper>the form where you can configure a new JbossWS runtime and change the path <diffmk:wrapper diffmk:change="changed">to </diffmk:wrapper>JBossWS runtime home folder,
+ modify <diffmk:wrapper diffmk:change="added">the </diffmk:wrapper>name and version of <diffmk:wrapper diffmk:change="changed">the </diffmk:wrapper>existing JBossWS runtime settings. Press <property moreinfo="none">Finish</property> to apply the changes.</para>
+
+ <figure float="0">
+ <title>Edit JBossWS Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Jbossws_preference_new.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="serverruntime">
+ <title>Default Server and Runtime</title>
+ <para>Open
+ <emphasis><property moreinfo="none">Window > Preferences > Web Services > Server and Runtime</property></emphasis>. <diffmk:wrapper diffmk:change="changed">On </diffmk:wrapper>this page, you can <diffmk:wrapper diffmk:change="added">specify a</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">set </diffmk:wrapper>default server and runtime.</para>
+ <para>For ease of use, the better way is to set runtime <diffmk:wrapper diffmk:change="changed">to </diffmk:wrapper>JBoss WS.</para>
+ <para>After <diffmk:wrapper diffmk:change="deleted">set </diffmk:wrapper>server and <diffmk:wrapper diffmk:change="added">runtime are</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">runtime, </diffmk:wrapper><diffmk:wrapper diffmk:change="added">specified, </diffmk:wrapper>click <diffmk:wrapper diffmk:change="added">on the </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="changed">Aply</diffmk:wrapper></property> button to save the <diffmk:wrapper diffmk:change="changed">values.</diffmk:wrapper></para>
+ <figure float="0">
+ <title></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_server_runtime.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+</chapter>
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/ws/docs/reference/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/ws/docs/reference/pom.xml 2008-10-30 11:12:00 UTC (rev 11329)
+++ branches/jbosstools-3.0.0.Beta1/ws/docs/reference/pom.xml 2008-10-30 11:35:01 UTC (rev 11330)
@@ -34,7 +34,7 @@
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11329 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-30 07:12:00 -0400 (Thu, 30 Oct 2008)
New Revision: 11329
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
Log:
JBIDE-3061, fixed in trunk
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30 09:45:49 UTC (rev 11328)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-10-30 11:12:00 UTC (rev 11329)
@@ -90,7 +90,6 @@
static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
private XulRunnerEditor xulRunnerEditor;
- private nsIDOMDocument domDocument;
private nsIDOMEventTarget documentEventTarget;
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
@@ -454,19 +453,9 @@
}
public nsIDOMDocument getDomDocument() {
- if (domDocument == null) {
- domDocument = xulRunnerEditor.getDOMDocument();
- }
- return domDocument;
+ return xulRunnerEditor.getDOMDocument();
}
- /**
- * @param domDocument the domDocument to set
- */
- protected void setDomDocument(nsIDOMDocument domDocument) {
-
- this.domDocument = domDocument;
- }
public nsIDOMElement getContentArea() {
return contentArea;
@@ -582,7 +571,7 @@
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGGESTUREEVENT, getContentAreaEventListener(), false);
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DRAGOVEREVENT, getContentAreaEventListener(), false);
getContentAreaEventTarget().addEventListener(MozillaDomEventListener.DBLCLICK, getContentAreaEventListener(), false);
- documentEventTarget = (nsIDOMEventTarget) getDomDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
+ documentEventTarget = (nsIDOMEventTarget) xulRunnerEditor.getDOMDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
documentEventTarget.addEventListener(MozillaDomEventListener.KEYPRESS, getContentAreaEventListener(), false);
} else {
//baseEventListener = new MozillaBaseEventListener();
@@ -604,7 +593,7 @@
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DRAGOVEREVENT, getContentAreaEventListener(), false);
getContentAreaEventTarget().removeEventListener(MozillaDomEventListener.DBLCLICK, getContentAreaEventListener(), false);
- if (domDocument != null && documentEventTarget != null) {
+ if (xulRunnerEditor.getDOMDocument() != null && documentEventTarget != null) {
documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS, getContentAreaEventListener(), false);
}
getContentAreaEventListener().setVisualEditor(null);
@@ -729,7 +718,6 @@
addSelectionListener();
xulRunnerEditor.addResizerListener();
controller.reinit();
- setDomDocument(xulRunnerEditor.getDOMDocument());
}
17 years, 2 months
JBoss Tools SVN: r11328 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:45:49 -0400 (Thu, 30 Oct 2008)
New Revision: 11328
Modified:
trunk/hibernatetools/docs/reference/en/modules/codegen.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/hibernatetools/docs/reference/en/modules/codegen.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2008-10-30 09:45:29 UTC (rev 11327)
+++ trunk/hibernatetools/docs/reference/en/modules/codegen.xml 2008-10-30 09:45:49 UTC (rev 11328)
@@ -606,13 +606,13 @@
}
this.name = name;
}
-}]]></programlisting>
-
- <para/>
+ }]]></programlisting>
+ <para>To find additional information about <property>Hibernate Tools</property> we suggest that you
+ visit our <ulink url="http://www.hibernate.org/255.html">website</ulink>. If you have questions, you are always welcome in our
+ <ulink url="http://forum.hibernate.org/viewforum.php?f=6">forum</ulink>.</para>
</section>
</section>
+
</section>
- <para>To find additional information about <property>Hibernate Tools</property> we suggest that you
- visit our <ulink url="http://www.hibernate.org/255.html">website</ulink>. If you have questions, you are always welcome in our
- <ulink url="http://forum.hibernate.org/viewforum.php?f=6">forum</ulink>.</para>
+
</chapter>
17 years, 2 months
JBoss Tools SVN: r11327 - trunk/jbpm/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:45:29 -0400 (Thu, 30 Oct 2008)
New Revision: 11327
Modified:
trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml
trunk/jbpm/docs/reference/en/modules/the_views.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2008-10-30 09:45:10 UTC (rev 11326)
+++ trunk/jbpm/docs/reference/en/modules/Quick_Howto_Guide.xml 2008-10-30 09:45:29 UTC (rev 11327)
@@ -42,7 +42,7 @@
</figure>
</section>
- <section revisionflag="added">
+ <section>
<title>Configuring Task Nodes</title>
<para>Here, we'll examine how you can configure the Task nodes in jBPM jPDL GPD.</para>
@@ -168,10 +168,8 @@
</imageobject>
</mediaobject>
</figure>
-
+ <para>We hope, our guide will help you to get started with the jPDL process language and jBPM
+ workflow on the whole. Besides, for additional information you are welcome on <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=217">our forum</ulink>.</para>
</section>
-
- <para>We hope, our guide will help you to get started with the jPDL process language and jBPM
- workflow on the whole. Besides, for additional information you are welcome on <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=217">our forum</ulink>.</para>
</chapter>
Modified: trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml 2008-10-30 09:45:10 UTC (rev 11326)
+++ trunk/jbpm/docs/reference/en/modules/guided_tour_jboss_jbpmgpd.xml 2008-10-30 09:45:29 UTC (rev 11327)
@@ -1,220 +1,221 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="GuidedTourJBossjBPMGPD" xreflabel="GuidedTourJBossjBPMGPD">
- <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- <keyword>JBoss</keyword>
- <keyword>Process</keyword>
- <keyword>Definition</keyword>
- </keywordset>
- </chapterinfo>
- <title>A Guided Tour of JBoss jBPM GPD</title>
- <para>In this chapter we suggest a step-by-step walk-through of creating and configuring your
- own simple process. Let's try to organize a new jBPM project.</para>
- <para>A wizard for creating a jBPM project is included in the GPD plugin. We have opted to
- create a project based on a template already containing a number of advanced artifacts that
- we will ignore for this section. In the future we will elaborate this wizard and offer the
- possibility to create an empty jBPM project as well as projects based on templates taken
- from the jBPM tutorial.</para>
- <section id="CreatingjBPMProject">
- <?dbhtml filename="CreatingjBPMProject.html"?>
- <title>Creating a jBPM Project</title>
- <para>This section will show you how to use the Creation wizard for creating a new jBPM
- project with already included source folders.</para>
- <para>At first you should select <emphasis>
- <property>File >New Project...</property>
- </emphasis> and then <emphasis>
- <property>JBoss jBPM > Process Project</property>
- </emphasis> in the New Project dialog:</para>
- <figure>
- <title>New Project Dialog</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para> Clicking <emphasis>
- <property>Next</property>
- </emphasis> brings us to the wizard page where it's necessary to specify the
- name and location for the project. We choose, for example, <emphasis>
- <property>HellojBPM</property>
- </emphasis> as the name and accept the default location. </para>
- <figure>
- <title>Process Name and Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus, our project will be
- created in the workspace root directory by default. If you want to change the directory
- for your future project, deselect <emphasis>
- <property>Use default location</property>
- </emphasis> and click <emphasis>
- <property>Browse...</property></emphasis> button to set needed location or simply type it.</para>
- <para>On the next screen you'll be prompted to select the core jBPM location that we have defined in the previous chapter.</para>
- <figure>
- <title>Core jBPM Location Specifying</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Clicking on <emphasis>
- <property>Finish</property>
- </emphasis> results in the project being generated. The wizard creates four source
- folders: one for the processes (<emphasis>
- <property>src/main/jpdl</property>
- </emphasis>), one for the java sources (<emphasis>
- <property>src/main/java</property>
- </emphasis>), one for the unit tests (<emphasis>
- <property>src/test/java</property>
- </emphasis>) and one for the resources such as the jbpm.properties and the
- hibernate.properties files (<emphasis>
- <property>src/main/config</property>
- </emphasis>). In addition a classpath container with all the core jBPM libraries is
- added to the project</para>
- <figure>
- <title>Layout of the Process Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Looking inside the different source folders will reveal a number of other artifacts
- that were generated, but we will leave these untouched for the moment. Instead, we will
- look at another wizard that enables us to create an empty process definition.</para>
- </section>
- <section id="creating_an_empty_process_definition">
- <?dbhtml filename="creating_an_empty_process_definition.html"?>
- <title>Creating an Empty Process Definition</title>
- <para>Now when the project is set up, we can use a Creation wizard to create an empty
- process definition. Bring up the <emphasis>
- <property>New</property>
- </emphasis> wizard by clicking the <emphasis>
- <property>File > New > Other...</property>
- </emphasis> menu item. The wizard opens on the <emphasis>
- <property>Select Wizard</property>
- </emphasis> page.</para>
- <figure>
- <title>The Select Wizard Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Selecting the <emphasis>
- <property>JBoss jBPM</property>
- </emphasis> category, then the <emphasis>
- <property>Process Definition</property>
- </emphasis> item and clicking on the <emphasis>
- <property>Next</property>
- </emphasis> button brings us to the <emphasis>
- <property>Create Process Definition</property>
- </emphasis> page.</para>
- <figure>
- <title>The Create New Process Definion Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>We choose <emphasis>
- <property>hello</property>
- </emphasis> as the name of the process archive file. Click on the <emphasis>
- <property>Finish</property>
- </emphasis> button to end the wizard and open the process definition editor.</para>
- <figure>
- <title>The Process Definition Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png"
- scale="60"/>
- </imageobject>
- </mediaobject>
- </figure>
-
-
- <para>You can see in the Package Explorer that creating a process definition involves
- creating a folder with the name of the process definition and populating this folder
- with two .xml files : <emphasis>
- <property>gpd.xml</property>
- </emphasis> and <emphasis>
- <property>processdefinition.xml</property>.
- </emphasis></para>
- <para>The <emphasis>
- <property>gpd.xml</property>
- </emphasis> contains the graphical information used by the process
- definition editor. The <emphasis>
- <property>processdefinition.xml</property>
- </emphasis> file contains the actual process definition info without the graphical
- rendering info. At present, the GPD assumes that these two files are siblings. More
- sophisticated configuration will be supported later.</para>
-
- <section id="minimal_process_definition">
- <?dbhtml filename="minimal_process_definition.html"?>
- <title>A Minimal Process Definition</title>
- <para>Now we are ready to create a very simple process definition consisting of a begin
- state, an intermediate state and an end state.</para>
- <para>To make the configuration of actions much easier it's better to use the
- jPDL perspective. It provides the tabbed Properties Editor which allows to configure
- all the relevant properties of the current selected item. </para>
-
- <section id="adding_the_nodes">
- <?dbhtml filename="adding_the_nodes.html"?>
- <title>Adding the Nodes</title>
- <para>At first select respectively <emphasis>
- <property>Start</property>,
- </emphasis> <emphasis>
- <property>State</property>
- </emphasis> and <emphasis>
- <property>End</property>
- </emphasis> on the tools palette and click on the canvas to add these nodes to
- the process definition. The result should look similar to this:</para>
- <figure>
- <title>A Simple Process With Three Nodes</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png"
- scale="60"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="adding_transitions">
- <?dbhtml filename="adding_transitions.html"?>
- <title>Adding Transitions</title>
- <para>Then, we will connect the nodes with transitions. To do that select the <emphasis>
- <property>Transition</property>
- </emphasis> tool in the tools palette and click on the <emphasis>
- <property>Start</property>
- </emphasis> node, then move to the <emphasis>
- <property>State</property>
- </emphasis> node and click again to see the transition being drawn. Perform the
- same steps to create a transition from the <emphasis>
- <property>State</property>
- </emphasis> node to the <emphasis>
- <property>End</property>
- </emphasis> node. The result will look like:</para>
- <figure>
- <title>A Simple Process With Transitions</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png"
- scale="60"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <para>Now, when you've got background knowledge of simple project creation, let's move to more advanced tools.</para>
- </section>
-
-</chapter>
+<chapter id="GuidedTourJBossjBPMGPD" xreflabel="GuidedTourJBossjBPMGPD">
+ <?dbhtml filename="GuidedTourJBossjBPMGPD.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ <keyword>JBoss</keyword>
+ <keyword>Process</keyword>
+ <keyword>Definition</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>A Guided Tour of JBoss jBPM GPD</title>
+ <para>In this chapter we suggest a step-by-step walk-through of creating and configuring your
+ own simple process. Let's try to organize a new jBPM project.</para>
+ <para>A wizard for creating a jBPM project is included in the GPD plugin. We have opted to
+ create a project based on a template already containing a number of advanced artifacts that
+ we will ignore for this section. In the future we will elaborate this wizard and offer the
+ possibility to create an empty jBPM project as well as projects based on templates taken
+ from the jBPM tutorial.</para>
+ <section id="CreatingjBPMProject">
+ <?dbhtml filename="CreatingjBPMProject.html"?>
+ <title>Creating a jBPM Project</title>
+ <para>This section will show you how to use the Creation wizard for creating a new jBPM
+ project with already included source folders.</para>
+ <para>At first you should select <emphasis>
+ <property>File >New Project...</property>
+ </emphasis> and then <emphasis>
+ <property>JBoss jBPM > Process Project</property>
+ </emphasis> in the New Project dialog:</para>
+ <figure>
+ <title>New Project Dialog</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Clicking <emphasis>
+ <property>Next</property>
+ </emphasis> brings us to the wizard page where it's necessary to specify the
+ name and location for the project. We choose, for example, <emphasis>
+ <property>HellojBPM</property>
+ </emphasis> as the name and accept the default location. </para>
+ <figure>
+ <title>Process Name and Location</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, our project will be created in the workspace root directory by default. If you
+ want to change the directory for your future project, deselect <emphasis>
+ <property>Use default location</property>
+ </emphasis> and click <emphasis>
+ <property>Browse...</property>
+ </emphasis> button to set needed location or simply type it.</para>
+ <para>On the next screen you'll be prompted to select the core jBPM location that
+ we have defined in the previous chapter.</para>
+ <figure>
+ <title>Core jBPM Location Specifying</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Clicking on <emphasis>
+ <property>Finish</property>
+ </emphasis> results in the project being generated. The wizard creates four source
+ folders: one for the processes (<emphasis>
+ <property>src/main/jpdl</property>
+ </emphasis>), one for the java sources (<emphasis>
+ <property>src/main/java</property>
+ </emphasis>), one for the unit tests (<emphasis>
+ <property>src/test/java</property>
+ </emphasis>) and one for the resources such as the jbpm.properties and the
+ hibernate.properties files (<emphasis>
+ <property>src/main/config</property>
+ </emphasis>). In addition a classpath container with all the core jBPM libraries is
+ added to the project</para>
+ <figure>
+ <title>Layout of the Process Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Looking inside the different source folders will reveal a number of other artifacts
+ that were generated, but we will leave these untouched for the moment. Instead, we will
+ look at another wizard that enables us to create an empty process definition.</para>
+ </section>
+ <section id="creating_an_empty_process_definition">
+ <?dbhtml filename="creating_an_empty_process_definition.html"?>
+ <title>Creating an Empty Process Definition</title>
+ <para>Now when the project is set up, we can use a Creation wizard to create an empty
+ process definition. Bring up the <emphasis>
+ <property>New</property>
+ </emphasis> wizard by clicking the <emphasis>
+ <property>File > New > Other...</property>
+ </emphasis> menu item. The wizard opens on the <emphasis>
+ <property>Select Wizard</property>
+ </emphasis> page.</para>
+ <figure>
+ <title>The Select Wizard Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Selecting the <emphasis>
+ <property>JBoss jBPM</property>
+ </emphasis> category, then the <emphasis>
+ <property>Process Definition</property>
+ </emphasis> item and clicking on the <emphasis>
+ <property>Next</property>
+ </emphasis> button brings us to the <emphasis>
+ <property>Create Process Definition</property>
+ </emphasis> page.</para>
+ <figure>
+ <title>The Create New Process Definion Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>We choose <emphasis>
+ <property>hello</property>
+ </emphasis> as the name of the process archive file. Click on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button to end the wizard and open the process definition editor.</para>
+ <figure>
+ <title>The Process Definition Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_6.png"
+ scale="60"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>You can see in the Package Explorer that creating a process definition involves
+ creating a folder with the name of the process definition and populating this folder
+ with two .xml files : <emphasis>
+ <property>gpd.xml</property>
+ </emphasis> and <emphasis>
+ <property>processdefinition.xml</property>. </emphasis></para>
+ <para>The <emphasis>
+ <property>gpd.xml</property>
+ </emphasis> contains the graphical information used by the process definition editor.
+ The <emphasis>
+ <property>processdefinition.xml</property>
+ </emphasis> file contains the actual process definition info without the graphical
+ rendering info. At present, the GPD assumes that these two files are siblings. More
+ sophisticated configuration will be supported later.</para>
+
+ <section id="minimal_process_definition">
+ <?dbhtml filename="minimal_process_definition.html"?>
+ <title>A Minimal Process Definition</title>
+ <para>Now we are ready to create a very simple process definition consisting of a begin
+ state, an intermediate state and an end state.</para>
+ <para>To make the configuration of actions much easier it's better to use the
+ jPDL perspective. It provides the tabbed Properties Editor which allows to configure
+ all the relevant properties of the current selected item. </para>
+
+ <section id="adding_the_nodes">
+ <?dbhtml filename="adding_the_nodes.html"?>
+ <title>Adding the Nodes</title>
+ <para>At first select respectively <emphasis>
+ <property>Start</property>, </emphasis>
+ <emphasis>
+ <property>State</property>
+ </emphasis> and <emphasis>
+ <property>End</property>
+ </emphasis> on the tools palette and click on the canvas to add these nodes to
+ the process definition. The result should look similar to this:</para>
+ <figure>
+ <title>A Simple Process With Three Nodes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_7.png"
+ scale="60"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ <section id="adding_transitions">
+ <?dbhtml filename="adding_transitions.html"?>
+ <title>Adding Transitions</title>
+ <para>Then, we will connect the nodes with transitions. To do that select the <emphasis>
+ <property>Transition</property>
+ </emphasis> tool in the tools palette and click on the <emphasis>
+ <property>Start</property>
+ </emphasis> node, then move to the <emphasis>
+ <property>State</property>
+ </emphasis> node and click again to see the transition being drawn. Perform the
+ same steps to create a transition from the <emphasis>
+ <property>State</property>
+ </emphasis> node to the <emphasis>
+ <property>End</property>
+ </emphasis> node. The result will look like:</para>
+ <figure>
+ <title>A Simple Process With Transitions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/guided_tour_jboss_jbpmgpd/guided_tour_8.png"
+ scale="60"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Now, when you've got background knowledge of simple project creation,
+ let's move to more advanced tools.</para>
+ </section>
+ </section>
+ </section>
+
+</chapter>
Modified: trunk/jbpm/docs/reference/en/modules/the_views.xml
===================================================================
--- trunk/jbpm/docs/reference/en/modules/the_views.xml 2008-10-30 09:45:10 UTC (rev 11326)
+++ trunk/jbpm/docs/reference/en/modules/the_views.xml 2008-10-30 09:45:29 UTC (rev 11327)
@@ -1,235 +1,230 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="the_views" xreflabel="the_views">
- <?dbhtml filename="the_views.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>jBPM</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>The views</title>
-
- <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
- <para>The views are used for representation and navigation the resources you are working on at
- the moment. One of the advantages of all the views is that all modifications made in the
- currant-active file are immediately displayed in them. Let’s get acquainted more closely
- with those that the <property>jPDL perspective</property> provides. </para>
-
- <figure>
- <title>The jPDL Perspective Views and Editors</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_0.png" scale="80"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see in the picture above, the <property>jPDL perspective</property> contains a complete set of
- functionality that's necessary for working on the jBPM project.</para>
-
- <section id="the_outline_view">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Outline View</title>
- <para>To have a way to quickly see an outline of the process use the <emphasis>
- <property>Outline view</property></emphasis> that is
- presented as the classical tree. If it is not visible select <emphasis>
- <property>Window > Show view > Outline</property>.
- </emphasis></para>
-
- <figure>
- <title>The Overview View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_overview">
- <?dbhtml filename="the_outline_view.html"?>
- <title>The Overview</title>
- <para>The main advantage of this view is that it gives visual representation of the whole
- currant-developing process. Besides, the <emphasis>
- <property>Overview</property></emphasis> comes as a scrollable thumbnail which
- enables a better navigation of the process structure if it's too large.</para>
-
- <figure>
- <title>The Overview</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-
- <section id="the_properties_view">
- <?dbhtml filename="the_properties_view.html"?>
- <title>The Properties View</title>
- <para> Here, we dwell on the JBDS <property>Properties view</property>.</para>
- <para>Notice if it's not visible you can access it by navigating <emphasis>
- <property>Window > Show view > Properties</property>.
- </emphasis></para>
- <para>The view shows the relevant properties of the selected item in the tabbed form. Every
- item has its own set of properties, which can be directly editable in the Properties
- view or by brining up the context menu.</para>
-
- <figure>
- <title>The Properties View of selected Transition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>For example, on the picture above the Properties view displays all the properties for
- a selected transition. Its name has been changed to <emphasis>
- <property>to_auction</property>.
- </emphasis> We've done it directly in active General tab of the view. The same
- way let's change the name for the second transition to <emphasis>
- <property>to_end</property>.
- </emphasis></para>
- <para>If no one item is selected, the view represents the properties of the whole process
- definition. </para>
-
- <figure>
- <title>The Properties View of Process Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In this case, it contains six tabs. The first one is the <emphasis>
- <property>General</property>.</emphasis> It allows to specify
- a process name and add necessary description. To illustrate let's change the process
- definition name to <emphasis>
- <property>jbay</property>.
- </emphasis></para>
- </section>
-
- <section id="jbpm_gpd_editor">
- <?dbhtml filename="direct_editing.html"?>
- <title>The jBPM Graphical Process Designer editor.</title>
- <para>The <property>jBPM GPD editor</property> includes four modes: Diagram, Deployment, Design and Source, which
- are available as switchable tabs at the bottom of the editor. Let's dwell on
- each of them.</para>
-
- <section id="the_diagram_mode">
- <title>The Diagram mode</title>
- <para> In this mode we define the process in the form of a diagram by means of tools
- provided on the left-hand side of the jBPM GPD. </para>
-
- <figure>
- <title>The Diagram mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Besides, some properties can be directly edited in the <property>Diagram mode</property> of the
- graphical editor. One example of this is the <emphasis>
- <property>name</property>
- </emphasis> property of nodes. You can edit this directly by selecting the node of
- which you want to change the name and then click once inside this node. This enables
- an editor in the node. We change the name of the node to <emphasis>
- <property>auction</property>.
- </emphasis></para>
- </section>
-
- <section id="source_mode">
- <?dbhtml filename="the_source_view.html"?>
- <title>The Source Mode</title>
- <para>Now, that we have defined a simple process definition, we can have a look at the
- XML that is being generated under the covers. To see this XML click on the Source
- tab of the graphical process designer editor.</para>
-
- <figure>
- <title>The Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>The <property>Source mode</property> enables to easily manipulate our XML. That is manually inserting
- and editing necessary elements or attributes. In addition, here you can take
- advantage of content assist.</para>
- </section>
-
- <section id="design_mode">
- <?dbhtml filename="the_design_view.html"?>
- <title>The Design Mode</title>
- <para>One more way to edit your file is to use <property>Design mode</property>. You can
- see it in the next picture:</para>
- <figure>
- <title>The Design Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>As you can see above, this mode looks like a table in the first column of which
- the process structure is performed. Here, you can also insert, remove and edit
- elements or attributes, moreover add comments and instructions. Their values can be
- directly edited in the second column of the Design mode table.</para>
- <para>For instance, let’s add a comment on the second transition. For that, you should
- bring up the context menu for it and choose <emphasis>
- <property>Add Before > Comment</property>.
- </emphasis></para>
-
- <figure>
- <title>Adding a Comment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Then, we can put the text <emphasis>This
- transition leads to the end state</emphasis> in the right column as its value.</para>
-
- <figure>
- <title>Comment is added</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="deployment_mode">
- <?dbhtml filename="the_deployment_view.html"?>
- <title>The Deployment Mode</title>
- <para>Finally, to adjust the deployment settings of the project you should switch on to
- the tab that opens the <property>Deployment mode</property>. On the picture below the <property>Deployment mode</property> is
- performed with default settings. Here, you can easily modify them or, if the
- settings won't match your needs, to reset defaults. </para>
- <figure>
- <title>The Deployment Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/the_views/the_views_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The button <emphasis>
- <property>Test Connections</property>
- </emphasis> is necessary to make sure whether all your settings are valid before
- deploying the process.</para>
- </section>
-
- </section>
-
- <para>Now that we've seen how to work with <property>jPDL perspective</property>, let's pass on to the project testing.</para>
-</chapter>
+<chapter id="the_views" xreflabel="the_views">
+ <?dbhtml filename="the_views.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>jBPM</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>The views</title>
+
+ <para>Here, it will be explained how to work with views and editors provided by JBDS.</para>
+ <para>The views are used for representation and navigation the resources you are working on at
+ the moment. One of the advantages of all the views is that all modifications made in the
+ currant-active file are immediately displayed in them. Let’s get acquainted more closely
+ with those that the <property>jPDL perspective</property> provides. </para>
+
+ <figure>
+ <title>The jPDL Perspective Views and Editors</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_0.png" scale="80"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see in the picture above, the <property>jPDL perspective</property> contains a
+ complete set of functionality that's necessary for working on the jBPM project.</para>
+
+ <section id="the_outline_view">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Outline View</title>
+ <para>To have a way to quickly see an outline of the process use the <emphasis>
+ <property>Outline view</property>
+ </emphasis> that is presented as the classical tree. If it is not visible select <emphasis>
+ <property>Window > Show view > Outline</property>. </emphasis></para>
+
+ <figure>
+ <title>The Overview View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_overview">
+ <?dbhtml filename="the_outline_view.html"?>
+ <title>The Overview</title>
+ <para>The main advantage of this view is that it gives visual representation of the whole
+ currant-developing process. Besides, the <emphasis>
+ <property>Overview</property>
+ </emphasis> comes as a scrollable thumbnail which enables a better navigation of the
+ process structure if it's too large.</para>
+
+ <figure>
+ <title>The Overview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section id="the_properties_view">
+ <?dbhtml filename="the_properties_view.html"?>
+ <title>The Properties View</title>
+ <para> Here, we dwell on the JBDS <property>Properties view</property>.</para>
+ <para>Notice if it's not visible you can access it by navigating <emphasis>
+ <property>Window > Show view > Properties</property>. </emphasis></para>
+ <para>The view shows the relevant properties of the selected item in the tabbed form. Every
+ item has its own set of properties, which can be directly editable in the Properties
+ view or by brining up the context menu.</para>
+
+ <figure>
+ <title>The Properties View of selected Transition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For example, on the picture above the Properties view displays all the properties for
+ a selected transition. Its name has been changed to <emphasis>
+ <property>to_auction</property>. </emphasis> We've done it directly in
+ active General tab of the view. The same way let's change the name for the
+ second transition to <emphasis>
+ <property>to_end</property>. </emphasis></para>
+ <para>If no one item is selected, the view represents the properties of the whole process
+ definition. </para>
+
+ <figure>
+ <title>The Properties View of Process Definition</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case, it contains six tabs. The first one is the <emphasis>
+ <property>General</property>.</emphasis> It allows to specify a process name and add
+ necessary description. To illustrate let's change the process definition name
+ to <emphasis>
+ <property>jbay</property>. </emphasis></para>
+ </section>
+
+ <section id="jbpm_gpd_editor">
+ <?dbhtml filename="direct_editing.html"?>
+ <title>The jBPM Graphical Process Designer editor.</title>
+ <para>The <property>jBPM GPD editor</property> includes four modes: Diagram, Deployment,
+ Design and Source, which are available as switchable tabs at the bottom of the editor.
+ Let's dwell on each of them.</para>
+
+ <section id="the_diagram_mode">
+ <title>The Diagram mode</title>
+ <para> In this mode we define the process in the form of a diagram by means of tools
+ provided on the left-hand side of the jBPM GPD. </para>
+
+ <figure>
+ <title>The Diagram mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Besides, some properties can be directly edited in the <property>Diagram
+ mode</property> of the graphical editor. One example of this is the <emphasis>
+ <property>name</property>
+ </emphasis> property of nodes. You can edit this directly by selecting the node of
+ which you want to change the name and then click once inside this node. This enables
+ an editor in the node. We change the name of the node to <emphasis>
+ <property>auction</property>. </emphasis></para>
+ </section>
+
+ <section id="source_mode">
+ <?dbhtml filename="the_source_view.html"?>
+ <title>The Source Mode</title>
+ <para>Now, that we have defined a simple process definition, we can have a look at the
+ XML that is being generated under the covers. To see this XML click on the Source
+ tab of the graphical process designer editor.</para>
+
+ <figure>
+ <title>The Source Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The <property>Source mode</property> enables to easily manipulate our XML. That is
+ manually inserting and editing necessary elements or attributes. In addition, here
+ you can take advantage of content assist.</para>
+ </section>
+
+ <section id="design_mode">
+ <?dbhtml filename="the_design_view.html"?>
+ <title>The Design Mode</title>
+ <para>One more way to edit your file is to use <property>Design mode</property>. You can
+ see it in the next picture:</para>
+ <figure>
+ <title>The Design Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_7.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see above, this mode looks like a table in the first column of which
+ the process structure is performed. Here, you can also insert, remove and edit
+ elements or attributes, moreover add comments and instructions. Their values can be
+ directly edited in the second column of the Design mode table.</para>
+ <para>For instance, let’s add a comment on the second transition. For that, you should
+ bring up the context menu for it and choose <emphasis>
+ <property>Add Before > Comment</property>. </emphasis></para>
+
+ <figure>
+ <title>Adding a Comment</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_8.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Then, we can put the text <emphasis>This transition leads to the end
+ state</emphasis> in the right column as its value.</para>
+
+ <figure>
+ <title>Comment is added</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="deployment_mode">
+ <?dbhtml filename="the_deployment_view.html"?>
+ <title>The Deployment Mode</title>
+ <para>Finally, to adjust the deployment settings of the project you should switch on to
+ the tab that opens the <property>Deployment mode</property>. On the picture below
+ the <property>Deployment mode</property> is performed with default settings. Here,
+ you can easily modify them or, if the settings won't match your needs, to
+ reset defaults. </para>
+ <figure>
+ <title>The Deployment Mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/the_views/the_views_10.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The button <emphasis>
+ <property>Test Connections</property>
+ </emphasis> is necessary to make sure whether all your settings are valid before
+ deploying the process.</para>
+ <para>Now that we've seen how to work with <property>jPDL
+ perspective</property>, let's pass on to the project testing.</para>
+ </section>
+ </section>
+</chapter>
17 years, 2 months
JBoss Tools SVN: r11326 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:45:10 -0400 (Thu, 30 Oct 2008)
New Revision: 11326
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
trunk/jsf/docs/userguide/en/modules/preferences.xml
trunk/jsf/docs/userguide/en/modules/spring_tools.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-30 09:44:51 UTC (rev 11325)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2008-10-30 09:45:10 UTC (rev 11326)
@@ -187,7 +187,7 @@
</listitem>
<listitem>
<para>
- <ulink url="&esblinklink;#ESBContentAssist">ESB XML files</ulink>
+ <ulink url="&esblink;#ESBContentAssist">ESB XML files</ulink>
</para>
</listitem>
</itemizedlist>
@@ -679,7 +679,7 @@
</proposal>
</AttributeType>
]]></programlisting>
- <orderedlist start="2" continuation="continues">
+ <orderedlist>
<listitem>
<para>Add information on your xml file in <emphasis>
<property><JBDS_home>/studio/eclipse/plugins/org.jboss.common.kb_***/plugin.xml</property>
Modified: trunk/jsf/docs/userguide/en/modules/preferences.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-30 09:44:51 UTC (rev 11325)
+++ trunk/jsf/docs/userguide/en/modules/preferences.xml 2008-10-30 09:45:10 UTC (rev 11326)
@@ -86,7 +86,7 @@
</listitem>
<listitem>
<para>
- <link linkend="StrutsAutomatic">Struts Automatic</link>
+ <link linkend="struts_automation">Struts Automatic</link>
</para>
</listitem>
@@ -135,7 +135,7 @@
<listitem>
<para>
- <link linkend="TitleDiagram">Tiles Diagram</link>
+ <link linkend="tiles_diagram">Tiles Diagram</link>
</para>
</listitem>
<listitem>
@@ -967,7 +967,17 @@
<imagedata fileref="images/preferences/preferences_35.png"/>
</imageobject>
</mediaobject>
- </figure>
+ </figure>
+ <para>In summary, this document should guide you to those parts of <property>JBoss
+ Tools</property> which you specifically need to develop Web Applications. It coves different
+ aspects of visual components such as editors, views, etc. for browsing, representing and
+ editing web resources you are working with.</para>
+
+ <para>If there's anything we didn't cover or you can't figure out,
+ please feel free to visit our <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ Developer Studio Forum</ulink> to ask questions. There we are also looking for your
+ suggestions and comments.</para>
</section>
<!--section id="View">
@@ -1140,15 +1150,4 @@
</figure>
</section>
-->
-
- <para>In summary, this document should guide you to those parts of <property>JBoss
- Tools</property> which you specifically need to develop Web Applications. It coves different
- aspects of visual components such as editors, views, etc. for browsing, representing and
- editing web resources you are working with.</para>
-
- <para>If there's anything we didn't cover or you can't figure out,
- please feel free to visit our <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
- Developer Studio Forum</ulink> to ask questions. There we are also looking for your
- suggestions and comments.</para>
</chapter>
Modified: trunk/jsf/docs/userguide/en/modules/spring_tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/spring_tools.xml 2008-10-30 09:44:51 UTC (rev 11325)
+++ trunk/jsf/docs/userguide/en/modules/spring_tools.xml 2008-10-30 09:45:10 UTC (rev 11326)
@@ -12,15 +12,15 @@
<para><ulink url="http://springide.org/project">Spring IDE</ulink> is a graphical user interface for the configuration files used by the <ulink url="http://www.springframework.org/">Spring Framework</ulink>. It's built as a set of plugins for the Eclipse platform.</para>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectNature">Add Spring Project Nature</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateNewProject">Create New Spring Project</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectReferences">Add References To Other Spring Projects</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddBeansConfigs">Add Spring Beans Config Files</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateBeansConfigSets">Create Spring Beans Config Sets</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenSpringExplorer">Open Spring Explorer</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#ValidateBeansConfig">Validate Spring Beans Config</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenBeansGraph">Open Spring Beans Graph</ulink></title></section>
- <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#SearchBeans">Search Spring Beans</ulink></title></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectNature">Add Spring Project Nature</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateNewProject">Create New Spring Project</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddProjectReferences">Add References To Other Spring Projects</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#AddBeansConfigs">Add Spring Beans Config Files</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#CreateBeansConfigSets">Create Spring Beans Config Sets</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenSpringExplorer">Open Spring Explorer</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#ValidateBeansConfig">Validate Spring Beans Config</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#OpenBeansGraph">Open Spring Beans Graph</ulink></title><para/></section>
+ <section><title><ulink url="http://springide.org/project/wiki/SpringideGuide#SearchBeans">Search Spring Beans</ulink></title><para/></section>
</section>
17 years, 2 months
JBoss Tools SVN: r11325 - trunk/jsf/docs/jsf_tools_ref_guide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:44:51 -0400 (Thu, 30 Oct 2008)
New Revision: 11325
Modified:
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml
trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml 2008-10-30 09:44:10 UTC (rev 11324)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/managed_beans.xml 2008-10-30 09:44:51 UTC (rev 11325)
@@ -1,232 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
-<chapter id="managed_beans">
- <?dbhtml filename="managed_beans.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Developer Studio</keyword>
- <keyword>Eclipse</keyword>
- <keyword>JSF Tools</keyword>
- <keyword>Java</keyword>
- <keyword>JBoss</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Managed Beans</title>
-
- <para>There is lots of power to work with
- <property>managed beans</property>.</para>
- <itemizedlist>
- <listitem>
- <para>Add and generate code for new managed beans</para>
- <itemizedlist>
- <listitem>
- <para>Generate code for attributes and
- getter/setter methods</para>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>
- <para>Add existing managed beans to JSF configuration
- file</para>
- </listitem>
- </itemizedlist>
-
- <para>Thus, in this section we will guides you through all this possibilities.</para>
-
- <section id="CodeGenerationForManagedBeans421">
-
- <title>Code Generation for Managed Beans</title>
-
- <para>To start, create a new managed bean in JSF configuration file
- editor, in the Tree view.</para>
- <figure>
- <title>Creation of New Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_34.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <note>
- <title>Note:</title>
- <para>When you define a new managed bean, make sure that <emphasis>
- <property>Generate Source Code</property>
- </emphasis> is checked as shown in the figure
- below.</para>
- </note>
- <figure>
- <title>New Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_35.png"
- scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After the <emphasis role="italic">
- <property>"Java"</property>
- </emphasis> class has been generated you can open it for
- additional editing. There are two ways to open the <emphasis
- role="italic">
- <property>"Java"</property>
- </emphasis> class:</para>
-
- <itemizedlist>
- <listitem>
- <para>click on <emphasis>
- <property>Managed-Bean-Class</property>
- </emphasis> link in the editor</para>
- </listitem>
- </itemizedlist>
- <para>or</para>
- <itemizedlist>
- <listitem>
- <para>right click the <emphasis>
- <property>managed bean</property>
- </emphasis> and select <emphasis>
- <property>Open Source</property>
- </emphasis></para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Opening of Created Managed Bean</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_36.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The generated Java source should look as follows:</para>
-
- <figure>
- <title>Java Source Code</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_37.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also generate source code for properties, also
- includes <emphasis role="italic">
- <property>"getter"</property>
- </emphasis> and <emphasis role="italic">
- <property>"setter"</property>
- </emphasis> methods. Right click on the bean and select <emphasis>
- <property>New > Property</property>
- </emphasis>. You will see <property>Add Property</property>
- dialog.</para>
- <figure>
- <title>Generation of Source Code for Properties</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_38.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para>When the form is open make sure that all the check boxes are
- selected:</para>
- <itemizedlist>
- <listitem><para>Add Java property</para></listitem>
- <listitem><para>Generate Getter</para></listitem>
- <listitem><para>Generate Setter</para></listitem>
- </itemizedlist>
- <para/>
- <figure>
- <title>"Add Property" Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_39.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once the generation is complete, you can open the file and see
- the added property with <emphasis role="italic">
- <property>"get"</property>
- </emphasis> and <emphasis role="italic">
- <property>"set"</property>
- </emphasis> methods:</para>
- <figure>
- <title>Generated Java Source Code for Property</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_40.png"
- scale="75"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Thus, we've discussed everything which comes to
- creating a new Managed Bean. The next section will show you how to
- add an existing Bean into a JSF configuration file.</para>
- </section>
- <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
-
- <title>Add Existing Java Beans to a JSF Configuration File</title>
- <para>If you already have a Java bean you can easily add it to a
- <property>JSF configuration file</property>.</para>
- <para>You should start the same way you create a new managed bean.
- Use the <emphasis>
- <property>Browse...</property>
- </emphasis> button to add your existing Java class.</para>
- <figure>
- <title>New Managed Bean Form</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_42.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
- <para>Once the class is set, its <emphasis>
- <property>Name</property>
- </emphasis> will be set as well. But you can easily
- substitute it for the other one. Notice that <emphasis>
- <property>Generate Source Code</property>
- </emphasis> option is not available as the <emphasis
- role="italic">
- <property>"Java"</property>
- </emphasis> class already exists. </para>
- <para>After adding your class <emphasis>
- <property>Next</property>
- </emphasis> button will be activated. Pressing it
- you'll get <emphasis>
- <property>Managed Properties</property>
- </emphasis> dialog where all corresponding properties are
- displayed. Check the necessary ones to add them into your
- <property>JSF Configuration File</property>.</para>
-
- <figure>
- <title>Selection of Bean's Properties.</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_43.png"
- />
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>If you don't want to add any, just click <emphasis>
- <property>Finish</property>. </emphasis></para>
- </section>
- <para>Above-listed steps have demonstrated how you can specify an existing Bean in
- the JSF configuration file, i.e. <emphasis>
- <property>faces-config.xml</property>. </emphasis> In the
- next chapter you'll know how to organize and register another kind of artifacts.</para>
-
-</chapter>
+<chapter id="managed_beans">
+ <?dbhtml filename="managed_beans.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>JSF Tools</keyword>
+ <keyword>Java</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Managed Beans</title>
+
+ <para>There is lots of power to work with <property>managed beans</property>.</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add and generate code for new managed beans</para>
+ <itemizedlist>
+ <listitem>
+ <para>Generate code for attributes and getter/setter methods</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Add existing managed beans to JSF configuration file</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>Thus, in this section we will guides you through all this possibilities.</para>
+
+ <section id="CodeGenerationForManagedBeans421">
+
+ <title>Code Generation for Managed Beans</title>
+
+ <para>To start, create a new managed bean in JSF configuration file editor, in the Tree
+ view.</para>
+ <figure>
+ <title>Creation of New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_34.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <note>
+ <title>Note:</title>
+ <para>When you define a new managed bean, make sure that <emphasis>
+ <property>Generate Source Code</property>
+ </emphasis> is checked as shown in the figure below.</para>
+ </note>
+ <figure>
+ <title>New Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_35.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>After the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class has been generated you can open it for additional editing. There are
+ two ways to open the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>click on <emphasis>
+ <property>Managed-Bean-Class</property>
+ </emphasis> link in the editor</para>
+ </listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
+ <listitem>
+ <para>right click the <emphasis>
+ <property>managed bean</property>
+ </emphasis> and select <emphasis>
+ <property>Open Source</property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Opening of Created Managed Bean</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_36.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The generated Java source should look as follows:</para>
+
+ <figure>
+ <title>Java Source Code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_37.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can also generate source code for properties, also includes <emphasis
+ role="italic">
+ <property>"getter"</property>
+ </emphasis> and <emphasis role="italic">
+ <property>"setter"</property>
+ </emphasis> methods. Right click on the bean and select <emphasis>
+ <property>New > Property</property>
+ </emphasis>. You will see <property>Add Property</property> dialog.</para>
+ <figure>
+ <title>Generation of Source Code for Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_38.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>When the form is open make sure that all the check boxes are selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>Add Java property</para>
+ </listitem>
+ <listitem>
+ <para>Generate Getter</para>
+ </listitem>
+ <listitem>
+ <para>Generate Setter</para>
+ </listitem>
+ </itemizedlist>
+ <para/>
+ <figure>
+ <title>"Add Property" Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_39.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the generation is complete, you can open the file and see the added property with
+ <emphasis role="italic">
+ <property>"get"</property>
+ </emphasis> and <emphasis role="italic">
+ <property>"set"</property>
+ </emphasis> methods:</para>
+ <figure>
+ <title>Generated Java Source Code for Property</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_40.png" scale="75"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Thus, we've discussed everything which comes to creating a new Managed Bean.
+ The next section will show you how to add an existing Bean into a JSF configuration
+ file.</para>
+ </section>
+ <section id="AddExistingJavaBeansToAJSFConfigurationFile74332">
+
+ <title>Add Existing Java Beans to a JSF Configuration File</title>
+ <para>If you already have a Java bean you can easily add it to a <property>JSF configuration
+ file</property>.</para>
+ <para>You should start the same way you create a new managed bean. Use the <emphasis>
+ <property>Browse...</property>
+ </emphasis> button to add your existing Java class.</para>
+ <figure>
+ <title>New Managed Bean Form</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_42.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Once the class is set, its <emphasis>
+ <property>Name</property>
+ </emphasis> will be set as well. But you can easily substitute it for the other one.
+ Notice that <emphasis>
+ <property>Generate Source Code</property>
+ </emphasis> option is not available as the <emphasis role="italic">
+ <property>"Java"</property>
+ </emphasis> class already exists. </para>
+ <para>After adding your class <emphasis>
+ <property>Next</property>
+ </emphasis> button will be activated. Pressing it you'll get <emphasis>
+ <property>Managed Properties</property>
+ </emphasis> dialog where all corresponding properties are displayed. Check the necessary
+ ones to add them into your <property>JSF Configuration File</property>.</para>
+
+ <figure>
+ <title>Selection of Bean's Properties.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_support/jsf_support_43.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you don't want to add any, just click <emphasis>
+ <property>Finish</property>. </emphasis></para>
+ <para>Above-listed steps have demonstrated how you can specify an existing Bean in the JSF
+ configuration file, i.e. <emphasis>
+ <property>faces-config.xml</property>. </emphasis> In the next chapter
+ you'll know how to organize and register another kind of artifacts.</para>
+ </section>
+</chapter>
Modified: trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml
===================================================================
--- trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml 2008-10-30 09:44:10 UTC (rev 11324)
+++ trunk/jsf/docs/jsf_tools_ref_guide/en/modules/projects.xml 2008-10-30 09:44:51 UTC (rev 11325)
@@ -454,10 +454,9 @@
<para>That's it. Now, you can use this template with any
new or imported project that uses the same run-time
implementation as the project you turned into a
- template.</para>
+ template.</para>
+ <para>At this point, you have a fully configured project and now you can
+ bring some new logic to it starting from JSF configuration
+ file.</para>
</section>
-
- <para>At this point, you have a fully configured project and now you can
- bring some new logic to it starting from JSF configuration
- file.</para>
</chapter>
\ No newline at end of file
17 years, 2 months
JBoss Tools SVN: r11324 - trunk/portlet/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:44:10 -0400 (Thu, 30 Oct 2008)
New Revision: 11324
Modified:
trunk/portlet/docs/reference/en/modules/intro.xml
trunk/portlet/docs/reference/en/modules/portlets_support.xml
trunk/portlet/docs/reference/en/modules/starting_project.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/portlet/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/intro.xml 2008-10-30 09:43:44 UTC (rev 11323)
+++ trunk/portlet/docs/reference/en/modules/intro.xml 2008-10-30 09:44:10 UTC (rev 11324)
@@ -47,7 +47,7 @@
Configuration to enable Portlet Facet in it.</para>
</entry>
<entry>
- <link linkend="creating _project_with_jbossportal">Creating a Dynamic
+ <link linkend="creating_project_with_jbossportal">Creating a Dynamic
Web Project</link>
</entry>
</row>
Modified: trunk/portlet/docs/reference/en/modules/portlets_support.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/portlets_support.xml 2008-10-30 09:43:44 UTC (rev 11323)
+++ trunk/portlet/docs/reference/en/modules/portlets_support.xml 2008-10-30 09:44:10 UTC (rev 11324)
@@ -215,15 +215,14 @@
<imagedata fileref="images/portlets_support/portlets_support_13.png"/>
</imageobject>
</mediaobject>
- </figure>
- </section>
-
- <para>With this document you've learnt how to get started with <property>JBoss
+ </figure>
+ <para>With this document you've learnt how to get started with <property>JBoss
Portal</property> using <property>JBoss Tools</property> suite of Eclipse plugins. The
- above chapters walked you through the steps on how to organize a web project with portlets
- which includes a sample staff and deploy it onto the <property>JBoss Portal</property>.</para>
-
- <para>If you still have questions or suggestions you are always welcome on our <ulink
+ above chapters walked you through the steps on how to organize a web project with portlets
+ which includes a sample staff and deploy it onto the <property>JBoss Portal</property>.</para>
+
+ <para>If you still have questions or suggestions you are always welcome on our <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201"
- >Forum</ulink>. Your feedback will be very much appreciated.</para>
+ >Forum</ulink>. Your feedback will be very much appreciated.</para>
+ </section>
</chapter>
Modified: trunk/portlet/docs/reference/en/modules/starting_project.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/starting_project.xml 2008-10-30 09:43:44 UTC (rev 11323)
+++ trunk/portlet/docs/reference/en/modules/starting_project.xml 2008-10-30 09:44:10 UTC (rev 11324)
@@ -7,7 +7,7 @@
Tools</property>, you should first have a Web Project pointed to the JBoss Portal Runtime.
Thus, this chapter is intended to give you a detail look at how you can get it.</para>
- <section id="creating _project_with_jbossportal">
+ <section id="creating_project_with_jbossportal">
<title>Creating a Dynamic Web Project</title>
<para>To create a Dynamic Web Project, go to <emphasis>
17 years, 2 months
JBoss Tools SVN: r11323 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:43:44 -0400 (Thu, 30 Oct 2008)
New Revision: 11323
Modified:
trunk/seam/docs/reference/en/modules/creating_new_seam.xml
trunk/seam/docs/reference/en/modules/seam_wizards.xml
trunk/seam/docs/reference/en/modules/testng.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/seam/docs/reference/en/modules/creating_new_seam.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2008-10-30 09:42:53 UTC (rev 11322)
+++ trunk/seam/docs/reference/en/modules/creating_new_seam.xml 2008-10-30 09:43:44 UTC (rev 11323)
@@ -51,7 +51,7 @@
<para>Clicking on <emphasis>
<property>New...</property>
- </emphasis> button in the <proeprty>Target Runtime</proeprty> section will bring you to
+ </emphasis> button in the <property>Target Runtime</property> section will bring you to
another dialog. Here, you can specify a new installed Runtime environment or the other
type of runtime appropriate for configuring your project. Let's create a JBoss 4.2
Runtime. For that after choosing it click on <emphasis>
Modified: trunk/seam/docs/reference/en/modules/seam_wizards.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_wizards.xml 2008-10-30 09:42:53 UTC (rev 11322)
+++ trunk/seam/docs/reference/en/modules/seam_wizards.xml 2008-10-30 09:43:44 UTC (rev 11323)
@@ -237,19 +237,16 @@
</imageobject>
</mediaobject>
</figure>
-
- </section>
-
- <para>Let's create two customers <property>c1</property> and <property>c2</property>. Enter the name in the text field and press the <property>Save</property> button.
- Customer should be successfully created. Press <property>Done</property>. Do the same for <property>c2</property> customer. The result should be:</para>
-
- <figure>
- <title>Two Customers Are Created</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/seam_wizards/seam_wizards_17.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ <para>Let's create two customers <property>c1</property> and <property>c2</property>. Enter the name in the text field and press the <property>Save</property> button.
+ Customer should be successfully created. Press <property>Done</property>. Do the same for <property>c2</property> customer. The result should be:</para>
+ <figure>
+ <title>Two Customers Are Created</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/seam_wizards/seam_wizards_17.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
</chapter>
Modified: trunk/seam/docs/reference/en/modules/testng.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/testng.xml 2008-10-30 09:42:53 UTC (rev 11322)
+++ trunk/seam/docs/reference/en/modules/testng.xml 2008-10-30 09:43:44 UTC (rev 11323)
@@ -243,17 +243,17 @@
<para>Thus with Seam tooling you can easily take advantage of TestNG framework. As you can
see, it generates its own TestNG project as a separate module within which you can
- easily monitor the tests execution and their output.</para>
+ easily monitor the tests execution and their output.</para>
+
+ <para>In conclusion, the main goal of this document is to get you know with a full featureset
+ that <property>JBoss Tools</property> provides to support Seam development. Thus if you have
+ some questions, comments or suggestions on the topic, please fell free to ask in the <ulink
+ url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
+ Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in
+ future leaving your vote on our page <ulink
+ url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
+ >here</ulink>. </para>
+
+ <para>A set of movies on Seam tooling is available <ulink url="http://docs.jboss.org/tools/movies">here</ulink>.</para>
</section>
-
- <para>In conclusion, the main goal of this document is to get you know with a full featureset
- that <property>JBoss Tools</property> provides to support Seam development. Thus if you have
- some questions, comments or suggestions on the topic, please fell free to ask in the <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss
- Tools Forum</ulink>. You can also influence on how you want to see JBoss Tools docs in
- future leaving your vote on our page <ulink
- url="http://wiki.jboss.org/wiki/JBossToolsDocsFuture"
- >here</ulink>. </para>
-
- <para>A set of movies on Seam tooling is available <ulink url="http://docs.jboss.org/tools/movies">here</ulink>.</para>
</chapter>
17 years, 2 months
JBoss Tools SVN: r11322 - trunk/ws/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:42:53 -0400 (Thu, 30 Oct 2008)
New Revision: 11322
Modified:
trunk/ws/docs/reference/en/modules/overview.xml
trunk/ws/docs/reference/en/modules/topdown.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/ws/docs/reference/en/modules/overview.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/overview.xml 2008-10-30 09:35:07 UTC (rev 11321)
+++ trunk/ws/docs/reference/en/modules/overview.xml 2008-10-30 09:42:53 UTC (rev 11322)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="overview" revisionflag="overview">
+<chapter id="overview">
<title>JBossWS Runtime Overview</title>
<para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).</para>
Modified: trunk/ws/docs/reference/en/modules/topdown.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/topdown.xml 2008-10-30 09:35:07 UTC (rev 11321)
+++ trunk/ws/docs/reference/en/modules/topdown.xml 2008-10-30 09:42:53 UTC (rev 11322)
@@ -1,306 +1,383 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<chapter id="create_ws_topdown" >
- <?dbhtml filename="topdown.html"?>
- <chapterinfo>
- <keywordset>
- <keyword>JBoss Tools</keyword>
- <keyword>Web Service</keyword>
- <keyword>JBossWS Web Service runtime</keyword>
- </keywordset>
- </chapterinfo>
-
- <title>Creating a Web Service using JBossWS runtime</title>
- <para>In this chapter we provide you with the necessary steps to create a Web Service using JBossWS runtime.</para>
-
+<chapter id="create_ws_topdown">
+ <?dbhtml filename="topdown.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Tools</keyword>
+ <keyword>Web Service</keyword>
+ <keyword>JBossWS Web Service runtime</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Creating a Web Service using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service using
+ JBossWS runtime.</para>
+
<section id="createproject">
- <title>Creating a Dynamic Web project</title>
+ <title>Creating a Dynamic Web project</title>
- <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
- <figure>
- <title>Dynamic Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_webproject_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Create a Web project by selecting
- <emphasis><property>New > Project... > Dynamic Web project</property></emphasis>. Enter the following information: </para>
- <itemizedlist>
- <listitem>
- <para>Project Name: enter a project name</para>
- </listitem>
- <listitem>
- <para>Target runtime: any server depending on your installation. If it is not listed, click New and browse to the location where it is installed to. You may set <emphasis><property>Target Runtime</property></emphasis> to <emphasis><property>None</property></emphasis>,
- in this case, you should add <link linkend="addfacet">JBoss Web Service facet to the project</link>.</para>
- <figure>
- <title>Dynamic Web Project Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_webproject_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Configure Web Module values:</para>
- <figure>
- <title>Web Module Settings Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_webproject_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>Click on the <property>Finish</property> button.</para>
+ <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
+ <figure>
+ <title>Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Create a Web project by selecting <emphasis>
+ <property>New > Project... > Dynamic Web project</property>
+ </emphasis>. Enter the following information: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Project Name: enter a project name</para>
+ </listitem>
+ <listitem>
+ <para>Target runtime: any server depending on your installation. If it is not listed,
+ click New and browse to the location where it is installed to. You may set <emphasis>
+ <property>Target Runtime</property>
+ </emphasis> to <emphasis>
+ <property>None</property>
+ </emphasis>, in this case, you should add <link linkend="addfacet">JBoss Web Service
+ facet to the project</link>.</para>
+ <figure>
+ <title>Dynamic Web Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Configure Web Module values:</para>
+ <figure>
+ <title>Web Module Settings Configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_webproject_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property>Finish</property> button.</para>
</section>
-
+
<section id="addfacet">
- <title>Configure JBoss Web Service facet settings</title>
- <para>If you have already created a new Dynamic Web project, the next step is to add JBoss Web Service facet to the project:</para>
+ <title>Configure JBoss Web Service facet settings</title>
+ <para>If you have already created a new Dynamic Web project, the next step is to add JBoss Web
+ Service facet to the project:</para>
<figure id="figure_addfacet">
- <title>Configure JBoss Web Service Facet</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_facet.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the project's target runtime, you may choose <emphasis><property>Server Supplied JBossWS Runtime</property></emphasis>
- and then click <emphasis><property>Ok</property></emphasis> to finish the configuration of JBoss Web Service facet.
- </para>
- <para>If the project has no <emphasis><property>Target Runtime</property></emphasis> settings, you should check the second radio button and specify a JBossWS runtime from the list.
- You also can create a new JBossWS runtime, click on the <emphasis><property>New...</property></emphasis> button will bring you to another dialog to configure new JBossWS runtime.</para>
- <figure id="figure_addfacet1">
- <title>Configure JBossWS Runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_newruntime.png"/>
- </imageobject>
- </mediaobject>
+ <title>Configure JBoss Web Service Facet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_facet.png"/>
+ </imageobject>
+ </mediaobject>
</figure>
+ <para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the
+ project's target runtime, you may choose <emphasis>
+ <property>Server Supplied JBossWS Runtime</property>
+ </emphasis> and then click <emphasis>
+ <property>Ok</property>
+ </emphasis> to finish the configuration of JBoss Web Service facet. </para>
+ <para>If the project has no <emphasis>
+ <property>Target Runtime</property>
+ </emphasis> settings, you should check the second radio button and specify a JBossWS
+ runtime from the list. You also can create a new JBossWS runtime, click on the <emphasis>
+ <property>New...</property>
+ </emphasis> button will bring you to another dialog to configure new JBossWS runtime.</para>
+ <figure id="figure_addfacet1">
+ <title>Configure JBossWS Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_newruntime.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
<para>See how to configure a new JBossWS runtime <link linkend="preference">here</link>:</para>
-
+
</section>
-
-
- <section id="topdownwebservice">
- <title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
- <para>In this chapter we provide you with the necessary steps to create a Web Service from a WSDL document using JBossWS runtime.</para>
- <para>At first, please make sure that you have already created a dynamic Web project with JBoss Web Service facet installed. </para>
- <para>See how to make it <link linkend="createproject">here</link>> and <link linkend="addfacet">here</link>.</para>
-
- <para>To create a Web Service using JBossWS runtime select<emphasis>
- <property>File > New > Other > Web Services > Web Service</property></emphasis> to run Web Service creation wizard.
- </para>
- <para>Let's get through the wizard step-by-step:</para>
- <figure id="figure_create_ws_topdown">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_creation1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>First, please select <property>Top down Java bean Web Service</property> from the Web Service type list,
- and select a WSDL document from workspace, click on the Server name lilnk on the page will bring you to
- another dialog. Here you can specify the server to a JBoss Server and Web Service runtime to JBossWS runtime:</para>
- <figure id="figure_create_ws_topdown_setserver">
- <title>Select Server and Web Service runtime</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_creation1_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on the <emphasis>
- <property>Finish</property>
- </emphasis> button to see the next wizard view opened:</para>
-
- <figure id="figure_create_ws_topdown1">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_creation1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Click on the <emphasis><property>Next</property></emphasis> button to proceed:</para>
- <figure id="figure_create_ws_topdown_codegen">
- <title>New Web Service Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_creation2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>On this page, the default package name comes from the namespace of the WSDL document, you also can change it to any valid package name you want.
- JAX-WS specification should be set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime.
- You can specify a catalog file and binding files if you have them. If you want the wizard to generate empty implementation classes for the
- Web Service, check the <emphasis> <property>Generate default Web Service implementation classes</property> </emphasis> check box.
- If you want to update the default Web.xml file with the Web Service servlets configured, check the <emphasis> <property>Update the default Web.xml</property> </emphasis>
- check box. Click on the <emphasis><property>Next</property> </emphasis> or on the <emphasis><property>Finish</property> </emphasis> button to generate code.</para>
-
- <para>Once the Web Service code is generated, you can view the implementation class and add business logic to each method.</para>
- <figure id="figure_impl_code">
- <title>The generated implementation Java code</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_Impl_code_view.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>View the Web.xml file:</para>
- <figure id="figure_webxml">
- <title>Web.xml</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_ws_webxml.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- </section>
-
- <section id="bottomupws">
- <title>Creating a Web service from a Java bean using JBossWS runtime</title>
- <para>The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and then deploying it to the server.</para>
- <para>To create a Web service from a bean using JBoss WS:</para>
- <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
- <para>Create <link linkend="createproject">a Dynamic Web project</link>.</para>
- <para>Add <link linkend="addfacet">JBossWS Facet</link> to Web project.</para>
- <para>Create a Web Service from a java bean: </para>
- <itemizedlist>
- <listitem>
- <para>Switch to the Java EE perspective <emphasis><property>Window > Open Perspective > Java EE</property></emphasis>.</para>
- </listitem>
- <listitem>
- <para>In the Project Explorer view, select the bean that you created or imported into the source folder of your Web project.</para>
- <figure>
- <title>Create a new Bean Class</title>
- <mediaobject>
- <imageobject>
- <imagedata scale="80" fileref="images/jbossws_bottomup.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>Click <emphasis><property>File > New > Other</property></emphasis>. Select Web Services in order to display various Web service wizards. Select the Web Service wizard. Click on the <property>Next</property> button.</para>
- <figure>
- <title>New Web Service</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_bottomup_1.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>On the first Web Service wizard page: select <property>Bottom up Java bean Web service</property> as your Web service type, and select the Java bean from which the service will be created:</para>
- <figure>
- <title>Set Web Service Common values</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_bottomup_2.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Select the stages of Web service development that you want to complete using the slider: </para>
- <itemizedlist>
- <listitem>
- <para>Develop: this will develop the WSDL definition and implementation of the Web service. This includes such tasks as creating modules that will contain generated code, WSDL files, deployment descriptors, and Java files when appropriate.</para>>
- </listitem>
- <listitem>
- <para>Assemble: this ensures the project that will host the Web service or client gets associated to an EAR when required by the target application server.</para>>
- </listitem>
- <listitem>
- <para>Deploy: this will create the deployment code for the service.</para>>
- </listitem>
- <listitem>
- <para>Install: this will install and configure the Web module and EARs on the target server.</para>>
- </listitem>
- <listitem>
- <para>Start: this will start the server once the service has been installed on it. The server-config.wsdd file will be generated.</para>>
- </listitem>
- <listitem>
- <para>Test: this will provide various options for testing the service, such as using the Web Service Explorer or sample JSPs.</para>>
- </listitem>
- </itemizedlist>
- </listitem>
- <listitem>Select your server: the default server is displayed. If you want to deploy your service to a different server click the link to specify a different server.</listitem>
- <listitem>Select your runtime: ensure the JBoss WS runtime is selected.</listitem>
- <listitem>Select the service project: the project selected in your workspace is displayed. To select a different project click on the project link. If you are deploying to JBoss Application Server you will also be asked to select the EAR associated with the project. Ensure that the project selected as the Client Web Project is different from the Service Web Project, or the service will be overwritten by the client's generated artifacts.</listitem>
- <listitem>If you want to create a client, select the type of proxy to be generated and repeat the above steps for the client. The better way is to create a web service client project separately.</listitem>
- </itemizedlist>
- <para>Click on the <property>Next</property> button.</para>
- </listitem>
- <listitem>
- <para>On the JBoss Web Service Code Generation Configuration page, set the following values:</para>
- <figure>
- <title>Set Web Service values for Code Generation</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_bottomup_3.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
- <listitem>
- <para>Generate WSDL file: select it, you will get a generated WSDL file in your project. But this wsdl's services' address location values are not a real address. </para>
- </listitem>
- <listitem>After the Web service has been created, the following option can become available depending on the options you selected:
- <para>Update the default web.xm file: if selected, you may test the web service by Explorer.</para>
- </listitem>
- </itemizedlist>
- <para>Click on the <property>Next</property> button.</para>
- </listitem>
- <listitem>
- <para>On this page, the project is deployed to the server. You can start the server and test the web service. If you want to publish the web service to a UDDI registry, you may click the <property>Next</property> button to publish it. If not, you may click the <property>Finish</property> button.</para>
- <figure>
- <title>Start a Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/jbossws_bottomup_4.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- <para>After the Web Service has been created, the following options may become available depending on the options selected:</para>
- <itemizedlist>
- <listitem>
- <para>the generated web services code</para>
- </listitem>
- <listitem>
- <para>If you selected to generate a WSDL file, you will get the file in your project's WebContent > wsdl folder.</para>
- <figure>
- <title>The generated WSDL file</title>
- <mediaobject>
- <imageobject>
- <imagedata scale="80" fileref="images/jbossws_bottomup_6.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- <listitem>
- <para>If you selected to update the default web.xml, you will test the web service in the browser. Open the Explorer, input the url for the web service according to web.xml plus <property>?wsdl.</property>, you will get the WSDL file from Explorer. </para>
- <figure>
- <title>The Updated web.xml file</title>
- <mediaobject>
- <imageobject>
- <imagedata scale="80" fileref="images/jbossws_bottomup_5.png"></imagedata>
- </imageobject>
- </mediaobject>
- </figure>
- </listitem>
- </itemizedlist>
- </section>
+
+ <section id="topdownwebservice">
+ <title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
+ <para>In this chapter we provide you with the necessary steps to create a Web Service from a
+ WSDL document using JBossWS runtime.</para>
+ <para>At first, please make sure that you have already created a dynamic Web project with
+ JBoss Web Service facet installed. </para>
+ <para>See how to make it <link linkend="createproject">here</link>> and <link
+ linkend="addfacet">here</link>.</para>
+
+ <para>To create a Web Service using JBossWS runtime select<emphasis>
+ <property>File > New > Other > Web Services > Web Service</property>
+ </emphasis> to run Web Service creation wizard. </para>
+ <para>Let's get through the wizard step-by-step:</para>
+ <figure id="figure_create_ws_topdown">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>First, please select <property>Top down Java bean Web Service</property> from the Web
+ Service type list, and select a WSDL document from workspace, click on the Server name
+ lilnk on the page will bring you to another dialog. Here you can specify the server to a
+ JBoss Server and Web Service runtime to JBossWS runtime:</para>
+ <figure id="figure_create_ws_topdown_setserver">
+ <title>Select Server and Web Service runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button to see the next wizard view opened:</para>
+
+ <figure id="figure_create_ws_topdown1">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click on the <emphasis>
+ <property>Next</property>
+ </emphasis> button to proceed:</para>
+ <figure id="figure_create_ws_topdown_codegen">
+ <title>New Web Service Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_creation2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>On this page, the default package name comes from the namespace of the WSDL document,
+ you also can change it to any valid package name you want. JAX-WS specification should be
+ set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime. You can
+ specify a catalog file and binding files if you have them. If you want the wizard to
+ generate empty implementation classes for the Web Service, check the <emphasis>
+ <property>Generate default Web Service implementation classes</property>
+ </emphasis> check box. If you want to update the default Web.xml file with the Web Service
+ servlets configured, check the <emphasis>
+ <property>Update the default Web.xml</property>
+ </emphasis> check box. Click on the <emphasis>
+ <property>Next</property>
+ </emphasis> or on the <emphasis>
+ <property>Finish</property>
+ </emphasis> button to generate code.</para>
+
+ <para>Once the Web Service code is generated, you can view the implementation class and add
+ business logic to each method.</para>
+ <figure id="figure_impl_code">
+ <title>The generated implementation Java code</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_Impl_code_view.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>View the Web.xml file:</para>
+ <figure id="figure_webxml">
+ <title>Web.xml</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_ws_webxml.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="bottomupws">
+ <title>Creating a Web service from a Java bean using JBossWS runtime</title>
+ <para>The Web Service wizard assists you in creating a new Web service, configuring it for
+ deployment, and then deploying it to the server.</para>
+ <para>To create a Web service from a bean using JBoss WS:</para>
+ <para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
+ <para>Create <link linkend="createproject">a Dynamic Web project</link>.</para>
+ <para>Add <link linkend="addfacet">JBossWS Facet</link> to Web project.</para>
+ <para>Create a Web Service from a java bean: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Switch to the Java EE perspective <emphasis>
+ <property>Window > Open Perspective > Java EE</property>
+ </emphasis>.</para>
+ </listitem>
+ <listitem>
+ <para>In the Project Explorer view, select the bean that you created or imported into
+ the source folder of your Web project.</para>
+ <figure>
+ <title>Create a new Bean Class</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="80" fileref="images/jbossws_bottomup.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>Click <emphasis>
+ <property>File > New > Other</property>
+ </emphasis>. Select Web Services in order to display various Web service wizards.
+ Select the Web Service wizard. Click on the <property>Next</property> button.</para>
+ <figure>
+ <title>New Web Service</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>On the first Web Service wizard page: select <property>Bottom up Java bean Web
+ service</property> as your Web service type, and select the Java bean from which
+ the service will be created:</para>
+ <figure>
+ <title>Set Web Service Common values</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Select the stages of Web service development that you want to complete using
+ the slider: </para>
+ <itemizedlist>
+ <listitem>
+ <para>Develop: this will develop the WSDL definition and implementation of
+ the Web service. This includes such tasks as creating modules that will
+ contain generated code, WSDL files, deployment descriptors, and Java
+ files when appropriate.</para>
+ </listitem>
+ <listitem>
+ <para>Assemble: this ensures the project that will host the Web service or
+ client gets associated to an EAR when required by the target application
+ server.</para>
+ </listitem>
+ <listitem>
+ <para>Deploy: this will create the deployment code for the service.</para>
+ </listitem>
+ <listitem>
+ <para>Install: this will install and configure the Web module and EARs on
+ the target server.</para>
+ </listitem>
+ <listitem>
+ <para>Start: this will start the server once the service has been installed
+ on it. The server-config.wsdd file will be generated.</para>
+ </listitem>
+ <listitem>
+ <para>Test: this will provide various options for testing the service, such
+ as using the Web Service Explorer or sample JSPs.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>Select your server: the default server is displayed. If you want to deploy
+ your service to a different server click the link to specify a different server.
+ </para>
+ </listitem>
+ <listitem>
+ <para>Select your runtime: ensure the JBoss WS runtime is selected.</para>
+ </listitem>
+ <listitem>
+ <para>Select the service project: the project selected in your workspace is
+ displayed. To select a different project click on the project link. If you are
+ deploying to JBoss Application Server you will also be asked to select the EAR
+ associated with the project. Ensure that the project selected as the Client Web
+ Project is different from the Service Web Project, or the service will be
+ overwritten by the client's generated artifacts.</para>
+ </listitem>
+ <listitem>
+ <para>If you want to create a client, select the type of proxy to be generated
+ and repeat the above steps for the client. The better way is to create a web
+ service client project separately.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property>Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>On the JBoss Web Service Code Generation Configuration page, set the following
+ values:</para>
+ <figure>
+ <title>Set Web Service values for Code Generation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
+ <listitem>
+ <para>Generate WSDL file: select it, you will get a generated WSDL file in your
+ project. But this wsdl's services' address location values are not a real
+ address. </para>
+ </listitem>
+ <listitem>
+ <para>After the Web service has been created, the following option can become
+ available depending on the options you selected: Update the default web.xm
+ file. If selected, you may test the web service by Explorer.</para>
+ </listitem>
+ </itemizedlist>
+ <para>Click on the <property>Next</property> button.</para>
+ </listitem>
+ <listitem>
+ <para>On this page, the project is deployed to the server. You can start the server and
+ test the web service. If you want to publish the web service to a UDDI registry, you
+ may click the <property>Next</property> button to publish it. If not, you may click
+ the <property>Finish</property> button.</para>
+ <figure>
+ <title>Start a Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jbossws_bottomup_4.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ <para>After the Web Service has been created, the following options may become available
+ depending on the options selected:</para>
+ <itemizedlist>
+ <listitem>
+ <para>the generated web services code</para>
+ </listitem>
+ <listitem>
+ <para>If you selected to generate a WSDL file, you will get the file in your project's
+ WebContent > wsdl folder.</para>
+ <figure>
+ <title>The generated WSDL file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="80" fileref="images/jbossws_bottomup_6.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ <listitem>
+ <para>If you selected to update the default web.xml, you will test the web service in
+ the browser. Open the Explorer, input the url for the web service according to
+ web.xml plus <property>?wsdl.</property>, you will get the WSDL file from Explorer. </para>
+ <figure>
+ <title>The Updated web.xml file</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata scale="80" fileref="images/jbossws_bottomup_5.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </listitem>
+ </itemizedlist>
+ </section>
+
</chapter>
17 years, 2 months
JBoss Tools SVN: r11321 - trunk/esb/docs/esb_ref_guide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:35:07 -0400 (Thu, 30 Oct 2008)
New Revision: 11321
Modified:
trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml 2008-10-30 09:34:42 UTC (rev 11320)
+++ trunk/esb/docs/esb_ref_guide/en/modules/esb_editor.xml 2008-10-30 09:35:07 UTC (rev 11321)
@@ -275,12 +275,10 @@
</imageobject>
</mediaobject>
</figure>
-
+ <para>The last chapter covers capabilities on how you can use ESB editor.</para>
+
+ <para>In summary, this reference supplies you with all necessary information on the
+ functionality that JBoss ESB Editor provides for work with JBoss ESB.</para>
</section>
-
- <para>The last chapter covers capabilities on how you can use ESB editor.</para>
-
- <para>In summary, this reference supplies you with all necessary information on the
- functionality that JBoss ESB Editor provides for work with JBoss ESB.</para>
</section>
</chapter>
17 years, 2 months
JBoss Tools SVN: r11320 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:34:42 -0400 (Thu, 30 Oct 2008)
New Revision: 11320
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-30 09:34:07 UTC (rev 11319)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-10-30 09:34:42 UTC (rev 11320)
@@ -52,8 +52,7 @@
is recommended to use the SysV service scripts for production servers.</para>
</listitem>
<listitem>
- <para>Download and install the appropriate -compat RPM from JPackage <ulink
- url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>.
+ <para>Download and install the appropriate -compat RPM from JPackage <ulink url="ftp://jpackage.hmdc.harvard.edu/JPackage/1.7/generic/RPMS.non-free/">here</ulink>.
Please ensure you choose a matching version of the -compat package to the JDK you've
installed.</para>
</listitem>
@@ -74,9 +73,9 @@
<para>If you have JDK already installed and added in your system path, you should add
<emphasis>$JAVA_HOME/bin</emphasis> before the old <emphasis>$PATH</emphasis> (not after it)
- so that the new version of JDK can be found first, i. e. <para>
+ so that the new version of JDK can be found first, i. e. <emphasis>
<emphasis>export PATH=$JAVA_HOME/bin:$PATH</emphasis>
- </para> This way, the machine will pick up the new JVM first. You only need to run
+ </emphasis> This way, the machine will pick up the new JVM first. You only need to run
"alternative" as a safe guard for the right JVM. </para>
</note>
@@ -200,8 +199,8 @@
<itemizedlist>
<listitem>
- <para>First of all you need the appropriate installation file for your platform from <ulink
- url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat
+ <para>First of all you need the appropriate installation file for your platform from
+ <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">Red Hat
website</ulink>.</para>
</listitem>
<listitem>
@@ -261,8 +260,7 @@
<itemizedlist>
<listitem>
- <para>Installation process includes <ulink
- url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
+ <para>Installation process includes <ulink url="http://www.jboss.com/products/platforms/application">JBoss Enterprise Application
Platform</ulink>. Select <emphasis>
<property>Yes</property>
</emphasis> to use it in JBoss Developer Studio.</para>
@@ -392,12 +390,10 @@
<tip>
<title>Tip:</title>
<para>We recommend you do not use Eclipse.org update site to go from Eclipse 3.3 to Eclipse 3.4.
- Instead we suggest that you download the full binary from <ulink
- url="http://www.eclipse.org/downloads/">here</ulink>.</para>
+ Instead we suggest that you download the full binary from <ulink url="http://www.eclipse.org/downloads/">here</ulink>.</para>
</tip>
- <para>If you can only use Eclipse 3.3 use <ulink
- url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
JBoss Tools 2.x will not have any of the new features.</para>
<note>
@@ -422,8 +418,7 @@
>http://download.jboss.org/jbosstools/updates/stable</ulink></para>
</listitem>
<listitem>
- <para> Development Updates: <ulink
- url="http://download.jboss.org/jbosstools/updates/development"
+ <para> Development Updates: <ulink url="http://download.jboss.org/jbosstools/updates/development"
>http://download.jboss.org/jbosstools/updates/development</ulink></para>
</listitem>
</itemizedlist>
@@ -440,8 +435,7 @@
</emphasis> directory and it will be readily available. It might be necessary to start Eclipse
with eclipse -clean to make sure it starts clean and rereads the new list of plugins.</para>
- <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink
- url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
+ <para>If you need to install any standalone plug-in from JBoss Tools visit a <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">JBoss Tools Wiki</ulink> page to read
about dependencies between standalone plug-ins.</para>
</section>
@@ -556,8 +550,7 @@
<section id="Support">
<?dbhtml filename="Support.html"?>
<title>Support</title>
- <para>If you have comments or questions, you can discuss them at our <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ <para>If you have comments or questions, you can discuss them at our <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
Developer Studio Forum</ulink>.</para>
<para>When writing to the forum for questions, please include the following information:</para>
<orderedlist>
@@ -572,8 +565,7 @@
</listitem>
</orderedlist>
- <para><property>JBDS</property> subscribers can get necessary support on our <ulink
- url="https://network.jboss.com/jbossnetwork/login.html">Support Portal</ulink>.</para>
+ <para><property>JBDS</property> subscribers can get necessary support on our <ulink url="https://network.jboss.com/jbossnetwork/login.html">Support Portal</ulink>.</para>
</section>
@@ -582,15 +574,12 @@
<title>Other relevant resources on the topic</title>
<para>JBDS on JBoss: <ulink url="http://labs.jboss.com/rhdevstudio/">JBoss Developer
Studio</ulink></para>
- <para>Forum: <ulink
- url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
+ <para>Forum: <ulink url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
Forum</ulink></para>
- <para>Subscription: <ulink
- url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">JBDS
+ <para>Subscription: <ulink url="https://www.redhat.com/apps/store/developers/jboss_developer_studio.html">JBDS
Subscription</ulink></para>
- <para>The latest documentation builds are available <ulink
- url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
</section>
</chapter>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-10-30 09:34:07 UTC (rev 11319)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-10-30 09:34:42 UTC (rev 11320)
@@ -121,9 +121,9 @@
</imageobject>
</mediaobject>
</figure>
- <para>Our <emphasis>
- <property>hello.jsp</property>
- </emphasis> page will now appear in <property>Project Explorer</property>.</para>
+ <para>Our <emphasis><property>hello.jsp</property></emphasis> page will now appear in
+ <property>Project Explorer</property>.
+ </para>
<section id="EditingJSPPage">
<?dbhtml filename="EditingJSPPage.html"?>
<title>Editing a JSP Page</title>
@@ -415,12 +415,13 @@
<imagedata fileref="images/jsp_application/jsp_application_17.png"/>
</imageobject>
</mediaobject>
- </figure>
+ </figure>
+ <para>Thus with the help of this chapter you've learnt how to organize a Dynamic
+ Web Project with a minimal configuration, add any staff to it (in our case it's
+ just one jsp page) and deploy and run it on the <property>JBoss Server</property>
+ shipped with <property>JBDS</property>.
+ </para>
</section>
- <para>Thus with the help of this chapter you've learnt how to organize a Dynamic
- Web Project with a minimal configuration, add any staff to it (in our case it's
- just one jsp page) and deploy and run it on the <property>JBoss Server</property>
- shipped with <property>JBDS</property>.</para>
- </section>
+ </section>
</chapter>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml 2008-10-30 09:34:07 UTC (rev 11319)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/manage.xml 2008-10-30 09:34:42 UTC (rev 11320)
@@ -350,8 +350,8 @@
</imageobject>
</mediaobject>
</figure>
-
- </section>
+ <para>Now, we are ready to create the first web application.</para>
+ </section>
+
</section>
- <para>Now, we are ready to create the first web application.</para>
</chapter>
17 years, 2 months
JBoss Tools SVN: r11319 - trunk/documentation/guides/Exadel-migration/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:34:07 -0400 (Thu, 30 Oct 2008)
New Revision: 11319
Modified:
trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml
trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml 2008-10-30 09:33:28 UTC (rev 11318)
+++ trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml 2008-10-30 09:34:07 UTC (rev 11319)
@@ -38,7 +38,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>In the first screen of the wizard, select the <emphasis><property>Change...</property></emphasis> button next to the <emphasis><property>web.xml Location</property></emphasis> field. Browse to the location of the web.xml file for the application you
want to import as a <property>JSF project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
You can edit this project name, if you wish.</para></listitem>
@@ -53,7 +53,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues" id="import_jsf_screen">
+ <itemizedlist id="import_jsf_screen">
<listitem><para>In the <emphasis><property>Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property>Finish</property></emphasis> button.</para></listitem>
</itemizedlist>
<para>On this step JBoss Developer Studio will try to determine your project
@@ -76,7 +76,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
</itemizedlist>
@@ -114,7 +114,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>In the Project Location screen of the wizard, select the <emphasis><property>Change... </property></emphasis>button next to the <emphasis><property>web.xml Location</property></emphasis> field. Browse the location of the web.xml file for the application you
want to import as a <property>Struts project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
You can edit this project name, if you wish.</para></listitem>
@@ -129,7 +129,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>In the next screen, JBoss Developer Studio will try to determine your project structure. The upper pane shows the modules in this project.
The lower pane allows you to edit the details of the select module. If the project structure is non-standard, some values might be left blank.
You can edit any values by hand or by using the <emphasis><property>Change...</property></emphasis> button.</para></listitem>
@@ -144,7 +144,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>In the <emphasis><property>Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property>Finish</property></emphasis> button.</para>
</listitem>
</itemizedlist>
@@ -166,7 +166,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
</itemizedlist>
Modified: trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml
===================================================================
--- trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml 2008-10-30 09:33:28 UTC (rev 11318)
+++ trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml 2008-10-30 09:34:07 UTC (rev 11319)
@@ -45,7 +45,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>In the wizard screen, select the <emphasis><property>Change...</property></emphasis> button next to
the <emphasis><property>*.war Location</property></emphasis> field. Browse to the location of the *.war file for
@@ -84,7 +84,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Click on the <emphasis><property>Finish</property></emphasis> button.</para>
</listitem>
@@ -121,7 +121,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Follow the same steps as with the JSF Project From <property>*.war</property> import
wizard.</para>
@@ -138,7 +138,7 @@
</mediaobject>
</figure>
- <itemizedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Click on the <emphasis><property>Finish</property></emphasis> button.</para>
</listitem>
17 years, 2 months
JBoss Tools SVN: r11318 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-30 05:33:28 -0400 (Thu, 30 Oct 2008)
New Revision: 11318
Modified:
trunk/as/docs/reference/en/modules/modules.xml
trunk/as/docs/reference/en/modules/tptp_support.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - correcting validation errors;
Modified: trunk/as/docs/reference/en/modules/modules.xml
===================================================================
--- trunk/as/docs/reference/en/modules/modules.xml 2008-10-30 09:02:02 UTC (rev 11317)
+++ trunk/as/docs/reference/en/modules/modules.xml 2008-10-30 09:33:28 UTC (rev 11318)
@@ -176,9 +176,8 @@
<property>.class</property>
</emphasis> file, is to enable the builder for that project. This is done by either
changing the global preferences for the <property>Archives View</property>, or by
- enabling project-specific preferences and ensuring the builder is on.</para>
- </section>
-
+ enabling project-specific preferences and ensuring the builder is on.</para>
<para>The last chapter covers a variety of methods on how you can deploy needed modules onto a
- server.</para>
+ server.</para>
+ </section>
</chapter>
Modified: trunk/as/docs/reference/en/modules/tptp_support.xml
===================================================================
--- trunk/as/docs/reference/en/modules/tptp_support.xml 2008-10-30 09:02:02 UTC (rev 11317)
+++ trunk/as/docs/reference/en/modules/tptp_support.xml 2008-10-30 09:33:28 UTC (rev 11318)
@@ -52,10 +52,9 @@
<para>All additional information on TPTP(Test and Performance Tools Platform) you can find
in <ulink
url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic..."
- >eclipse documentation</ulink>.</para>
- </section>
-
- <para>In summary, this reference should help you to start with <ulink
+ >eclipse documentation</ulink>.</para>
+ <para>In summary, this reference should help you to start with <ulink
url="http://www.jboss.org/jbossas">JBoss AS</ulink> and get to know with functionality
- for work with it.</para>
+ for work with it.</para>
+ </section>
</chapter>
17 years, 2 months
JBoss Tools SVN: r11317 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-10-30 05:02:02 -0400 (Thu, 30 Oct 2008)
New Revision: 11317
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizardPage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizardPage.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3051
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizardPage.java 2008-10-30 06:58:14 UTC (rev 11316)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateDdlWizardPage.java 2008-10-30 09:02:02 UTC (rev 11317)
@@ -42,7 +42,6 @@
private LocationValidator validator = new LocationValidator((Workspace) ResourcesPlugin.getWorkspace());
-
protected GenerateDdlWizardPage(JpaProject jpaProject) {
super(jpaProject);
}
@@ -68,6 +67,7 @@
}
}
});
+ outputdir.setText(getDefaultOutput());
outputdir.setDialogFieldListener(fieldlistener);
outputdir.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_output_dir);
outputdir.setButtonLabel(HibernateConsoleMessages.CodeGenerationSettingsTab_browse);
@@ -86,6 +86,7 @@
}
protected void dialogChanged() {
+ setErrorMessage(null);
String msg = PathHelper.checkDirectory(getOutputDir(), HibernateConsoleMessages.CodeGenerationSettingsTab_output_directory, false);
if (msg!=null) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizardPage.java 2008-10-30 06:58:14 UTC (rev 11316)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateEntitiesWizardPage.java 2008-10-30 09:02:02 UTC (rev 11317)
@@ -12,7 +12,14 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jdt.core.JavaConventions;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.PackageFragmentRoot;
+import org.eclipse.jdt.internal.corext.util.JavaConventionsUtil;
+import org.eclipse.jdt.internal.corext.util.Messages;
+import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IStringButtonAdapter;
@@ -26,6 +33,7 @@
import org.hibernate.eclipse.console.utils.DialogSelectionHelper;
import org.hibernate.eclipse.launch.PathHelper;
import org.hibernate.util.StringHelper;
+import org.jboss.tools.hibernate.jpt.ui.HibernateJptUIPlugin;
/**
* @author Dmitry Geraskov
@@ -65,10 +73,11 @@
}
}
});
+ outputdir.setText(getDefaultOutput());
outputdir.setDialogFieldListener(fieldlistener);
outputdir.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_output_dir);
- outputdir.setButtonLabel(HibernateConsoleMessages.CodeGenerationSettingsTab_browse);
-
+ outputdir.setButtonLabel(HibernateConsoleMessages.CodeGenerationSettingsTab_browse);
+
Control[] controls = outputdir.doFillIntoGrid(container, numColumns);
// Hack to tell the text field to stretch!
( (GridData)controls[1].getLayoutData() ).grabExcessHorizontalSpace = true;
@@ -77,31 +86,46 @@
packageName.setDialogFieldListener(fieldlistener);
packageName.setLabelText(HibernateConsoleMessages.CodeGenerationSettingsTab_package);
packageName.doFillIntoGrid(container, numColumns);
-
+
setPageComplete( false );
}
protected void dialogChanged() {
+ setMessage("");
+ /*validate package name*/
+ String packName= getPackageName();
+ if (packName.length() > 0) {
+ IStatus val= validatePackageName(packName, getJpaProject());
+ if (val.getSeverity() == IStatus.ERROR) {
+ setErrorMessage(Messages.format(NewWizardMessages.NewTypeWizardPage_error_InvalidPackageName, val.getMessage()));
+ setPageComplete( false );
+ return;
+ } else if (val.getSeverity() == IStatus.WARNING) {
+ setWarningMessage(Messages.format(NewWizardMessages.NewTypeWizardPage_warning_DiscouragedPackageName, val.getMessage()));
+ }
+ } else {
+ setWarningMessage(NewWizardMessages.NewTypeWizardPage_warning_DefaultPackageDiscouraged);
+ }
+
String msg = PathHelper.checkDirectory(getOutputDir(), HibernateConsoleMessages.CodeGenerationSettingsTab_output_directory, false);
-
+
if (msg!=null) {
setErrorMessage( msg );
setPageComplete( false );
return;
}
-
- if (StringHelper.isNotEmpty(getPackageName())){
- IStatus status= JavaConventions.validatePackageName(getPackageName() );
- if (status.getSeverity() == IStatus.ERROR || status.getSeverity() == IStatus.WARNING) {
- setErrorMessage( status.getMessage() );
- return;
- }
- }
super.dialogChanged();
}
+ private static IStatus validatePackageName(String text, JpaProject project) {
+ if (project == null || !project.getJavaProject().exists()) {
+ return JavaConventions.validatePackageName(text, JavaCore.VERSION_1_3, JavaCore.VERSION_1_3);
+ }
+ return JavaConventionsUtil.validatePackageName(text, project.getJavaProject());
+ }
+
public String getPackageName(){
return packageName.getText();
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-10-30 06:58:14 UTC (rev 11316)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.ui/src/org/jboss/tools/hibernate/jpt/ui/wizard/GenerateInitWizardPage.java 2008-10-30 09:02:02 UTC (rev 11317)
@@ -24,6 +24,10 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.PackageFragmentRoot;
+import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.ComboDialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.jdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
@@ -201,8 +205,8 @@
setErrorMessage("Please, select connection profile");
return;
}
+
setPageComplete(true);
- setErrorMessage(null);
}
private String[] dtpConnectionProfileNames() {
@@ -305,4 +309,31 @@
public boolean isTemporaryConfiguration(){
return !selectMethod.getSelection();
}
+
+ public JpaProject getJpaProject(){
+ return jpaProject;
+ }
+
+ public void setWarningMessage(String warning){
+ setMessage(warning, WARNING);
+ }
+
+ protected String getDefaultOutput(){
+ try{
+ if (getJpaProject() == null) return "";
+ if (getJpaProject().getJavaProject() == null) return "";
+ if (!getJpaProject().getJavaProject().exists()) return "";
+ IPackageFragmentRoot[] roots = getJpaProject().getJavaProject().getPackageFragmentRoots();
+ for (int i = 0; i < roots.length; i++) {
+ IPackageFragmentRoot root = roots[i];
+ if (root.getClass() == PackageFragmentRoot.class) {
+ if (root.exists()) return root.getResource().getFullPath().toOSString();
+ }
+ }
+ return getJpaProject().getJavaProject().getResource().getFullPath().toOSString();
+ } catch(JavaModelException e){
+ HibernateJptUIPlugin.logException(e);
+ return "";
+ }
+ }
}
17 years, 2 months
JBoss Tools SVN: r11316 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: javabean/ui and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-30 02:58:14 -0400 (Thu, 30 Oct 2008)
New Revision: 11316
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
Log:
JBIDE-2992
Add type/connections problem check function to Xml2Java analyzer
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-30 02:21:00 UTC (rev 11315)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-10-30 06:58:14 UTC (rev 11316)
@@ -786,10 +786,11 @@
} else {
rootModel = new JavaBeanModel(null, rootClassName);
}
+ rootModel.setBeanClassString(SmooksModelUtils.getParmaText("beanClass", current));
setSelectorIsUsed(rootClassName);
buildChildrenOfTargetInputModel(listType, rootModel, false,
rootIsError, current, loader);
- List list = new ArrayList();
+ List<JavaBeanModel> list = new ArrayList<JavaBeanModel>();
list.add(rootModel);
return list;
}
@@ -834,6 +835,7 @@
selector = selector.substring(2, selector.length() - 1);
ResourceConfigType resourceConfig = findResourceConfigTypeWithSelector(
selector, listType);
+ model.setBeanClassString(SmooksModelUtils.getParmaText("beanClass", resourceConfig));
if (resourceConfig != null) {
this.buildChildrenOfTargetInputModel(listType, model, false,
false, resourceConfig, classLoader);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java 2008-10-30 02:21:00 UTC (rev 11315)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/javabean/ui/JavaBeanPropertiesSection.java 2008-10-30 06:58:14 UTC (rev 11316)
@@ -11,6 +11,7 @@
package org.jboss.tools.smooks.javabean.ui;
import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -89,19 +90,21 @@
}
private JavaBeanModel getJavaBeanModel() {
- IStructuredSelection selection = (IStructuredSelection) this
- .getSelection();
- Object obj = selection.getFirstElement();
- if (obj == null)
- return null;
- if (obj instanceof EditPart) {
- Object model = ((EditPart) obj).getModel();
- if (model instanceof LineConnectionModel) {
- AbstractStructuredDataModel target = (AbstractStructuredDataModel) ((LineConnectionModel) model)
- .getTarget();
- Object referenceObj = target.getReferenceEntityModel();
- if (referenceObj instanceof JavaBeanModel) {
- return (JavaBeanModel) referenceObj;
+ ISelection s = (ISelection) this.getSelection();
+ if (s instanceof IStructuredSelection) {
+ IStructuredSelection selection = (IStructuredSelection)s;
+ Object obj = selection.getFirstElement();
+ if (obj == null)
+ return null;
+ if (obj instanceof EditPart) {
+ Object model = ((EditPart) obj).getModel();
+ if (model instanceof LineConnectionModel) {
+ AbstractStructuredDataModel target = (AbstractStructuredDataModel) ((LineConnectionModel) model)
+ .getTarget();
+ Object referenceObj = target.getReferenceEntityModel();
+ if (referenceObj instanceof JavaBeanModel) {
+ return (JavaBeanModel) referenceObj;
+ }
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-30 02:21:00 UTC (rev 11315)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-30 06:58:14 UTC (rev 11316)
@@ -135,6 +135,7 @@
import org.jboss.tools.smooks.ui.gef.tools.TargetTreeDropTargetListener;
import org.jboss.tools.smooks.ui.gef.util.GraphicsConstants;
import org.jboss.tools.smooks.ui.modelparser.SmooksConfigurationFileGenerateContext;
+import org.jboss.tools.smooks.ui.wizards.SmooksConfigFileNewWizard;
import org.jboss.tools.smooks.ui.wizards.TransformDataSelectionWizard;
import org.jboss.tools.smooks.utils.SmooksGraphConstants;
import org.jboss.tools.smooks.utils.UIUtils;
@@ -271,8 +272,8 @@
SashForm sashForm = new SashForm(mainComposite, SWT.VERTICAL);
GridData sashFormLd = new GridData(GridData.FILL_BOTH);
sashForm.setLayoutData(sashFormLd);
-// sashForm.
-// sashForm.setSashWidth(1);
+ // sashForm.
+ // sashForm.setSashWidth(1);
designTimeAnalyzeResultRegion = toolkit.createComposite(sashForm);
GridLayout ngl = new GridLayout();
@@ -282,7 +283,7 @@
SashForm mappingMainComposite = new SashForm(sashForm, SWT.NONE);
// under the eclipse3.3
-// mappingMainComposite.setSashWidth(1);
+ // mappingMainComposite.setSashWidth(1);
GridData sgd = new GridData(GridData.FILL_BOTH);
section.setLayoutData(sgd);
{
@@ -649,9 +650,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ui.forms.editor.FormPage#doSave(org.eclipse.core.runtime.
- * IProgressMonitor)
+ * @see org.eclipse.ui.forms.editor.FormPage#doSave(org.eclipse.core.runtime.
+ * IProgressMonitor)
*/
@Override
public void doSave(IProgressMonitor monitor) {
@@ -714,13 +714,19 @@
context.setDataMappingRootModel(this.rootModel);
context.setSmooksConfigFile(((IFileEditorInput) getEditorInput())
.getFile());
-
- context.setSourceViewerLabelProvider((LabelProvider)sourceViewer.getLabelProvider());
- context.setSourceViewerContentProvider((ITreeContentProvider)sourceViewer.getContentProvider());
-
- context.setTargetViewerLabelProvider((LabelProvider)targetViewer.getLabelProvider());
- context.setTargetViewerContentProvider((ITreeContentProvider)targetViewer.getContentProvider());
-
+
+ context.setSourceViewerLabelProvider((LabelProvider) sourceViewer
+ .getLabelProvider());
+ context
+ .setSourceViewerContentProvider((ITreeContentProvider) sourceViewer
+ .getContentProvider());
+
+ context.setTargetViewerLabelProvider((LabelProvider) targetViewer
+ .getLabelProvider());
+ context
+ .setTargetViewerContentProvider((ITreeContentProvider) targetViewer
+ .getContentProvider());
+
context.setShell(getSite().getShell());
}
@@ -967,9 +973,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite,
- * org.eclipse.ui.IEditorInput)
+ * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite,
+ * org.eclipse.ui.IEditorInput)
*/
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
@@ -1001,7 +1006,8 @@
throwable = e;
}
if (throwable != null) {
- ((SmooksFormEditor) getEditor()).setOnlyShowTextEditor(true,throwable);
+ ((SmooksFormEditor) getEditor()).setOnlyShowTextEditor(true,
+ throwable);
}
}
@@ -1053,12 +1059,24 @@
try {
if (viewer == this.sourceViewer) {
this.createSourceGraphModels();
+ this.getSmooksConfigurationFileGenerateContext()
+ .getProperties()
+ .setProperty(
+ SmooksConfigFileNewWizard.PRO_SOURCE_DATA_PATH,
+ cw.getStructuredDataSourcePath());
sourceDataTypeID = typeID;
}
if (viewer == this.targetViewer) {
this.createTargetGraphModels();
targetDataTypeID = typeID;
+ this.getSmooksConfigurationFileGenerateContext()
+ .getProperties()
+ .setProperty(
+ SmooksConfigFileNewWizard.PRO_TARGET_DATA_PATH,
+ cw.getStructuredDataSourcePath());
}
+ commandStackChanged = true;
+ firePropertyChange(PROP_DIRTY);
} catch (Exception e) {
MessageDialog.openError(getSite().getShell(), "Error",
"a error occurs during filling Data into the viewer:\n"
@@ -1103,9 +1121,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ui.forms.events.IHyperlinkListener#linkActivated(org.
- * eclipse.ui.forms.events.HyperlinkEvent)
+ * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkActivated(org.
+ * eclipse.ui.forms.events.HyperlinkEvent)
*/
public void linkActivated(HyperlinkEvent e) {
showCreationWizard(viewer);
@@ -1114,9 +1131,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ui.forms.events.IHyperlinkListener#linkEntered(org.eclipse
- * .ui.forms.events.HyperlinkEvent)
+ * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkEntered(org.eclipse
+ * .ui.forms.events.HyperlinkEvent)
*/
public void linkEntered(HyperlinkEvent e) {
@@ -1125,9 +1141,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ui.forms.events.IHyperlinkListener#linkExited(org.eclipse
- * .ui.forms.events.HyperlinkEvent)
+ * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkExited(org.eclipse
+ * .ui.forms.events.HyperlinkEvent)
*/
public void linkExited(HyperlinkEvent e) {
@@ -1159,9 +1174,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets
- * .Event)
+ * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets
+ * .Event)
*/
public void handleEvent(Event event) {
TreeItem item = (TreeItem) event.item;
@@ -1194,9 +1208,8 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt
- * .events.PaintEvent)
+ * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt
+ * .events.PaintEvent)
*/
public void paintControl(PaintEvent e) {
Tree tree = (Tree) e.getSource();
@@ -1289,7 +1302,8 @@
SWT.NONE);
Menu menu = new Menu(getSite().getShell(), SWT.POP_UP);
List<ResolveCommand> list = result.getResolveProblem();
- for (Iterator<ResolveCommand> iterator2 = list.iterator(); iterator2.hasNext();) {
+ for (Iterator<ResolveCommand> iterator2 = list.iterator(); iterator2
+ .hasNext();) {
final ResolveCommand resolveCommand = (ResolveCommand) iterator2
.next();
MenuItem item = new MenuItem(menu, SWT.NONE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-30 02:21:00 UTC (rev 11315)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml/AbstractFileSelectionWizardPage.java 2008-10-30 06:58:14 UTC (rev 11316)
@@ -10,9 +10,6 @@
import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizard;
-import org.eclipse.jface.wizard.IWizardNode;
-import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -28,7 +25,6 @@
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.INewWizard;
/**
*
@@ -44,6 +40,7 @@
protected Button fileSystemBrowseButton;
protected boolean reasourceLoaded = false;
private Button workspaceBrowseButton;
+ private String filePath = null;
public AbstractFileSelectionWizardPage(String pageName) {
super(pageName);
@@ -52,7 +49,7 @@
public Object getReturnValue() {
try {
- returnObject = this.loadedTheObject(fileText.getText());
+ returnObject = this.loadedTheObject(filePath);
} catch (Exception e) {
e.printStackTrace();
}
@@ -60,7 +57,7 @@
}
public String getFilePath(){
- return fileText.getText();
+ return filePath;
}
/*
* (non-Javadoc)
@@ -109,6 +106,7 @@
protected void hookFileTextModifyListener() {
final ModifyListener modifyListener = new ModifyListener() {
public void modifyText(ModifyEvent e) {
+ filePath = fileText.getText();
changeWizardPageStatus();
}
};
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-30 02:21:00 UTC (rev 11315)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/xml2java/analyzer/XML2JavaAnalyzer.java 2008-10-30 06:58:14 UTC (rev 11316)
@@ -17,6 +17,8 @@
import javax.swing.text.html.HTMLDocument.HTMLReader.TagAction;
import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
import org.jboss.tools.smooks.analyzer.AbstractAnalyzer;
import org.jboss.tools.smooks.analyzer.DesignTimeAnalyzeResult;
import org.jboss.tools.smooks.analyzer.MappingModel;
@@ -395,9 +397,89 @@
}
return null;
}
+
+ private void checkRootNodeConnected(
+ SmooksConfigurationFileGenerateContext context) {
+ GraphRootModel root = context.getGraphicalRootModel();
+ List sourceList = root.loadSourceModelList();
+ List targetList = root.loadTargetModelList();
+ AbstractXMLObject rootSource = null;
+ JavaBeanModel rootTarget = null;
+ boolean needCheck = false;
+
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourcegm = (AbstractStructuredDataModel) iterator
+ .next();
+ if (sourcegm instanceof IConnectableModel) {
+ if (!((IConnectableModel) sourcegm).getModelSourceConnections()
+ .isEmpty()
+ || !((IConnectableModel) sourcegm)
+ .getModelTargetConnections().isEmpty()) {
+ needCheck = true;
+ break;
+ }
+ }
+ }
+
+ if (needCheck) {
+ for (Iterator iterator = sourceList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel sourceGraphModel = (AbstractStructuredDataModel) iterator
+ .next();
+ AbstractXMLObject source = (AbstractXMLObject) sourceGraphModel
+ .getReferenceEntityModel();
+ if (source.getParent().getClass() == DocumentObject.class ) {
+ rootSource = source;
+ break;
+ }
+ }
+
+ for (Iterator iterator = targetList.iterator(); iterator.hasNext();) {
+ AbstractStructuredDataModel targetGraphModel = (AbstractStructuredDataModel) iterator
+ .next();
+ JavaBeanModel target = (JavaBeanModel) targetGraphModel
+ .getReferenceEntityModel();
+ if (target.isRoot()) {
+ rootTarget = target;
+ break;
+ }
+ }
+ if (rootSource != null && rootTarget != null) {
+ AbstractStructuredDataModel rootSourceGraphModel = UIUtils
+ .findGraphModel(root, rootSource);
+ AbstractStructuredDataModel rootTargetGraphModel = UIUtils
+ .findGraphModel(root, rootTarget);
+ if (rootSourceGraphModel instanceof IConnectableModel
+ && rootTargetGraphModel instanceof IConnectableModel) {
+ if (((IConnectableModel) rootSourceGraphModel)
+ .isSourceConnectWith((IConnectableModel) rootTargetGraphModel)) {
+ // do nothing
+ } else {
+ // ask user if they want to connect the root model
+ Shell displayParent = context.getShell();
+ boolean connectAuto = MessageDialog
+ .openQuestion(
+ displayParent,
+ "Connection Question",
+ "The root models don't be connected , it will make some errors with the generation config file contents.\nDo you wan to connect them?");
+ if (connectAuto) {
+ // connect root model
+ LineConnectionModel connectionModel = new LineConnectionModel();
+ connectionModel
+ .setSource((IConnectableModel) rootSourceGraphModel);
+ connectionModel
+ .setTarget((IConnectableModel) rootTargetGraphModel);
+ connectionModel.connect();
+ }
+ }
+ }
+ }
+ }
+ }
+
public DesignTimeAnalyzeResult[] analyzeGraphModel(
SmooksConfigurationFileGenerateContext context) {
+ checkRootNodeConnected(context);
List<DesignTimeAnalyzeResult> typeCheckResults = UIUtils
.checkTargetJavaModelType(context);
List<DesignTimeAnalyzeResult> connectionCheckResults = UIUtils
17 years, 2 months
JBoss Tools SVN: r11315 - in workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/actions and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-29 22:21:00 -0400 (Wed, 29 Oct 2008)
New Revision: 11315
Added:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/AbstractServerActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ChangeTimeStampActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DebugServerActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/RunServerActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/SelectServerActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManager.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManagerListener.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/StopServerActionDelegate.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/messages.properties
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogActionProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogLabelProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathChangeValueAction.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerDecorator.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerLabelProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServersView.java
Removed:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/jmx/
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ExtensionManager.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ToolsServerUICore.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/action/
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ExtensionTableViewer.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/JBossServerView.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerExtensionFrame.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerFrame.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerTableViewer.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/preferencepages/
Modified:
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java
workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
incremental update of moving stuff around, and renaming packages. This was necessary because the last release had package names in the org.eclipse namespace, which was clearly wrong. Also, deleted JBoss Servers View to replace it with the new beta view and made sure the extensions worked with it.
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/AbstractServerActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/AbstractServerActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/AbstractServerActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,139 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+
+public abstract class AbstractServerActionDelegate implements IWorkbenchWindowActionDelegate, ServerManagerListener {
+
+ static Map<String, AbstractServerActionDelegate> delegates = new HashMap<String,AbstractServerActionDelegate>();
+
+ protected IWorkbenchWindow window;
+ protected IAction action;
+ protected boolean isInitialised = false;
+
+ public AbstractServerActionDelegate() {
+ delegates.put(getClass().getName(), this);
+ }
+
+ public static void updateAll() {
+ AbstractServerActionDelegate[] ds = delegates.values().toArray(new AbstractServerActionDelegate[0]);
+ for (int i = 0; i < ds.length; i++) {
+ try {
+ ds[i].update();
+ } catch (Exception e) {
+ }
+ }
+ }
+
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ initModel();
+ }
+ });
+ }
+
+ private void initModel() {
+ ServerManager.getInstance().addListener(this);
+ update();
+ isInitialised = true;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(this.action == action) return;
+ this.action = action;
+ serverManagerChanged();
+ }
+
+ public void run(IAction action) {
+ if(!isInitialised) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if(isActionEnabled()) {
+ _run();
+ }
+ }
+ });
+ } else {
+ _run();
+ }
+ }
+
+ private void _run() {
+ try {
+ doRun();
+ } catch (Exception e) {
+ }
+ }
+
+ public void dispose() {}
+ protected void doRun() {}
+
+ protected boolean isActionEnabled() {
+ return true;
+ }
+
+ protected void update() {
+ if(action != null) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ action.setEnabled(isActionEnabled());
+ setToolTip();
+ }
+ });
+ }
+ }
+
+ public void serverManagerChanged() {
+ update();
+ }
+
+ protected void setToolTip() {
+ if(action != null) {
+ String tooltip = computeToolTip();
+ if(tooltip != null) action.setToolTipText(tooltip);
+ }
+ }
+
+ protected String computeToolTip() {
+ return null;
+ }
+
+
+ // a stub that can be used by subclasses
+ protected static ISelectionProvider getSelectionProvider() {
+ return new ISelectionProvider() {
+ public void addSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ }
+ public ISelection getSelection() {
+ return null;
+ }
+ public void removeSelectionChangedListener(
+ ISelectionChangedListener listener) {
+ }
+ public void setSelection(ISelection selection) {
+ }
+ };
+ }
+
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ChangeTimeStampActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ChangeTimeStampActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ChangeTimeStampActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+
+public class ChangeTimeStampActionDelegate implements IWorkbenchWindowActionDelegate {
+
+ protected IWorkbenchWindow window;
+ String tooltip = null;
+ IProject project = null;
+ public void init(IWorkbenchWindow window) {
+ this.window = window;
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {
+ if(project == null && action.isEnabled()) action.setEnabled(false);
+ if(tooltip != null && (selection instanceof IStructuredSelection)) {
+ Object o = ((IStructuredSelection)selection).getFirstElement();
+ IProject p = getProject(o);
+ if(p != null) {
+ project = p;
+ action.setEnabled(computeEnabled());
+ action.setToolTipText(NLS.bind(ServerActionMessages.CHANGE_TIME_STAMP,project.getName()));
+ return;
+ }
+ }
+ tooltip = ServerActionMessages.CHANGE_TIME_STAMP_DEFAULT;
+ action.setToolTipText(tooltip);
+ }
+
+ IProject getProject(Object selection) {
+ if(selection instanceof IResource) {
+ return ((IResource)selection).getProject();
+ } else if(selection instanceof IAdaptable) {
+ Object r = ((IAdaptable)selection).getAdapter(IResource.class);
+ return r instanceof IResource ? ((IResource)r).getProject() : null;
+ }
+ return null;
+ }
+
+ protected boolean computeEnabled() {
+ if(project == null || !project.isAccessible()) return false;
+ boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
+ boolean isEar = J2EEProjectUtilities.isEARProject(project);
+ boolean isEJB = J2EEProjectUtilities.isEJBProject(project);
+ return isEar || isEJB || isWar;
+ }
+
+ public void run(IAction action) {
+ try {
+ changeTimeStamp(project);
+ } catch (Exception e) {
+
+ }
+ }
+
+ public void dispose() {
+ window = null;
+ }
+
+ public static void changeTimeStamp(IProject project) throws CoreException {
+ if(project == null || !project.isAccessible()) return;
+ List<IFile> fs = getFilesToTouch(project);
+ for (int i = 0; i < fs.size(); i++) {
+ IFile f = (IFile)fs.get(i);
+ f.setLocalTimeStamp(System.currentTimeMillis());
+ f.touch(new NullProgressMonitor()); // done so deployers/listeners can detect the actual change.
+ }
+ }
+
+ private static List<IFile> getFilesToTouch(IProject project) {
+ List<IFile> fs = new ArrayList<IFile>();
+ if(project == null || !project.isAccessible()) return fs;
+ boolean isWar = J2EEProjectUtilities.isDynamicWebProject(project);
+ boolean isEar = J2EEProjectUtilities.isEARProject(project);
+
+ boolean isReferencedByEar = false;
+ if(!isEar) {
+ IProject[] ps = J2EEProjectUtilities.getReferencingEARProjects(project);
+ for (int i = 0; i < ps.length; i++) {
+ fs.addAll(getFilesToTouch(ps[i]));
+ isReferencedByEar = true;
+ }
+ }
+ if(isEar) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IPath path = component.getRootFolder().getProjectRelativePath();
+ IFile f = project.getFile(path.append("META-INF").append("application.xml"));
+ if(f != null && f.exists()) {
+ fs.add(f);
+ }
+ }
+ if(isWar && !isReferencedByEar) {
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IPath path = component.getRootFolder().getProjectRelativePath();
+ IFile f = project.getFile(path.append("WEB-INF").append("web.xml"));
+ if(f != null && f.exists()) {
+ fs.add(f);
+ }
+ }
+ return fs;
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DebugServerActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DebugServerActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/DebugServerActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.wst.server.core.IServer;
+
+public class DebugServerActionDelegate extends RunServerActionDelegate {
+
+ protected String getLaunchMode() {
+ return ILaunchManager.DEBUG_MODE;
+ }
+
+
+ protected String computeToolTip() {
+ IServer selected = ServerManager.getInstance().getSelectedServer();
+ String name = selected == null ? "" : selected.getName(); //$NON-NLS-1$
+ if( selected != null && selected.getServerState() == IServer.STATE_STARTED)
+ return NLS.bind(ServerActionMessages.RESTART_IN_DEBUG_MODE, name);
+ return NLS.bind(ServerActionMessages.START_IN_DEBUG_MODE, name); //$NON-NLS-2$
+ }
+
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/RunServerActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/RunServerActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/RunServerActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.view.servers.StartAction;
+
+public class RunServerActionDelegate extends AbstractServerActionDelegate {
+
+ private StartAction delegate;
+ public void init(IWorkbenchWindow window) {
+ super.init(window);
+ update();
+ }
+
+ protected void doRun() {
+ IServer server = ServerManager.getInstance().getSelectedServer();
+ if(server == null)
+ return;
+ delegate = new StartAction(window.getShell(), getSelectionProvider(), getLaunchMode());
+ if( delegate.accept(server))
+ delegate.perform(server);
+ updateAll();
+ }
+
+ protected String getLaunchMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+
+ protected boolean isActionEnabled() {
+ IServer selected = ServerManager.getInstance().getSelectedServer();
+ return (selected != null
+ && selected.getServerState() != IServer.STATE_STARTING);
+ }
+
+ protected String computeToolTip() {
+ IServer selected = ServerManager.getInstance().getSelectedServer();
+ String name = selected == null ? "" : selected.getName(); //$NON-NLS-1$
+ if( selected != null && selected.getServerState() == IServer.STATE_STARTED)
+ return NLS.bind(ServerActionMessages.RESTART_IN_RUN_MODE, name);
+ return NLS.bind(ServerActionMessages.START_IN_RUN_MODE, name);
+ }
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/SelectServerActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/SelectServerActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/SelectServerActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,146 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IWorkbenchWindowPulldownDelegate;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.TaskModel;
+import org.eclipse.wst.server.ui.internal.ImageResource;
+import org.eclipse.wst.server.ui.internal.wizard.NewServerWizard;
+import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
+
+
+public class SelectServerActionDelegate extends AbstractServerActionDelegate
+ implements IWorkbenchWindowPulldownDelegate {
+
+ private ArrayList images = new ArrayList();
+
+ protected void safeSelectionChanged(IAction action, ISelection selection) {
+ this.action = action;
+ update();
+ }
+
+ protected void update() {
+ if (action == null) return;
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ update0();
+ }
+ });
+ }
+
+ private void update0() {
+ if(action == null) return;
+ IServer server = ServerManager.getInstance().getSelectedServer();
+ if( server != null ) {
+ ImageDescriptor id = ImageResource.getImageDescriptor(server.getServerType().getId());
+ action.setImageDescriptor(id);
+ }
+ action.setText(null);
+ action.setToolTipText(ServerActionMessages.SELECT_A_SERVER);
+ }
+
+ protected void doRun() {
+ getMenu(window.getShell()).setVisible(true);
+ }
+
+ public void dispose() {
+ action = null;
+ }
+
+ public Menu getMenu(Control parent) {
+ cleanImages();
+
+ Menu menu = new Menu(parent);
+ IServer[] servers = ServerManager.getInstance().getServers();
+ for (int i = 0; i < servers.length; i++) {
+ createServerItem(menu, servers[i]);
+ }
+ new MenuItem(menu, SWT.SEPARATOR);
+ createNewServerItem(menu);
+ return menu;
+ }
+
+ // prevent memory leaks
+ protected void cleanImages() {
+ Iterator<Image> i = images.iterator();
+ while(i.hasNext())
+ ((Image)i.next()).dispose();
+ images.clear();
+ }
+
+ private void createServerItem(Menu menu, final IServer server) {
+ MenuItem item = new MenuItem(menu, SWT.RADIO);
+ if(server == ServerManager.getInstance().getSelectedServer()) {
+ item.setSelection(true);
+ }
+
+ item.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ ServerManager.getInstance().setSelectedServer(server.getId());
+ update();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ });
+ item.setText(server.getName());
+ ImageDescriptor id = ImageResource.getImageDescriptor(server.getServerType().getId());
+ Image i = id.createImage();
+ images.add(i);
+ item.setImage(i);
+ }
+
+ private void createNewServerItem(Menu menu) {
+ MenuItem item = new MenuItem(menu, SWT.PUSH);
+ item.setText("New server...");
+ item.setImage(JBossServerUISharedImages.getImage(JBossServerUISharedImages.GENERIC_SERVER_IMAGE));
+ item.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ newServer();
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ newServer();
+ widgetSelected(e);
+ }
+ });
+ }
+
+ private void newServer() {
+ NewServerWizard wizard = new NewServerWizard();
+ WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
+ if (dialog.open() != Window.CANCEL) {
+ IServer server = (IServer)wizard.getRootFragment().getTaskModel().getObject(TaskModel.TASK_SERVER);
+ if(server != null) {
+ ServerManager.getInstance().setSelectedServer(server.getId());
+ update();
+ }
+ }
+ }
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerActionMessages.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,20 @@
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import org.eclipse.osgi.util.NLS;
+
+public class ServerActionMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.as.wst.server.ui.action.messages";
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, ServerActionMessages.class);
+ }
+ public static String START_IN_DEBUG_MODE;
+ public static String RESTART_IN_DEBUG_MODE;
+ public static String START_IN_RUN_MODE;
+ public static String RESTART_IN_RUN_MODE;
+ public static String SELECT_A_SERVER;
+ public static String STOP_SERVER;
+ public static String CHANGE_TIME_STAMP;
+ public static String CHANGE_TIME_STAMP_DEFAULT;
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManager.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManager.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManager.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.preferences.DefaultScope;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeLifecycleListener;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerLifecycleListener;
+import org.eclipse.wst.server.core.IServerListener;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerEvent;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+
+public class ServerManager {
+ private static ServerManager instance;
+
+ public static synchronized ServerManager getInstance() {
+ if(instance == null) {
+ instance = new ServerManager();
+ }
+ return instance;
+ }
+
+ private List<ServerManagerListener> listeners = new ArrayList<ServerManagerListener>();
+ private IServerListener serverListener;
+ protected IServer[] servers = new IServer[0];
+
+ IServer selected = null;
+
+ public ServerManager() {
+ serverListener = new ServerListenerImpl();
+ load();
+ }
+
+ void load() {
+ servers = (IServer[])ServerCore.getServers().clone();
+ loadSelectedServer();
+ ServerResourceListenerImpl listener = new ServerResourceListenerImpl();
+ ServerCore.addRuntimeLifecycleListener(listener);
+ ServerCore.addServerLifecycleListener(listener);
+ }
+
+ private void loadSelectedServer() {
+ if(servers == null || servers.length == 0) return;
+ String ds = getDefaultWebServer();
+ IServer s = getServer(ds);
+ if(s == null && servers.length > 0) {
+ s = servers[0];
+ setDefaultWebServer(servers[0].getId());
+ }
+ setSelectedServerInternal(s);
+ }
+
+ public IServer[] getServers() {
+ return servers;
+ }
+
+ public IServer getServer(String serverId) {
+ for (int i = 0; i < servers.length; i++) {
+ if(servers[i].getId().equals(serverId)) {
+ return servers[i];
+ }
+ }
+ return null;
+ }
+
+ public void addListener(ServerManagerListener listener) {
+ if(!listeners.contains(listener)) listeners.add(listener);
+ }
+
+ public void removeListener(ServerManagerListener listener) {
+ listeners.remove(listener);
+ }
+
+ void fire() {
+ ServerManagerListener[] ls = (ServerManagerListener[])listeners.toArray(new ServerManagerListener[0]);
+ for (int i = 0; i < ls.length; i++) {
+ ls[i].serverManagerChanged();
+ }
+ }
+
+ public void setSelectedServer(String id) {
+ IServer server = getServer(id);
+ if(server == selected) return;
+ setSelectedServerInternal(server);
+ setDefaultWebServer(id);
+ fire();
+ }
+
+ private void setSelectedServerInternal(IServer server) {
+ if(selected == server) return;
+ if(selected != null) selected.removeServerListener(serverListener);
+ selected = server;
+ if(selected != null) selected.addServerListener(serverListener);
+ }
+
+ public String getSelectedServerId() {
+ String result = getDefaultWebServer();
+ return result == null ? "" : result;
+ }
+
+ public IServer getSelectedServer() {
+ return selected;
+ }
+
+ class ServerResourceListenerImpl implements IRuntimeLifecycleListener, IServerLifecycleListener {
+ public void serverAdded(IServer server) {
+ IServer[] ss = new IServer[servers.length + 1];
+ System.arraycopy(servers, 0, ss, 0, servers.length);
+ ss[servers.length] = server;
+ servers = ss;
+ loadSelectedServer();
+ fire();
+ }
+ public void serverChanged(IServer server) {
+ fire();
+ }
+ public void serverRemoved(IServer server) {
+ List<IServer> l = new ArrayList<IServer>();
+ for (int i = 0; i < servers.length; i++) {
+ if(servers[i] != server) l.add(servers[i]);
+ }
+ if(l.size() == servers.length) return;
+ servers = l.toArray(new IServer[0]);
+ loadSelectedServer();
+ fire();
+ }
+ public void runtimeAdded(IRuntime runtime) {
+ fire();
+ }
+ public void runtimeChanged(IRuntime runtime) {
+ fire();
+ }
+ public void runtimeRemoved(IRuntime runtime) {
+ fire();
+ }
+ }
+
+ class ServerListenerImpl implements IServerListener {
+ public void serverChanged(ServerEvent arg0) {
+ fire();
+ }
+ }
+
+ static String DEFAULT_WEB_SERVER = JBossServerUIPlugin.PLUGIN_ID + ".defaultWebServer";
+
+ static String getDefaultWebServer() {
+ String result = getInstancePreference(DEFAULT_WEB_SERVER);
+ return result;
+ }
+
+ static void setDefaultWebServer(String value) {
+ getInstancePreferences().put(DEFAULT_WEB_SERVER, value);
+ }
+
+ static IEclipsePreferences getInstancePreferences() {
+ return new InstanceScope().getNode(JBossServerUIPlugin.PLUGIN_ID);
+ }
+
+ static IEclipsePreferences getDefaultPreferences() {
+ return new DefaultScope().getNode(JBossServerUIPlugin.PLUGIN_ID);
+ }
+
+ static String getInstancePreference(String key) {
+ IEclipsePreferences p = getInstancePreferences();
+ String value = p == null ? null : p.get(key, null);
+ return value != null ? value : getDefaultPreference(key);
+ }
+
+ static String getDefaultPreference(String key) {
+ IEclipsePreferences p = getDefaultPreferences();
+ return p == null ? null : p.get(key, null);
+ }
+
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManagerListener.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManagerListener.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ServerManagerListener.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,16 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+public interface ServerManagerListener {
+ public void serverManagerChanged();
+
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/StopServerActionDelegate.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/StopServerActionDelegate.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/StopServerActionDelegate.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
+
+public class StopServerActionDelegate extends AbstractServerActionDelegate {
+ protected StopAction delegate;
+
+ public void init(IWorkbenchWindow window) {
+ super.init(window);
+ update();
+ delegate = new StopAction(window.getShell(), getSelectionProvider());
+ }
+
+ protected void doRun() {
+ IServer server = ServerManager.getInstance().getSelectedServer();
+ if(server == null) return;
+ if( delegate.accept(server))
+ delegate.perform(server);
+ }
+
+ protected boolean isActionEnabled() {
+ IServer selected = ServerManager.getInstance().getSelectedServer();
+ return (selected != null &&
+ (selected.getServerState() == IServer.STATE_STARTED
+ || selected.getServerState() == IServer.STATE_STARTING));
+ }
+
+ protected String computeToolTip() {
+ IServer selected = ServerManager.getInstance().getSelectedServer();
+ String name = selected == null ? "" : selected.getName(); //$NON-NLS-1$
+ return NLS.bind(ServerActionMessages.STOP_SERVER, name);
+ }
+
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/messages.properties
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/messages.properties (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/messages.properties 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,8 @@
+START_IN_DEBUG_MODE=Start {0} in debug mode
+RESTART_IN_DEBUG_MODE=Restart {0} in debug mode
+START_IN_RUN_MODE=Start {0}
+RESTART_IN_RUN_MODE=Restart {0}
+SELECT_A_SERVER=Select a default server
+STOP_SERVER=Shutdown {0}
+CHANGE_TIME_STAMP=Change Timestamp of {0}
+CHANGE_TIME_STAMP_DEFAULT=Touch descriptors
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogActionProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogActionProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogActionProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,72 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.ServerEventModel;
+import org.jboss.ide.eclipse.as.ui.dialogs.ShowStackTraceDialog;
+
+public class EventLogActionProvider extends CommonActionProvider {
+ private Action clearLogAction;
+ private Action showStackTraceAction;
+ private ICommonActionExtensionSite actionSite;
+ public EventLogActionProvider() {
+ super();
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ createActions();
+ }
+ public void fillContextMenu(IMenuManager menu) {
+ ICommonViewerSite site = actionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
+ Object first = selection.getFirstElement();
+ if( first != null && first instanceof ServerEventModel) {
+ menu.add(clearLogAction);
+ }
+ if( first != null && first instanceof EventLogTreeItem &&
+ (((EventLogTreeItem)first).getEventClass().equals(EventLogModel.EVENT_TYPE_EXCEPTION) ||
+ ((EventLogTreeItem)first).getSpecificType().equals(EventLogModel.EVENT_TYPE_EXCEPTION))) {
+ menu.add(showStackTraceAction);
+ }
+ }
+ }
+
+
+ protected void createActions() {
+ clearLogAction = new Action() {
+ public void run() {
+ IStructuredSelection selection = (IStructuredSelection)actionSite.getStructuredViewer().getSelection();
+ if(selection.getFirstElement() != null && selection.getFirstElement() instanceof ServerEventModel) {
+ ((ServerEventModel)selection.getFirstElement()).clearEvents();
+ actionSite.getStructuredViewer().refresh(((ServerEventModel)selection.getFirstElement()));
+ }
+ }
+ };
+ clearLogAction.setText("Clear Event Log");
+
+ showStackTraceAction = new Action() {
+ public void run() {
+ IStructuredSelection selection = (IStructuredSelection)actionSite.getStructuredViewer().getSelection();
+ if( selection.getFirstElement() != null && selection.getFirstElement() instanceof EventLogTreeItem ) {
+ EventLogTreeItem item = (EventLogTreeItem)selection.getFirstElement();
+ ShowStackTraceDialog dialog = new ShowStackTraceDialog(new Shell(), item);
+ dialog.open();
+ }
+ }
+ };
+ showStackTraceAction.setText("See Exception Details");
+ }
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogContentProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,165 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogRoot;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.IEventLogListener;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.ServerEventModel;
+import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+
+public class EventLogContentProvider implements ITreeContentProvider {
+ public static final String SHOW_TIMESTAMP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.showTimestamp";
+ public static final String GROUP_BY_CATEGORY = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.groupByCategory";
+ public static final String EVENT_ON_TOP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.eventOnTop";
+ public static final int NEWEST_ON_TOP = 1;
+ public static final int OLDEST_ON_TOP = 2;
+ public static final int _TRUE_ = 1;
+ public static final int _FALSE_ = 2;
+
+ private Viewer viewer;
+
+ public EventLogContentProvider() {
+ EventLogModel.enableLogging();
+ EventLogModel.getDefault().addListener(new IEventLogListener() {
+ public void eventModelChanged(String serverId,
+ EventLogTreeItem changed) {
+ if( viewer instanceof StructuredViewer ) {
+ final Object o = changed.getEventRoot();
+ if( o instanceof EventLogRoot) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ ((StructuredViewer)viewer).refresh(((EventLogRoot)o).getModel());
+ }
+ });
+ }
+ }
+ }
+ });
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if( parentElement instanceof IServer && parentElement != null ) {
+ return new Object[] { EventLogModel.getModel((IServer)parentElement)};
+ }
+ if( parentElement instanceof ServerEventModel) {
+ ServerEventModel s = ((ServerEventModel)parentElement);
+ boolean categorize = getCategorize();
+ if( categorize )
+ return getRootCategories(s);
+ Object[] ret = s.getRoot().getChildren();
+ if( getSortOrder()) {
+ List<Object> l = Arrays.asList(ret);
+ Collections.reverse(l);
+ return l.toArray();
+ }
+ return ret;
+ }
+
+ if( parentElement instanceof MajorEventType ) {
+ // get children only of this type
+ String serverId = ((MajorEventType)parentElement).getServer();
+ SimpleTreeItem[] children = EventLogModel.getModel(serverId).getRoot().getChildren();
+ ArrayList<SimpleTreeItem> items = new ArrayList<SimpleTreeItem>();
+ for( int i = 0; i < children.length; i++ ) {
+ if( children[i] instanceof EventLogTreeItem ) {
+ String type = ((EventLogTreeItem)children[i]).getEventClass();
+ if( type != null && type.equals(((MajorEventType)parentElement).getId()))
+ items.add(children[i]);
+ }
+ }
+
+ if( getSortOrder() ) Collections.reverse(items);
+
+ return items.toArray(new Object[items.size()]);
+ }
+
+ // just return the object's kids
+ if( parentElement instanceof EventLogTreeItem ) {
+ return ((EventLogTreeItem)parentElement).getChildren();
+ }
+ return new Object[0];
+ }
+
+ public static class MajorEventType {
+ private String id;
+ private String serverId;
+ public MajorEventType(String serverId, String id) {
+ this.id = id;
+ this.serverId = serverId;
+ }
+ public String getId() {
+ return id;
+ }
+ public String getServer() { return serverId; }
+ public String toString() { return id; }
+ public boolean equals(Object o) {
+ return o instanceof MajorEventType &&
+ ((MajorEventType)o).getId().equals(id) &&
+ ((MajorEventType)o).getServer().equals(serverId);
+ }
+ }
+
+ protected Object[] getRootCategories(ServerEventModel model) {
+ EventLogRoot root = model.getRoot();
+ ArrayList<String> list = new ArrayList<String>();
+ ArrayList<MajorEventType> majorTypes = new ArrayList<MajorEventType>();
+ SimpleTreeItem[] children = root.getChildren();
+ for( int i = 0; i < children.length; i++ ) {
+ if( children[i] instanceof EventLogTreeItem ) {
+ String type = ((EventLogTreeItem)children[i]).getEventClass();
+ if( !list.contains(type)) {
+ list.add(type);
+ majorTypes.add(new MajorEventType(model.getId(), type));
+ }
+ }
+ }
+ return majorTypes.toArray(new MajorEventType[majorTypes.size()]);
+ }
+
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0 ? true : false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return null;
+ }
+
+ public void dispose() {
+ EventLogModel.disableLogging();
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = viewer;
+ }
+
+ protected boolean getSortOrder() {
+ Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
+ int showTimestamp = store.getInt(EVENT_ON_TOP);
+ if( showTimestamp == OLDEST_ON_TOP) return false;
+ return true;
+ }
+ protected boolean getCategorize() {
+ Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
+ int showTimestamp = store.getInt(GROUP_BY_CATEGORY);
+ if( showTimestamp == _TRUE_ ) return true;
+ if( showTimestamp == _FALSE_) return false;
+ return false; // default
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogLabelProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogLabelProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/EventLogLabelProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,142 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import java.util.Date;
+import java.util.HashMap;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionRegistry;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Preferences;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
+import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.ServerEventModel;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+import org.jboss.ide.eclipse.as.ui.views.server.extensions.EventLogContentProvider.MajorEventType;
+
+public class EventLogLabelProvider extends LabelProvider {
+
+ public static final String SHOW_TIMESTAMP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.showTimestamp";
+ public static final int _TRUE_ = 1;
+ public static final int _FALSE_ = 2;
+ private static HashMap<String, String> majorTypeToName = new HashMap<String, String>();
+
+ static {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] cf = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "EventLogMajorType");
+ for( int i = 0; i < cf.length; i++ ) {
+ String type = cf[i].getAttribute("typeId");
+ String name = cf[i].getAttribute("name");
+ majorTypeToName.put(type, name);
+ }
+ }
+
+ private Image rootImage;
+ public EventLogLabelProvider() {
+ super();
+ ImageDescriptor des = ImageDescriptor.createFromURL(JBossServerUIPlugin.getDefault().getBundle().getEntry("icons/info_obj.gif"));
+ rootImage = des.createImage();
+ }
+ public void dispose() {
+ super.dispose();
+ rootImage.dispose();
+ }
+
+ private IEventLogLabelProvider[] labelProviderDelegates = null;
+ public Image getImage(Object element) {
+ if( labelProviderDelegates == null )
+ loadLabelProviderDelegates();
+
+ if( element instanceof ServerEventModel ) {
+ return rootImage;
+ }
+
+ if( !(element instanceof EventLogTreeItem))
+ return null;
+
+ EventLogTreeItem item = (EventLogTreeItem)element;
+ for( int i = 0; i < labelProviderDelegates.length; i++ ) {
+ if( labelProviderDelegates[i] != null
+ && labelProviderDelegates[i].supports(item.getSpecificType())) {
+ Image image = labelProviderDelegates[i].getImage((EventLogTreeItem)element);
+ if( image != null ) return image;
+ }
+ }
+
+ return null;
+ }
+
+ public String getText(Object element) {
+ if( element == null ) return "ERROR: Unknown String type";
+
+ if( element instanceof ServerEventModel ) {
+ return "Event Log";
+ }
+
+
+ String suffix = getShowTimestamp() ? createTimestamp(element) : "";
+ if( labelProviderDelegates == null )
+ loadLabelProviderDelegates();
+
+
+ if( !(element instanceof EventLogTreeItem)) {
+ if( element instanceof MajorEventType ) {
+ String val = majorTypeToName.get(((MajorEventType)element).getId());
+ if( val != null ) return val;
+ }
+ return element.toString();
+ }
+ EventLogTreeItem item = (EventLogTreeItem)element;
+
+ for( int i = 0; i < labelProviderDelegates.length; i++ ) {
+ if( labelProviderDelegates[i] != null
+ && labelProviderDelegates[i].supports(item.getSpecificType())) {
+ String text = labelProviderDelegates[i].getText((EventLogTreeItem)element);
+ if( text != null ) return text + suffix;
+ }
+ }
+
+ return element == null ? "" : element.toString() + suffix;
+ }
+
+ public void loadLabelProviderDelegates() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] elements = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "EventLogLabelProvider");
+ labelProviderDelegates = new IEventLogLabelProvider[elements.length];
+ for( int i = 0; i < elements.length; i++ ) {
+ try {
+ labelProviderDelegates[i] = (IEventLogLabelProvider)elements[i].createExecutableExtension("class");
+ } catch( CoreException ce ) {
+ JBossServerUIPlugin.log("Error loading Event Log Label Provider Delegate", ce);
+ }
+ }
+ }
+ protected boolean getShowTimestamp() {
+ Preferences store = JBossServerUIPlugin.getDefault().getPluginPreferences();
+ int showTimestamp = store.getInt(SHOW_TIMESTAMP);
+ if( showTimestamp == _TRUE_ ) return true;
+ if( showTimestamp == _FALSE_) return false;
+ return false; // default
+ }
+
+ protected String createTimestamp(Object element) {
+ if( element instanceof EventLogTreeItem ) {
+ Long v = (Long) ((EventLogTreeItem)element).getProperty(EventLogTreeItem.DATE);
+ if( v == null ) return "";
+
+ double date = v.doubleValue();
+ double now = new Date().getTime();
+ int seconds = (int) (( now - date) / 1000);
+ int minutes = seconds / 60;
+ int hours = minutes / 60;
+ minutes -= (hours * 60);
+ String minString = minutes + "m ago";
+ if( hours == 0 )
+ return " (" + minString + ")";
+ return " (" + hours + "h " + minString + ")";
+ }
+ return "";
+ }
+}
\ No newline at end of file
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,167 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.extensions;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
-import org.jboss.tools.as.wst.server.ui.views.server.preferencepages.ViewProviderPreferenceComposite;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public abstract class JBossServerViewExtension {
- protected ServerViewProvider provider;
-
- /**
- * Which extension point is mine.
- * @param provider
- */
- public void setViewProvider(ServerViewProvider provider) {
- this.provider = provider;
- }
-
- /**
- * Should query preferencestore to see if I'm enabled or not
- * @return
- */
- public boolean isEnabled() {
- return provider.isEnabled();
- }
-
-
- public void init() {
- }
- public void enable() {
- }
- public void disable() {
- }
- public void dispose() {
- if( getPropertySheetPage() != null )
- getPropertySheetPage().dispose();
- }
-
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selected) {
- }
-
- public ITreeContentProvider getContentProvider() {
- return null;
- }
- public LabelProvider getLabelProvider() {
- return null;
- }
-
- public IPropertySheetPage getPropertySheetPage() {
- return null;
- }
-
- public ViewProviderPreferenceComposite createPreferenceComposite(Composite parent) {
- return null;
- }
-
- public Image createIcon() {
- return null;
- }
-
- public void refreshModel(Object object) {
- // override me
- }
-
- protected void suppressingRefresh(Runnable runnable) {
- JBossServerView.getDefault().getExtensionFrame().getViewer().suppressingRefresh(runnable);
- }
-
- protected void refreshViewer() {
- refreshViewer(null);
- }
- protected void refreshViewer(final Object o) {
- Runnable r = new Runnable() {
- public void run() {
- if( isEnabled() ) {
- if( o == null || o == provider ) {
- JBossServerView.getDefault().getExtensionFrame().getViewer().refresh(provider);
- } else {
- ExtensionTableViewer viewer = JBossServerView.getDefault().getExtensionFrame().getViewer();
- ContentWrapper wrapped = new ContentWrapper(o, provider);
- if( viewer.elementInTree(wrapped))
- viewer.refresh(new ContentWrapper(o, provider));
- else
- viewer.refresh(provider);
- }
- }
- }
- };
-
- if( JBossServerView.getDefault() == null )
- return;
-
- if( Display.getCurrent() == null )
- Display.getDefault().asyncExec(r);
- else
- r.run();
- }
- protected void removeElement(Object o) {
- JBossServerView.getDefault().getServerFrame().getViewer().remove(new ContentWrapper(o, provider));
- }
- protected void addElement(Object parent, Object child) {
- JBossServerView.getDefault().getServerFrame().getViewer().add(new ContentWrapper(parent, provider), new ContentWrapper(child, provider));
- }
-
- // what servers should i show for?
- protected boolean supports(IServer server) {
- if( server == null ) return false;
- return isJBossDeployable(server);
- }
-
- // show for anything that's jboss deployable
- protected boolean isJBossDeployable(IServer server) {
- return (IDeployableServer)server.loadAdapter(IDeployableServer.class, new NullProgressMonitor()) != null;
- }
-
- // show only for full jboss servers
- protected boolean isJBossServer(IServer server) {
- return (JBossServer)server.loadAdapter(JBossServer.class, new NullProgressMonitor()) != null;
- }
-
- protected boolean allAre(Object[] list, Class clazz) {
- for( int i = 0; i < list.length; i++ )
- if( list[i].getClass() != clazz )
- return false;
- return true;
- }
-}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/PropertySheetFactory.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -45,7 +45,6 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
/**
*
@@ -161,9 +160,6 @@
}
public Object[] getElements(Object inputElement) {
- if( inputElement instanceof ContentWrapper ) {
- inputElement = ((ContentWrapper)inputElement).getElement();
- }
if( properties != null )
return properties.keySet().toArray();
@@ -174,9 +170,6 @@
}
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- if( newInput instanceof ContentWrapper )
- newInput = ((ContentWrapper)newInput).getElement();
-
input = newInput;
properties = holder.getProperties(newInput);
}
@@ -198,9 +191,6 @@
}
public String getColumnText(Object element, int columnIndex) {
- if( element instanceof ContentWrapper )
- element = ((ContentWrapper)element).getElement();
-
if( columnIndex == 0 ) return element.toString();
if( columnIndex == 1 && element instanceof String && properties != null ) {
return properties.getProperty((String)element);
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ServerViewProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,141 +0,0 @@
-package org.jboss.ide.eclipse.as.ui.views.server.extensions;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.osgi.framework.Bundle;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ServerViewProvider {
- public static final String EXTENSION_ENABLED = "EXTENSION_ENABLED_";
- public static final String EXTENSION_WEIGHT = "EXTENSION_WEIGHT_";
-
- public static final String ID_LABEL = "id";
- public static final String NAME_LABEL = "name";
- public static final String DESCRIPTION_LABEL = "description";
- public static final String PROVIDER_LABEL = "providerClass";
- public static final String ICON_LABEL = "icon";
-
-
- private IConfigurationElement element;
- private JBossServerViewExtension extension;
-
- private ImageDescriptor iconDescriptor;
- private Image icon;
-
- private boolean enabled;
- private int weight;
- private boolean loadFailed = false;
-
- public ServerViewProvider(IConfigurationElement element) {
- this.element = element;
-
- // Am I enabled?
- Preferences prefs = JBossServerUIPlugin.getDefault().getPluginPreferences();
-
-
- String enabledKey = EXTENSION_ENABLED + getId();
- setEnabled( prefs.contains(enabledKey) ? prefs.getBoolean(enabledKey) : true );
-
- String weightKey = EXTENSION_WEIGHT + getId();
- setWeight( prefs.contains(weightKey) ? prefs.getInt(weightKey) : 0 );
-
- Bundle pluginBundle = JBossServerUIPlugin.getDefault().getBundle();
- String iconLoc = getIconLocation();
- if( iconLoc != null ) {
- iconDescriptor =
- ImageDescriptor.createFromURL(pluginBundle.getEntry(iconLoc));
- }
- }
-
- public String getId() {
- return element.getAttribute(ID_LABEL);
- }
-
- public String getName() {
- return element.getAttribute(NAME_LABEL);
- }
-
- public String getDescription() {
- return element.getAttribute(DESCRIPTION_LABEL);
- }
-
- public String getIconLocation() {
- return element.getAttribute(ICON_LABEL);
- }
-
- public Image getImage() {
- if( icon == null && iconDescriptor != null ) {
- icon = iconDescriptor.createImage();
- } else if( icon == null && iconDescriptor == null ){
- icon = getDelegate().createIcon();
- } else if( icon != null && icon.isDisposed()) {
- icon = iconDescriptor == null ? getDelegate().createIcon() : iconDescriptor.createImage();
- }
- return icon;
- }
-
- public JBossServerViewExtension getDelegate() {
- try {
- if( extension == null && !loadFailed) {
- extension = (JBossServerViewExtension)element.createExecutableExtension(PROVIDER_LABEL);
- extension.setViewProvider(this);
- }
- } catch( CoreException ce ) {
- loadFailed = true;
- ce.printStackTrace();
- }
- return extension;
- }
-
- public String getDelegateName() {
- return element.getAttribute(PROVIDER_LABEL);
- }
-
- public boolean isEnabled() {
- return enabled;
- }
-
- public void setEnabled(boolean enable) {
- if( enable && !enabled ) {
- enabled = true;
- if(getDelegate() != null ) getDelegate().enable();
- } else if( !enable && enabled ) {
- enabled = false;
- if(getDelegate() != null ) getDelegate().disable();
- }
- }
-
- public boolean supports(IServer server) {
- return getDelegate() == null ? false : getDelegate().supports(server);
- }
-
- public int getWeight() {
- return weight;
- }
-
- public void setWeight(int weight) {
- this.weight = weight;
- }
-
- public void dispose() {
- if( getDelegate() != null )
- getDelegate().dispose();
- if( icon != null && iconDescriptor != null )
- icon.dispose();
-
- Preferences prefs = JBossServerUIPlugin.getDefault().getPluginPreferences();
-
- prefs.setValue(EXTENSION_ENABLED + getId(), enabled);
- prefs.setValue(EXTENSION_WEIGHT + getId(), weight);
- JBossServerUIPlugin.getDefault().savePluginPreferences();
- }
-}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/SimplePropertiesViewExtension.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -36,7 +36,7 @@
* @author Rob Stryker <rob.stryker(a)redhat.com>
*
*/
-public abstract class SimplePropertiesViewExtension
+public abstract class SimplePropertiesViewExtension { /*
extends JBossServerViewExtension implements ISimplePropertiesHolder {
private SimplePropertiesPropertySheetPage propertiesSheet;
@@ -60,5 +60,5 @@
public abstract String[] getPropertyKeys(Object selected);
public abstract Properties getProperties(Object selected);
-
+*/
}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathActionProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,271 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+import org.jboss.ide.eclipse.as.ui.Messages;
+import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs;
+import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathCategoryDialog;
+import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathDialog;
+import org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeContentProvider.ServerWrapper;
+
+public class XPathActionProvider extends CommonActionProvider {
+
+ private ICommonActionExtensionSite actionSite;
+ public Action newXPathCategoryAction, deleteXPathCategoryAction,
+ newXPathAction, editXPathAction, deleteXPathAction, editFileAction;
+ private XPathChangeValueAction xpathChangeValueAction;
+ private Object selectedNode;
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ CommonViewer cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ createActions(cv, wsSite.getSelectionProvider());
+ }
+ }
+ }
+
+ public void createActions(CommonViewer tableViewer, ISelectionProvider provider) {
+ Shell shell = tableViewer.getTree().getShell();
+ newXPathCategoryAction = new Action() {
+ public void run() {
+ XPathCategoryDialog d = new XPathCategoryDialog(Display
+ .getCurrent().getActiveShell(), getServer());
+ if (d.open() == Window.OK) {
+ XPathModel.getDefault().addCategory(getServer(),
+ d.getText());
+ XPathModel.getDefault().save(getServer());
+ refreshViewer();
+ }
+ }
+ };
+ newXPathCategoryAction.setText("New Category");
+
+ deleteXPathCategoryAction = new Action() {
+ public void run() {
+ int style = SWT.APPLICATION_MODAL | SWT.YES | SWT.NO;
+ MessageBox messageBox = new MessageBox(Display.getCurrent()
+ .getActiveShell(), style);
+ messageBox
+ .setText(Messages.DescriptorXPathRemoveCategory + "?");
+ messageBox
+ .setMessage(Messages.DescriptorXPathRemoveCategoryDesc);
+ if (messageBox.open() == SWT.YES) {
+ XPathModel.getDefault().removeCategory(getServer(),
+ ((XPathCategory) selectedNode).getName());
+ XPathModel.getDefault().save(getServer());
+ refreshViewer();
+ }
+ }
+ };
+ deleteXPathCategoryAction
+ .setText(Messages.DescriptorXPathRemoveCategory);
+
+ newXPathAction = new Action() {
+ public void run() {
+ XPathCategory category = (XPathCategory) selectedNode;
+ if (category != null) {
+ String categoryName = category.getName();
+ XPathDialog d = new XPathDialog(Display.getCurrent()
+ .getActiveShell(), getServer(), categoryName);
+ if (d.open() == Window.OK) {
+ XPathCategory[] categoryList = XPathModel.getDefault()
+ .getCategories(getServer());
+ XPathCategory categoryItem = null;
+ for (int i = 0; i < categoryList.length; i++) {
+ if (categoryList[i].getName().equals(
+ category.getName()))
+ categoryItem = categoryList[i];
+ }
+ if (categoryItem != null) {
+ XPathQuery query = new XPathQuery(d.getName(),
+ XPathDialogs.getConfigFolder(getServer()),
+ null, d.getXpath(), d.getAttribute());
+ categoryItem.addQuery(query);
+ XPathModel.getDefault().save(getServer());
+ refreshViewer();
+ }
+ }
+ }
+ }
+ };
+ newXPathAction.setText(Messages.DescriptorXPathNewXPath);
+
+ editXPathAction = new Action() {
+ public void run() {
+ Object o = selectedNode;
+ if (o != null && o instanceof XPathQuery) {
+ XPathQuery original = (XPathQuery) o;
+ XPathCategory category = original.getCategory();
+
+ XPathDialog d = new XPathDialog(Display.getCurrent()
+ .getActiveShell(), getServer(), category.getName(),
+ original.getName());
+ d.setAttribute(original.getAttribute());
+ d.setXpath(original.getXpathPattern());
+
+ if (d.open() == Window.OK) {
+ original.setAttribute(d.getAttribute());
+ original.setXpathPattern(d.getXpath());
+ original.setName(d.getName());
+ category.save();
+ refreshViewer();
+ }
+ }
+ }
+ };
+ editXPathAction.setText(Messages.DescriptorXPathEditXPath);
+
+ deleteXPathAction = new Action() {
+ public void run() {
+ Object o = selectedNode;
+ if (o instanceof XPathQuery) {
+ XPathCategory cat = ((XPathQuery) o).getCategory();
+ cat.removeQuery((XPathQuery) o);
+ cat.save();
+ refreshViewer();
+ }
+ }
+ };
+ deleteXPathAction.setText(Messages.DescriptorXPathDeleteXPath);
+
+ editFileAction = new Action() {
+ public void run() {
+ try {
+ Object o = selectedNode;
+ Path p = null;
+ if (o instanceof XPathQuery
+ && ((XPathQuery) o).getResults().length == 1) {
+ o = (XPathFileResult) ((XPathQuery) o).getResults()[0];
+ }
+ if (o instanceof XPathFileResult) {
+ p = new Path(((XPathFileResult) o).getFileLocation());
+ } else if (o instanceof XPathResultNode) {
+ p = new Path(((XPathResultNode) o).getFileLocation());
+ }
+ if (p != null) {
+
+ IFileStore fileStore = EFS.getLocalFileSystem()
+ .getStore(p.removeLastSegments(1));
+ fileStore = fileStore.getChild(p.lastSegment());
+ IWorkbench wb = PlatformUI.getWorkbench();
+ IWorkbenchWindow win = wb.getActiveWorkbenchWindow();
+ IWorkbenchPage page = win.getActivePage();
+
+ if (!fileStore.fetchInfo().isDirectory()
+ && fileStore.fetchInfo().exists()) {
+ try {
+ IDE.openEditorOnFileStore(page, fileStore);
+ } catch (PartInitException e) {
+ }
+ }
+ }
+ } catch (Exception exc) {
+ JBossServerUIPlugin.log("Error running edit file action",
+ exc);
+ }
+ }
+ };
+ editFileAction.setText("Edit File");
+
+ xpathChangeValueAction = new XPathChangeValueAction(shell, tableViewer, provider);
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ ICommonViewerSite site = actionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider()
+ .getSelection();
+ Object first = selection.getFirstElement();
+ if (first == null)
+ return;
+
+ if (first instanceof ServerWrapper) {
+ menu.add(newXPathCategoryAction);
+ menu.add(new Separator());
+ return;
+ }
+
+ if (first instanceof XPathCategory) {
+ menu.add(newXPathAction);
+ menu.add(deleteXPathCategoryAction);
+ menu.add(new Separator());
+ return;
+ }
+
+ if (first instanceof XPathQuery) {
+ selectedNode = first;
+ menu.add(newXPathAction);
+ menu.add(editXPathAction);
+ menu.add(deleteXPathAction);
+ }
+
+ if( xpathChangeValueAction.shouldRun())
+ menu.add(xpathChangeValueAction);
+
+ if ((first instanceof XPathResultNode || first instanceof XPathFileResult)
+ || (first instanceof XPathQuery && ((XPathQuery) first)
+ .getResults().length == 1)) {
+ menu.add(editFileAction);
+ }
+ }
+ }
+
+ protected void refreshViewer() {
+ actionSite.getStructuredViewer().refresh();
+ }
+
+ protected IServer getServer() {
+ Object o = selectedNode;
+ if (o instanceof ServerWrapper)
+ return ((ServerWrapper) o).server;
+ if (o instanceof XPathCategory)
+ return ((XPathCategory) o).getServer();
+ if (o instanceof XPathQuery)
+ return ((XPathQuery) o).getCategory().getServer();
+ if (o instanceof XPathFileResult)
+ return ((XPathFileResult) o).getQuery().getCategory().getServer();
+ if (o instanceof XPathResultNode)
+ return ((XPathResultNode) o).getFile().getQuery().getCategory()
+ .getServer();
+ return null;
+ }
+
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathChangeValueAction.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathChangeValueAction.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathChangeValueAction.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,364 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.TreeEditor;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.actions.SelectionProviderAction;
+import org.eclipse.ui.actions.TextActionHandler;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+/**
+ * Action to rename a server.
+ */
+public class XPathChangeValueAction extends SelectionProviderAction {
+ protected CustomTreeEditor treeEditor;
+ protected Tree tree;
+ protected TreeViewer viewer;
+ protected Text textEditor;
+ protected Composite textEditorParent;
+ private TextActionHandler textActionHandler;
+ protected Shell shell;
+ protected int width = -1;
+ protected Rectangle newParentBounds;
+
+ protected boolean saving = false;
+
+ public XPathChangeValueAction(Shell shell, TreeViewer viewer, ISelectionProvider selectionProvider) {
+ super(selectionProvider, "Change Value");
+ this.shell = shell;
+ this.viewer = viewer;
+ this.tree = viewer.getTree();
+ this.treeEditor = new CustomTreeEditor(tree);
+ }
+
+ public boolean shouldRun() {
+ if( getStructuredSelection().toArray().length > 1)
+ return false;
+
+ Object o = getStructuredSelection().getFirstElement();
+ if( XPathDecorator.getDecoration(o) != null )
+ return true;
+ return false;
+ }
+
+ public void run() {
+ queryNewValueInline(getStructuredSelection().getFirstElement());
+ }
+
+ /**
+ * On Mac the text widget already provides a border when it has focus, so
+ * there is no need to draw another one. The value of returned by this
+ * method is usd to control the inset we apply to the text field bound's in
+ * order to get space for drawing a border. A value of 1 means a one-pixel
+ * wide border around the text field. A negative value supresses the border.
+ * However, in M9 the system property
+ * "org.eclipse.swt.internal.carbon.noFocusRing" has been introduced as a
+ * temporary workaround for bug #28842. The existence of the property turns
+ * the native focus ring off if the widget is contained in a main window
+ * (not dialog). The check for the property should be removed after a final
+ * fix for #28842 has been provided.
+ */
+ private static int getCellEditorInset(Control c) {
+ // special case for MacOS X
+ if ("carbon".equals(SWT.getPlatform())) { //$NON-NLS-1$
+ if (System
+ .getProperty("org.eclipse.swt.internal.carbon.noFocusRing") == null || c.getShell().getParent() != null) { //$NON-NLS-1$
+ return -2; // native border
+ }
+ }
+ return 1; // one pixel wide black border
+ }
+
+ /**
+ * Get the Tree being edited.
+ *
+ * @returnTree
+ */
+ private Tree getTree() {
+ return tree;
+ }
+
+ private Composite createParent() {
+ Tree tree2 = getTree();
+ Composite result = new Composite(tree2, SWT.NONE);
+ TreeItem[] selectedItems = tree2.getSelection();
+ treeEditor.horizontalAlignment = SWT.LEFT;
+ treeEditor.grabHorizontal = true;
+ treeEditor.setEditor(result, selectedItems[0]);
+ return result;
+ }
+
+ /**
+ * Return the new name to be given to the target resource or
+ * <code>null<code>
+ * if the query was canceled. Rename the currently selected server using the table editor.
+ * Continue the action when the user is done.
+ *
+ * @param server the server to rename
+ */
+ private void queryNewValueInline(final Object node) {
+
+ // Make sure text editor is created only once. Simply reset text
+ // editor when action is executed more than once. Fixes bug 22269
+ if (textEditorParent == null) {
+ createTextEditor(node);
+ }
+ textEditor.setText(XPathModel.getResultNode(node).getText());
+ // Open text editor with initial size
+ Point textSize = textEditor.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ textSize.x += textSize.y; // Add extra space for new characters
+ Point parentSize = textEditorParent.getSize();
+ int inset = getCellEditorInset(textEditorParent);
+ textEditor.setBounds(2, inset, Math.min(textSize.x, parentSize.x - 4),
+ parentSize.y - 2 * inset);
+ textEditor.setText(new XPathTreeLabelProvider().getText(node));
+ width = textEditor.getSize().x - 10;
+ textEditor.setText(XPathModel.getResultNode(node).getText());
+ treeEditor.layout();
+ textEditorParent.setVisible(true);
+ textEditor.setVisible(true);
+ textEditorParent.redraw();
+ textEditor.selectAll();
+ textEditor.setFocus();
+ }
+
+ /**
+ * Create the text editor widget.
+ *
+ * @param server the server to rename
+ */
+ private void createTextEditor(final Object node) {
+ // Create text editor parent. This draws a nice bounding rect
+ textEditorParent = createParent();
+ textEditorParent.setVisible(false);
+ final int inset = getCellEditorInset(textEditorParent);
+ if (inset > 0) {
+ textEditorParent.addListener(SWT.Paint, new Listener() {
+ public void handleEvent(Event e) {
+ Point textSize = textEditor.getSize();
+ Point parentSize = textEditorParent.getSize();
+ e.gc.drawRectangle(0, 0, Math.min(textSize.x + 4,
+ parentSize.x - 1), parentSize.y - 1);
+ }
+ });
+ }
+ // Create inner text editor
+ textEditor = new Text(textEditorParent, SWT.NONE);
+ textEditor.setFont(tree.getFont());
+ textEditorParent.setBackground(textEditor.getBackground());
+ textEditor.addListener(SWT.Modify, new Listener() {
+ public void handleEvent(Event e) {
+ Point textSize = textEditor.computeSize(SWT.DEFAULT,
+ SWT.DEFAULT);
+ textSize.x += textSize.y; // Add extra space for new
+ // characters.
+ Point parentSize = textEditorParent.getSize();
+
+ textEditor.setBounds(2, inset, Math.min(textSize.x,
+ parentSize.x - 4), parentSize.y - 2 * inset);
+ textEditorParent.redraw();
+ }
+ });
+ textEditor.addListener(SWT.Traverse, new Listener() {
+ public void handleEvent(Event event) {
+
+ // Workaround for Bug 20214 due to extra
+ // traverse events
+ switch (event.detail) {
+ case SWT.TRAVERSE_ESCAPE:
+ // Do nothing in this case
+ disposeTextWidget();
+ event.doit = true;
+ event.detail = SWT.TRAVERSE_NONE;
+ break;
+ case SWT.TRAVERSE_RETURN:
+ saveChangesAndDispose(node);
+ event.doit = true;
+ event.detail = SWT.TRAVERSE_NONE;
+ break;
+ }
+ }
+ });
+ textEditor.addFocusListener(new FocusAdapter() {
+ public void focusLost(FocusEvent fe) {
+ saveChangesAndDispose(node);
+ }
+ });
+
+ if (textActionHandler != null) {
+ textActionHandler.addText(textEditor);
+ }
+ textEditor.setVisible(false);
+ }
+
+ /**
+ * Close the text widget and reset the editorText field.
+ */
+ protected void disposeTextWidget() {
+ width = -1;
+ if (textActionHandler != null)
+ textActionHandler.removeText(textEditor);
+
+ if (textEditorParent != null) {
+ textEditorParent.dispose();
+ textEditorParent = null;
+ textEditor = null;
+ treeEditor.setEditor(null, null);
+ }
+ }
+
+ /**
+ * Save the changes and dispose of the text widget.
+ *
+ * @param server the server to rename
+ */
+ protected void saveChangesAndDispose(Object node) {
+ if (saving == true)
+ return;
+ saving = true;
+
+ // Cache the resource to avoid selection loss since a selection of
+ // another item can trigger this method
+ final String newVal = textEditor.getText();
+ XPathResultNode itemToChange = XPathModel.getResultNode(node);
+ // if its unchanged do nothing
+ if( !itemToChange.getText().equals(newVal)) {
+ // set the text and add the document to the list of dirty ones
+ itemToChange.setText(newVal);
+ if( itemToChange.getDocument() != null ) {
+ itemToChange.saveDescriptor();
+ }
+ }
+
+ // Run this in an async to make sure that the operation that triggered
+ // this action is completed. Otherwise this leads to problems when the
+ // icon of the item being renamed is clicked (i.e., which causes the
+ // rename text widget to lose focus and trigger this method)
+ getTree().getShell().getDisplay().asyncExec(new Runnable() {
+ public void run() {
+ try {
+ // Dispose the text widget regardless
+ disposeTextWidget();
+ // Ensure the Navigator tree has focus, which it may not if
+ // the text widget previously had focus
+ if (tree != null && !tree.isDisposed()) {
+ tree.setFocus();
+ viewer.refresh(getStructuredSelection().getFirstElement());
+ }
+ } finally {
+ saving = false;
+ }
+ }
+ });
+ }
+
+
+ protected class CustomTreeEditor extends TreeEditor {
+ public CustomTreeEditor(Tree tree) {
+ super(tree);
+ }
+
+ public void setItem (TreeItem item) {
+ super.setItem(item);
+ }
+
+ private boolean hadFocus = false;
+ public void layout () {
+ if (tree == null || tree.isDisposed()) return;
+ if (getItem() == null || getItem().isDisposed()) return;
+ int columnCount = tree.getColumnCount();
+ if (columnCount == 0 && getColumn() != 0) return;
+ if (columnCount > 0 && (getColumn() < 0 || getColumn() >= columnCount)) return;
+
+ if (getEditor() == null || getEditor().isDisposed()) return;
+ if (getEditor().getVisible ()) {
+ hadFocus = getEditor().isFocusControl();
+ } // this doesn't work because
+ // resizing the column takes the focus away
+ // before we get here
+ getEditor().setBounds (customComputeBounds (superComputeBounds()));
+ if (hadFocus) {
+ if (getEditor() == null || getEditor().isDisposed()) return;
+ getEditor().setFocus ();
+ }
+ }
+
+ Rectangle customComputeBounds (Rectangle rect) {
+ Rectangle r = new Rectangle(rect.x + (width == -1 ? 0 : width), rect.y, rect.width, rect.height);
+ return r;
+ }
+
+ Rectangle superComputeBounds() {
+ if (getItem() == null || getColumn() == -1 || getItem().isDisposed() ) return new Rectangle(0, 0, 0, 0);
+ Rectangle cell = getItem().getBounds(getColumn());
+ Rectangle rect = getItem().getImageBounds(getColumn());
+ cell.x = rect.x + rect.width;
+ cell.width -= rect.width;
+ Rectangle area = tree.getClientArea();
+ if (cell.x < area.x + area.width) {
+ if (cell.x + cell.width > area.x + area.width) {
+ cell.width = area.x + area.width - cell.x;
+ }
+ }
+ Rectangle editorRect = new Rectangle(cell.x, cell.y, minimumWidth, minimumHeight);
+
+ if (grabHorizontal) {
+ if (tree.getColumnCount() == 0) {
+ // Bounds of tree item only include the text area - stretch out to include
+ // entire client area
+ cell.width = area.x + area.width - cell.x;
+ }
+ editorRect.width = Math.max(cell.width, minimumWidth);
+ }
+
+ if (grabVertical) {
+ editorRect.height = Math.max(cell.height, minimumHeight);
+ }
+
+ if (horizontalAlignment == SWT.RIGHT) {
+ editorRect.x += cell.width - editorRect.width;
+ } else if (horizontalAlignment == SWT.LEFT) {
+ // do nothing - cell.x is the right answer
+ } else { // default is CENTER
+ editorRect.x += (cell.width - editorRect.width)/2;
+ }
+ // don't let the editor overlap with the +/- of the tree
+ editorRect.x = Math.max(cell.x, editorRect.x);
+
+ if (verticalAlignment == SWT.BOTTOM) {
+ editorRect.y += cell.height - editorRect.height;
+ } else if (verticalAlignment == SWT.TOP) {
+ // do nothing - cell.y is the right answer
+ } else { // default is CENTER
+ editorRect.y += (cell.height - editorRect.height)/2;
+ }
+ return editorRect;
+ }
+
+ }
+
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathDecorator.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,38 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+
+public class XPathDecorator extends LabelProvider implements ILightweightLabelDecorator {
+ public void decorate(Object element, IDecoration decoration) {
+ String decoration2 = getDecoration(element);
+ if( decoration2 != null ) {
+ decoration.addSuffix(decoration2);
+ }
+ }
+
+ public static String getDecoration(Object element) {
+ if( element instanceof XPathQuery) {
+ XPathResultNode[] nodes = XPathModel.getResultNodes((XPathQuery)element);
+ if(nodes.length == 1 ) {
+ return " " + nodes[0].getText();
+ }
+ }
+
+ if( element instanceof XPathFileResult ) {
+ XPathResultNode[] nodes = ((XPathFileResult)element).getChildren();
+ if( nodes.length == 1 )
+ return " " + nodes[0].getText();
+ }
+
+ if( element instanceof XPathResultNode ) {
+ return ((XPathResultNode)element).getText();
+ }
+ return null;
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeContentProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeContentProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,135 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+
+public class XPathTreeContentProvider implements ITreeContentProvider {
+
+ public static class DelayProxy {
+ }
+
+ public static final DelayProxy LOADING = new DelayProxy();
+
+ private Viewer viewer;
+ private ArrayList<XPathCategory> loading = new ArrayList<XPathCategory>();
+
+ public class ServerWrapper {
+ public IServer server;
+
+ public ServerWrapper(IServer server) {
+ this.server = server;
+ }
+
+ public int hashCode() {
+ return server.getId().hashCode();
+ }
+
+ public boolean equals(Object other) {
+ return other instanceof ServerWrapper
+ && ((ServerWrapper) other).server.getId().equals(
+ server.getId());
+ }
+ }
+
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement == null)
+ return new Object[] {};
+ if (parentElement instanceof IServer) {
+ return new Object[] { new ServerWrapper((IServer) parentElement) };
+ }
+
+ if (parentElement instanceof ServerWrapper) {
+ return XPathModel.getDefault().getCategories(
+ ((ServerWrapper) parentElement).server);
+ }
+
+ if (parentElement instanceof XPathCategory) {
+ if (((XPathCategory) parentElement).isLoaded())
+ return ((XPathCategory) parentElement).getQueries();
+
+ if (!loading.contains((XPathCategory) parentElement))
+ launchLoad((XPathCategory) parentElement);
+
+ return new Object[] { LOADING };
+ }
+
+ // we're the named element (JNDI)
+ if (parentElement instanceof XPathQuery) {
+ if (XPathModel.getResultNodes((XPathQuery) parentElement).length == 1) {
+ return new Object[0];
+ } else {
+ return ((XPathQuery) parentElement).getResults();
+ }
+ }
+
+ // we're a file node (blah.xml)
+ if (parentElement instanceof XPathFileResult) {
+ if (((XPathFileResult) parentElement).getChildren().length == 1)
+ return new Object[0];
+ return ((XPathFileResult) parentElement).getChildren();
+ }
+
+ if (parentElement instanceof XPathResultNode) {
+ return new Object[0];
+ }
+
+ return new Object[0];
+ }
+
+ protected void launchLoad(final XPathCategory cat) {
+ new Job("Loading XPaths") {
+ protected IStatus run(IProgressMonitor monitor) {
+ loading.add(cat);
+ XPathQuery[] queries = cat.getQueries();
+ XPathFileResult[] results;
+ for (int i = 0; i < queries.length; i++) {
+ results = queries[i].getResults();
+ for (int j = 0; j < results.length; j++) {
+ results[j].getChildren();
+ }
+ }
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ loading.remove(cat);
+ ((StructuredViewer) viewer).refresh(cat.getServer());
+ }
+ });
+ return Status.OK_STATUS;
+ }
+ }.schedule(200);
+ }
+
+
+ public Object getParent(Object element) {
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ return getChildren(element).length > 0 ? true : false;
+ }
+
+ public Object[] getElements(Object inputElement) {
+ return new Object[0];
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ this.viewer = viewer;
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/XPathTreeLabelProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,63 @@
+package org.jboss.ide.eclipse.as.ui.views.server.extensions;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
+import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
+import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
+import org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeContentProvider.ServerWrapper;
+
+public class XPathTreeLabelProvider extends LabelProvider {
+ private Image rootImage;
+ public XPathTreeLabelProvider() {
+ super();
+ ImageDescriptor des = ImageDescriptor.createFromURL(JBossServerUIPlugin.getDefault().getBundle().getEntry("icons/XMLFile.gif"));
+ rootImage = des.createImage();
+ }
+
+ public Image getImage(Object element) {
+ if( element instanceof ServerWrapper )
+ return rootImage;
+
+ if (element instanceof XPathCategory)
+ return PlatformUI.getWorkbench().getSharedImages().getImage(
+ ISharedImages.IMG_OBJ_FOLDER);
+
+ return null;
+ }
+
+ public String getText(Object element) {
+ if( element instanceof ServerWrapper )
+ return "XML Configuration";
+ if( element == XPathTreeContentProvider.LOADING )
+ return "Loading...";
+
+ if (element instanceof XPathCategory)
+ return ((XPathCategory) element).getName();
+
+ if( element instanceof XPathQuery )
+ return ((XPathQuery)element).getName();
+
+ if( element instanceof XPathFileResult )
+ return ((XPathFileResult)element).getFileLocation();
+
+ return "";
+ }
+
+ public XPathResultNode[] getResultNodes(XPathQuery query) {
+ ArrayList<XPathResultNode> l = new ArrayList<XPathResultNode>();
+ XPathFileResult[] files = query.getResults();
+ for( int i = 0; i < files.length; i++ ) {
+ l.addAll(Arrays.asList(files[i].getChildren()));
+ }
+ return l.toArray(new XPathResultNode[l.size()]);
+ }
+}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/DescriptorXPathViewProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -21,50 +21,14 @@
*/
package org.jboss.ide.eclipse.as.ui.views.server.providers;
-import org.eclipse.core.filesystem.EFS;
-import org.eclipse.core.filesystem.IFileStore;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.window.Window;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.MessageBox;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathModel;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
-import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs;
-import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathCategoryDialog;
-import org.jboss.ide.eclipse.as.ui.dialogs.XPathDialogs.XPathDialog;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.providers.descriptors.DescriptorXPathPropertySheetPage;
/**
*
* @author Rob Stryker <rob.stryker(a)redhat.com>
*
*/
-public class DescriptorXPathViewProvider extends JBossServerViewExtension {
+public class DescriptorXPathViewProvider { /*
+extends JBossServerViewExtension {
private XPathTreeContentProvider contentProvider;
private XPathTreeLabelProvider labelProvider;
@@ -323,5 +287,6 @@
}
}
}
+ */
}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/EventLogViewProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -21,57 +21,15 @@
*/
package org.jboss.ide.eclipse.as.ui.views.server.providers;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Properties;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Preferences;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogRoot;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
-import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.IEventLogListener;
-import org.jboss.ide.eclipse.as.core.util.SimpleTreeItem;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.dialogs.ShowStackTraceDialog;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.IEventLogLabelProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.ISimplePropertiesHolder;
-import org.jboss.tools.as.wst.server.ui.views.server.preferencepages.ViewProviderPreferenceComposite;
-
/**
*
* @author Rob Stryker <rob.stryker(a)redhat.com>
*
*/
-public class EventLogViewProvider extends JBossServerViewExtension implements IEventLogListener, ISimplePropertiesHolder {
+public class EventLogViewProvider {
+ /*
+ extends JBossServerViewExtension implements IEventLogListener, ISimplePropertiesHolder {
public static final String SHOW_TIMESTAMP = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.showTimestamp";
public static final String GROUP_BY_CATEGORY = "org.jboss.ide.eclipse.as.ui.views.server.providers.EventLogViewProvider.groupByCategory";
@@ -323,11 +281,11 @@
return new Properties();
}
- public ViewProviderPreferenceComposite createPreferenceComposite(Composite parent) {
+ public EventLogPreferenceComposite createPreferenceComposite(Composite parent) {
return new EventLogPreferenceComposite(parent);
}
- protected class EventLogPreferenceComposite extends ViewProviderPreferenceComposite {
+ protected class EventLogPreferenceComposite extends Composite {
private Button newestFirst, oldestFirst, showTime, sort;
private Group firstGroup;
public EventLogPreferenceComposite(Composite parent) {
@@ -451,5 +409,5 @@
EventLogModel.disableLogging();
}
-
+*/
}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/InactiveExtensionViewProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,157 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers;
-
-import java.util.ArrayList;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.JBossServerViewExtension;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.tools.as.wst.server.ui.ToolsServerUICore;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class InactiveExtensionViewProvider extends JBossServerViewExtension {
-
- private ITreeContentProvider contentProvider;
- private LabelProvider labelProvider;
- public InactiveExtensionViewProvider() {
- contentProvider = new InactiveContentProvider();
- labelProvider = new InactiveLabelProvider();
- }
-
-
- public class InactiveContentProvider implements ITreeContentProvider {
-
- public Object[] getChildren(Object parentElement) {
- if( parentElement == provider ) {
- ServerViewProvider[] allExtensions = ToolsServerUICore.getAllServerViewProviders();
- ArrayList<ServerViewProvider> list = new ArrayList<ServerViewProvider>();
- for( int i = 0; i < allExtensions.length; i++ ) {
- if( !allExtensions[i].isEnabled()) {
- list.add(allExtensions[i]);
- }
- }
- ServerViewProvider[] retval = new ServerViewProvider[list.size()];
- list.toArray(retval);
- return retval;
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0 ? true : false;
- }
-
- public Object[] getElements(Object inputElement) {
- // Unused
- return null;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- // Do nothing... don't care about which server is selected
- }
-
- }
-
- public class InactiveLabelProvider extends LabelProvider {
- public Image getImage(Object element) {
- if( element instanceof ServerViewProvider ) {
- return ((ServerViewProvider)element).getImage();
- }
- return null;
- }
-
- public String getText(Object element) {
- if( element instanceof ServerViewProvider ) {
- return ((ServerViewProvider)element).getName();
- }
- return element == null ? "" : element.toString();
- }
-
- }
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
- final Object[] selected = selection;
- boolean allProviders = true;
- for( int i = 0; i < selected.length; i++ )
- allProviders = allProviders && selected[i] instanceof ServerViewProvider
- && selected[i] != this.provider;
-
- if( allProviders) {
- Action act = new Action() {
- public void run() {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- for( int i = 0; i < selected.length; i++ ) {
- ((ServerViewProvider)selected[i]).setEnabled(true);
- ((ServerViewProvider)selected[i]).getDelegate().getContentProvider().
- inputChanged(JBossServerView.getDefault().getServerFrame().getViewer(), null, JBossServerView.getDefault().getSelectedServer());
- }
- JBossServerView.getDefault().getExtensionFrame().getViewer().refresh();
- }
- } );
- }
- };
- act.setText(Messages.InactiveCategoriesReEnable);
- menu.add(act);
- }
- }
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object selection) {
- fillContextMenu(shell, menu, new Object[] { selection });
- }
-
- public ITreeContentProvider getContentProvider() {
- return contentProvider;
- }
-
- public LabelProvider getLabelProvider() {
- return labelProvider;
- }
-
- public IPropertySheetPage getPropertySheetPage() {
- return null;
- }
-
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/ModuleViewProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,295 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2006, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as.ui.views.server.providers;
-
-import java.util.ArrayList;
-import java.util.Properties;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-import org.eclipse.wst.server.core.IServerListener;
-import org.eclipse.wst.server.core.IServerWorkingCopy;
-import org.eclipse.wst.server.core.ServerEvent;
-import org.eclipse.wst.server.core.ServerUtil;
-import org.eclipse.wst.server.core.internal.PublishServerJob;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.ui.ServerUICore;
-import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
-import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
-import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
-import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ModuleViewProvider extends SimplePropertiesViewExtension {
-
- private ModuleContentProvider contentProvider;
- private ModuleLabelProvider labelProvider;
- private Action deleteModuleAction, fullPublishModuleAction, incrementalPublishModuleAction;
- private ModuleServer[] selection;
- private IServerLifecycleListener serverResourceListener;
- private IServerListener serverListener;
-
- public ModuleViewProvider() {
- contentProvider = new ModuleContentProvider();
- labelProvider = new ModuleLabelProvider();
- createActions();
- addListeners();
- }
-
- private void createActions() {
- deleteModuleAction = new Action() {
- public void run() {
- if (MessageDialog.openConfirm(new Shell(), Messages.ServerDialogHeading, Messages.DeleteModuleConfirm)) {
- Thread t = new Thread() { public void run() {
- try {
- if( selection.length > 0 && selection[0].server != null ) {
- IServer server = selection[0].server;
- ArrayList topModsToRemove = new ArrayList();
- IModule topModTmp;
- for( int i = 0; i < selection.length; i++ ) {
- if( !topModsToRemove.contains(selection[i].module[0]))
- topModsToRemove.add(selection[i].module[0]);
- }
- IServerWorkingCopy serverWC = server.createWorkingCopy();
- IModule[] modsToRemove =
- (IModule[]) topModsToRemove.toArray(new IModule[topModsToRemove.size()]);
- ServerUtil.modifyModules(serverWC, new IModule[0], modsToRemove, new NullProgressMonitor());
- IServer server2 = serverWC.save(true, null);
- new PublishServerJob(server2, IServer.PUBLISH_INCREMENTAL, true).schedule();
- }
- } catch (CoreException e) {
- // ignore
- }
- }};
- t.start();
- }
- }
- };
- deleteModuleAction.setText(Messages.DeleteModuleText);
- deleteModuleAction.setDescription(Messages.DeleteModuleDescription);
- deleteModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.UNPUBLISH_IMAGE));
-
- fullPublishModuleAction = new Action() {
- public void run() {
- actionPublish(IServer.PUBLISH_STATE_FULL);
- }
- };
- fullPublishModuleAction.setText(Messages.FullPublishModuleText);
- fullPublishModuleAction.setDescription(Messages.PublishModuleDescription);
- fullPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
-
-
- incrementalPublishModuleAction = new Action() {
- public void run() {
- actionPublish(IServer.PUBLISH_STATE_INCREMENTAL);
- }
- };
- incrementalPublishModuleAction.setText(Messages.IncrementalPublishModuleText);
- incrementalPublishModuleAction.setDescription(Messages.PublishModuleDescription);
- incrementalPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
-}
-
- protected void actionPublish(int type) {
- // Assumption: Anything selected is already on the server, or it wouldnt be in the view.
- if( selection != null && selection.length > 0 ) {
- Server s = ((Server)selection[0].server);
- for( int i = 0; i < selection.length; i++ ) {
- IModule[] mod = selection[i].module;
- s.setModulePublishState(mod, type);
- ArrayList<IModule[]> allChildren = ModuleUtil.getDeepChildren(s, mod);
- for( int j = 0; j < allChildren.size(); j++ ) {
- s.setModulePublishState((IModule[])allChildren.get(j), type);
- }
- }
- new PublishServerJob(s, IServer.PUBLISH_INCREMENTAL, true).schedule();
- }
- }
-
-
- public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
- if( allAre(selection, ModuleServer.class)) {
- ModuleServer[] ms = new ModuleServer[selection.length];
- for( int i = 0; i < selection.length; i++ )
- ms[i] = (ModuleServer)selection[i];
- this.selection = ms;
- menu.add(deleteModuleAction);
- menu.add(fullPublishModuleAction);
- menu.add(incrementalPublishModuleAction);
- }
- }
-
- public ITreeContentProvider getContentProvider() {
- return contentProvider;
- }
-
- public LabelProvider getLabelProvider() {
- return labelProvider;
- }
-
- public boolean supports(IServer server) {
- return true;
- }
-
-
- class ModuleContentProvider implements ITreeContentProvider {
-
- private IServer input;
-
- public Object[] getChildren(Object parentElement) {
-
- if (parentElement instanceof ModuleServer) {
- ModuleServer ms = (ModuleServer) parentElement;
- try {
- IModule[] children = ms.server.getChildModules(ms.module, null);
- int size = children.length;
- ModuleServer[] ms2 = new ModuleServer[size];
- for (int i = 0; i < size; i++) {
- int size2 = ms.module.length;
- IModule[] module = new IModule[size2 + 1];
- System.arraycopy(ms.module, 0, module, 0, size2);
- module[size2] = children[i];
- ms2[i] = new ModuleServer(ms.server, module);
- }
- return ms2;
- } catch (Exception e) {
- return new Object[]{};
- }
- }
-
-
-
- if( parentElement instanceof ServerViewProvider && input != null ) {
- IModule[] modules = input.getModules();
- int size = modules.length;
- ModuleServer[] ms = new ModuleServer[size];
- for (int i = 0; i < size; i++) {
- ms[i] = new ModuleServer(input, new IModule[] { modules[i] });
- }
- return ms;
- }
- return new Object[] {};
- }
-
- public Object getParent(Object element) {
- if( element instanceof ModuleServer ) {
- return provider;
- }
-
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return getChildren(element).length > 0 ? true : false;
- }
-
- // unused
- public Object[] getElements(Object inputElement) {
- return null;
- }
-
- public void dispose() {
- // TODO Auto-generated method stub
-
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- input = (IServer)newInput;
- }
-
- public IServer getServer() {
- return input;
- }
- }
-
- class ModuleLabelProvider extends LabelProvider {
- public String getText(Object obj) {
- if( obj instanceof ModuleServer ) {
- ModuleServer ms = (ModuleServer)obj;
- int size = ms.module.length;
- return ms.module[size - 1].getName();
- }
-
- return "unknown";
- }
- public Image getImage(Object obj) {
- if( obj instanceof ModuleServer ) {
- ModuleServer ms = (ModuleServer)obj;
- int size = ms.module.length;
- return ServerUICore.getLabelProvider().getImage(ms.module[ms.module.length - 1]);
- }
- return null;
- }
-
- }
-
-
- public String[] getPropertyKeys(Object selected) {
- return new String[] { Messages.ModulePropertyType, Messages.ModulePropertyProject, Messages.ModulePropertyName };
- }
-
- public Properties getProperties(Object selected) {
- Properties props = new Properties();
- if( selected != null && selected instanceof ModuleServer) {
- ModuleServer moduleServer = ((ModuleServer)selected);
- IModule mod = moduleServer.module[moduleServer.module.length-1];
- if( mod != null && mod.getProject() != null ) {
- props.setProperty(Messages.ModulePropertyType, mod.getModuleType().getId());
- props.setProperty(Messages.ModulePropertyProject, mod.getProject().getName());
- props.setProperty(Messages.ModulePropertyProject, mod.getName());
- }
- }
- return props;
- }
-
- private void addListeners() {
- UnitedServerListenerManager.getDefault().addListener(new UnitedServerListener() {
- public void serverChanged(ServerEvent event) {
- int eventKind = event.getKind();
- if ((eventKind & ServerEvent.MODULE_CHANGE) != 0) {
- // module change event
- if ((eventKind & ServerEvent.STATE_CHANGE) != 0 || (eventKind & ServerEvent.PUBLISH_STATE_CHANGE) != 0) {
- refreshViewer();
- }
- }
- }
- });
- }
-}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -38,7 +38,6 @@
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
@@ -61,14 +60,13 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
import org.jboss.ide.eclipse.as.ui.Messages;
import org.jboss.ide.eclipse.as.ui.views.server.providers.DescriptorXPathViewProvider;
-import org.jboss.tools.as.wst.server.ui.views.server.ExtensionTableViewer.ContentWrapper;
/**
*
* @author Rob Stryker <rob.stryker(a)redhat.com>
*
*/
-public class DescriptorXPathPropertySheetPage implements IPropertySheetPage {
+public class DescriptorXPathPropertySheetPage { /*implements IPropertySheetPage {
private TreeViewer xpathTreeViewer;
private TreeColumn column, column2;//, column3;
private Tree xpathTree;
@@ -141,9 +139,6 @@
public void selectionChanged(IWorkbenchPart part, ISelection selection) {
//input = null;
Object element = ((IStructuredSelection)selection).getFirstElement();
- if( element instanceof ContentWrapper ) {
- element = ((ContentWrapper)element).getElement();
- }
if( element != null //)&& element != provider.getActiveCategory()
&& element instanceof XPathCategory) {
// show loading
@@ -426,5 +421,5 @@
}
return null;
}
-
+*/
}
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/XPathPropertyContentProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -27,7 +27,6 @@
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathQuery;
import org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathFileResult.XPathResultNode;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
/**
*
@@ -57,10 +56,6 @@
return ((XPathQuery)parentElement).getResults();
}
}
-
- // re-creates it from scratch... hrmm
- if( parentElement instanceof ServerViewProvider )
- return new Object[] {"ERROR"}; //XPathModel.getDefault().getCategories()
return new Object[0];
}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ExtensionManager.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ExtensionManager.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ExtensionManager.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,79 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.tools.as.wst.server.ui;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionRegistry;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-
-/**
- *
- * @author rob.stryker(a)jboss.com
- */
-public class ExtensionManager {
- private static ExtensionManager instance;
- public static ExtensionManager getDefault() {
- if( instance == null )
- instance = new ExtensionManager();
- return instance;
- }
-
- private ServerViewProvider[] serverViewExtensions;
- public ServerViewProvider[] getAllServerViewProviders() {
- if( serverViewExtensions == null )
- loadAllServerViewProviders();
- Arrays.sort(serverViewExtensions, new Comparator() {
- public int compare(Object arg0, Object arg1) {
- if( arg0 instanceof ServerViewProvider && arg1 instanceof ServerViewProvider) {
- return ((ServerViewProvider)arg0).getWeight() - ((ServerViewProvider)arg1).getWeight();
- }
- return 0;
- }
- });
- return serverViewExtensions;
- }
- private void loadAllServerViewProviders() {
- // Create the extensions from the registry
- IExtensionRegistry registry = Platform.getExtensionRegistry();
- IConfigurationElement[] elements = registry.getConfigurationElementsFor(JBossServerUIPlugin.PLUGIN_ID, "ServerViewExtension");
- ArrayList list = new ArrayList();
- for( int i = 0; i < elements.length; i++ ) {
- try {
- list.add(new ServerViewProvider(elements[i]));
- } catch(Exception e) {
- String msg = "Server View Provider (" + elements[i].getAttribute(ServerViewProvider.ID_LABEL) + ") failed to load";
- IStatus status = new Status(IStatus.ERROR, JBossServerUIPlugin.PLUGIN_ID, msg, e);
- JBossServerUIPlugin.getDefault().getLog().log(status);
- }
- }
- serverViewExtensions = (ServerViewProvider[]) list.toArray(new ServerViewProvider[list.size()]);
- }
-
-}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerActionProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,297 @@
+package org.jboss.tools.as.wst.server.ui;
+
+import java.util.Iterator;
+
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IContributionManager;
+import org.eclipse.jface.action.IMenuListener;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.bindings.TriggerSequence;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.keys.IBindingService;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.ServerPort;
+import org.eclipse.wst.server.core.model.ServerDelegate;
+import org.eclipse.wst.server.ui.internal.Messages;
+import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+import org.eclipse.wst.server.ui.internal.Trace;
+import org.eclipse.wst.server.ui.internal.actions.NewServerWizardAction;
+import org.eclipse.wst.server.ui.internal.view.servers.CopyAction;
+import org.eclipse.wst.server.ui.internal.view.servers.DeleteAction;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleSloshAction;
+import org.eclipse.wst.server.ui.internal.view.servers.MonitorServerPortAction;
+import org.eclipse.wst.server.ui.internal.view.servers.OpenAction;
+import org.eclipse.wst.server.ui.internal.view.servers.PasteAction;
+import org.eclipse.wst.server.ui.internal.view.servers.PropertiesAction;
+import org.eclipse.wst.server.ui.internal.view.servers.PublishAction;
+import org.eclipse.wst.server.ui.internal.view.servers.PublishCleanAction;
+import org.eclipse.wst.server.ui.internal.view.servers.RemoveModuleAction;
+import org.eclipse.wst.server.ui.internal.view.servers.RenameAction;
+import org.eclipse.wst.server.ui.internal.view.servers.RestartModuleAction;
+import org.eclipse.wst.server.ui.internal.view.servers.ShowInConsoleAction;
+import org.eclipse.wst.server.ui.internal.view.servers.ShowInDebugAction;
+import org.eclipse.wst.server.ui.internal.view.servers.StartAction;
+import org.eclipse.wst.server.ui.internal.view.servers.StartModuleAction;
+import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
+import org.eclipse.wst.server.ui.internal.view.servers.StopModuleAction;
+
+public class ServerActionProvider extends CommonActionProvider {
+ private ICommonActionExtensionSite actionSite;
+ private Clipboard clipboard;
+ public ServerActionProvider() {
+ super();
+ }
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ CommonViewer cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ addListeners(cv);
+ makeServerActions(cv, wsSite.getSelectionProvider());
+ }
+ }
+ }
+
+
+ // actions on a server
+ protected Action[] actions;
+ protected Action actionModifyModules;
+ protected Action openAction, showInConsoleAction, showInDebugAction, propertiesAction, monitorPropertiesAction;
+ protected Action copyAction, pasteAction, deleteAction, renameAction;
+ protected Action noneAction = new Action(Messages.dialogMonitorNone) {
+ // dummy action
+ };
+
+ private void addListeners(CommonViewer tableViewer) {
+ tableViewer.addOpenListener(new IOpenListener() {
+ public void open(OpenEvent event) {
+ try {
+ IStructuredSelection sel = (IStructuredSelection) event.getSelection();
+ Object data = sel.getFirstElement();
+ if (!(data instanceof IServer))
+ return;
+ IServer server = (IServer) data;
+ ServerUIPlugin.editServer(server);
+ } catch (Exception e) {
+ Trace.trace(Trace.SEVERE, "Could not open server", e);
+ }
+ }
+ });
+ }
+
+ private void makeServerActions(CommonViewer tableViewer, ISelectionProvider provider) {
+ clipboard = new Clipboard(tableViewer.getTree().getDisplay());
+ Shell shell = tableViewer.getTree().getShell();
+
+ actions = new Action[6];
+ // create the start actions
+ actions[0] = new StartAction(shell, provider, ILaunchManager.DEBUG_MODE);
+ actions[1] = new StartAction(shell, provider, ILaunchManager.RUN_MODE);
+ actions[2] = new StartAction(shell, provider, ILaunchManager.PROFILE_MODE);
+
+ // create the stop action
+ actions[3] = new StopAction(shell, provider);
+
+ // create the publish actions
+ actions[4] = new PublishAction(shell, provider);
+ actions[5] = new PublishCleanAction(shell, provider);
+
+ // create the open action
+ openAction = new OpenAction(provider);
+
+// // create copy, paste, and delete actions
+ pasteAction = new PasteAction(shell, provider, clipboard);
+ copyAction = new CopyAction(provider, clipboard, pasteAction);
+ deleteAction = new DeleteAction(shell, provider);
+ renameAction = new RenameAction(shell, tableViewer, provider);
+
+ // create the other actions
+ actionModifyModules = new ModuleSloshAction(shell, provider);
+ showInConsoleAction = new ShowInConsoleAction(provider);
+ showInDebugAction = new ShowInDebugAction(provider);
+
+ // create the properties action
+ propertiesAction = new PropertiesAction(shell, provider);
+ monitorPropertiesAction = new PropertiesAction(shell, "org.eclipse.wst.server.ui.properties.monitor", provider);
+ }
+
+ public void fillActionBars(IActionBars actionBars) {
+ actionBars.setGlobalActionHandler("org.eclipse.wst.server.debug", actions[0]);
+ actionBars.setGlobalActionHandler("org.eclipse.wst.server.run", actions[1]);
+ actionBars.setGlobalActionHandler("org.eclipse.wst.server.stop", actions[3]);
+ actionBars.setGlobalActionHandler("org.eclipse.wst.server.publish", actions[4]);
+ actionBars.setGlobalActionHandler("org.eclipse.ui.navigator.Open", openAction);
+ actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
+ actionBars.updateActionBars();
+ actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
+ actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
+ actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
+ actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), renameAction);
+
+ IContributionManager cm = actionBars.getToolBarManager();
+ cm.removeAll();
+
+ for (int i = 0; i < actions.length - 1; i++)
+ cm.add(actions[i]);
+ }
+
+ private static void fillNewContextMenu(Shell shell, ISelection selection, IMenuManager menu) {
+ IAction newServerAction = new NewServerWizardAction();
+ newServerAction.setText(Messages.actionNewServer);
+ menu.add(newServerAction);
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ ICommonViewerSite site = actionSite.getViewSite();
+ IStructuredSelection selection = null;
+ Shell shell = actionSite.getViewSite().getShell();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
+ }
+
+ IServer server = null;
+ IModule[] module = null;
+ if (selection != null && !selection.isEmpty()) {
+ Iterator iterator = selection.iterator();
+ Object obj = iterator.next();
+ if (obj instanceof IServer)
+ server = (IServer) obj;
+ if (obj instanceof ModuleServer) {
+ ModuleServer ms = (ModuleServer) obj;
+ server = ms.server;
+ module = ms.module;
+ }
+ if (iterator.hasNext()) {
+ server = null;
+ module = null;
+ }
+ }
+
+ // new action
+ MenuManager newMenu = new MenuManager(Messages.actionNew);
+ fillNewContextMenu(null, selection, newMenu);
+ menu.add(newMenu);
+
+ // open action
+ if (server != null && module == null) {
+ menu.add(openAction);
+
+ String text = Messages.actionShowIn;
+ final IWorkbench workbench = PlatformUI.getWorkbench();
+ final IBindingService bindingService = (IBindingService) workbench
+ .getAdapter(IBindingService.class);
+ final TriggerSequence[] activeBindings = bindingService
+ .getActiveBindingsFor("org.eclipse.ui.navigate.showInQuickMenu");
+ if (activeBindings.length > 0) {
+ text += "\t" + activeBindings[0].format();
+ }
+
+ MenuManager showInMenu = new MenuManager(text);
+ showInMenu.add(showInConsoleAction);
+ showInMenu.add(showInDebugAction);
+ //IActionBars actionBars = getViewSite().getActionBars();
+ //actionBars.setGlobalActionHandler("group.show", showInMenu);
+ menu.add(showInMenu);
+ menu.add(new Separator());
+ } else
+ menu.add(new Separator());
+
+ if (server != null) {
+ if (module == null) {
+ menu.add(copyAction);
+ menu.add(pasteAction);
+ menu.add(deleteAction);
+ menu.add(renameAction);
+ } else if (module.length == 1)
+ menu.add(new RemoveModuleAction(shell, server, module[0]));
+ menu.add(new Separator());
+ }
+
+ if (server != null && module == null) {
+ // server actions
+ for (int i = 0; i < actions.length; i++)
+ menu.add(actions[i]);
+
+ menu.add(new Separator());
+ menu.add(actionModifyModules);
+
+ // monitor
+ if (server.getServerType() != null) {
+ final MenuManager menuManager = new MenuManager(Messages.actionMonitor);
+
+ final IServer server2 = server;
+ final Shell shell2 = shell;
+ menuManager.addMenuListener(new IMenuListener() {
+ public void menuAboutToShow(IMenuManager manager) {
+ menuManager.removeAll();
+ if (server2.getAdapter(ServerDelegate.class) != null) {
+ ServerPort[] ports = server2.getServerPorts(null);
+ if (ports != null) {
+ int size = ports.length;
+ for (int i = 0; i < size; i++) {
+ if (!ports[i].isAdvanced())
+ menuManager.add(new MonitorServerPortAction(shell2, server2, ports[i]));
+ }
+ }
+ }
+
+ if (menuManager.isEmpty())
+ menuManager.add(noneAction);
+
+ menuManager.add(new Separator());
+ menuManager.add(monitorPropertiesAction);
+ }
+ });
+
+ // add an initial menu item so that the menu appears correctly
+ noneAction.setEnabled(false);
+ menuManager.add(noneAction);
+ menu.add(menuManager);
+ }
+ }
+
+ if (server != null && module != null) {
+ menu.add(new Separator());
+ menu.add(new StartModuleAction(server, module));
+ menu.add(new StopModuleAction(server, module));
+ menu.add(new RestartModuleAction(server, module));
+ }
+
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end"));
+
+ if (server != null) {
+ menu.add(new Separator());
+ menu.add(propertiesAction);
+ }
+ }
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerContentProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,331 @@
+package org.jboss.tools.as.wst.server.ui;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IPublishListener;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerLifecycleListener;
+import org.eclipse.wst.server.core.IServerListener;
+import org.eclipse.wst.server.core.ServerCore;
+import org.eclipse.wst.server.core.ServerEvent;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.core.internal.UpdateServerJob;
+import org.eclipse.wst.server.core.util.PublishAdapter;
+import org.eclipse.wst.server.ui.internal.Messages;
+import org.eclipse.wst.server.ui.internal.Trace;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+import org.eclipse.wst.server.ui.internal.viewers.BaseContentProvider;
+
+public class ServerContentProvider extends BaseContentProvider implements ITreeContentProvider {
+ public static Object INITIALIZING = new Object();
+ protected IServerLifecycleListener serverResourceListener;
+ protected IPublishListener publishListener;
+ protected IServerListener serverListener;
+
+ // servers that are currently publishing and starting
+ protected static Set<String> publishing = new HashSet<String>(4);
+ protected static Set<String> starting = new HashSet<String>(4);
+ protected boolean animationActive = false;
+ protected boolean stopAnimation = false;
+ protected boolean initialized = false;
+
+
+ private StructuredViewer viewer;
+
+ public ServerContentProvider() {
+ addListeners();
+ }
+
+ public Object[] getElements(Object element) {
+ if( !initialized ) {
+ deferInitialization();
+ return new Object[] {INITIALIZING};
+ }
+
+ List<IServer> list = new ArrayList<IServer>();
+ IServer[] servers = ServerCore.getServers();
+ if (servers != null) {
+ int size = servers.length;
+ for (int i = 0; i < size; i++) {
+ if (!((Server)servers[i]).isPrivate())
+ list.add(servers[i]);
+ }
+ }
+ return list.toArray();
+ }
+
+ public Object[] getChildren(Object element) {
+ if (element instanceof ModuleServer) {
+ ModuleServer ms = (ModuleServer) element;
+ try {
+ IModule[] children = ms.server.getChildModules(ms.module, null);
+ int size = children.length;
+ ModuleServer[] ms2 = new ModuleServer[size];
+ for (int i = 0; i < size; i++) {
+ int size2 = ms.module.length;
+ IModule[] module = new IModule[size2 + 1];
+ System.arraycopy(ms.module, 0, module, 0, size2);
+ module[size2] = children[i];
+ ms2[i] = new ModuleServer(ms.server, module);
+ }
+ return ms2;
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ IServer server = (IServer) element;
+ IModule[] modules = server.getModules();
+ int size = modules.length;
+ ModuleServer[] ms = new ModuleServer[size];
+ for (int i = 0; i < size; i++) {
+ ms[i] = new ModuleServer(server, new IModule[] { modules[i] });
+ }
+ return ms;
+ }
+
+ public Object getParent(Object element) {
+ if (element instanceof ModuleServer) {
+ ModuleServer ms = (ModuleServer) element;
+ return ms.server;
+ }
+ return null;
+ }
+
+ public boolean hasChildren(Object element) {
+ if (element instanceof ModuleServer) {
+ // Check if the module server has child modules.
+ ModuleServer curModuleServer = (ModuleServer)element;
+ IServer curServer = curModuleServer.server;
+ IModule[] curModule = curModuleServer.module;
+ if (curServer != null && curModule != null) {
+ IModule[] curChildModule = curServer.getChildModules(curModule, null);
+ if (curChildModule != null && curChildModule.length > 0)
+ return true;
+
+ return false;
+ }
+
+ return false;
+ }
+ if( element instanceof IServer ) {
+ return ((IServer) element).getModules().length > 0;
+ }
+ return false;
+ }
+
+ public void inputChanged(Viewer aViewer, Object oldInput, Object newInput) {
+ viewer = (StructuredViewer) aViewer;
+ }
+
+ public void dispose() {
+ // do nothing
+ }
+
+
+
+ // Listeners and refreshing the viewer
+ protected void addListeners() {
+ serverResourceListener = new IServerLifecycleListener() {
+ public void serverAdded(IServer server) {
+ refreshServer(null);
+ server.addServerListener(serverListener);
+ ((Server) server).addPublishListener(publishListener);
+ }
+ public void serverChanged(IServer server) {
+ refreshServer(server);
+ }
+ public void serverRemoved(IServer server) {
+ refreshServer(null);
+ server.removeServerListener(serverListener);
+ ((Server) server).removePublishListener(publishListener);
+ }
+ };
+ ServerCore.addServerLifecycleListener(serverResourceListener);
+
+ publishListener = new PublishAdapter() {
+ public void publishStarted(IServer server) {
+ handlePublishChange(server, true);
+ }
+
+ public void publishFinished(IServer server, IStatus status) {
+ handlePublishChange(server, false);
+ }
+ };
+
+ serverListener = new IServerListener() {
+ public void serverChanged(ServerEvent event) {
+ if (event == null)
+ return;
+
+ int eventKind = event.getKind();
+ IServer server = event.getServer();
+ if ((eventKind & ServerEvent.SERVER_CHANGE) != 0) {
+ // server change event
+ if ((eventKind & ServerEvent.STATE_CHANGE) != 0) {
+ refreshServer(server, true);
+ int state = event.getState();
+ String id = server.getId();
+ if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
+ boolean startThread = false;
+ synchronized (starting) {
+ if (!starting.contains(id)) {
+ if (starting.isEmpty())
+ startThread = true;
+ starting.add(id);
+ }
+ }
+ if (startThread)
+ startThread();
+ } else {
+ boolean stopThread = false;
+ synchronized (starting) {
+ if (starting.contains(id)) {
+ starting.remove(id);
+ if (starting.isEmpty())
+ stopThread = true;
+ }
+ }
+ if (stopThread)
+ stopThread();
+ }
+ } else
+ refreshServer(server);
+ } else if ((eventKind & ServerEvent.MODULE_CHANGE) != 0) {
+ // module change event
+ if ((eventKind & ServerEvent.STATE_CHANGE) != 0 || (eventKind & ServerEvent.PUBLISH_STATE_CHANGE) != 0) {
+ refreshServer(server);
+ }
+ }
+ }
+ };
+
+ // add listeners to servers
+ IServer[] servers = ServerCore.getServers();
+ if (servers != null) {
+ int size = servers.length;
+ for (int i = 0; i < size; i++) {
+ servers[i].addServerListener(serverListener);
+ ((Server) servers[i]).addPublishListener(publishListener);
+ }
+ }
+ }
+
+ protected void deferInitialization() {
+ Job job = new Job(Messages.jobInitializingServersView) {
+ public IStatus run(IProgressMonitor monitor) {
+ IServer[] servers = ServerCore.getServers();
+ int size = servers.length;
+ for (int i = 0; i < size; i++) {
+ ((Server)servers[i]).getAllModules().iterator();
+ }
+
+ for (int i = 0; i < size; i++) {
+ IServer server = servers[i];
+ if (server.getServerType() != null && server.getServerState() == IServer.STATE_UNKNOWN) {
+ UpdateServerJob job2 = new UpdateServerJob(server);
+ job2.schedule();
+ }
+ }
+ initialized = true;
+ refreshServer(null);
+ return Status.OK_STATUS;
+ }
+ };
+
+ job.setSystem(true);
+ job.setPriority(Job.SHORT);
+ job.schedule();
+ }
+
+ protected void refreshServer(final IServer server) {
+ refreshServer(server, false);
+ }
+ protected void refreshServer(final IServer server, final boolean resetSelection) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ try {
+ if( viewer != null && !viewer.getControl().isDisposed()) {
+ viewer.refresh(server);
+ if( resetSelection ) {
+ ISelection sel = viewer.getSelection();
+ viewer.setSelection(sel);
+ }
+ ServerDecorator.getDefault().redecorate(server);
+ }
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ });
+ }
+
+ protected void handlePublishChange(IServer server, boolean isPublishing) {
+ String serverId = server.getId();
+ if (isPublishing)
+ publishing.add(serverId);
+ else
+ publishing.remove(serverId);
+
+ refreshServer(server);
+ }
+
+
+ protected void startThread() {
+ if (animationActive)
+ return;
+
+ stopAnimation = false;
+
+ final Display display = viewer == null ? Display.getDefault() : viewer.getControl().getDisplay();
+ final int SLEEP = 200;
+ final Runnable[] animator = new Runnable[1];
+ animator[0] = new Runnable() {
+ public void run() {
+ if (!stopAnimation) {
+ try {
+ int size = 0;
+ String[] servers;
+ synchronized (starting) {
+ size = starting.size();
+ servers = new String[size];
+ starting.toArray(servers);
+ }
+
+ for (int i = 0; i < size; i++) {
+ IServer server = ServerCore.findServer(servers[i]);
+ if (server != null ) {
+ ServerDecorator.animate();
+ refreshServer(server);
+ }
+ }
+ } catch (Exception e) {
+ Trace.trace(Trace.FINEST, "Error in Servers view animation", e);
+ }
+ display.timerExec(SLEEP, animator[0]);
+ }
+ }
+ };
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ display.timerExec(SLEEP, animator[0]);
+ }
+ });
+ }
+
+ protected void stopThread() {
+ stopAnimation = true;
+ }}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerDecorator.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerDecorator.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerDecorator.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,196 @@
+package org.jboss.tools.as.wst.server.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.IServerType;
+import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.ui.ServerUICore;
+import org.eclipse.wst.server.ui.internal.ImageResource;
+import org.eclipse.wst.server.ui.internal.Messages;
+import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
+import org.eclipse.wst.server.ui.internal.provisional.UIDecoratorManager;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+
+public class ServerDecorator extends LabelProvider implements ILightweightLabelDecorator {
+
+ public static final String[] syncState = new String[] {
+ Messages.viewSyncOkay,
+ Messages.viewSyncRestart,
+ Messages.viewSyncPublish,
+ Messages.viewSyncRestartPublish,
+ Messages.viewSyncPublishing};
+
+ public static final String[] syncStateUnmanaged = new String[] {
+ Messages.viewSyncOkay2,
+ Messages.viewSyncRestart2,
+ Messages.viewSyncPublish2,
+ Messages.viewSyncRestartPublish2,
+ Messages.viewSyncPublishing2};
+
+ public static final String[] modulePublishState = new String[] {
+ "",
+ Messages.viewSyncOkay,
+ Messages.viewSyncPublish,
+ Messages.viewSyncPublish};
+
+ private static ServerDecorator instance;
+ public static ServerDecorator getDefault() {
+ return instance;
+ }
+
+ private static int count = 0;
+ public static void animate() {
+ count = (count + 1)%3;
+ }
+ public static int getCount() {
+ return count;
+ }
+
+ public ServerDecorator() {
+ instance = this;
+ }
+
+ public void decorate(Object element, IDecoration decoration) {
+ if( element instanceof IServer ) {
+ String state = getServerStateLabel((IServer)element);
+ String status = getServerStatusLabel((IServer)element);
+ decoration.addSuffix(combine(state, status));
+ } else if( element instanceof ModuleServer ) {
+ String state = getModuleStateText((ModuleServer)element);
+ String status = getModuleStatusText((ModuleServer)element);
+ decoration.addSuffix(combine(state, status));
+ }
+ }
+
+ protected String combine(String state, String status) {
+ if(isEmpty(state) && isEmpty(status))
+ return "";
+ if( isEmpty(state))
+ return " [" + status + "]";
+ if( isEmpty(status))
+ return " [" + state + "]";
+ return " [" + state + ", " + status + "]";
+ }
+
+ protected boolean isEmpty(String s) {
+ return (s == null || "".equals(s));
+ }
+
+ public void redecorate(IServer server) {
+ fireLabelProviderChanged(new LabelProviderChangedEvent(this));
+ }
+
+
+
+ /*
+ * Utility methods
+ */
+ public static Image getServerImage(IServer server) {
+ return server == null ? null :
+ server.getServerType() == null ? null :
+ ImageResource.getImage(server.getServerType().getId());
+ }
+
+ public static String getServerStateLabel(IServer server) {
+ return server == null ? null :
+ server.getServerType() == null ? null :
+ getStateLabel(server.getServerType(), server.getServerState(), server.getMode());
+ }
+
+ public static String getStateLabel(IServerType serverType, int state, String mode) {
+ return serverType == null ? null :
+ UIDecoratorManager.getUIDecorator(serverType).getStateLabel(state, mode, count);
+ }
+
+ public static String getServerStatusLabel(IServer server) {
+ IStatus status = ((Server) server).getServerStatus();
+ if (status != null)
+ return status.getMessage();
+
+ if (server.getServerType() == null)
+ return "";
+
+ if (server.getServerState() == IServer.STATE_UNKNOWN)
+ return "";
+
+ String serverId = server.getId();
+ if (ServerContentProvider.publishing.contains(serverId))
+ return ServerDecorator.syncState[4];
+
+ // republish
+ int i = 0;
+ if (server.shouldPublish()) {
+ if (((Server)server).isPublishUnknown())
+ return "";
+ i += 2;
+ }
+
+ if (server.shouldRestart())
+ i = 1;
+
+ return syncState[i];
+ }
+
+ public static Image getServerStateImage(IServer server) {
+ return server == null ? null :
+ getStateImage(server.getServerType(), server.getServerState(), server.getMode());
+ }
+
+ public static Image getStateImage(IServerType serverType, int state, String mode) {
+ return serverType == null ? null :
+ UIDecoratorManager.getUIDecorator(serverType).getStateImage(state, mode, getCount());
+ }
+
+ public static String getModuleText(ModuleServer ms ) {
+ if (ms == null || ms.module == null)
+ return "";
+ int size = ms.module.length;
+ return ms.module[size - 1].getName();
+ }
+
+ public static Image getModuleImage(ModuleServer ms) {
+ if( ms != null ) {
+ ILabelProvider labelProvider = ServerUICore.getLabelProvider();
+ Image image = labelProvider.getImage(ms.module[ms.module.length - 1]);
+ labelProvider.dispose();
+ return image;
+ }
+ return null;
+ }
+
+ public static String getModuleStateText(ModuleServer ms) {
+ return "";
+ }
+
+ public static String getModuleStatusText(ModuleServer ms) {
+ if( ms != null && ms.server != null && ms.module != null ) {
+ IStatus status = ((Server) ms.server).getModuleStatus(ms.module);
+ if (status != null)
+ return status.getMessage();
+
+ return modulePublishState[ms.server.getModulePublishState(ms.module)];
+ }
+ return "";
+ }
+
+ public static Image getModuleStatusImage(ModuleServer ms) {
+ IStatus status = ((Server) ms.server).getModuleStatus(ms.module);
+ if (status != null) {
+ ISharedImages sharedImages = ServerUIPlugin.getInstance().getWorkbench().getSharedImages();
+ if (status.getSeverity() == IStatus.ERROR)
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ else if (status.getSeverity() == IStatus.WARNING)
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+ else if (status.getSeverity() == IStatus.INFO)
+ return sharedImages.getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+ }
+ return null;
+ }
+}
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerLabelProvider.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerLabelProvider.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServerLabelProvider.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,78 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.as.wst.server.ui;
+
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.ServerUICore;
+import org.eclipse.wst.server.ui.internal.ImageResource;
+import org.eclipse.wst.server.ui.internal.Messages;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+/**
+ * Server table label provider.
+ */
+public class ServerLabelProvider extends LabelProvider {
+
+ /**
+ * ServerTableLabelProvider constructor comment.
+ */
+ public ServerLabelProvider() {
+ super();
+ }
+
+ public String getText(Object element) {
+ if (element instanceof ModuleServer) {
+ ModuleServer ms = (ModuleServer) element;
+ if (ms.module == null)
+ return "";
+ int size = ms.module.length;
+ String name = ms.module[size - 1].getName();
+ return name;
+ }
+
+ if( element instanceof IServer ) {
+ IServer server = (IServer) element;
+ return notNull(server.getName());
+ }
+
+ if( element == ServerContentProvider.INITIALIZING)
+ return Messages.viewInitializing;
+
+ return "-";
+ }
+ public Image getImage(Object element) {
+ Image image = null;
+ if (element instanceof ModuleServer) {
+ ModuleServer ms = (ModuleServer) element;
+ ILabelProvider labelProvider = ServerUICore.getLabelProvider();
+ image = labelProvider.getImage(ms.module[ms.module.length - 1]);
+ labelProvider.dispose();
+ } else if( element instanceof IServer ) {
+ IServer server = (IServer) element;
+ if (server.getServerType() != null) {
+ image = ImageResource.getImage(server.getServerType().getId());
+ }
+ }
+ return image;
+ }
+
+ protected String notNull(String s) {
+ if (s == null)
+ return "";
+ return s;
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ return false;
+ }
+}
\ No newline at end of file
Added: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServersView.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServersView.java (rev 0)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ServersView.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - Initial API and implementation
+ *******************************************************************************/
+package org.jboss.tools.as.wst.server.ui;
+
+import org.eclipse.ui.navigator.CommonNavigator;
+/**
+ * A view of servers, their modules, and status.
+ */
+public class ServersView extends CommonNavigator {
+ /**
+ * ServersView constructor comment.
+ */
+ public ServersView() {
+ super();
+ }
+}
\ No newline at end of file
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ToolsServerUICore.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ToolsServerUICore.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/ToolsServerUICore.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,24 +0,0 @@
-package org.jboss.tools.as.wst.server.ui;
-
-import java.util.ArrayList;
-
-import org.eclipse.wst.server.core.IServer;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-
-public class ToolsServerUICore {
-
- public static ServerViewProvider[] getEnabledViewProviders(IServer server) {
- ServerViewProvider[] serverViewExtensions = getAllServerViewProviders();
- ArrayList<ServerViewProvider> list = new ArrayList<ServerViewProvider>();
- for( int i = 0; i < serverViewExtensions.length; i++ ) {
- if( serverViewExtensions[i].isEnabled() && serverViewExtensions[i].supports(server)) {
- list.add(serverViewExtensions[i]);
- }
- }
- return list.toArray(new ServerViewProvider[list.size()]);
- }
-
- public static ServerViewProvider[] getAllServerViewProviders() {
- return ExtensionManager.getDefault().getAllServerViewProviders();
- }
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ExtensionTableViewer.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ExtensionTableViewer.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ExtensionTableViewer.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,491 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.tools.as.wst.server.ui.views.server;
-
-import java.util.ArrayList;
-import java.util.Properties;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.part.PageBook;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.ui.ServerUICore;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListener;
-import org.jboss.ide.eclipse.as.core.server.UnitedServerListenerManager;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
-import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.ISimplePropertiesHolder;
-import org.jboss.ide.eclipse.as.ui.views.server.extensions.PropertySheetFactory.SimplePropertiesPropertySheetPage;
-import org.jboss.tools.as.wst.server.ui.ToolsServerUICore;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ExtensionTableViewer extends TreeViewer {
-
- protected TableViewerPropertySheet propertySheet;
- protected Action disableCategoryAction, refreshAction;
- protected boolean suppressingRefresh = false;
- public ExtensionTableViewer(Tree tree) {
- super(tree);
- setContentProvider(new ContentProviderDelegator());
- setLabelProvider(new LabelProviderDelegator());
- propertySheet = new TableViewerPropertySheet();
- createActions();
-
- UnitedServerListenerManager.getDefault().addListener(new UnitedServerListener() {
- public void serverRemoved(IServer server) {
- final IServer server2 = server;
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- Object o = getInput();
- if( server2.equals(o)) {
- setInput(null);
- }
- }
- });
- }
- });
- }
-
- protected void createActions() {
- disableCategoryAction = new Action() {
- public void run() {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- Object selected = getSelectedElement();
- if( selected instanceof ServerViewProvider) {
- ((ServerViewProvider)selected).setEnabled(false);
- refresh();
- }
- }
- } );
- }
- };
- disableCategoryAction.setText(Messages.DisableCategoryAction);
- refreshAction = new Action() {
- public void run() {
- Object o1 = ((IStructuredSelection)getSelection()).getFirstElement();
- if( o1 != null ) {
- // tell the delegate to refresh its model for the selected item, before we refresh the viewer
- ServerViewProvider provider = o1 instanceof ServerViewProvider ? (ServerViewProvider)o1 : ((ContentWrapper)o1).getProvider();
- if( provider != null )
- provider.getDelegate().refreshModel(o1);
- }
- Object el = getSelectedElement();
- if( el instanceof ServerViewProvider )
- refresh(el);
- else
- refresh(((IStructuredSelection)getSelection()).getFirstElement());
- }
- };
- refreshAction.setText("Refresh Item");
- }
-
- public static class ContentWrapper {
- private Object o;
- private ServerViewProvider provider;
-
- public ContentWrapper(Object o, ServerViewProvider provider) {
- this.o = o;
- this.provider = provider;
- }
-
- public Object getElement() {
- return o;
- }
-
- public ServerViewProvider getProvider() {
- return provider;
- }
-
- public boolean equals(Object other) {
- if( other == null ) return false;
-
- if( other instanceof ContentWrapper ) {
- if( ((ContentWrapper)other).getElement() == null )
- return o == null;
- return ((ContentWrapper)other).getElement().equals(o);
- }
- return false;
- }
-
- public int hashCode() {
- if( o == null ) return super.hashCode();
- return o.hashCode();
- }
- }
-
- protected class LabelProviderDelegator extends LabelProvider {
- public String getText(Object obj) {
- if( obj instanceof JBossServer) {
- JBossServer server = (JBossServer)obj;
- String ret = server.getServer().getName();
- return ret;
- }
- if( obj instanceof ServerViewProvider) {
- return ((ServerViewProvider)obj).getName();
- }
-
- if( obj instanceof ContentWrapper ) {
- ContentWrapper wrapper = (ContentWrapper)obj;
- return wrapper.getProvider().getDelegate().getLabelProvider().getText(wrapper.getElement());
- }
- return obj.toString();
- }
- public Image getImage(Object obj) {
- if( obj instanceof JBossServer ) {
- return ServerUICore.getLabelProvider().getImage(((JBossServer)obj).getServer());
- }
- if( obj instanceof ServerViewProvider ) {
- return ((ServerViewProvider)obj).getImage();
- }
-
- if( obj instanceof ContentWrapper ) {
- Object object2 = ((ContentWrapper)obj).getElement();
- return ((ContentWrapper)obj).getProvider().getDelegate().getLabelProvider().getImage(object2);
- }
-
- return null;
- }
- }
- protected class ContentProviderDelegator implements ITreeContentProvider {
-
- public ContentProviderDelegator() {
- }
-
- public ContentWrapper[] wrap( Object[] elements, ServerViewProvider provider ) {
- if( elements == null ) return new ContentWrapper[0];
-
- ContentWrapper[] wrappers = new ContentWrapper[elements.length];
- for( int i = 0; i < wrappers.length; i++ ) {
- wrappers[i] = new ContentWrapper(elements[i], provider);
- }
- return wrappers;
- }
-
- public Object[] getElements(Object inputElement) {
- if( inputElement == null ) return new Object[0];
- IServer tmp = (IServer)getInput();
- if( tmp == null )
- return new Object[0];
- return ToolsServerUICore.getEnabledViewProviders(tmp);
- }
-
- public Object[] getChildren(Object parentElement) {
- if( parentElement == null ) return new Object[0];
-
- if( parentElement instanceof ServerViewProvider) {
- Object[] ret = ((ServerViewProvider)parentElement).getDelegate().getContentProvider().getChildren(parentElement);
- return wrap(ret, ((ServerViewProvider)parentElement));
- }
-
- if( parentElement instanceof ContentWrapper ) {
- ContentWrapper parentWrapper = (ContentWrapper)parentElement;
- Object[] o = null;
- try {
- o = parentWrapper.getProvider().getDelegate().getContentProvider().getChildren(parentWrapper.getElement());
- } catch( Exception e) {
- JBossServerUIPlugin.log("Error finding children of " + parentElement, e);
- }
- if( o == null )
- return new Object[0];
- return wrap(o, parentWrapper.getProvider());
- }
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- if( element instanceof ServerViewProvider )
- return ((ServerViewProvider)element).getDelegate().getContentProvider().hasChildren(element);
- if( element instanceof ContentWrapper ) {
- ContentWrapper parentWrapper = (ContentWrapper)element;
- return parentWrapper.getProvider().getDelegate().getContentProvider().hasChildren(parentWrapper.getElement());
- }
- return getChildren(element).length > 0 ? true : false;
- }
-
- public void dispose() {
- }
-
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- ServerViewProvider[] providers = ToolsServerUICore.
- getEnabledViewProviders(newInput instanceof IServer ? (IServer)newInput : null);
- for( int i = 0; i < providers.length; i++ ) {
- try {
- providers[i].getDelegate().getContentProvider().inputChanged(viewer, oldInput, newInput);
- } catch( Exception e) {
- JBossServerUIPlugin.log("Error changing input to " + newInput, e);
- }
- }
- }
-
- }
-
- public Object getRawElement(Object o) {
- if( o instanceof ContentWrapper )
- return ((ContentWrapper)o).getElement();
- return o;
- }
-
- public Object[] getRawElements(IStructuredSelection selection) {
- ArrayList<Object> tmp = new ArrayList<Object>();
- Object[] obj = selection.toArray();
- Object tmp2;
- for( int i = 0; i < obj.length; i++ ) {
- tmp2 = getRawElement(obj[i]);
- if( tmp2 != null ) tmp.add(tmp2);
- }
- return (Object[]) tmp.toArray(new Object[tmp.size()]);
- }
-
- public ServerViewProvider getParentViewProvider(Object o) {
- if( o instanceof ContentWrapper )
- return ((ContentWrapper)o).getProvider();
- return null;
- }
-
- public Object getSelectedElement() {
- ISelection sel = getSelection();
- if( sel instanceof IStructuredSelection ) {
- Object o = ((IStructuredSelection)sel).getFirstElement();
- if( o != null && o instanceof ContentWrapper ) {
- o = ((ContentWrapper)o).getElement();
- }
- return o;
- }
- return null;
- }
-
- protected void fillSelectedContextMenu(Shell shell, IMenuManager mgr) {
- ISelection sel = getSelection();
- if (sel instanceof IStructuredSelection) {
- ServerViewProvider provider = findProvider((IStructuredSelection)sel);
- if (provider != null) {
- Object[] selected = getRawElements((IStructuredSelection)sel);
- provider.getDelegate().fillContextMenu(shell, mgr, selected);
- }
- }
- }
-
- protected ServerViewProvider findProvider(IStructuredSelection sel) {
- Object[] selected = sel.toArray();
- ServerViewProvider provider = null;
- ServerViewProvider tmpProvider;
- for( int i = 0; i < selected.length; i++ ) {
- if( selected[i] instanceof ServerViewProvider ) {
- tmpProvider = (ServerViewProvider)selected[i];
- } else {
- tmpProvider = getParentViewProvider(selected[i]);
- }
- if( provider == null )
- provider = tmpProvider;
- else if( tmpProvider != provider )
- return null;
- }
- return provider;
- }
-
- protected void fillJBContextMenu(Shell shell, IMenuManager menu) {
- Object selected = getSelectedElement();
- menu.add(refreshAction);
- if( selected instanceof ServerViewProvider ) {
- menu.add(disableCategoryAction);
- }
-
- menu.add(new Separator());
- }
-
- public IPropertySheetPage getPropertySheet() {
- return propertySheet;
- }
-
- public class TableViewerPropertySheet implements IPropertySheetPage {
-
- private PageBook book;
- private ArrayList<ServerViewProvider> addedControls = new ArrayList<ServerViewProvider>();
- private SimplePropertiesPropertySheetPage topLevelPropertiesPage;
-
- public void createControl(Composite parent) {
- topLevelPropertiesPage = PropertySheetFactory.createSimplePropertiesSheet(new TopLevelProperties());
- book = new PageBook(parent, SWT.NONE);
- addedControls.clear();
- topLevelPropertiesPage.createControl(book);
- book.showPage(topLevelPropertiesPage.getControl());
- }
-
- public void dispose() {
- }
-
- public Control getControl() {
- return book;
- }
-
- public void setActionBars(IActionBars actionBars) {
- }
-
- public void setFocus() {
- }
-
- public void selectionChanged(IWorkbenchPart part, ISelection sel) {
- Object selected = getSelectedObject(sel);
- if( selected != null ) {
-
- IPropertySheetPage page = null;
- if( selected instanceof ContentWrapper ) {
- page = getDelegatePage(((ContentWrapper)selected).getProvider());
- } else /*if( selected instanceof ServerViewProvider ) {
- page = getDelegatePage((ServerViewProvider)selected);
- } else if( page == null ) */ {
- page = topLevelPropertiesPage;
- }
- if( page != null ) {
- page.selectionChanged(part, sel);
- book.showPage(page.getControl());
- }
- }
- }
- private IPropertySheetPage getDelegatePage(ServerViewProvider provider) {
- IPropertySheetPage returnSheet = null;
- returnSheet = provider.getDelegate().getPropertySheetPage();
- if( !addedControls.contains(provider) && returnSheet != null) {
- returnSheet.createControl(book);
- addedControls.add(provider);
- }
- return returnSheet;
- }
-
- public Object getSelectedObject(ISelection sel) {
- if( sel instanceof IStructuredSelection ) {
- IStructuredSelection selection = (IStructuredSelection)sel;
- Object selected = selection.getFirstElement();
- return selected;
- }
- return null;
- }
-
- }
- /**
- * Properties for the top level elements
- * (a server or a category / extension point
- * @author rstryker
- *
- */
- class TopLevelProperties implements ISimplePropertiesHolder {
- public Properties getProperties(Object selected) {
- Properties ret = new Properties();
- if( selected instanceof ServerViewProvider ) {
- ServerViewProvider provider = (ServerViewProvider)selected;
- ret.setProperty(Messages.ExtensionID, provider.getId());
- ret.setProperty(Messages.ExtensionName, provider.getName());
- ret.setProperty(Messages.ExtensionDescription, provider.getDescription());
- ret.setProperty(Messages.ExtensionProviderClass, provider.getDelegateName());
- }
- return ret;
- }
-
-
- public String[] getPropertyKeys(Object selected) {
- if( selected instanceof ServerViewProvider) {
- return new String[] {
- Messages.ExtensionName, Messages.ExtensionDescription,
- Messages.ExtensionID, Messages.ExtensionProviderClass
- };
-
- }
- if( selected instanceof JBossServer ) {
- return new String[] {
- Messages.ServerRuntimeVersion, Messages.ServerHome,
- Messages.ServerConfigurationName, Messages.ServerDeployDir,
- };
- }
- return new String[] {};
- }
- }
-
- public void dispose() {
- // The Loner
- propertySheet.dispose();
-
- ServerViewProvider[] providers = ToolsServerUICore.getAllServerViewProviders();
- for( int i = 0; i < providers.length; i++ ) {
- providers[i].dispose();
- }
- }
-
-
- public void suppressingRefresh(Runnable runnable) {
- boolean currentVal = suppressingRefresh;
- suppressingRefresh = true;
- runnable.run();
- suppressingRefresh = currentVal;
- }
-
- public void refresh() {
- refresh(null);
- }
- public void refresh(final Object element) {
- if(!suppressingRefresh) {
- try {
- super.refresh(element);
- } catch( Exception e ) {
- JBossServerUIPlugin.log("Error refreshing view. ", e);
- }
- }
- }
-
- public boolean elementInTree(Object element) {
- Widget[] w = super.findItems(element);
- return w != null && w.length > 0;
- }
-
-
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/JBossServerView.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/JBossServerView.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/JBossServerView.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,192 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.tools.as.wst.server.ui.views.server;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionManager;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.views.properties.IPropertySheetPage;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class JBossServerView extends ViewPart {
-
- public static final String VIEW_ID = "org.jboss.ide.eclipse.as.ui.views.JBossServerView";
-
- private static final String TAG_SASHFORM_HEIGHT = "sashformHeight";
-
- public static JBossServerView instance;
- private static ArrayList<ISelectionChangedListener> serverFrameListeners = new ArrayList<ISelectionChangedListener>();
- private static ArrayList<ISelectionChangedListener> extensionFrameListeners = new ArrayList<ISelectionChangedListener>();
-
- public static JBossServerView getDefault() {
- return instance;
- }
-
- public static void addServerFrameListener(ISelectionChangedListener listener) {
- if( !serverFrameListeners.contains(listener))
- serverFrameListeners.add(listener);
- if( getDefault() != null )
- getDefault().getServerFrame().getViewer().addSelectionChangedListener(listener);
- }
- public static void addExtensionFrameListener(ISelectionChangedListener listener) {
- if( !extensionFrameListeners.contains(listener))
- extensionFrameListeners.add(listener);
- if( getDefault() != null )
- getDefault().getExtensionFrame().getViewer().addSelectionChangedListener(listener);
- }
-
- public static void removeServerFrameListener(ISelectionChangedListener listener) {
- if( serverFrameListeners.contains(listener))
- serverFrameListeners.remove(listener);
- if( getDefault() != null )
- getDefault().getServerFrame().getViewer().removeSelectionChangedListener(listener);
- }
- public static void removeExtensionFrameListener(ISelectionChangedListener listener) {
- if( extensionFrameListeners.contains(listener))
- extensionFrameListeners.remove(listener);
- if( getDefault() != null )
- getDefault().getExtensionFrame().getViewer().removeSelectionChangedListener(listener);
- }
-
- public static interface IServerViewFrame {
- public IAction[] getActionBarActions();
- public int getDefaultSize();
- public void refresh();
- }
-
- public JBossServerView() {
- super();
- instance = this;
- }
-
- private SashForm form;
- private int[] sashRows;
- private IMemento memento;
-
- private IServerViewFrame[] frames;
- private ServerFrame serverFrame;
- private ServerExtensionFrame extensionFrame;
-
- public void init(IViewSite site, IMemento memento) throws PartInitException {
- super.init(site, memento);
- ServerUIPlugin.getPreferences().setShowOnActivity(false);
- this.memento = memento;
- int sum = 0;
- sashRows = new int[2];
- for (int i = 0; i < sashRows.length; i++) {
- sashRows[i] = 50;
- if (memento != null) {
- Integer in = memento.getInteger(TAG_SASHFORM_HEIGHT + i);
- if (in != null && in.intValue() > 5)
- sashRows[i] = in.intValue();
- }
- sum += sashRows[i];
- }
- }
-
- public void saveState(IMemento memento) {
- super.saveState(memento);
- int[] weights = form.getWeights();
- for (int i = 0; i < weights.length; i++) {
- if (weights[i] != 0)
- memento.putInteger(TAG_SASHFORM_HEIGHT + i, weights[i]);
- }
- }
-
- public void createPartControl(Composite parent) {
- form = new SashForm(parent, SWT.VERTICAL);
- form.setBackground(new Color(parent.getDisplay(), 255, 255, 255));
- form.setLayout(new FillLayout());
-
-
- Composite topWrapper = new Composite(form, SWT.NONE);
- topWrapper.setLayout(new FillLayout());
- serverFrame = new ServerFrame(topWrapper, this);
-
- Composite bottomWrapper = new Composite(form, SWT.NONE);
- bottomWrapper.setLayout(new FillLayout());
- extensionFrame = new ServerExtensionFrame(bottomWrapper, this);
-
-
- frames = new IServerViewFrame[] { serverFrame, extensionFrame };
-
- // add toolbar buttons
- IContributionManager cm = getViewSite().getActionBars().getToolBarManager();
- for( int i = 0; i < frames.length; i++ ) {
- IAction[] actions = frames[i].getActionBarActions();
- for (int j = 0; j < actions.length - 1; j++)
- cm.add(actions[j]);
- }
-
- form.setWeights(sashRows);
-
-
- // if the extensions have already been created, add those listeners now.
- Iterator<ISelectionChangedListener> k;
- for(k = serverFrameListeners.iterator(); k.hasNext();)
- serverFrame.getViewer().addSelectionChangedListener(k.next());
- for(k = extensionFrameListeners.iterator(); k.hasNext();)
- extensionFrame.getViewer().addSelectionChangedListener(k.next());
- }
-
- public void refreshAll() {
- for( int i = 0; i < frames.length; i++ ) {
- frames[i].refresh();
- }
- }
-
- public ServerFrame getServerFrame() { return this.serverFrame; }
- public ServerExtensionFrame getExtensionFrame() { return this.extensionFrame; }
-
- public void setFocus() {
- getExtensionFrame().getViewer().getTree().setFocus();
- }
-
- public IServer getSelectedServer() {
- return serverFrame == null ? null : serverFrame.getSelectedServer();
- }
-
- public Object getAdapter(Class adaptor) {
- if( adaptor == IPropertySheetPage.class) {
- return extensionFrame.getViewer().getPropertySheet();
- }
- return super.getAdapter(adaptor);
- }
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerExtensionFrame.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerExtensionFrame.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerExtensionFrame.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,122 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.tools.as.wst.server.ui.views.server;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.TreeSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView.IServerViewFrame;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ServerExtensionFrame extends Composite implements IServerViewFrame {
-
- private Tree jbTreeTable;
- private ExtensionTableViewer jbViewer;
- private JBossServerView view;
- public ServerExtensionFrame(Composite parent, JBossServerView view) {
- super(parent, SWT.NONE);
- this.view = view;
- setLayout(new FillLayout());
- jbTreeTable = new Tree(this, SWT.MULTI | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- jbViewer = new ExtensionTableViewer(jbTreeTable);
- view.getSite().setSelectionProvider(jbViewer);
- addListeners();
- doMenuStuff(parent);
- }
-
- protected void doMenuStuff(Composite parent) {
- MenuManager menuManager = new MenuManager("#PopupMenu");
- menuManager.setRemoveAllWhenShown(true);
- final Shell shell = jbTreeTable.getShell();
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- jbViewer.fillSelectedContextMenu(shell, mgr);
- mgr.add(new Separator());
- jbViewer.fillJBContextMenu(shell, mgr);
- }
- });
- Menu menu = menuManager.createContextMenu(parent);
- jbTreeTable.setMenu(menu);
- }
-
- public ExtensionTableViewer getViewer() {
- return jbViewer;
- }
-
- public void refresh() {
- jbViewer.refresh();
- }
-
- public void addListeners() {
-
- /*
- * Handles the selection of the server viewer which is embedded in my sashform
- */
- view.getServerFrame().getViewer().addSelectionChangedListener(new ISelectionChangedListener() {
- public void selectionChanged(SelectionChangedEvent event) {
- Object selection = ((TreeSelection)event.getSelection()).getFirstElement();
- Object server = selection;
- if( selection instanceof ModuleServer ) {
- server = ((ModuleServer)selection).server;
- }
-
- if( selection == null ) return;
- if( server != jbViewer.getInput()) {
- // find the newest copy of the server
- IServer tmp = ServerCore.findServer(((IServer)server).getId());
- jbViewer.setInput(tmp);
- } else {
- jbViewer.refresh();
- }
- }
-
- });
- }
-
-
- public IAction[] getActionBarActions() {
- return new IAction[] {}; // none
- }
-
- public int getDefaultSize() {
- return 0;
- }
- }
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerFrame.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerFrame.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerFrame.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,345 +0,0 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.tools.as.wst.server.ui.views.server;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionManager;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.swt.widgets.TreeColumn;
-import org.eclipse.swt.widgets.TreeItem;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.IWorkbenchPartSite;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.keys.IBindingService;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.internal.Trace;
-import org.eclipse.wst.server.ui.internal.ContextIds;
-import org.eclipse.wst.server.ui.internal.Messages;
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-import org.eclipse.wst.server.ui.internal.actions.NewServerWizardAction;
-import org.eclipse.wst.server.ui.internal.view.servers.CopyAction;
-import org.eclipse.wst.server.ui.internal.view.servers.DeleteAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ModuleSloshAction;
-import org.eclipse.wst.server.ui.internal.view.servers.OpenAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PasteAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PropertiesAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PublishAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PublishCleanAction;
-import org.eclipse.wst.server.ui.internal.view.servers.RenameAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ShowInConsoleAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ShowInDebugAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StartAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
-import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
-import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
-import org.jboss.ide.eclipse.as.ui.dialogs.TwiddleDialog;
-import org.jboss.tools.as.wst.server.ui.views.server.JBossServerView.IServerViewFrame;
-
-/**
- *
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ServerFrame extends Composite implements IServerViewFrame {
-
- protected Action[] actions;
- protected IWorkbenchPartSite site;
- protected IViewSite viewSite;
- protected Tree treeTable;
- protected ServerTableViewer tableViewer;
-
- // custom
- protected Action editLaunchConfigAction, twiddleAction, newServerAction;
-
- // wtp
- protected Action actionModifyModules;
- protected Action openAction, showInConsoleAction, showInDebugAction, propertiesAction;
- protected Action copyAction, pasteAction, deleteAction, renameAction;
-
- public ServerFrame(Composite parent, JBossServerView view) {
- super(parent, SWT.BORDER);
- setLayout(new FillLayout());
- this.site = view.getSite();
- this.viewSite = view.getViewSite();
-
-
- int cols[] = new int[] {150, 100, 50};
-
- treeTable = new Tree(this, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL | SWT.NONE);
- treeTable.setHeaderVisible(true);
- treeTable.setLinesVisible(false);
- treeTable.setFont(parent.getFont());
- PlatformUI.getWorkbench().getHelpSystem().setHelp(treeTable, ContextIds.VIEW_SERVERS);
-
- // add columns
- TreeColumn column = new TreeColumn(treeTable, SWT.SINGLE);
- column.setText(Messages.viewServer);
- column.setWidth(cols[0]);
-
- TreeColumn column2 = new TreeColumn(treeTable, SWT.SINGLE);
- column2.setText(Messages.viewState);
- column2.setWidth(cols[1]);
-
- TreeColumn column3 = new TreeColumn(treeTable, SWT.SINGLE);
- column3.setText(Messages.viewStatus);
- column3.setWidth(cols[2]);
-
- tableViewer = new ServerTableViewer(viewSite, treeTable);
- initializeActions(tableViewer);
-
- treeTable.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent event) {
- try {
- } catch (Exception e) {
- viewSite.getActionBars().getStatusLineManager().setMessage(null, "");
- }
- }
- public void widgetDefaultSelected(SelectionEvent event) {
- try {
- TreeItem item = treeTable.getSelection()[0];
- Object data = item.getData();
- if (!(data instanceof IServer))
- return;
- IServer server = (IServer) data;
- ServerUIPlugin.editServer(server);
- } catch (Exception e) {
- Trace.trace(Trace.SEVERE, "Could not open server", e);
- }
- }
- });
-
- MenuManager menuManager = new MenuManager("#PopupMenu");
- menuManager.setRemoveAllWhenShown(true);
- final Shell shell = treeTable.getShell();
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager mgr) {
- fillContextMenu(shell, mgr);
- }
- });
- Menu menu = menuManager.createContextMenu(parent);
- treeTable.setMenu(menu);
- site.registerContextMenu(menuManager, tableViewer);
- site.setSelectionProvider(tableViewer);
- }
-
- protected void fillContextMenu(Shell shell, IMenuManager menu) {
- if( getSelectedServer() != null ) {
- cloneFill(shell, menu);
- } else {
- menu.add(newServerAction);
- }
- }
-
- protected void cloneFill(Shell shell, IMenuManager menu) {
-
- /* Show in ... */
- String text = Messages.actionShowIn;
- final IWorkbench workbench = PlatformUI.getWorkbench();
- final IBindingService bindingService = (IBindingService) workbench
- .getAdapter(IBindingService.class);
- final TriggerSequence[] activeBindings = bindingService
- .getActiveBindingsFor("org.eclipse.ui.navigate.showInQuickMenu");
- if (activeBindings.length > 0) {
- text += "\t" + activeBindings[0].format();
- }
-
- menu.add(newServerAction);
- menu.add(openAction);
-
- MenuManager showInMenu = new MenuManager(text);
- showInMenu.add(showInConsoleAction);
- showInMenu.add(showInDebugAction);
- menu.add(showInMenu);
- menu.add(new Separator());
-
- menu.add(copyAction);
- menu.add(pasteAction);
- menu.add(deleteAction);
- menu.add(renameAction);
-
- menu.add(new Separator());
-
- // server actions
- for (int i = 0; i < actions.length; i++)
- menu.add(actions[i]);
-
- menu.add(new Separator());
-// menu.add(actionModifyModules);
-
- menu.add(twiddleAction);
- menu.add(editLaunchConfigAction);
- menu.add(actionModifyModules);
- twiddleAction.setEnabled(true);
- editLaunchConfigAction.setEnabled(true);
-
- }
-
- public IServer getSelectedServer() {
- Object o = ((IStructuredSelection)tableViewer.getSelection()).getFirstElement();
- return (IServer)o;
- }
-
- public void initializeActions(ISelectionProvider provider) {
- createWTPActions(provider);
- createCustomActions();
- }
-
- protected void createWTPActions(ISelectionProvider provider) {
- Shell shell = viewSite.getShell();
- IActionBars actionBars = viewSite.getActionBars();
-
- actions = new Action[6];
- // create the start actions
- actions[0] = new StartAction(shell, provider, ILaunchManager.DEBUG_MODE);
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.debug", actions[0]);
- actions[1] = new StartAction(shell, provider, ILaunchManager.RUN_MODE);
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.run", actions[1]);
- actions[2] = new StartAction(shell, provider, ILaunchManager.PROFILE_MODE);
-
- // create the stop action
- actions[3] = new StopAction(shell, provider);
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.stop", actions[3]);
-
- // create the publish actions
- actions[4] = new PublishAction(shell, provider);
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.publish", actions[4]);
- actions[5] = new PublishCleanAction(shell, provider);
-
- // create the open action
- openAction = new OpenAction(provider);
- actionBars.setGlobalActionHandler("org.eclipse.ui.navigator.Open", openAction);
-
- // create copy, paste, and delete actions
- pasteAction = new PasteAction(shell, provider, tableViewer.clipboard);
- copyAction = new CopyAction(provider, tableViewer.clipboard, pasteAction);
- deleteAction = new DeleteAction(shell, provider);
- renameAction = new RenameAction(shell, tableViewer, provider);
- actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
- actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
- actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), renameAction);
-
- // create the other actions
- actionModifyModules = new ModuleSloshAction(shell, provider);
- showInConsoleAction = new ShowInConsoleAction(provider);
- showInDebugAction = new ShowInDebugAction(provider);
-
- // create the properties action
- propertiesAction = new PropertiesAction(shell, provider);
- actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- }
-
- protected void createCustomActions() {
- newServerAction = new Action() {
- public void run() {
- IAction newServerAction = new NewServerWizardAction();
- newServerAction.run();
- }
- };
- newServerAction.setText("New Server");
- newServerAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.GENERIC_SERVER_IMAGE));
-
- editLaunchConfigAction = new Action() {
- public void run() {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- try {
- final Object selected = getSelectedServer();
- IServer s = null;
- if( selected instanceof JBossServer ) {
- s = ((JBossServer)selected).getServer();
- } else if( selected instanceof IServer ) {
- s = (IServer)selected;
- }
-
- if( s != null ) {
- ILaunchConfiguration launchConfig = ((Server) s).getLaunchConfiguration(true, null);
- // TODO: use correct launch group
- DebugUITools.openLaunchConfigurationPropertiesDialog(new Shell(), launchConfig, "org.eclipse.debug.ui.launchGroup.run");
- }
- } catch (CoreException ce) {
- }
- }
- });
- }
- };
- editLaunchConfigAction.setText(org.jboss.ide.eclipse.as.ui.Messages.EditLaunchConfigurationAction);
- editLaunchConfigAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.IMG_JBOSS_CONFIGURATION));
-
- twiddleAction = new Action() {
- public void run() {
- final IStructuredSelection selected = ((IStructuredSelection)tableViewer.getSelection());
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- TwiddleDialog dialog = new TwiddleDialog(tableViewer.getTree().getShell(), selected.getFirstElement());
- dialog.open();
- }
- } );
-
- }
- };
- twiddleAction.setText( org.jboss.ide.eclipse.as.ui.Messages.TwiddleServerAction);
- twiddleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.TWIDDLE_IMAGE));
-
- }
-
- public ServerTableViewer getViewer() {
- return tableViewer;
- }
-
- public void refresh() {
- tableViewer.refresh();
- }
-
- public IAction[] getActionBarActions() {
- return actions;
- }
-
- public int getDefaultSize() {
- return 0;
- }
-}
Deleted: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerTableViewer.java
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerTableViewer.java 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/views/server/ServerTableViewer.java 2008-10-30 02:21:00 UTC (rev 11315)
@@ -1,389 +0,0 @@
-package org.jboss.tools.as.wst.server.ui.views.server;
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - Initial API and implementation
- *******************************************************************************/
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.LabelProviderChangedEvent;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.IViewSite;
-import org.eclipse.wst.server.core.IPublishListener;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.IServerLifecycleListener;
-import org.eclipse.wst.server.core.IServerListener;
-import org.eclipse.wst.server.core.IServerType;
-import org.eclipse.wst.server.core.ServerCore;
-import org.eclipse.wst.server.core.ServerEvent;
-import org.eclipse.wst.server.core.internal.Server;
-import org.eclipse.wst.server.core.util.PublishAdapter;
-import org.eclipse.wst.server.ui.internal.Trace;
-import org.eclipse.wst.server.ui.internal.provisional.UIDecoratorManager;
-import org.eclipse.wst.server.ui.internal.view.servers.ServerTableLabelProvider;
-/**
- * Tree view showing servers and their associations.
- * This is for the TOP window
- * @author Rob Stryker <rob.stryker(a)redhat.com>
- *
- */
-public class ServerTableViewer extends TreeViewer {
- protected static final String ROOT = "root";
-
- protected IServerLifecycleListener serverResourceListener;
- protected IPublishListener publishListener;
- protected IServerListener serverListener;
-
- protected static Object deletedElement = null;
-
- // servers that are currently publishing and starting
- protected static List publishing = new ArrayList();
- protected static List starting = new ArrayList();
-
- protected ServerTableLabelProvider2 labelProvider;
- protected Clipboard clipboard;
-
- protected IViewSite viewSite;
-
- protected class ServerTableLabelProvider2 extends ServerTableLabelProvider {
- private int myCount = 0;
- protected Image getStateImage(IServerType serverType, int state, String mode) {
- return UIDecoratorManager.getUIDecorator(serverType).getStateImage(state, mode, myCount);
- }
- protected String getStateLabel(IServerType serverType, int state, String mode) {
- return UIDecoratorManager.getUIDecorator(serverType).getStateLabel(state, mode, myCount);
- }
- protected void animate2() {
- myCount ++;
- if (myCount > 2)
- myCount = 0;
- }
-
- }
-
- public class TrimmedServerContentProvider implements IStructuredContentProvider, ITreeContentProvider {
- public Object[] getElements(Object element) {
- return ServerCore.getServers();
- }
-
- public void inputChanged(Viewer theViewer, Object oldInput, Object newInput) {
- // do nothing
- }
-
- public void dispose() {
- // do nothing
- }
-
- public Object[] getChildren(Object element) {
- return new Object[0];
- }
-
- public Object getParent(Object element) {
- return null;
- }
-
- public boolean hasChildren(Object element) {
- return false;
- }
- }
-
- protected Thread thread = null;
- protected boolean stopThread = false;
-
- protected void startThread() {
- stopThread = false;
- if (thread != null)
- return;
-
- thread = new Thread("Servers View Animator") {
- public void run() {
- while (!stopThread) {
- try {
- labelProvider.animate2();
- final Object[] rootElements = ((ITreeContentProvider)getContentProvider()).getElements(null);
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- if (getTree() != null && !getTree().isDisposed())
- update(rootElements, null);
- }
- });
- Thread.sleep(250);
- } catch (Exception e) {
- Trace.trace(Trace.FINEST, "Error in animated server view", e);
- }
- thread = null;
- }
- }
- };
- thread.setDaemon(true);
- thread.start();
- }
-
- protected void stopThread() {
- stopThread = true;
- }
-
- /**
- * ServerTableViewer constructor comment.
- *
- * @param view the view
- * @param tree the tree
- */
- public ServerTableViewer(final IViewSite site, final Tree tree) {
- super(tree);
- this.viewSite = site;
- clipboard = new Clipboard(tree.getDisplay());
-
- setContentProvider(new TrimmedServerContentProvider());
- labelProvider = new ServerTableLabelProvider2();
- labelProvider.addListener(new ILabelProviderListener() {
- public void labelProviderChanged(LabelProviderChangedEvent event) {
- Object[] obj = event.getElements();
- if (obj == null)
- refresh(true);
- else {
- int size = obj.length;
- for (int i = 0; i < size; i++)
- refresh(obj[i], true);
- }
- }
- });
- setLabelProvider(labelProvider);
- setSorter(new ViewerSorter() {
- // empty
- });
-
- setInput(ROOT);
- addListeners();
- }
-
- protected void addListeners() {
- serverResourceListener = new IServerLifecycleListener() {
- public void serverAdded(IServer server) {
- addServer(server);
- server.addServerListener(serverListener);
- ((Server) server).addPublishListener(publishListener);
- }
- public void serverChanged(IServer server) {
- refreshServer(server);
- }
- public void serverRemoved(IServer server) {
- removeServer(server);
- server.removeServerListener(serverListener);
- ((Server) server).removePublishListener(publishListener);
- }
- };
- ServerCore.addServerLifecycleListener(serverResourceListener);
-
- publishListener = new PublishAdapter() {
- public void publishStarted(IServer server) {
- handlePublishChange(server, true);
- }
-
- public void publishFinished(IServer server, IStatus status) {
- handlePublishChange(server, false);
- }
- };
-
- serverListener = new IServerListener() {
- public void serverChanged(ServerEvent event) {
- if (event == null) {
- return;
- }
- int eventKind = event.getKind();
- IServer server = event.getServer();
- if ((eventKind & ServerEvent.SERVER_CHANGE) != 0) {
- // server change event
- if ((eventKind & ServerEvent.STATE_CHANGE) != 0) {
- refreshServer(server);
- int state = event.getState();
- String id = server.getId();
- if (state == IServer.STATE_STARTING || state == IServer.STATE_STOPPING) {
- if (!starting.contains(id)) {
- if (starting.isEmpty())
- startThread();
- starting.add(id);
- }
- } else {
- if (starting.contains(id)) {
- starting.remove(id);
- if (starting.isEmpty())
- stopThread();
- }
- }
- } else
- refreshServer(server);
- } else if ((eventKind & ServerEvent.MODULE_CHANGE) != 0) {
- // module change event
- if ((eventKind & ServerEvent.STATE_CHANGE) != 0 || (eventKind & ServerEvent.PUBLISH_STATE_CHANGE) != 0) {
- refreshServer(server);
- }
- }
- }
- };
-
- // add listeners to servers
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- servers[i].addServerListener(serverListener);
- ((Server) servers[i]).addPublishListener(publishListener);
- }
- }
- }
-
- protected void refreshServer(final IServer server) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- try {
- refresh(server);
-
- // This ensures the icons are updated in case of a publish or state change
- ISelection sel = ServerTableViewer.this.getSelection();
- ServerTableViewer.this.setSelection(sel);
- } catch (Exception e) {
- // ignore
- }
- }
- });
- }
-
- protected void handleDispose(DisposeEvent event) {
- stopThread();
- //if (dsListener != null)
- // view.getViewSite().getPage().removeSelectionListener(dsListener);
-
- ServerCore.removeServerLifecycleListener(serverResourceListener);
-
- // remove listeners from server
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- servers[i].removeServerListener(serverListener);
- ((Server) servers[i]).removePublishListener(publishListener);
- }
- }
-
- clipboard.dispose();
- super.handleDispose(event);
- }
-
- /**
- * Called when the publish state changes.
- * @param server org.eclipse.wst.server.core.IServer
- */
- protected void handlePublishChange(IServer server, boolean isPublishing) {
- String serverId = server.getId();
- if (isPublishing)
- publishing.add(serverId);
- else
- publishing.remove(serverId);
-
- refreshServer(server);
- }
-
- /**
- *
- */
- protected void handleServerModulesChanged(IServer server2) {
- if (server2 == null)
- return;
-
- IServer[] servers = ServerCore.getServers();
- if (servers != null) {
- int size = servers.length;
- for (int i = 0; i < size; i++) {
- if (server2.equals(servers[i]))
- refresh(servers[i]);
- }
- }
- }
-
- /**
- * Called when an element is added.
- * @param server org.eclipse.wst.server.core.IServer
- */
- protected void handleServerResourceAdded(IServer server) {
- add(null, server);
- }
-
- /**
- * Called when an element is changed.
- * @param server org.eclipse.wst.server.core.IServer
- */
- protected void handleServerResourceChanged(IServer server) {
- refresh(server);
- }
-
- /**
- * Called when an element is removed.
- * @param server org.eclipse.wst.server.core.IServer
- */
- protected void handleServerResourceRemoved(IServer server) {
- remove(server);
-
- String serverId = server.getId();
- publishing.remove(serverId);
-
- viewSite.getActionBars().getStatusLineManager().setMessage(null, null);
- }
-
- protected void addServer(final IServer server) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- add(ROOT, server);
- }
- });
- }
-
- protected void removeServer(final IServer server) {
- Display.getDefault().asyncExec(new Runnable() {
- public void run() {
- remove(server);
- }
- });
- }
-}
\ No newline at end of file
Modified: workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-10-30 00:31:00 UTC (rev 11314)
+++ workspace/rstryker/viewRefactor/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2008-10-30 02:21:00 UTC (rev 11315)
@@ -112,6 +112,7 @@
</adapter>
</extension>
+<!--
<extension
point="org.eclipse.ui.views">
<view
@@ -122,10 +123,10 @@
id="org.jboss.ide.eclipse.as.ui.views.JBossServerView"
name="JBoss Server View"/>
</extension>
+-->
-
<extension
point="org.jboss.ide.eclipse.as.ui.ServerViewExtension">
<ViewProvider
@@ -301,15 +302,15 @@
<extension point="org.eclipse.ui.actionSets">
<actionSet description="%actionSets.serverActions.description" id="org.jboss.tools.jst.web.ui.server.actionSet" label="%actionSets.serverActions.label" visible="true">
- <action class="org.jboss.tools.as.wst.server.ui.action.SelectServerActionDelegate" icon="icons/actions/xpl/server.gif" id="org.jboss.tools.jst.web.ui.action.server.SelectServerActionDelegate" label="label1" style="pulldown" toolbarPath="Normal/SelectServer" tooltip="%actionSets.serverActions.selectServer.label">
+ <action class="org.jboss.ide.eclipse.as.ui.actions.SelectServerActionDelegate" icon="icons/actions/xpl/server.gif" id="org.jboss.tools.jst.web.ui.action.server.SelectServerActionDelegate" label="label1" style="pulldown" toolbarPath="Normal/SelectServer" tooltip="%actionSets.serverActions.selectServer.label">
</action>
- <action class="org.jboss.tools.as.wst.server.ui.action.ChangeTimeStampActionDelegate" icon="icons/actions/webxml.gif" id="org.jboss.tools.jst.web.ui.action.server.ChangeTimeStampActionDelegate" label="label2" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.changeWebXmlTimeStamp.label">
+ <action class="org.jboss.ide.eclipse.as.ui.actions.ChangeTimeStampActionDelegate" icon="icons/actions/webxml.gif" id="org.jboss.tools.jst.web.ui.action.server.ChangeTimeStampActionDelegate" label="label2" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.changeWebXmlTimeStamp.label">
</action>
- <action class="org.jboss.tools.as.wst.server.ui.action.StopServerActionDelegate" icon="icons/actions/stop.gif" id="org.jboss.tools.jst.web.ui.action.server.StopServerActionDelegate" label="label4" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.stopServer.label">
+ <action class="org.jboss.ide.eclipse.as.ui.actions.StopServerActionDelegate" icon="icons/actions/stop.gif" id="org.jboss.tools.jst.web.ui.action.server.StopServerActionDelegate" label="label4" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.stopServer.label">
</action>
- <action class="org.jboss.tools.as.wst.server.ui.action.DebugServerActionDelegate" icon="icons/actions/xpl/debug.gif" id="org.jboss.tools.jst.web.ui.action.server.DebugServerActionDelegate" label="label6" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.startServer.label">
+ <action class="org.jboss.ide.eclipse.as.ui.actions.DebugServerActionDelegate" icon="icons/actions/xpl/debug.gif" id="org.jboss.tools.jst.web.ui.action.server.DebugServerActionDelegate" label="label6" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.startServer.label">
</action>
- <action class="org.jboss.tools.as.wst.server.ui.action.RunServerActionDelegate" icon="icons/actions/start.gif" id="org.jboss.tools.jst.web.ui.action.server.RunServerActionDelegate" label="label7" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.startServer.label">
+ <action class="org.jboss.ide.eclipse.as.ui.actions.RunServerActionDelegate" icon="icons/actions/start.gif" id="org.jboss.tools.jst.web.ui.action.server.RunServerActionDelegate" label="label7" toolbarPath="Normal/server" tooltip="%actionSets.serverActions.startServer.label">
</action>
</actionSet>
</extension>
@@ -329,18 +330,18 @@
<extension point="org.eclipse.ui.views">
<view
- id="org.eclipse.wst.server.ui.ServersViewProvisional"
- name="JBoss Servers View 2 (beta)"
+ id="org.jboss.tools.as.wst.server.ui.ServersView"
+ name="JBoss Server View"
category="org.eclipse.wst.server.ui"
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServersView"
+ class="org.jboss.tools.as.wst.server.ui.ServersView"
icon="icons/jboss.gif"/>
</extension>
<extension point="org.eclipse.ui.decorators">
<decorator
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServerDecorator"
- icon="icons/obj16/server.gif"
- id="org.eclipse.wst.server.ui.navigatorDecorator"
+ class="org.jboss.tools.as.wst.server.ui.ServerDecorator"
+ icon="icons/cview16/servers_view.gif"
+ id="org.jboss.tools.as.wst.server.ui.navigatorDecorator"
label="Server State Decorator"
lightweight="true"
location="BOTTOM_RIGHT">
@@ -361,10 +362,10 @@
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
activeByDefault="true"
- contentProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServerContentProvider"
+ contentProvider="org.jboss.tools.as.wst.server.ui.ServerContentProvider"
icon="icons/cview16/servers_view.gif"
- id="org.eclipse.wst.server.ui.ServersView.content.root"
- labelProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServerLabelProvider"
+ id="org.jboss.tools.as.wst.server.ui.ServersView.content.root"
+ labelProvider="org.jboss.tools.as.wst.server.ui.ServerLabelProvider"
name="Servers View Default Content"
priority="highest">
<triggerPoints>
@@ -382,8 +383,8 @@
</instanceof>
</or></possibleChildren>
<actionProvider
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServerActionProvider"
- id="org.eclipse.wst.server.ui.internal.view.servers.provisional.ServerActionProvider"
+ class="org.jboss.tools.as.wst.server.ui.ServerActionProvider"
+ id="org.jboss.tools.as.wst.server.ui.ServersView.ServerActionProvider"
priority="highest">
</actionProvider>
</navigatorContent>
@@ -391,11 +392,11 @@
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
- viewerId="org.eclipse.wst.server.ui.ServersViewProvisional">
+ viewerId="org.jboss.tools.as.wst.server.ui.ServersView">
<includes>
<contentExtension
isRoot="true"
- pattern="org.eclipse.wst.server.ui.ServersView.content.root">
+ pattern="org.jboss.tools.as.wst.server.ui.ServersView.content.root">
</contentExtension>
</includes>
</viewerContentBinding>
@@ -411,8 +412,8 @@
id="org.jboss.ide.eclipse.as.ui.extensions.eventLog"
activeByDefault="true"
icon="icons/info_obj.gif"
- contentProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.EventLogContentProvider"
- labelProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.EventLogLabelProvider"
+ contentProvider="org.jboss.ide.eclipse.as.ui.views.server.extensions.EventLogContentProvider"
+ labelProvider="org.jboss.ide.eclipse.as.ui.views.server.extensions.EventLogLabelProvider"
name="JBoss Server Event Log"
priority="normal">
<triggerPoints>
@@ -430,17 +431,17 @@
</instanceof>
</or></possibleChildren>
<actionProvider
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.EventLogActionProvider"
+ class="org.jboss.ide.eclipse.as.ui.views.server.extensions.EventLogActionProvider"
id="org.jboss.ide.eclipse.as.ui.extensions.eventLog.actions"
priority="highest">
</actionProvider>
</navigatorContent>
<navigatorContent
activeByDefault="true"
- contentProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathTreeContentProvider"
+ contentProvider="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeContentProvider"
icon="icons/XMLFile.gif"
id="org.jboss.ide.eclipse.as.ui.extensions.xml"
- labelProvider="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathTreeLabelProvider"
+ labelProvider="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeLabelProvider"
name="XML Configuration"
priority="normal">
<triggerPoints>
@@ -451,10 +452,10 @@
<possibleChildren>
<or>
<instanceof
- value="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathProvider$XPathTreeContentProvider$ServerWrapper">
+ value="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeContentProvider$ServerWrapper">
</instanceof>
<instanceof
- value="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathProvider$XPathTreeContentProvider$DelayProxy">
+ value="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathTreeContentProvider$DelayProxy">
</instanceof>
<instanceof
value="org.jboss.ide.eclipse.as.core.extensions.descriptors.XPathCategory">
@@ -470,8 +471,8 @@
</instanceof></or>
</possibleChildren>
<actionProvider
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathActionProvider"
- id="org.jboss.ide.eclipse.as.ui.extensions.eventLog.actions"
+ class="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathActionProvider"
+ id="org.jboss.ide.eclipse.as.ui.extensions.xml.actions"
priority="highest">
</actionProvider>
</navigatorContent>
@@ -479,7 +480,7 @@
<extension
point="org.eclipse.ui.navigator.viewer">
<viewerContentBinding
- viewerId="org.eclipse.wst.server.ui.ServersViewProvisional">
+ viewerId="org.jboss.tools.as.wst.server.ui.ServersView">
<includes>
<contentExtension
isRoot="false"
@@ -498,7 +499,7 @@
<!-- Decorator for xpaths / xml-->
<extension point="org.eclipse.ui.decorators">
<decorator
- class="org.eclipse.wst.server.ui.internal.view.servers.provisional.extensions.XPathDecorator"
+ class="org.jboss.ide.eclipse.as.ui.views.server.extensions.XPathDecorator"
id="org.jboss.ide.eclipse.as.ui.extensions.xml.decorator"
label="JBoss Server XML Configuration Decorator"
lightweight="true"
17 years, 2 months
JBoss Tools SVN: r11314 - in trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects: jsfHyperlinkTests and 11 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-29 20:31:00 -0400 (Wed, 29 Oct 2008)
New Revision: 11314
Added:
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.classpath
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.project
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jdt.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jst.common.project.facet.core.prefs
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.component
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.project.facet.core.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean1.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean2.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean3.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean4.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean5.java
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/faces-config.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/lib/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/lib/jsf-impl.jar
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/web.xml
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page1.jsp
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page2.jsp
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page3.jsp
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page4.jsp
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page5.jsp
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.properties
trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.xml
Log:
test project for JSF hyperlinks
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.classpath
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.classpath (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.classpath 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="JavaSource"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
+</classpath>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.project
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.project (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.project 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>jsfHyperlinkTests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+ <nature>org.jboss.tools.jsf.jsfnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jdt.core.prefs 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,7 @@
+#Wed Oct 29 16:28:57 PDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jst.common.project.facet.core.prefs
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jst.common.project.facet.core.prefs (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jst.common.project.facet.core.prefs 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,4 @@
+#Wed Oct 29 16:28:57 PDT 2008
+classpath.helper/org.eclipse.jdt.launching.JRE_CONTAINER\:\:org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType\:\:java-1.5.0-sun-1.5.0.15/owners=jst.java\:5.0
+classpath.helper/org.eclipse.jst.server.core.container\:\:org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget\:\:JBoss\ 4.2\ Runtime/owners=jst.web\:2.4
+eclipse.preferences.version=1
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.jst.common.project.facet.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.component
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.component (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.component 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+<wb-module deploy-name="jsfHyperlinkTests">
+<wb-resource deploy-path="/" source-path="/WebContent"/>
+<wb-resource deploy-path="/WEB-INF/classes" source-path="/JavaSource"/>
+<property name="context-root" value="jsfHyperlinkTests"/>
+<property name="java-output-path"/>
+</wb-module>
+</project-modules>
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.project.facet.core.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.project.facet.core.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.project.facet.core.xml 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+ <runtime name="JBoss 4.2 Runtime"/>
+ <fixed facet="jst.java"/>
+ <fixed facet="jst.web"/>
+ <installed facet="jst.java" version="5.0"/>
+ <installed facet="jst.web" version="2.4"/>
+</faceted-project>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/.settings/org.eclipse.wst.common.project.facet.core.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean1.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean1.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean1.java 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,37 @@
+package org.jboss.jsf.tests;
+
+public class Bean1 {
+
+ private java.lang.String property1;
+ private org.jboss.jsf.tests.Bean5 property2;
+ private org.jboss.jsf.tests.Bean5 property3;
+
+ public Bean1() {
+ // TODO Auto-generated constructor stub
+ }
+
+ public java.lang.String getProperty1() {
+ return property1;
+ }
+
+ public void setProperty1(java.lang.String property1) {
+ this.property1 = property1;
+ }
+
+ public org.jboss.jsf.tests.Bean5 getProperty2() {
+ return property2;
+ }
+
+ public void setProperty2(org.jboss.jsf.tests.Bean5 property2) {
+ this.property2 = property2;
+ }
+
+ public org.jboss.jsf.tests.Bean5 getProperty3() {
+ return property3;
+ }
+
+ public void setProperty3(org.jboss.jsf.tests.Bean5 property3) {
+ this.property3 = property3;
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean1.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean2.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean2.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean2.java 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,9 @@
+package org.jboss.jsf.tests;
+
+public class Bean2 {
+
+ public Bean2() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean2.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean3.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean3.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean3.java 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+package org.jboss.jsf.tests;
+
+/**
+ * @author eskimo
+ *
+ */
+public class Bean3 {
+
+ /**
+ *
+ */
+ public Bean3() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean3.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean4.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean4.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean4.java 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,9 @@
+package org.jboss.jsf.tests;
+
+public class Bean4 {
+
+ public Bean4() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean4.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean5.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean5.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean5.java 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,19 @@
+/**
+ *
+ */
+package org.jboss.jsf.tests;
+
+/**
+ * @author eskimo
+ *
+ */
+public class Bean5 {
+
+ /**
+ *
+ */
+ public Bean5() {
+ // TODO Auto-generated constructor stub
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/JavaSource/org/jboss/jsf/tests/Bean5.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/MANIFEST.MF (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/MANIFEST.MF 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/META-INF/MANIFEST.MF
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/faces-config.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/faces-config.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/faces-config.xml 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
+ "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>bean1</managed-bean-name>
+ <managed-bean-class>org.jboss.jsf.tests.Bean1</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ <managed-property>
+ <property-name>property1</property-name>
+ <property-class>java.lang.String</property-class>
+ <value>"property1 value"</value>
+ </managed-property>
+ <!--Here is long comment for the property2-->
+ <managed-property id="bean1.property2">
+ <description>Here is the long description of the property2</description>
+ <display-name>Property2 of bean1</display-name>
+ <property-name>property2</property-name>
+ <property-class>org.jboss.jsf.tests.Bean5</property-class>
+ <null-value/>
+ </managed-property>
+ <managed-property>
+ <property-name>property3</property-name>
+ <property-class>org.jboss.jsf.tests.Bean5</property-class>
+ <value>#{bean5}</value>
+ </managed-property>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean2</managed-bean-name>
+ <managed-bean-class>org.jboss.jsf.tests.Bean2</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ <list-entries>
+ <value-class>java.lang.String</value-class>
+ <value>testValue1</value>
+ <value>testValue2</value>
+ <value>testValue3</value>
+ </list-entries>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean3</managed-bean-name>
+ <managed-bean-class>org.jboss.jsf.tests.Bean3</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ <map-entries>
+ <key-class>java.lang.String</key-class>
+ <value-class>java.lang.String</value-class>
+ <map-entry>
+ <key>key1</key>
+ <value>testValue1</value>
+ </map-entry>
+ <map-entry>
+ <key>key2</key>
+ <value>testValue2</value>
+ </map-entry>
+ <map-entry>
+ <key>key3</key>
+ <null-value/>
+ </map-entry>
+ </map-entries>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean4</managed-bean-name>
+ <managed-bean-class>org.jboss.jsf.tests.Bean4</managed-bean-class>
+ <managed-bean-scope>none</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>bean5</managed-bean-name>
+ <managed-bean-class>org.jboss.jsf.tests.Bean5</managed-bean-class>
+ <managed-bean-scope>application</managed-bean-scope>
+ </managed-bean>
+ <navigation-rule>
+ <from-view-id>/page1.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>page2</from-outcome>
+ <to-view-id>/page2.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>page3</from-outcome>
+ <to-view-id>/page3.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/page2.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>page3</from-outcome>
+ <to-view-id>/page3.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>page4</from-outcome>
+ <to-view-id>/page4.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/page3.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>page4</from-outcome>
+ <to-view-id>/page4.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <from-outcome>page5</from-outcome>
+ <to-view-id>/page5.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/page4.jsp</from-view-id>
+ <navigation-case>
+ <from-outcome>page5</from-outcome>
+ <to-view-id>/page5.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+ <navigation-rule>
+ <from-view-id>/page5.jsp</from-view-id>
+ <navigation-case>
+ <from-action>action5</from-action>
+ <to-view-id>/page1.jsp</to-view-id>
+ </navigation-case>
+ <navigation-case>
+ <to-view-id>/page3.jsp</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+</faces-config>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/lib/jsf-impl.jar
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/lib/jsf-impl.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/web.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/web.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/web.xml 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+ <display-name>jsfHyperlinkTests</display-name>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <listener>
+ <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
+ </listener>
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <!-- Faces Servlet Mapping -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/WEB-INF/web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page1.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page1.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page1.jsp 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page1.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page2.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page2.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page2.jsp 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page2.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page3.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page3.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page3.jsp 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page3.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page4.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page4.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page4.jsp 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page4.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page5.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page5.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page5.jsp 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,13 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:view>
+
+ </f:view>
+ </body>
+</html>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/WebContent/page5.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.properties
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.properties (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.properties 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,3 @@
+#
+#Wed Oct 29 16:28:57 PDT 2008
+classpath.external=/home/eskimo/exadel-projects/jbds-ganymede/runtime-New_configuration/.metadata/.plugins/org.jboss.tools.common.projecttemplates/lib/servlet/2.4/jsp-api.jar;/home/eskimo/exadel-projects/jbds-ganymede/runtime-New_configuration/.metadata/.plugins/org.jboss.tools.common.projecttemplates/lib/servlet/2.4/servlet-api.jar;
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.xml 2008-10-30 00:31:00 UTC (rev 11314)
@@ -0,0 +1,87 @@
+<project name="jsfHyperlinkTests" basedir="../" default="deploy">
+
+ <!-- Project settings -->
+ <property name="project.distname" value="jsfHyperlinkTests"/>
+
+ <!-- Local system paths -->
+ <property file="${basedir}/ant/build.properties"/>
+ <property name="webroot.dir" value="${basedir}/WebContent"/>
+ <property name="webinf.dir" value="${webroot.dir}/WEB-INF"/>
+ <property name="build.dir" value="build"/>
+
+ <!-- classpath for JSF 1.1.01 -->
+ <path id="compile.classpath">
+ <pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
+ <pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/jstl.jar"/>
+ <pathelement path ="${webinf.dir}/lib/standard.jar"/>
+ <pathelement path ="${webinf.dir}/classes"/>
+ <pathelement path ="${classpath.external}"/>
+ <pathelement path ="${classpath}"/>
+ </path>
+
+ <!-- define your folder for deployment -->
+ <property name="deploy.dir" value="deploy"/>
+
+
+ <!-- Check timestamp on files -->
+ <target name="prepare">
+ <tstamp/>
+ </target>
+
+ <!-- Copy any resource or configuration files -->
+ <target name="resources">
+ <copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
+ <fileset dir="JavaSource">
+ <patternset>
+ <include name="**/*.conf"/>
+ <include name="**/*.properties"/>
+ <include name="**/*.xml"/>
+ </patternset>
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- Normal build of application -->
+ <target name="compile" depends="prepare,resources">
+ <javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
+ <classpath refid="compile.classpath"/>
+ </javac>
+ </target>
+
+ <!-- Remove classes directory for clean build -->
+ <target name="clean"
+ description="Prepare for clean build">
+ <delete dir="${webinf.dir}/classes"/>
+ <mkdir dir="${webinf.dir}/classes"/>
+ </target>
+
+ <!-- Build entire project -->
+ <target name="build" depends="prepare,compile"/>
+ <target name="rebuild" depends="clean,prepare,compile"/>
+
+ <!-- Create binary distribution -->
+ <target name="war" depends="build">
+ <mkdir dir="${build.dir}"/>
+ <war
+ basedir="${webroot.dir}"
+ warfile="${build.dir}/${project.distname}.war"
+ webxml="${webinf.dir}/web.xml">
+ <exclude name="WEB-INF/${build.dir}/**"/>
+ <exclude name="WEB-INF/src/**"/>
+ <exclude name="WEB-INF/web.xml"/>
+ </war>
+
+ </target>
+
+ <target name="deploy" depends="war">
+ <delete file="${deploy.dir}/${project.distname}.war"/>
+ <delete dir="${deploy.dir}/${project.distname}"/>
+ <copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
+ </target>
+
+</project>
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.text.ext.test/projects/jsfHyperlinkTests/ant/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 2 months
JBoss Tools SVN: r11313 - trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-29 18:37:02 -0400 (Wed, 29 Oct 2008)
New Revision: 11313
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29 21:15:10 UTC (rev 11312)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29 22:37:02 UTC (rev 11313)
@@ -118,7 +118,6 @@
protected void handleClassButtonSelected() {
getControl().setCursor(new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT));
IProject project = (IProject) model.getProperty(PROJECT);
- IVirtualComponent component = ComponentCore.createComponent(project);
MultiSelectFilteredFileSelectionDialog ms = new MultiSelectFilteredFileSelectionDialog(
getShell(),
"New Portlet",
@@ -126,7 +125,13 @@
new String[0],
false,
project);
- IContainer root = component.getRootFolder().getUnderlyingFolder();
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IContainer root = null;
+ if (component != null) {
+ root = component.getRootFolder().getUnderlyingFolder();
+ } else {
+ root = project;
+ }
ms.setInput(root);
ms.open();
if (ms.getReturnCode() == Window.OK) {
17 years, 2 months
JBoss Tools SVN: r11312 - in trunk/documentation/whatsnew: as and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-10-29 17:15:10 -0400 (Wed, 29 Oct 2008)
New Revision: 11312
Added:
trunk/documentation/whatsnew/core/core-news-3.0.0.Beta1.html
trunk/documentation/whatsnew/images/consoleconfig_validation.png
trunk/documentation/whatsnew/images/datamodel_support.png
trunk/documentation/whatsnew/images/esb_icons.png
trunk/documentation/whatsnew/images/esb_projectstructure.png
trunk/documentation/whatsnew/images/externalcss_editing.png
trunk/documentation/whatsnew/images/generate_entities.png
trunk/documentation/whatsnew/images/orderedcompletions.png
trunk/documentation/whatsnew/images/persistence_xml_hibernate.png
trunk/documentation/whatsnew/images/portlet_wizard_simplification.png
trunk/documentation/whatsnew/images/projectarchives_error.png
trunk/documentation/whatsnew/images/resourcebundle_rendering.png
trunk/documentation/whatsnew/images/selective_seam_generate_entities.PNG
trunk/documentation/whatsnew/images/show_non_visual_tags.png
trunk/documentation/whatsnew/images/shownon-visual tags.png
trunk/documentation/whatsnew/images/smooks_wizard.png
trunk/documentation/whatsnew/images/unbalanced_el.png
trunk/documentation/whatsnew/images/unknown_tag_template.png
trunk/documentation/whatsnew/images/unknown_tag_template_001.png
trunk/documentation/whatsnew/images/unknown_tag_template_dialog.png
trunk/documentation/whatsnew/jbds/jbds-news-2.0.0.Beta1.html
trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Beta1.html
Modified:
trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html
trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html
trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Beta1.html
trunk/documentation/whatsnew/index.html
trunk/documentation/whatsnew/seam/seam-news-2.0.0.Beta1.html
trunk/documentation/whatsnew/smooks/smooks-news-1.0.0.Beta1.html
trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Beta1.html
Log:
second iteration of whatsnew
Modified: trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/as/as-news-2.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -2,14 +2,14 @@
<head>
<link rel="stylesheet" href="../whatsnew.css">
-<title>JBoss AS Tools 2.0.0.Alpha1 News</title>
+<title>JBoss AS Tools 2.0.0.Beta1 News</title>
</head>
<body>
-<h1>JBoss AS Tools 2.0.0.Alpha1 - New and Noteworthy</h1>
+<h1>JBoss AS Tools 2.0.0.Beta1 - New and Noteworthy</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../portlet/portlet-news-1.0.0.Alpha1.html">Portlet Tools News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../portlet/portlet-news-1.0.0.Beta1.html">Portlet Tools News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
@@ -29,6 +29,8 @@
</td>
</tr>
+
+
</table>
</body>
Added: trunk/documentation/whatsnew/core/core-news-3.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/core/core-news-3.0.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/core/core-news-3.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -0,0 +1,75 @@
+<?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>Core 3.0.0.Beta1 What's New</title>
+</head>
+<body>
+<h1>Core 3.0.0.Beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../seam/seam-news-2.0.0.Beta1.html">Seam News ></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="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Drools</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>The Drools plugin is now included in the JBoss Tools build.</p>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Project Archives</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Project Archives error dialog</b></td>
+ <td valign="top">
+ <p>Project Archives now will show an error dialog if a build or incremental update fails.</p>
+
+ <p><img src="../images/projectarchives_error.png"/></p>
+
+ <p>Detailed information about what caused the error is shown when clicking Details...</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2">
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Project Archives Ant task improvements</b></td>
+ <td valign="top">
+ <p>The project archives Ant task now supports variables and gives more informative error/logging messages when something goes wrong.</p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
Modified: trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -1,62 +1,75 @@
-<?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>ESB tools 3.0.0.Beta1 What's New</title>
-</head>
-<body>
-<h1>ESB tools 3.0.0.Beta1 What's New</h1>
-
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../as/as-news-1.1.0.beta1.html">JBoss AS Tools News ></a></p>
-
-
-<table border="0" cellpadding="10" cellspacing="0" width="80%">
-
- <tr>
- <td colspan="2">
- <hr/>
- <h3>ESB</h3>
- <hr/>
- </td>
- </tr>
- <tr>
- <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>BPMN to jPDL Export Wizard</b></td>
- <td valign="top">
- <p>We added an export wizard that converts BPMN diagrams defined using the Eclipse SOA Tools Platform (STP) BPMN editor and
- produces jPDL that can be executed with the JBoss jBPM process engine.</p>
- <p><img src="../images/bpmn2jpdl_exportwiz.png"/></p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>ESB Project Wizard</b></td>
- <td valign="top">
- <p>We added a project wizard for JBoss ESB development, including integrated deployment.</p>
- <p><img src="../images/esb_projwiz.png"/></p>
- </td>
- </tr>
- <tr>
- <td colspan="2"><hr />
- </td>
- </tr>
- <tr>
- <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>jboss-esb.xml editor</b></td>
- <td valign="top">
- <p>We added additional wizard support for providers, listeners, and actions in the JBoss ESB configuration file editor.</p>
- <p><img src="../images/esbxmleditor.png"/></p>
- </td>
- </tr>
-</table>
-
-</body>
-
-</html>
-
-
+<?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>ESB tools 1.1.0.Beta1 What's New</title>
+</head>
+<body>
+<h1>ESB tools 1.1.0.Beta1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../smooks/smooks-news-1.0.0.Beta1.html">Smooks Tools News ></a></p>
+
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>ESB</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>BPMN to jPDL Export Wizard</b></td>
+ <td valign="top">
+ <p>We added an export wizard for translating BPMN files created by Eclipse STP BPMN editor to jPDL that can be executed with the JBoss jBPM process engine.</p>
+ <p><img src="../images/bpmn2jpdl_exportwiz.png"/></p>
+
+ <p>The wizard can be activated from the <b>File > Export</b> menu.</p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>ESB UI improvement</b></td>
+ <td valign="top">
+ <p>There is now a unique icon for ESB related files/wizards.</p>
+ <p><img src="../images/esb_projwiz.png"/></p>
+ <p><img src="../images/esb_projectstructure.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>ESB Project Deployment</b></td>
+ <td valign="top">
+ <p>There is now a ESB project Wizard which creates a project that will be deployed as an .esb archive to a JBoss AS based server.</p>
+ <p><img src="../images/esb_icons.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>jboss-esb.xml editor</b></td>
+ <td valign="top">
+ <p>We added an structured xml editor for the jboss-esb.xml file used in JBoss ESB archives.</p>
+ <p><img src="../images/esbxmleditor.png"/></p>
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
+
+
Modified: trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/hibernate/hibernate-news-3.2.4.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -11,7 +11,7 @@
<body>
<h1>Hibernate tools 3.2.4.Beta1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../as/as-news-2.0.0.Alpha1.html">JBoss AS Tools News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../as/as-news-2.0.0.Beta1.html">JBoss AS Tools News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
@@ -54,12 +54,27 @@
</td>
</tr>
+
<tr>
<td colspan="2"><hr />
</td>
</tr>
<tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>More validation in Console configuration wizard</b></td>
+ <td valign="top">
+ <p>Default console name is now generated so it is unqiue avoiding warnings and the name is furthermore checked for invalid filename characters preventing any errors doing save.</p>
+
+<p><img src="../images/consoleconfig_validation.png"/></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
<td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Use DTP Connection</b></td>
<td valign="top">
<p>Hibernate console configuration can now use a DTP connection instead of default hibernate connection settings.</p>
@@ -69,7 +84,39 @@
</td>
</tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Hibernate page in persistence.xml</b></td>
+ <td valign="top">
+ <p>We now have a Hibernate specific page in the persistence.xml editor for JPA projects to provide a form UI for
+Hibernate specific properties.</p>
+
+ <p><img src="../images/persistence_xml_hibernate.png"/></p>
+
+
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>JPA Project Generate Entities</b></td>
+ <td valign="top">
+ <p>We now provide support for JPA Project Generate Entities action and allow you to use a DTP connection directly or use a Hibernate Console configuration for the basis of the generation.</p>
+
+ <p><img src="../images/generate_entities.png"/></p>
+
+ </td>
+ </tr>
+
+
</table>
</body>
Added: trunk/documentation/whatsnew/images/consoleconfig_validation.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/consoleconfig_validation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/datamodel_support.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/datamodel_support.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/esb_icons.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/esb_icons.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/esb_projectstructure.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/esb_projectstructure.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/externalcss_editing.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/externalcss_editing.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/generate_entities.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/generate_entities.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/orderedcompletions.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/orderedcompletions.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/persistence_xml_hibernate.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/persistence_xml_hibernate.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/portlet_wizard_simplification.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/portlet_wizard_simplification.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/projectarchives_error.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/projectarchives_error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/resourcebundle_rendering.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/resourcebundle_rendering.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/selective_seam_generate_entities.PNG
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/selective_seam_generate_entities.PNG
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/show_non_visual_tags.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/show_non_visual_tags.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/shownon-visual tags.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/shownon-visual tags.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/smooks_wizard.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/smooks_wizard.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/unbalanced_el.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/unbalanced_el.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/unknown_tag_template.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/unknown_tag_template.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/unknown_tag_template_001.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/unknown_tag_template_001.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/unknown_tag_template_dialog.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/unknown_tag_template_dialog.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/index.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -1,167 +1,176 @@
-thanks<html>
-
-<head>
-<link rel="stylesheet" href="whatsnew.css">
-<title>JBoss Tools News and Noteworthy</title>
-</head>
-
-<body>
-
-<h1>JBoss Tools News and Noteworthy</h1>
-
-<html>
-
-<table border="0" cellpadding="10" cellspacing="0" width="80%">
- <tr>
- <td colspan="2">
- <hr>
- <h3>JBoss Tools</h3>
- <hr>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>3.0.0.Beta1</b>
- <td valign="top">
- <p><a href="seam/seam-news-2.0.0.Beta1.html">Seam Tools</a></p>
- <p><a href="hibernate/hibernate-news-3.2.4.Beta1.html">Hibernate Tools</a></p>
- <p><a href="as/as-news-2.0.0.Beta1.html">JBoss AS Tools</a></p>
- <p><a href="vpe/vpe-news-3.0.0.Beta1.html">Visual Page Editor</a></p>
- <p><a href="esb/esb-news-1.1.0.Beta1.html">JBoss ESB Tools</a></p>
- <p><a href="smooks/smooks-news-1.0.0.Beta1.html">Smooks Tools</a></p>
- </td>
- </tr>
-
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>3.0.0.Alpha1</b>
- <td valign="top">
- <p><a href="core/core-news-3.0.0.Alpha1.html">Core/General</a></p>
- <p><a href="seam/seam-news-2.0.0.Alpha1.html">Seam Tools</a></p>
- <p><a href="hibernate/hibernate-news-3.2.4.Alpha1.html">Hibernate Tools</a></p>
- <p><a href="as/as-news-2.0.0.Alpha1.html">JBoss AS Tools</a></p>
- <p><a href="portlet/portlet-news-1.0.0.Alpha1.html">Portal Tools</a></p>
-
- <p><a href="ws/ws-news-1.0.0.Alpha1.html">Web Services</a></p>
- <p><a href="birt/birt-news-1.0.0.Alpha1.html">Birt Tools</a></p>
-
- <p><a href="vpe/vpe-news-3.0.0.Alpha1.html">Visual Page Editor</a></p>
-
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>2.1.0.GA</b>
- <td valign="top"><p>Bugfixes, no new major features</p></td>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>2.1.0.CR1</b>
- <td valign="top">
- <p><a href="vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor</a></p>
- <p><a href="seam/seam-news-1.1.0.CR1.html">Seam Tools</a></p>
- </td>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>2.1.0.beta1</b>
- <td valign="top">
- <p><a href="esb/esb-news-1.0.0.beta1.html">JBoss ESB Tools</a></p>
- <p><a href="as/as-news-1.1.0.beta1.html">JBoss AS Tools</a></p>
- <p><a href="seam/seam-news-1.1.0.beta1.html">Seam Tools</a></p>
- <p><a href="hibernate/hibernate-news-3.2.1.beta1.html">Hibernate Tools</a></p>
- <p><a href="vpe/vpe-news-2.1.0.beta1.html">Visual Page Editor</a></p>
- </td>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>2.0.0.GA/2.0.1.GA</b>
- <td valign="top"><p>Bugfixes, no new major features</p></td>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>Candidate Release 1</b></td>
- <td valign="top">
- <p><a href="as/as-news-1.0.0.cr1.html">JBoss AS Tools</a></p>
- <p><a href="seam/seam-news-1.0.0.cr1.html">Seam Tools</a></p>
- <p><a href="hibernate/hibernate-news-3.2.0.cr1.html">Hibernate Tools</a></p>
- <p><a href="vpe/vpe-news-2.0.0.cr1.html">Visual Page Editor</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>Beta4</b></td>
- <td valign="top">
- <p><a href="as/as-news-1.0.0.beta4.html">JBoss AS Tools</a></p>
- <p><a href="seam/seam-news-1.0.0.beta2.html">Seam Tools</a></p>
- <p><a href="jst/jst-news-1.0.0.beta2.html">JST Tools</a></p>
- <p><a href="http://www.hibernate.org/hib_docs/tools/eclipse/newandnoteworthy/hibernat...">Hibernate Tools</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>Beta3</b></td>
- <td valign="top">
- <p><a href="seam/seam-news-1.0.0.beta1.html">Seam Tools</a></p>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <hr/>
- <h3>JBoss Developer Studio</h3>
- <hr/>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>1.1.0.GA</b></td>
- <td valign="top">
- <p>Bugfixes, no new major features</p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>1.1.0.CR1</b></td>
- <td valign="top">
- <p><a href="jbds/jbds-news-1.1.0.CR1.html">JBoss Developer Studio</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>1.1.0.beta1</b></td>
- <td valign="top">
- <p><a href="jbds/jbds-news-1.1.0.beta1.html">JBoss Developer Studio</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>1.0.0.GA</b></td>
- <td valign="top">
- <p>Red Hat Developer Studio renamed to JBoss Developer Studio</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>Beta2</b></td>
- <td valign="top">
- <p><a href="rhds/rhds-news-1.0.0.beta2.html">Red Hat Developer Studio</a></p>
- </td>
- </tr>
- <tr>
- <td valign="top" align="left">
- <p align="right"><b>Beta1</b></td>
- <td valign="top">
- <p><a href="rhds/rhds-news-1.0.0.beta1.html">Red Hat Developer Studio</a></p>
- </td>
- </tr>
-</table>
-
-</body>
-
-</html>
-
-
+thanks<html>
+
+<head>
+<link rel="stylesheet" href="whatsnew.css">
+<title>JBoss Tools News and Noteworthy</title>
+</head>
+
+<body>
+
+<h1>JBoss Tools News and Noteworthy</h1>
+
+<html>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>JBoss Tools</h3>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>3.0.0.Beta1</b>
+ <td valign="top">
+ <p><a href="core/core-news-3.0.0.Beta1.html">Core/General</a></p>
+ <p><a href="seam/seam-news-2.0.0.Beta1.html">Seam Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.2.4.Beta1.html">Hibernate Tools</a></p>
+ <p><a href="as/as-news-2.0.0.Beta1.html">JBoss AS Tools</a></p>
+ <p><a href="portlet/portlet-news-1.0.0.Beta1.html">Portal Tools</a></p>
+ <p><a href="vpe/vpe-news-3.0.0.Beta1.html">Visual Page Editor</a></p>
+ <p><a href="esb/esb-news-1.1.0.Beta1.html">JBoss ESB Tools</a></p>
+ <p><a href="smooks/smooks-news-1.0.0.Beta1.html">Smooks Tools</a></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>3.0.0.Alpha1</b>
+ <td valign="top">
+ <p><a href="core/core-news-3.0.0.Alpha1.html">Core/General</a></p>
+ <p><a href="seam/seam-news-2.0.0.Alpha1.html">Seam Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.2.4.Alpha1.html">Hibernate Tools</a></p>
+ <p><a href="as/as-news-2.0.0.Alpha1.html">JBoss AS Tools</a></p>
+ <p><a href="portlet/portlet-news-1.0.0.Alpha1.html">Portal Tools</a></p>
+
+ <p><a href="ws/ws-news-1.0.0.Alpha1.html">Web Services</a></p>
+ <p><a href="birt/birt-news-1.0.0.Alpha1.html">Birt Tools</a></p>
+
+ <p><a href="vpe/vpe-news-3.0.0.Alpha1.html">Visual Page Editor</a></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.1.0.GA</b>
+ <td valign="top"><p>Bugfixes, no new major features</p></td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.1.0.CR1</b>
+ <td valign="top">
+ <p><a href="vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor</a></p>
+ <p><a href="seam/seam-news-1.1.0.CR1.html">Seam Tools</a></p>
+ </td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.1.0.beta1</b>
+ <td valign="top">
+ <p><a href="esb/esb-news-1.0.0.beta1.html">JBoss ESB Tools</a></p>
+ <p><a href="as/as-news-1.1.0.beta1.html">JBoss AS Tools</a></p>
+ <p><a href="seam/seam-news-1.1.0.beta1.html">Seam Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.2.1.beta1.html">Hibernate Tools</a></p>
+ <p><a href="vpe/vpe-news-2.1.0.beta1.html">Visual Page Editor</a></p>
+ </td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.0.0.GA/2.0.1.GA</b>
+ <td valign="top"><p>Bugfixes, no new major features</p></td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Candidate Release 1</b></td>
+ <td valign="top">
+ <p><a href="as/as-news-1.0.0.cr1.html">JBoss AS Tools</a></p>
+ <p><a href="seam/seam-news-1.0.0.cr1.html">Seam Tools</a></p>
+ <p><a href="hibernate/hibernate-news-3.2.0.cr1.html">Hibernate Tools</a></p>
+ <p><a href="vpe/vpe-news-2.0.0.cr1.html">Visual Page Editor</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Beta4</b></td>
+ <td valign="top">
+ <p><a href="as/as-news-1.0.0.beta4.html">JBoss AS Tools</a></p>
+ <p><a href="seam/seam-news-1.0.0.beta2.html">Seam Tools</a></p>
+ <p><a href="jst/jst-news-1.0.0.beta2.html">JST Tools</a></p>
+ <p><a href="http://www.hibernate.org/hib_docs/tools/eclipse/newandnoteworthy/hibernat...">Hibernate Tools</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Beta3</b></td>
+ <td valign="top">
+ <p><a href="seam/seam-news-1.0.0.beta1.html">Seam Tools</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>JBoss Developer Studio</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.0.0.Beta1</b></td>
+ <td valign="top">
+ <p><a href="jbds/jbds-news-2.0.0.Beta1.html">JBoss Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>1.1.0.GA</b></td>
+ <td valign="top">
+ <p>Bugfixes, no new major features</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>1.1.0.CR1</b></td>
+ <td valign="top">
+ <p><a href="jbds/jbds-news-1.1.0.CR1.html">JBoss Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>1.1.0.beta1</b></td>
+ <td valign="top">
+ <p><a href="jbds/jbds-news-1.1.0.beta1.html">JBoss Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>1.0.0.GA</b></td>
+ <td valign="top">
+ <p>Red Hat Developer Studio renamed to JBoss Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Beta2</b></td>
+ <td valign="top">
+ <p><a href="rhds/rhds-news-1.0.0.beta2.html">Red Hat Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Beta1</b></td>
+ <td valign="top">
+ <p><a href="rhds/rhds-news-1.0.0.beta1.html">Red Hat Developer Studio</a></p>
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/jbds/jbds-news-2.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/jbds/jbds-news-2.0.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/jbds/jbds-news-2.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -0,0 +1,52 @@
+<html>
+
+<head>
+<link rel="stylesheet" href="../whatsnew.css">
+<title>JBoss Developer Studio 2.0.0.CR1 News</title>
+</head>
+
+<body>
+
+<h1>JBoss Developer Studio 2.0.0.CR1 - New and Noteworthy</h1>
+
+<html>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>Platforms</h3>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>EAP 4.3 + Seam 2 FP</b></td>
+ <td valign="top">
+ <p>We now bundle EAP 4.3 and Seam 2 feature pack</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>Eclipse 3.4 (Ganymede)</b></td>
+ <td valign="top">
+ <p>Eclipse core and WTP is updated to Eclipse 3.4 (Ganymede) binaries.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>SpringIDE 2</b></td>
+ <td valign="top">
+ <p>We have updated SpringIDE to version 2</p>
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Beta1.html (rev 0)
+++ trunk/documentation/whatsnew/portlet/portlet-news-1.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -0,0 +1,60 @@
+<?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>JBoss Tools Portlet</title>
+</head>
+<body>
+<h1>JBoss Tools Portlet 3.0.0.Beta1 - New and Noteworthy</h1>
+<p>Last revised August 10, 2008</p>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-3.0.0.Beta1.html">Visual Page Editor News ></a></p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>JBoss Tools Portlet</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Portlet Wizard on non-WTP projects</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ The JBoss Portlet wizards no longer require a WTP project to be able to create Portlets.</p>
+<p>Note: that if the project does not have the proper portlet API jar's the generated classes will have compile errors.</p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p><b>Simplfied Wizards</b></p>
+ </td>
+ <td valign="top">
+ <p>
+ There are now only two JBoss Portlet wizards, instead of three. The Seam and JSF portlet wizard have been merged into one.</p>
+<p><img src="../images/portlet_wizard_simplification.png"/></p>
+ </td>
+ </tr>
+
+
+
+</table>
+
+</body>
+
+</html>
+
+
Modified: trunk/documentation/whatsnew/seam/seam-news-2.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/seam/seam-news-2.0.0.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/seam/seam-news-2.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -9,9 +9,9 @@
<title>Seam tools 2.0.0.Beta1 What's New</title>
</head>
<body>
-<h1>Seam tools 2.0.0.Alpha1 What's New</h1>
+<h1>Seam tools 2.0.0.Beta1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.2.4.Alpha1.html">Hibernate News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../hibernate/hibernate-news-3.2.4.Beta1.html">Hibernate News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
@@ -43,8 +43,38 @@
<a name="itemnam2e" id="itemname2"></a><b>(Basic) Seam 2.1 support</b>
</td>
<td width="70%" valign="top">
- <p>Work have been done to make sure this release will work with Seam 2.1; i.e. components.xml editor supports 2.1 schemas.</p>
- <p>Generate Entities wizard will only work with Seam 2.1.0.SP1 or use the patch available in the related <a href="https://jira.jboss.org/jira/browse/JBSEAM-3617">bug in jira</a> for Seam 2.1.0.GA</a></p>
+ <p>Work have been done to make sure this release will work with Seam 2.1 as a Technology Preview; i.e. components.xml editor supports 2.1 schemas.</p>
+ <p>Generate Entities wizard will only work with Seam 2.1.0.SP1 or use the patch available in the related <a href="https://jira.jboss.org/jira/browse/JBSEAM-3617">bug in jira</a> for Seam 2.1.0.GA</a></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Seam 2.0 no longer marked as Technology Preview</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>Seam 2.0 is now fully supported in JBDS thus we do no longer need to mark the support technology preview.</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Less aggressive scanning</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>Previous releases scanned all folders of a project for Seam resources, sometime causing unwanted sideeffects (duplicate components, out of sync resources etc.).</p>
+ <p>Seam now only scans Java source directories, project classpath and WTP projects WEB-INF directory.</p>
+ <p>Besides stopping giving bad errors/warnings it should also give a decent speed up for large projects since only a smaller focused set of resources will be scanned.</p>
</td>
</tr>
@@ -86,7 +116,100 @@
</td>
</tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Selective Generate Entities</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>.</p>
+
+ <p>Seam Generate Entities now allow you to select which catalog/schemas/tables you want to reverse engineer.</p>
+
+ <p><img src="../images/selective_seam_generate_entities.png"/></p>
+
+ </td>
+ </tr>
+
+
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Ordered JSF code completions</b>
+ </td>
+ <td width="70%" valign="top">
+
+ <p>JSF code completions are now explicitly ordered by type to give more relevant completions higher priority. The current ordering is below.</p>
+
+<ol>
+<li>XML/JSP/HTML Tags</li>
+<li>Tag Attributes</li>
+<li>Tag Attribute Values:
+<ol>
+ <li>The Tag Name List for the jsfc-attribute</li>
+ <li>Predefined Tag Attribute Values </li>
+ <li>SEAM EL (Seam Components, Seam Component Properties, Seam Component Methods, Seam Message Components, Seam Message Component Properties, Seam Factories)</li>
+ <li>JSF EL (Managed Beans, Managed Bean Properties, Managed Bean Methods, Constants, Resource Bundles, Resource Bundle Properties)</li>
+ <li>WTP JSF EL</li>
+</ol>
+<li>
+</ol>
+
+<p><img src="../images/orderedcompletions.png"/></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>@DataModelSelection support</b>
+ </td>
+ <td width="70%" valign="top">
+
+ <p>Seam code completion now also picks up <code>@DataModelSection</code>.</p>
+
+ <p><img src="../images/datamodel_support.png"/></p>
+
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Warning for unbalanced EL</b>
+ </td>
+ <td width="70%" valign="top">
+
+ <p>EL validation now adds warnings for unbalanced EL.</p>
+
+<p><img src="../images/unbalanced_el.png"/></p>
+
+
+
+ </td>
+ </tr>
+
+
+
+
+
</table>
</body>
Modified: trunk/documentation/whatsnew/smooks/smooks-news-1.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/smooks/smooks-news-1.0.0.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/smooks/smooks-news-1.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -11,7 +11,7 @@
<body>
<h1>Smooks tools 3.0.0.Beta1 What's New</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../as/as-news-1.1.0.beta1.html">JBoss AS Tools News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../core/core-news-3.0.0.Beta1.html">Core/General ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
@@ -30,6 +30,18 @@
<p><img src="../images/smooks_editor.png"/></p>
</td>
</tr>
+ <tr>
+ <td colspan="2">
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>Smooks wizard</b></td>
+ <td valign="top">
+ <p>There is now a Smooks wizard for creating a .smooks file</p>
+ <p><img src="../images/smooks_wizard.png"/></p>
+ </td>
+ </tr>
</table>
</body>
Modified: trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Beta1.html 2008-10-29 21:00:49 UTC (rev 11311)
+++ trunk/documentation/whatsnew/vpe/vpe-news-3.0.0.Beta1.html 2008-10-29 21:15:10 UTC (rev 11312)
@@ -11,7 +11,7 @@
<body>
<h1>What's New Visual Page Editor</h1>
-<p align="right"><a href="../index.html">< Main Index</a> <a href="../core/core-news-3.0.0.Alpha1.html">Core News ></a></p>
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../esb/esb-news-1.1.0.Beta1.html">ESB News ></a></p>
<table border="0" cellpadding="10" cellspacing="0" width="80%">
<tr>
<td colspan="2">
@@ -47,6 +47,19 @@
</td>
</tr>
<tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Drag'n'Drop of components are back!</b></td>
+ <td valign="top"><p>
+ Drag'n'Drop of components now show a caret to indicate where the component will be dropped.
+ </p>
+ <p><img src="../images/jsfcompletions.png"/></p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
<td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Unique icons for Richfaces tags in palette</b></td>
<td valign="top"><p>
Richfaces tags now have unique icons in the JBoss Tools palette instead of all using the default tag icon.
@@ -54,9 +67,121 @@
<p><img src="../images/richfaces_palette_icons.png"/></p>
</td>
</tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Support for more Richfaces and JSF 2 tags</b></td>
+ <td valign="top"><p>
+ <code>rich:hotKey, rich:ajaxValidator, rich:graphValidator, rich:beanValidator, rich:extendedDataTable</code> is now supported in the Visual Page Editor.
+ </p>
+<p>We also added initial support for some new tags from JSF 2: <code>h:body, h:head, h:outputscript, h:outputstyle</code></p>
+ </td>
+ </tr>
<tr>
<td colspan="2"><hr />
</td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>External CSS Editing</b></td>
+ <td valign="top"><p>
+ <p>There is now a CSS <b>class</b> wizard that can be used to add or edit CSS styles in existing CSS style files.</p>
+
+ <p>This wizard is also used for style edits in Visual Page Editor.</p>
+
+ <p><img src="../images/externalcss_editing.png"/></p>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>No More UAC Dialog in Vista</b></td>
+ <td valign="top"><p>
+ When opening Visual Page Editor on Vista users were previously presented with 2 security check dialogs caused by regedit being used to check for XULRunner installations.
+ This check is now removed and Vista users should have two less UAC dialogs to worry about.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Show Non-visual tags</b></td>
+ <td valign="top"><p>
+ The visual page editor now has a option to show non-visual tags.
+ </p>
+ <p><img src="../images/shownon-visual tags.png"/></p>
+
+<p>When enabled a small grey box with the non-visual tags will be drawn in the visual part to more easily see where the boundaries are and to provide a way to select them more easily by just clicking.</p>
+
+<p><img src="../images/show_non_visual_tags.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Improvement to template for unknown tags</b></td>
+ <td valign="top"><p>
+ It have always been able to setup a template for unknown tags by right clicking them in the Visual Page Editor:
+ </p>
+ <p><img src="../images/unknown_tag_template.png"/></p>
+
+<p>We have improved the dialog for defining the template to allow you to select which html tag to use and instead of restricted styling options you can know use CSS to define the style.</p>
+
+<p><img src="../images/unknown_tag_template_dialog.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>More speed improvements</b></td>
+ <td valign="top"><p>
+ We did another round of speed improvements to the Visual Page Editor and now typing directly in the visual part is done with lot less pauses.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+
+
+ <tr>
+ <td valign="top" align="left"><a name="itemname3" id="itemname3"></a><b>Resource bundle for nested includes</b></td>
+ <td valign="top"><p> Visual Page Editor has a preference for
+ showing the raw EL or render the translated string for
+ resource bundles. In previous versions there were problems
+ with rendering the resource bundles when the content came from
+ nested includes. That is now fixed making it available at all
+ levels.
+ </p>
+
+<p><img src="../images/resourcebundle_rendering.png"/></p>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+
+
+
</table>
</body>
17 years, 2 months
JBoss Tools SVN: r11311 - branches/jbosstools-3.0.0.Beta1/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-29 17:00:49 -0400 (Wed, 29 Oct 2008)
New Revision: 11311
Modified:
branches/jbosstools-3.0.0.Beta1/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
Log:
JBIDE-3055 Browse for existing Portlet class gives exception
Modified: branches/jbosstools-3.0.0.Beta1/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29 20:57:39 UTC (rev 11310)
+++ branches/jbosstools-3.0.0.Beta1/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassWizardPage.java 2008-10-29 21:00:49 UTC (rev 11311)
@@ -118,7 +118,6 @@
protected void handleClassButtonSelected() {
getControl().setCursor(new Cursor(getShell().getDisplay(), SWT.CURSOR_WAIT));
IProject project = (IProject) model.getProperty(PROJECT);
- IVirtualComponent component = ComponentCore.createComponent(project);
MultiSelectFilteredFileSelectionDialog ms = new MultiSelectFilteredFileSelectionDialog(
getShell(),
"New Portlet",
@@ -126,7 +125,13 @@
new String[0],
false,
project);
- IContainer root = component.getRootFolder().getUnderlyingFolder();
+ IVirtualComponent component = ComponentCore.createComponent(project);
+ IContainer root = null;
+ if (component != null) {
+ root = component.getRootFolder().getUnderlyingFolder();
+ } else {
+ root = project;
+ }
ms.setInput(root);
ms.open();
if (ms.getReturnCode() == Window.OK) {
17 years, 2 months
JBoss Tools SVN: r11310 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-29 16:57:39 -0400 (Wed, 29 Oct 2008)
New Revision: 11310
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
Log:
Fix for JUnit tests errors in sem.ui related to opening javaEditor with asyncExec.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2008-10-29 20:13:10 UTC (rev 11309)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2008-10-29 20:57:39 UTC (rev 11310)
@@ -15,13 +15,19 @@
import java.util.Map;
import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
import org.jboss.tools.seam.ui.ISeamHelpContextIds;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.widget.editor.INamedElement;
@@ -32,6 +38,11 @@
*/
public class SeamActionWizard extends SeamBaseWizard implements INewWizard {
+ @Override
+ public boolean performFinish() {
+ return super.performFinish();
+ }
+
public void createPageControls(Composite pageContainer) {
super.createPageControls(pageContainer);
PlatformUI.getWorkbench().getHelpSystem().setHelp(pageContainer, ISeamHelpContextIds.NEW_SEAM_ACTION);
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-10-29 20:13:10 UTC (rev 11309)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseOperation.java 2008-10-29 20:57:39 UTC (rev 11310)
@@ -94,47 +94,14 @@
public IStatus execute(IProgressMonitor monitor, IAdaptable info)
throws ExecutionException {
IStatus result = Status.OK_STATUS;
- Map<String, INamedElement> params = (Map)info.getAdapter(Map.class);
- final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(
- params.get(IParameter.SEAM_PROJECT_NAME).getValueAsString());
+
+
+ final SeamProjectsSet seamPrjSet = new SeamProjectsSet(getProject(info));
- Map<String, Object> vars = new HashMap<String, Object>();
- IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(project);
- SeamProjectsSet seamPrjSet = new SeamProjectsSet(project);
-
try {
- for (String key : seamFacetPrefs.keys()) {
- vars.put(key, seamFacetPrefs.get(key, "")); //$NON-NLS-1$
- }
+
+ Map<String, Object> vars = loadParameters(info, seamPrjSet);
- for (Object valueHolder : params.values()) {
- INamedElement elem = (INamedElement)valueHolder;
- vars.put(elem.getName(),elem.getValue().toString());
- }
-
- loadCustomVariables(vars);
-
- String actionFolder = getSessionBeanPackageName(seamFacetPrefs, params);
- String entityFolder = getEntityBeanPackageName(seamFacetPrefs, params);
- String testFolder = getTestCasesPackageName(seamFacetPrefs, params);
-
- vars.put(IParameter.SEAM_PROJECT_INSTANCE, project);
- vars.put(IParameter.JBOSS_SEAM_HOME, SeamRuntimeManager.getInstance().getRuntimeForProject(project).getHomeDir());
-
- putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_LOCATION_PATH, project);
- putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_WEBCONTENT_PATH, seamPrjSet.getViewsFolder());
- putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_ACTION, seamPrjSet.getActionFolder());
- putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_MODEL, seamPrjSet.getModelFolder());
- putResourceLocationProperty(vars, IParameter.SEAM_EJB_PROJECT_LOCATION_PATH, seamPrjSet.getEjbProject());
- putResourceLocationProperty(vars, IParameter.SEAM_TEST_PROJECT_LOCATION_PATH, seamPrjSet.getTestProject());
- putResourceLocationProperty(vars, IParameter.TEST_SOURCE_FOLDER, seamPrjSet.getTestsFolder());
- putPackageLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_PATH, actionFolder);
- putResourceLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_NAME, actionFolder);
- putPackageLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_PATH, testFolder);
- putResourceLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_NAME, testFolder);
- putPackageLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_PATH, entityFolder);
- putResourceLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_NAME, entityFolder);
-
List<FileMapping> fileMapping = getFileMappings(vars);
List<String[]> fileMappingCopy = applyVariables(fileMapping,vars);
FilterSetCollection filters = getFilterSetCollection(vars);
@@ -146,23 +113,23 @@
index++;
}
- Display.getCurrent().asyncExec(new Runnable() {
- /* (non-Javadoc)
- * @see java.lang.Runnable#run()
- */
- public void run() {
- if(file.length > 0){
- IFile iFile = project.getWorkspace().getRoot().getFileForLocation(new Path(file[0].getAbsolutePath()));
- try {
- IDE.openEditor(SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(), iFile);
- } catch (PartInitException e) {
- SeamGuiPlugin.getPluginLog().logError(e);
- }
- }
- }
- });
+// Display.getCurrent().asyncExec(new Runnable() {
+// /* (non-Javadoc)
+// * @see java.lang.Runnable#run()
+// */
+// public void run() {
+// if(file.length > 0){
+// IFile iFile = seamPrjSet.getWarProject().getWorkspace().getRoot().getFileForLocation(new Path(file[0].getAbsolutePath()));
+// try {
+// IDE.openEditor(SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(), iFile);
+// } catch (PartInitException e) {
+// SeamGuiPlugin.getPluginLog().logError(e);
+// }
+// }
+// }
+// });
if(shouldTouchServer(seamPrjSet)) {
- WebUtils.changeTimeStamp(project);
+ WebUtils.changeTimeStamp(seamPrjSet.getWarProject());
}
} catch (BackingStoreException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
@@ -201,6 +168,63 @@
return result;
}
+ private Map<String, Object> loadParameters(IAdaptable info, SeamProjectsSet seamPrjSet) throws BackingStoreException {
+ Map<String, INamedElement> params = (Map)info.getAdapter(Map.class);
+ IEclipsePreferences seamFacetPrefs = SeamCorePlugin.getSeamPreferences(seamPrjSet.getWarProject());
+
+ Map<String, Object> vars = new HashMap<String, Object>();
+
+ for (String key : seamFacetPrefs.keys()) {
+ vars.put(key, seamFacetPrefs.get(key, "")); //$NON-NLS-1$
+ }
+
+ for (Object valueHolder : params.values()) {
+ INamedElement elem = (INamedElement)valueHolder;
+ vars.put(elem.getName(),elem.getValue().toString());
+ }
+
+ loadCustomVariables(vars);
+
+ String actionFolder = getSessionBeanPackageName(seamFacetPrefs, params);
+ String entityFolder = getEntityBeanPackageName(seamFacetPrefs, params);
+ String testFolder = getTestCasesPackageName(seamFacetPrefs, params);
+
+ vars.put(IParameter.SEAM_PROJECT_INSTANCE, seamPrjSet.getWarProject());
+ vars.put(IParameter.JBOSS_SEAM_HOME, SeamRuntimeManager.getInstance().getRuntimeForProject(seamPrjSet.getWarProject()).getHomeDir());
+
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_LOCATION_PATH, seamPrjSet.getWarProject());
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_WEBCONTENT_PATH, seamPrjSet.getViewsFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_ACTION, seamPrjSet.getActionFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_PROJECT_SRC_MODEL, seamPrjSet.getModelFolder());
+ putResourceLocationProperty(vars, IParameter.SEAM_EJB_PROJECT_LOCATION_PATH, seamPrjSet.getEjbProject());
+ putResourceLocationProperty(vars, IParameter.SEAM_TEST_PROJECT_LOCATION_PATH, seamPrjSet.getTestProject());
+ putResourceLocationProperty(vars, IParameter.TEST_SOURCE_FOLDER, seamPrjSet.getTestsFolder());
+ putPackageLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_PATH, actionFolder);
+ putResourceLocationProperty(vars, IParameter.SESSION_BEAN_PACKAGE_NAME, actionFolder);
+ putPackageLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_PATH, testFolder);
+ putResourceLocationProperty(vars, IParameter.TEST_CASES_PACKAGE_NAME, testFolder);
+ putPackageLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_PATH, entityFolder);
+ putResourceLocationProperty(vars, IParameter.ENTITY_BEAN_PACKAGE_NAME, entityFolder);
+ return vars;
+ }
+
+ public void openResultInEditor(IAdaptable info) {
+ final SeamProjectsSet seamPrjSet = new SeamProjectsSet(getProject(info));
+ try {
+ Map<String, Object> vars = loadParameters(info, seamPrjSet);
+ List<FileMapping> fileMapping = getFileMappings(vars);
+ List<String[]> fileMappingCopy = applyVariables(fileMapping,vars);
+ IFile iFile = seamPrjSet.getWarProject().getWorkspace().getRoot().getFileForLocation(new Path(fileMappingCopy.get(0)[1]));
+ IDE.openEditor(SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage(), iFile);
+ } catch (CoreException e) {
+
+ } catch (BackingStoreException e) {
+
+ }
+
+
+ }
+
protected boolean shouldTouchServer(SeamProjectsSet seamPrjSet) {
return !seamPrjSet.isWarConfiguration();
}
@@ -217,6 +241,13 @@
return seamFacetPrefs.get(IParameter.TEST_CASES_PACKAGE_NAME, "");
}
+ protected IProject getProject(IAdaptable info) {
+ Map<String, INamedElement> params = (Map)info.getAdapter(Map.class);
+
+ return ResourcesPlugin.getWorkspace().getRoot().getProject(
+ params.get(IParameter.SEAM_PROJECT_NAME).getValueAsString());
+ }
+
/**
* @param fileMapping
* @param vars
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2008-10-29 20:13:10 UTC (rev 11309)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamBaseWizard.java 2008-10-29 20:57:39 UTC (rev 11310)
@@ -75,6 +75,10 @@
operation.addContext(undoContext);
try {
result = operationHistory.execute(operation, monitor, (IAdaptable)getPages()[0]);
+ if(operation instanceof SeamBaseOperation) {
+ SeamBaseOperation seamOperation = (SeamBaseOperation)operation;
+ seamOperation.openResultInEditor((IAdaptable)getPages()[0]);
+ }
} catch (ExecutionException e) {
result = new Status(IStatus.ERROR,SeamGuiPlugin.PLUGIN_ID,e.getMessage(),e);
SeamCorePlugin.getPluginLog().logError(e);
17 years, 2 months
JBoss Tools SVN: r11309 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2008-10-29 16:13:10 -0400 (Wed, 29 Oct 2008)
New Revision: 11309
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2915
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css 2008-10-29 19:23:16 UTC (rev 11308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/extendedDataTable/extendedDataTable.css 2008-10-29 20:13:10 UTC (rev 11309)
@@ -64,7 +64,7 @@
padding: 4px 4px 4px 4px;
text-align: center;
font-size: 11px;
- font-color: #000000;
+ color: #000000;
font-family: Arial, Verdana, sans-serif;
}
@@ -84,6 +84,7 @@
border-right: 1px solid;
border-bottom: 1px solid;
border-color: #C4C0B9;
+ background-color: #F1EEE9;
padding: 4px 4px 4px 4px;
text-align: left;
font-size: 11px;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-10-29 19:23:16 UTC (rev 11308)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesExtendedDataTableTemplate.java 2008-10-29 20:13:10 UTC (rev 11309)
@@ -34,6 +34,14 @@
*/
public class RichFacesExtendedDataTableTemplate extends VpeAbstractTemplate {
+ private static final String PADDING_0PX = "padding: 0px;"; //$NON-NLS-1$
+ private static final String RIGHT = "right"; //$NON-NLS-1$
+ private static final String TOP = "top"; //$NON-NLS-1$
+ private static final String VALUE = "100"; //$NON-NLS-1$
+ private static final String _100 = "100%"; //$NON-NLS-1$
+ private static final String _17PX = "17px"; //$NON-NLS-1$
+ private static final String SCROLL_STYLE = "width: 17px; overflow : scroll; height : 100%;"; //$NON-NLS-1$
+ private static final String VERTICAL_ALIGN_MIDDLE = "vertical-align:middle;"; //$NON-NLS-1$
private static final String DISPLAY_NONE = "display : none"; //$NON-NLS-1$
private static final String FILTER_BY = "filterBy"; //$NON-NLS-1$
private static final String DIV_STYLE = "padding : 4px"; //$NON-NLS-1$
@@ -42,35 +50,17 @@
private static final String FALSE = "false"; //$NON-NLS-1$
private static final String SCOP = "scop"; //$NON-NLS-1$
private static final String COL = "col"; //$NON-NLS-1$
- private static final String TABLE_CAPTION_RICH_TABLE_CAPTION = "dr-table-caption rich-table-caption"; //$NON-NLS-1$
- private static final String DR_TABLE_CAPTION_RICH_TABLE_CAPTION = "dr-table-caption rich-table-caption "; //$NON-NLS-1$
- private static final String SUB_TABLE = ":subTable"; //$NON-NLS-1$
- private static final String COLUMN_GROUP = ":columnGroup"; //$NON-NLS-1$
- private static final String DR_TABLE_ROW_RICH_TABLE_ROW = "dr-table-row rich-table-row"; //$NON-NLS-1$
- private static final String DR_TABLE_FIRSTROW_RICH_TABLE_FIRSTROW = "dr-table-firstrow rich-table-firstrow"; //$NON-NLS-1$
- private static final String TRUE = "true"; //$NON-NLS-1$
- private static final String BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
- private static final String DR_TABLE_FOOTERCELL_RICH_TABLE_FOOTERCELL = "dr-table-footercell rich-table-footercell"; //$NON-NLS-1$
- private static final String DR_TABLE_FOOTER_CONTINUE_RICH_TABLE_FOOTER_CONTINUE = "dr-table-footer-continue rich-table-footer-continue"; //$NON-NLS-1$
- private static final String DR_TABLE_FOOTER_RICH_TABLE_FOOTER = "dr-table-footer rich-table-footer"; //$NON-NLS-1$
private static final String DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL = "dr-table-subfootercell rich-table-subfootercell"; //$NON-NLS-1$
private static final String DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER = "dr-table-subfooter rich-table-subfooter"; //$NON-NLS-1$
private static final String DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL = "dr-table-subheadercell rich-table-subheadercell"; //$NON-NLS-1$
private static final String DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER = "dr-table-subheader rich-table-subheader"; //$NON-NLS-1$
- private static final String DR_TABLE_HEADERCELL_RICH_TABLE_HEADERCELL = "dr-table-headercell rich-table-headercell"; //$NON-NLS-1$
- private static final String DR_TABLE_HEADER_CONTINUE_RICH_TABLE_HEADER_CONTINUE = "dr-table-header-continue rich-table-header-continue"; //$NON-NLS-1$
- private static final String DR_TABLE_HEADER_RICH_TABLE_HEADER = "dr-table-header rich-table-header"; //$NON-NLS-1$
private static final String EMPTY = ""; //$NON-NLS-1$
- private static final String DR_TABLE_RICH_TABLE = "dr-table rich-table "; //$NON-NLS-1$
private static final String RICH_FACES_DATA_TABLE = "richFacesDataTable"; //$NON-NLS-1$
private static final String EXTENDED_DATA_TABLE_CSS = "extendedDataTable/extendedDataTable.css"; //$NON-NLS-1$
private static final String SEMICOLON = ";"; //$NON-NLS-1$
private static final String COLON = " : "; //$NON-NLS-1$
- private static final String DR_TABLE_HIDDEN = "dr-table-hidden"; //$NON-NLS-1$
- private static final String COLUMN = ':' + RichFaces.TAG_COLUMN;
- private static final String COLUMNS = ':' + RichFaces.TAG_COLUMNS;
+ private static final String COLUMN = "rich:column"; //$NON-NLS-1$
final static String DEFAULT_HEIGHT = "500px"; //$NON-NLS-1$
- final static String DEFAULT_WIDTH = "100%"; //$NON-NLS-1$
final static String HEADER = "header"; //$NON-NLS-1$
final static String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
final static String FOOTER = "footer"; //$NON-NLS-1$
@@ -81,12 +71,9 @@
final static String SPACE = " "; //$NON-NLS-1$
final static String ZERRO = "0"; //$NON-NLS-1$
final static String SORTABLE_PATH = "extendedDataTable/sortable.gif"; //$NON-NLS-1$
+ final static String SORT_BY_ATTR = "sortBy"; //$NON-NLS-1$
+ final static String COMMA = ","; //$NON-NLS-1$
- private static String STYLE_FOR_RIGHT_SCROLL = "height: 100%; overflow-y: scroll"; //$NON-NLS-1$
- private static String TD_STYLE_FOR_RIGHT_SCROLL = "height: 100%;width : 17px;"; //$NON-NLS-1$
-
- private static final int NUM_ROW = 5;
-
/**
* Creates a node of the visual tree on the node of the source tree. This
* visual node should not have the parent node This visual node can have
@@ -105,227 +92,227 @@
Element sourceElement = (Element) sourceNode;
- String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
- String height = sourceElement.getAttribute(HTML.ATTR_HEIGHT);
+ String width = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_WIDTH);
+ String height = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_HEIGHT);
+ String style = ComponentUtil.getAttribute(sourceElement,
+ HTML.ATTR_STYLE);
+ String styleCommonClass = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_STYLE_CLASS);
+ ComponentUtil.setCSSLink(pageContext, EXTENDED_DATA_TABLE_CSS,
+ RICH_FACES_DATA_TABLE);
+
+ nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ String divStyle = HTML.ATTR_WIDTH + COLON
+ + (width.length() > 0 ? width: _100) + SEMICOLON
+ + HTML.ATTR_HEIGHT + COLON
+ + (height.length() > 0 ? height : DEFAULT_HEIGHT ) + SEMICOLON;
+ div.setAttribute(HTML.ATTR_STYLE, divStyle);
+
+ VpeCreationData vpeCreationData = new VpeCreationData(div);
+
// -----------CommonTable
nsIDOMElement tableCommon = visualDocument
.createElement(HTML.TAG_TABLE);
+ tableCommon.setAttribute(HTML.ATTR_BORDER, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_CELLPADDING, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_CELLSPACING, ZERRO);
+ tableCommon.setAttribute(HTML.ATTR_WIDTH, _100);
+ tableCommon.setAttribute(HTML.ATTR_HEIGHT, _100);
+
+ div.appendChild(tableCommon);
- VpeCreationData creationData = new VpeCreationData(tableCommon);
+ ArrayList<Element> columns = getColumns(sourceNode);
+ int columnsLength = columns.size();
- nsIDOMElement tr1 = visualDocument.createElement(HTML.TAG_TR);
- tableCommon.appendChild(tr1);
+ // Add colgroup
+ nsIDOMElement colgroup = visualDocument
+ .createElement(HTML.TAG_COLGROUP);
+ tableCommon.appendChild(colgroup);
- // ---------------------tr1------------------------
- nsIDOMElement tr1_TD1 = visualDocument.createElement(HTML.TAG_TD);
- tr1.appendChild(tr1_TD1);
+ for (int i = 0; i < columnsLength; i++) {
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ col.setAttribute(HTML.ATTR_WIDTH, VALUE);
+ colgroup.appendChild(col);
+ }
- nsIDOMElement tr1_TD2 = visualDocument.createElement(HTML.TAG_TD);
- tr1_TD2.setAttribute(HTML.ATTR_STYLE, TD_STYLE_FOR_RIGHT_SCROLL);
- tr1.appendChild(tr1_TD2);
+ // Add Head
+ String headerClass = (String) sourceElement.getAttribute(HEADER_CLASS);
- nsIDOMElement tr1_td2_DIV = visualDocument.createElement(HTML.TAG_DIV);
- tr1_td2_DIV.setAttribute(HTML.ATTR_STYLE, STYLE_FOR_RIGHT_SCROLL);
- tr1_TD2.appendChild(tr1_td2_DIV);
+ nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
+ ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
+ tableCommon.appendChild(thead);
+ nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
+ nsIDOMElement filterTR = visualDocument.createElement(HTML.TAG_TR);
+ thead.appendChild(tr);
+ thead.appendChild(filterTR);
+ String styleClass = RichFacesDataTableTemplate.encodeStyleClass(null,
+ DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER, null, headerClass);
+ if (styleClass != null) {
+ tr.setAttribute(HTML.ATTR_CLASS, styleClass);
+ filterTR.setAttribute(HTML.ATTR_CLASS, styleClass);
+ }
+ encodeHeaderFacets(vpeCreationData, tr, filterTR, visualDocument,
+ columnsHeaders,
+ DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL, headerClass);
+ //
+
+ // Add footer
+ ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
+ nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
+ tableCommon.appendChild(tfoot);
+ String footerClass = (String) sourceElement.getAttribute(FOOTER_CLASS);
+ nsIDOMElement tfootTR = visualDocument.createElement(HTML.TAG_TR);
+ tfoot.appendChild(tfootTR);
+ String styleFooterClass = RichFacesDataTableTemplate.encodeStyleClass(
+ null, DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER, null,
+ footerClass);
+ if (styleFooterClass != null) {
+ tfootTR.setAttribute(HTML.ATTR_CLASS, styleFooterClass);
+ }
+ encodeFooterFacets(vpeCreationData, tfootTR, visualDocument,
+ columnsFooters,
+ DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL,
+ styleFooterClass);
- // -------------------------------------------------------
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
- tr1_TD1.appendChild(div);
- div.setAttribute(HTML.ATTR_CLASS, DR_TABLE_HIDDEN);
+ // Add tbody
+ nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
+ tableCommon.appendChild(tbody);
- String divStyle = HTML.ATTR_WIDTH + COLON
- + (width == null ? DEFAULT_WIDTH : width) + SEMICOLON
- + HTML.ATTR_HEIGHT + COLON
- + (height == null ? DEFAULT_HEIGHT : height) + SEMICOLON;
+ nsIDOMElement bodyTR = visualDocument.createElement(HTML.TAG_TR);
+ tbody.appendChild(bodyTR);
- div.setAttribute(HTML.ATTR_STYLE, divStyle);
+ nsIDOMElement bodyTD = visualDocument.createElement(HTML.TAG_TD);
+ bodyTD.setAttribute(HTML.ATTR_COLSPAN, new Integer(columnsLength)
+ .toString());
+ bodyTD.setAttribute(HTML.ATTR_VALIGN, TOP);
+ bodyTD.setAttribute(HTML.ATTR_STYLE, PADDING_0PX);
+ bodyTR.appendChild(bodyTD);
- nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
- ComponentUtil.copyAttributes(sourceNode, table);
- table.removeAttribute(HTML.ATTR_HEIGHT);
- div.appendChild(table);
+ // Add body Table
+ String border = ComponentUtil.getAttribute(sourceElement, HTML.ATTR_BORDER);
+
+ nsIDOMElement bodyTable = visualDocument.createElement(HTML.TAG_TABLE);
+ if (border.length() > 0)
+ bodyTable.setAttribute(HTML.ATTR_BORDER, border);
+ if (style.length() > 0) {
+ bodyTable.setAttribute(HTML.ATTR_STYLE, style);
+ }
+ if (styleCommonClass.length()>0) {
+ tableCommon.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
+ bodyTable.setAttribute(HTML.ATTR_CLASS, styleCommonClass);
+ }
+ bodyTable.setAttribute(HTML.ATTR_WIDTH, _100);
+ bodyTable.setAttribute(HTML.ATTR_HEIGHT, _100);
+ bodyTD.appendChild(bodyTable);
- ComponentUtil
- .setCSSLink(pageContext,
- EXTENDED_DATA_TABLE_CSS,
- RICH_FACES_DATA_TABLE);
- String tableClass = sourceElement
- .getAttribute(RichFaces.ATTR_STYLE_CLASS);
- table.setAttribute(HTML.ATTR_CLASS, DR_TABLE_RICH_TABLE
- + (tableClass == null ? EMPTY : tableClass));
-
- // Encode colgroup definition.
- ArrayList<Element> columns = getColumns(sourceElement);
- int columnsLength = getColumnsCount(sourceElement, columns);
- nsIDOMElement colgroup = visualDocument
+ nsIDOMElement bodyColgroup = visualDocument
.createElement(HTML.TAG_COLGROUP);
- colgroup.setAttribute(HTML.TAG_SPAN, String.valueOf(columnsLength));
- table.appendChild(colgroup);
+ bodyTable.appendChild(bodyColgroup);
- // Encode Caption
- encodeCaption(creationData, sourceElement, visualDocument, table);
+ for (int i = 0; i < columnsLength; i++) {
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ col.setAttribute(HTML.ATTR_WIDTH, VALUE);
+ bodyColgroup.appendChild(col);
+ }
+ nsIDOMElement col = visualDocument.createElement(HTML.TAG_COL);
+ bodyColgroup.appendChild(col);
- // Encode Header
- Element header = ComponentUtil.getFacet(sourceElement, HEADER);
- ArrayList<Element> columnsHeaders = getColumnsWithFacet(columns, HEADER);
- if (header != null || !columnsHeaders.isEmpty()) {
- nsIDOMElement thead = visualDocument.createElement(HTML.TAG_THEAD);
- table.appendChild(thead);
- String headerClass = (String) sourceElement
- .getAttribute(HEADER_CLASS);
- if (header != null) {
- encodeTableHeaderOrFooterFacet(pageContext, creationData, thead,
- columnsLength, visualDocument, header,
- DR_TABLE_HEADER_RICH_TABLE_HEADER,
- DR_TABLE_HEADER_CONTINUE_RICH_TABLE_HEADER_CONTINUE,
- DR_TABLE_HEADERCELL_RICH_TABLE_HEADERCELL,
- headerClass, HTML.TAG_TD);
+ nsIDOMElement tableTbody = visualDocument.createElement(HTML.TAG_TBODY);
+ bodyTable.appendChild(tableTbody);
+
+ nsIDOMElement tbodyTR = visualDocument.createElement(HTML.TAG_TR);
+ // Add rowClasses attr
+ String rowClasses = ComponentUtil.getAttribute(sourceElement, RichFaces.ATTR_ROW_CLASSES);
+ if (rowClasses.length() > 0) {
+ String[] rowsClass = rowClasses.split(COMMA);
+ if (rowsClass!=null && rowsClass.length > 0) {
+ // Add first rowClass
+ tbodyTR.setAttribute(HTML.ATTR_CLASS, rowsClass[0]);
}
- if (!columnsHeaders.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement filterTR = visualDocument.createElement(HTML.TAG_TR);
- thead.appendChild(tr);
- thead.appendChild(filterTR);
- String styleClass = encodeStyleClass(null,
- DR_TABLE_SUBHEADER_RICH_TABLE_SUBHEADER, null,
- headerClass);
- if (styleClass != null) {
- tr.setAttribute(HTML.ATTR_CLASS, styleClass);
- filterTR.setAttribute(HTML.ATTR_CLASS, styleClass);
- }
- encodeHeaderFacets(creationData, tr, filterTR, visualDocument,
- columnsHeaders,
- DR_TABLE_SUBHEADERCELL_RICH_TABLE_SUBHEADERCELL,
- headerClass);
-
-
- }
}
+
+ tableTbody.appendChild(tbodyTR);
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+ VpeChildrenInfo trInfo = new VpeChildrenInfo(tbodyTR);
+ vpeCreationData.addChildrenInfo(trInfo);
- // Encode Footer
- Element footer = ComponentUtil.getFacet(sourceElement, FOOTER);
- ArrayList<Element> columnsFooters = getColumnsWithFacet(columns, FOOTER);
- if (footer != null || !columnsFooters.isEmpty()) {
- nsIDOMElement tfoot = visualDocument.createElement(HTML.TAG_TFOOT);
- table.appendChild(tfoot);
- String footerClass = (String) sourceElement
- .getAttribute(FOOTER_CLASS);
- if (!columnsFooters.isEmpty()) {
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- tfoot.appendChild(tr);
- String styleClass = encodeStyleClass(null,
- DR_TABLE_SUBFOOTER_RICH_TABLE_SUBFOOTER, null,
- footerClass);
- if (styleClass != null) {
- tr.setAttribute(HTML.ATTR_CLASS, styleClass);
- }
- encodeFooterFacets(creationData, tr, visualDocument,
- columnsFooters,
- DR_TABLE_SUBFOOTERCELL_RICH_TABLE_SUBFOOTERCELL,
- footerClass);
+ for (Node child : children) {
+ if (child.getNodeName().equals(COLUMN)) {
+ trInfo.addSourceChild(child);
}
- if (footer != null) {
- encodeTableHeaderOrFooterFacet(pageContext, creationData, tfoot,
- columnsLength, visualDocument, footer,
- DR_TABLE_FOOTER_RICH_TABLE_FOOTER,
- DR_TABLE_FOOTER_CONTINUE_RICH_TABLE_FOOTER_CONTINUE,
- DR_TABLE_FOOTERCELL_RICH_TABLE_FOOTERCELL,
- footerClass, HTML.TAG_TD);
- }
}
- nsIDOMElement tbody = visualDocument.createElement(HTML.TAG_TBODY);
- table.appendChild(tbody);
+ // Add scroll
+ nsIDOMElement scrollTD = visualDocument.createElement(HTML.TAG_TD);
+ scrollTD.setAttribute(HTML.ATTR_ALIGN, RIGHT);
+ scrollTD.setAttribute(HTML.ATTR_WIDTH, _17PX);
+ bodyTR.appendChild(scrollTD);
- // Create mapping to Encode body
- for (int i = 0; i < NUM_ROW; i++) {
- List<Node> children = ComponentUtil.getChildren(sourceElement);
- boolean firstRow = true;
- nsIDOMElement tr = null;
- VpeChildrenInfo trInfo = null;
- for (Node child : children) {
- String nodeName = child.getNodeName();
- if (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS)) {
- String breakBefore = ((Element) child)
- .getAttribute(BREAK_BEFORE);
- if (breakBefore != null
- && breakBefore.equalsIgnoreCase(TRUE)) {
- tr = null;
- }
- if (tr == null) {
- tr = visualDocument.createElement(HTML.TAG_TR);
- if (firstRow) {
- tr.setAttribute(HTML.ATTR_CLASS,
- DR_TABLE_FIRSTROW_RICH_TABLE_FIRSTROW);
- firstRow = false;
- } else {
- tr.setAttribute(HTML.ATTR_CLASS,
- DR_TABLE_ROW_RICH_TABLE_ROW);
- }
- trInfo = new VpeChildrenInfo(tr);
- tbody.appendChild(tr);
- creationData.addChildrenInfo(trInfo);
- }
- trInfo.addSourceChild(child);
- } else if (child.getNodeName().endsWith(COLUMN_GROUP)) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext,
- creationData, (Element) child, visualDocument,
- tbody);
- tr = null;
- } else if (child.getNodeName().endsWith(SUB_TABLE)) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext,
- creationData, (Element) child, visualDocument,
- tbody);
- tr = null;
- } else {
- VpeChildrenInfo childInfo = new VpeChildrenInfo(tbody);
- childInfo.addSourceChild(child);
- creationData.addChildrenInfo(childInfo);
- tr = null;
- }
+ nsIDOMElement scrollDiv = visualDocument.createElement(HTML.TAG_DIV);
+ scrollDiv.setAttribute(HTML.ATTR_STYLE,
+ SCROLL_STYLE);
+ scrollTD.appendChild(scrollDiv);
+
+ return vpeCreationData;
+ }
+
+ /**
+ *
+ * @param sourceNode
+ * @return
+ */
+ public ArrayList<Element> getColumns(Node sourceNode) {
+ ArrayList<Element> columns = new ArrayList<Element>();
+ NodeList list = sourceNode.getChildNodes();
+ for (int i = 0; i < list.getLength(); i++) {
+ Node node = list.item(i);
+ if (node instanceof Element && node.getNodeName().equals(COLUMN)) {
+ columns.add((Element) node);
}
}
-
- return creationData;
+ return columns;
}
/**
*
* @param creationData
- * @param sourceElement
+ * @param parentTr
* @param visualDocument
- * @param table
+ * @param footers
+ * @param skinCellClass
+ * @param footerClass
*/
- protected void encodeCaption(VpeCreationData creationData,
- Element sourceElement, nsIDOMDocument visualDocument,
- nsIDOMElement table) {
- // Encode caption
- Element captionFromFacet = ComponentUtil.getFacet(sourceElement,
- HTML.TAG_CAPTION);
- if (captionFromFacet != null) {
- String captionClass = (String) table.getAttribute(CAPTION_CLASS);
- String captionStyle = (String) table.getAttribute(CAPTION_STYLE);
+ public static void encodeFooterFacets(VpeCreationData creationData,
+ nsIDOMElement parentTr, nsIDOMDocument visualDocument,
+ ArrayList<Element> footers, String skinCellClass, String footerClass) {
+ String classAttribute = "footerClass"; //$NON-NLS-1$
+ String styleClass = EMPTY;
+ for (Element column : footers) {
- nsIDOMElement caption = visualDocument
- .createElement(HTML.TAG_CAPTION);
- table.appendChild(caption);
- if (captionClass != null && captionClass.length() > 0) {
- captionClass = DR_TABLE_CAPTION_RICH_TABLE_CAPTION
- + captionClass;
- } else {
- captionClass = TABLE_CAPTION_RICH_TABLE_CAPTION;
+ String columnHeaderClass = column.getAttribute(classAttribute);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ parentTr.appendChild(td);
+ styleClass = RichFacesDataTableTemplate.encodeStyleClass(
+ null, skinCellClass, footerClass, columnHeaderClass);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.setAttribute(SCOP, COL);
+ String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
+ if (colspan != null && colspan.length() > 0) {
+ td.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
- caption.setAttribute(HTML.ATTR_CLASS, captionClass);
- if (captionStyle != null && captionStyle.length() > 0) {
- caption.setAttribute(HTML.ATTR_STYLE, captionStyle);
- }
+ Element facetBody = ComponentUtil.getFacet(column, FOOTER);
- VpeChildrenInfo cap = new VpeChildrenInfo(caption);
- cap.addSourceChild(captionFromFacet);
- creationData.addChildrenInfo(cap);
+ VpeChildrenInfo child = new VpeChildrenInfo(td);
+ child.addSourceChild(facetBody);
+ creationData.addChildrenInfo(child);
}
-
+
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.appendChild(visualDocument.createTextNode(SPACE));
+ parentTr.appendChild(td);
}
/**
@@ -343,6 +330,7 @@
nsIDOMDocument visualDocument, ArrayList<Element> headers,
String skinCellClass, String headerClass) {
String classAttribute = "headerClass"; //$NON-NLS-1$
+ String styleClass = EMPTY;
// Check filter
boolean existFilters = false;
for (Element column : headers) {
@@ -359,23 +347,14 @@
for (Element column : headers) {
String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TH);
- nsIDOMElement table = visualDocument.createElement(HTML.TAG_TABLE);
- td.appendChild(table);
- table.setAttribute(HTML.ATTR_BORDER, ZERRO);
- table.setAttribute(HTML.ATTR_CELLPADDING, ZERRO);
- table.setAttribute(HTML.ATTR_CELLSPACING, ZERRO);
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- nsIDOMElement trTd1 = visualDocument.createElement(HTML.TAG_TD);
- nsIDOMElement trTd2 = visualDocument.createElement(HTML.TAG_TD);
- table.appendChild(tr);
- tr.appendChild(trTd1);
- tr.appendChild(trTd2);
+ nsIDOMElement span = visualDocument.createElement(HTML.TAG_SPAN);
+ td.appendChild(span);
parentTr.appendChild(td);
- String styleClass = encodeStyleClass(null, skinCellClass,
- headerClass, columnHeaderClass);
+ styleClass = RichFacesDataTableTemplate.encodeStyleClass(
+ null, skinCellClass, headerClass, columnHeaderClass);
td.setAttribute(HTML.ATTR_CLASS, styleClass);
td.setAttribute(SCOP, COL);
String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
@@ -384,7 +363,7 @@
}
Element facetBody = ComponentUtil.getFacet(column, HEADER);
- VpeChildrenInfo child = new VpeChildrenInfo(trTd1);
+ VpeChildrenInfo child = new VpeChildrenInfo(span);
child.addSourceChild(facetBody);
creationData.addChildrenInfo(child);
// Add filter
@@ -399,145 +378,46 @@
filterTD.setAttribute(HTML.ATTR_COLSPAN, colspan);
}
// Check current filter
- if(ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
+ if (ComponentUtil.getAttribute(column, FILTER_BY).length() > 0) {
// Add input
- nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement div = visualDocument
+ .createElement(HTML.TAG_DIV);
div.setAttribute(HTML.ATTR_STYLE, DIV_STYLE);
filterTD.appendChild(div);
- nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
+ nsIDOMElement input = visualDocument
+ .createElement(HTML.TAG_INPUT);
div.appendChild(input);
input.setAttribute(HTML.ATTR_TYPE, INPUT_TYPE_ATTR);
input.setAttribute(HTML.ATTR_CLASS, EXTENDED_TABLE_INPUT);
}
-
-
+
}
// Add sortable attribute
String sortable = ComponentUtil.getAttribute(column, ATTR_SORTABLE);
- if (sortable.equalsIgnoreCase(FALSE)) {
+ String sortBy = ComponentUtil.getAttribute(column, SORT_BY_ATTR);
+ if (sortBy.length() == 0 && sortable.equalsIgnoreCase(FALSE)) {
continue;
}
nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
+ img.setAttribute(HTML.ATTR_STYLE, VERTICAL_ALIGN_MIDDLE);
ComponentUtil.setImg(img, SORTABLE_PATH);
- trTd2.appendChild(img);
+ td.appendChild(img);
}
+
+ nsIDOMElement th = visualDocument.createElement(HTML.TAG_TH);
+ th.setAttribute(HTML.ATTR_CLASS, styleClass);
+ th.appendChild(visualDocument.createTextNode(SPACE));
+ parentTr.appendChild(th);
+
+ nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
+ td.setAttribute(HTML.ATTR_CLASS, styleClass);
+ td.appendChild(visualDocument.createTextNode(SPACE));
+ filterTR.appendChild(td);
}
-
- /**
- *
- * @param creationData
- * @param parentTr
- * @param visualDocument
- * @param footers
- * @param skinCellClass
- * @param footerClass
- */
- public static void encodeFooterFacets(VpeCreationData creationData,
- nsIDOMElement parentTr, nsIDOMDocument visualDocument,
- ArrayList<Element> footers, String skinCellClass, String footerClass) {
- String classAttribute = "footerClass"; //$NON-NLS-1$
- for (Element column : footers) {
- String columnHeaderClass = column.getAttribute(classAttribute);
- nsIDOMElement td = visualDocument.createElement(HTML.TAG_TD);
- parentTr.appendChild(td);
- String styleClass = encodeStyleClass(null, skinCellClass,
- footerClass, columnHeaderClass);
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- td.setAttribute(SCOP, COL);
- String colspan = column.getAttribute(HTML.ATTR_COLSPAN);
- if (colspan != null && colspan.length() > 0) {
- td.setAttribute(HTML.ATTR_COLSPAN, colspan);
- }
- Element facetBody = ComponentUtil.getFacet(column, FOOTER);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- }
- }
-
/**
*
- * @param creationData
- * @param parentTheadOrTfood
* @param columns
- * @param visualDocument
- * @param facetBody
- * @param skinFirstRowClass
- * @param skinRowClass
- * @param skinCellClass
- * @param facetBodyClass
- * @param element
- */
- protected void encodeTableHeaderOrFooterFacet(final VpePageContext pageContext, VpeCreationData creationData,
- nsIDOMElement parentTheadOrTfood, int columns,
- nsIDOMDocument visualDocument, Element facetBody,
- String skinFirstRowClass, String skinRowClass,
- String skinCellClass, String facetBodyClass, String element) {
- boolean isColumnGroup = facetBody.getNodeName()
- .endsWith(COLUMN_GROUP);
- boolean isSubTable = facetBody.getNodeName().endsWith(SUB_TABLE);
- if (isColumnGroup) {
- RichFacesColumnGroupTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else if (isSubTable) {
- RichFacesSubTableTemplate.DEFAULT_INSTANCE.encode(pageContext, creationData,
- facetBody, visualDocument, parentTheadOrTfood);
- } else {
- nsIDOMElement tr = visualDocument.createElement(HTML.TAG_TR);
- parentTheadOrTfood.appendChild(tr);
-
- String styleClass = encodeStyleClass(null, skinFirstRowClass,
- facetBodyClass, null);
- if (styleClass != null) {
- tr.setAttribute(HTML.ATTR_CLASS, styleClass);
- }
- String style = ComponentUtil.getHeaderBackgoundImgStyle();
- tr.setAttribute(HTML.ATTR_STYLE, style);
-
- nsIDOMElement td = visualDocument.createElement(element);
- tr.appendChild(td);
-
- styleClass = encodeStyleClass(null, skinCellClass, facetBodyClass,
- null);
- if (styleClass != null) {
- td.setAttribute(HTML.ATTR_CLASS, styleClass);
- }
-
- if (columns > 0) {
- td.setAttribute(HTML.ATTR_COLSPAN, String.valueOf(columns));
- }
- td.setAttribute(HTML.ATTR_SCOPE, HTML.TAG_COLGROUP);
-
- VpeChildrenInfo child = new VpeChildrenInfo(td);
- child.addSourceChild(facetBody);
- creationData.addChildrenInfo(child);
- }
- }
-
- /**
- *
- * @param parentSourceElement
- * @return list of columns
- */
- public static ArrayList<Element> getColumns(Element parentSourceElement) {
- ArrayList<Element> columns = new ArrayList<Element>();
- NodeList children = parentSourceElement.getChildNodes();
- for (int i = 0; i < children.getLength(); i++) {
- Node child = children.item(i);
- String nodeName = child.getNodeName();
- if ((child instanceof Element)
- && (nodeName.endsWith(COLUMN) || nodeName.endsWith(COLUMNS)) ) {
- columns.add((Element) child);
- }
- }
- return columns;
- }
-
- /**
- *
- * @param columns
* @param facetName
* @return list of columns with facet
*/
@@ -554,110 +434,6 @@
}
/**
- *
- * @param parentPredefined
- * @param predefined
- * @param parent
- * @param custom
- * @return
- */
- public static String encodeStyleClass(Object parentPredefined,
- Object predefined, Object parent, Object custom) {
- StringBuffer styleClass = new StringBuffer();
- // Construct predefined classes
- if (null != parentPredefined) {
- styleClass.append(parentPredefined).append(SPACE);
- } else if (null != predefined) {
- styleClass.append(predefined).append(SPACE);
- }
- // Append class from parent component.
- if (null != parent) {
- styleClass.append(parent).append(SPACE);
- }
- if (null != custom) {
- styleClass.append(custom);
- }
- if (styleClass.length() > 0) {
- return styleClass.toString();
- }
- return null;
- }
-
- /**
- *
- * @param sourceElement
- * @param columns
- * @return
- */
- protected int getColumnsCount(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- // check for exact value in component
- try {
- int span = Integer.parseInt(sourceElement.getAttribute(RichFaces.ATTR_COLUMNS));
- count = count > 0 ? span : calculateRowColumns(sourceElement,
- columns);
- } catch (NumberFormatException e) {
- count = calculateRowColumns(sourceElement, columns);
- }
- return count;
- }
-
- /*
- * Calculate max number of columns per row. For rows, recursive calculate
- * max length.
- */
- private int calculateRowColumns(Element sourceElement,
- ArrayList<Element> columns) {
- int count = 0;
- int currentLength = 0;
- for (Element column : columns) {
- if (ComponentUtil.isRendered(column)) {
- String nodeName = column.getNodeName();
- if (nodeName.endsWith(COLUMN_GROUP)) {
- // Store max calculated value of previsous rows.
- if (currentLength > count) {
- count = currentLength;
- }
- // Calculate number of columns in row.
- currentLength = calculateRowColumns(sourceElement,
- getColumns(column));
- // Store max calculated value
- if (currentLength > count) {
- count = currentLength;
- }
- currentLength = 0;
- } else if (nodeName.equals(sourceElement.getPrefix() + COLUMN) ||
- nodeName.equals(sourceElement.getPrefix() + COLUMNS)) {
- String breakBeforeStr = column.getAttribute(BREAK_BEFORE);
- // For new row, save length of previsous.
- if (Boolean.getBoolean(breakBeforeStr)) {
- if (currentLength > count) {
- count = currentLength;
- }
- currentLength = 0;
- }
- String colspanStr = column.getAttribute(HTML.ATTR_COLSPAN);
- try {
- int colspan = Integer.parseInt(colspanStr);
- currentLength += colspan > 0 ? colspan : 1;
- } catch (NumberFormatException e) {
- currentLength++;
- }
- } else if (nodeName.endsWith(COLUMN)) {
- // UIColumn always have colspan == 1.
- currentLength++;
- }
-
- }
- }
- if (currentLength > count) {
- count = currentLength;
- }
- return count;
- }
-
- /**
* Checks, whether it is necessary to re-create an element at change of
* attribute
*
@@ -678,6 +454,7 @@
* @return <code>true</code> if it is required to re-create an element at a
* modification of attribute, <code>false</code> otherwise.
*/
+ @Override
public boolean isRecreateAtAttrChange(VpePageContext pageContext,
Element sourceElement, nsIDOMDocument visualDocument,
nsIDOMElement visualNode, Object data, String name, String value) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-29 19:23:16 UTC (rev 11308)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/HTML.java 2008-10-29 20:13:10 UTC (rev 11309)
@@ -73,8 +73,8 @@
public static final String ATTR_COLSPAN = "colspan"; //$NON-NLS-1$
public static final String ATTR_CELLSPACING = "cellspacing"; //$NON-NLS-1$
public static final String ATTR_CELLPADDING = "cellpadding"; //$NON-NLS-1$
- public static final String ATTR_WIDTH = "WIDTH"; //$NON-NLS-1$
- public static final String ATTR_HEIGHT = "HEIGHT"; //$NON-NLS-1$
+ public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
+ public static final String ATTR_HEIGHT = "height"; //$NON-NLS-1$
public static final String ATTR_BORDER = "border"; //$NON-NLS-1$
public static final String ATTR_FOR = "FOR"; //$NON-NLS-1$
public static final String ATTR_DIR = "dir"; //$NON-NLS-1$
17 years, 2 months
JBoss Tools SVN: r11308 - workspace/rstryker.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-29 15:23:16 -0400 (Wed, 29 Oct 2008)
New Revision: 11308
Added:
workspace/rstryker/viewRefactor/
Log:
copying trunk to view refactor
Copied: workspace/rstryker/viewRefactor (from rev 11307, trunk/as)
17 years, 2 months
JBoss Tools SVN: r11307 - workspace/rstryker.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-29 15:22:51 -0400 (Wed, 29 Oct 2008)
New Revision: 11307
Removed:
workspace/rstryker/viewRefactor/
Log:
deleting old view refactor workspace
17 years, 2 months
JBoss Tools SVN: r11306 - /.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-10-29 14:59:31 -0400 (Wed, 29 Oct 2008)
New Revision: 11306
Removed:
org.jboss.ide.eclipse.core/
Log:
this empty folder sitting at project root didn't belong there at all.
17 years, 2 months
JBoss Tools SVN: r11305 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-29 14:54:33 -0400 (Wed, 29 Oct 2008)
New Revision: 11305
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileAuxiliary.java
Log:
fix to get reid of exceptions model tests
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileAuxiliary.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileAuxiliary.java 2008-10-29 17:25:19 UTC (rev 11304)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FileAuxiliary.java 2008-10-29 18:54:33 UTC (rev 11305)
@@ -39,7 +39,8 @@
}
public FileAnyAuxiliaryImpl getAuxiliaryFile(XModelObject folder, XModelObject main, boolean create) {
- String name = getAuxiliaryName(main);
+ if(folder==null) return null;
+ String name = getAuxiliaryName(main);
String p = name + "." + extension;
XModelObject f = folder.getChildByPath(p);
if(!(f instanceof FileAnyAuxiliaryImpl)) {
17 years, 2 months
JBoss Tools SVN: r11303 - branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-29 13:01:48 -0400 (Wed, 29 Oct 2008)
New Revision: 11303
Modified:
branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
fix JUnit tests exceptions in seam core tests. WorkbenchUntils.cloaseAllEditors() call was added to avoid exceptions in opened java editors.
[java] org.osgi.service.prefs.BackingStoreException: Exception loading preferences from: /seam_ear-ejb/.settings/org.eclipse.jdt.core.prefs.
[java] at org.eclipse.core.internal.resources.ProjectPreferences.load(ProjectPreferences.java:460)
[java] at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:307)
[java] at org.eclipse.core.internal.preferences.EclipsePreferences.getChild(EclipsePreferences.java:412)
[java] at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:541)
[java] at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:662)
[java] at org.eclipse.core.resources.ProjectScope.getNode(ProjectScope.java:67)
[java] at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EclipsePreferencesAdapter.getNode(JavaEditor.java:368)
[java] at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor$EclipsePreferencesAdapter.contains(JavaEditor.java:394)
[java] at org.eclipse.ui.texteditor.ChainedPreferenceStore.getVisibleStore(ChainedPreferenceStore.java:529)
Modified: branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-29 16:24:29 UTC (rev 11302)
+++ branches/jbosstools-3.0.0.Beta1/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2008-10-29 17:01:48 UTC (rev 11303)
@@ -32,6 +32,7 @@
import org.jboss.tools.seam.internal.core.project.facet.SeamProjectCreator;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ResourcesUtils;
+import org.jboss.tools.test.util.WorkbenchUtils;
/**
* Base class for facet related tests; based on the facet test class found in
@@ -106,6 +107,7 @@
boolean oldAutoBuilding = true;
Exception last = null;
try {
+ WorkbenchUtils.closeAllEditors();
oldAutoBuilding = ResourcesUtils.setBuildAutomatically(false);
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
JobUtils.waitForIdle();
17 years, 2 months
JBoss Tools SVN: r11302 - in branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference: en and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-29 12:24:29 -0400 (Wed, 29 Oct 2008)
New Revision: 11302
Added:
branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/en/master_output.xml 2008-10-29 16:24:29 UTC (rev 11302)
@@ -0,0 +1,5047 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[
+<!ENTITY preface SYSTEM "modules/preface.xml">
+<!ENTITY setup SYSTEM "modules/setup.xml">
+<!ENTITY codegenarchitecture SYSTEM "modules/codegenarchitecture.xml">
+<!ENTITY plugins SYSTEM "modules/plugins.xml">
+<!ENTITY ant SYSTEM "modules/ant.xml">
+<!ENTITY reveng SYSTEM "modules/reverseengineering.xml">
+<!ENTITY codegen SYSTEM "modules/codegen.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+]><book lang="en" xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Hibernate Tools Reference Guide</title>
+
+ <author><firstname>Max</firstname><surname>Andersen</surname><email>max.andersen(a)jboss.com</email></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+
+ <releaseinfo>
+ Version: <diffmk:wrapper diffmk:change="changed">3.0.0.beta1
+ </diffmk:wrapper></releaseinfo>
+
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/hibernate_logo_a.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/hibernatetools/pdf/H..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+ <toc></toc>
+
+
+<chapter id="preface" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/preface.xml">
+
+ <title>Preface</title>
+
+ <para><property moreinfo="none">Hibernate Tools</property> is a toolset for <ulink url="http://www.hibernate.org/6.html">Hibernate 3</ulink> and <ulink url="http://www.hibernate.org/27.html">related projects</ulink>. The tools provide Ant
+ tasks and Eclipse plugins for performing reverse engineering, code generation, visualization
+ and interaction with Hibernate.</para>
+
+ <section id="hibernate_key_features">
+ <title>Key Features</title>
+
+ <para>First, we propose to look through the list of key features that you can benefit from
+ if you start using <property moreinfo="none">Hibernate Tools</property>.</para>
+
+ <table>
+ <title>Key Functionality for Hibernate Tools</title>
+ <tgroup cols="3">
+
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="5*"></colspec>
+ <colspec align="left" colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Feature</entry>
+ <entry>Benefit</entry>
+ <entry>Chapter</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Code Generation through Ant Task</para>
+ </entry>
+ <entry>
+ <para>Allows to execute mapping or Java code generation from reverse
+ engineering, schema generation and generation of other artifacts
+ during the build process.</para>
+ </entry>
+ <entry><link linkend="ant">ant task</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Wizards for creation
+ purposes and code
+ generation</para>
+ </entry>
+ <entry>
+ <para> A set of wizards are provided with the Hibernate Eclipse tools to
+ quickly create common Hibernate files such as configuration
+ (cfg.xml) files, mapping files and revenge.xml as well. Code
+ Generation wizard helps to generate a series of various artifacts,
+ there is even support for completely reverse engineer an existing
+ database schema.</para>
+ </entry>
+ <entry> <link linkend="map_file_wizard">hibernate mapping file</link>
+ <link linkend="hib_config_file">hibernate configuration file</link>
+ <link linkend="code_gen">code generation</link>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>
+ Mapping and Configuration files
+ Editors
+ </para>
+ </entry>
+ <entry>
+ <para>Support auto-completion and syntax highlighting. Editors also
+ support semantic auto-completion for class names and property/field
+ names, making it much more versatile than a normal XML
+ editor.</para>
+ </entry>
+ <entry> <link linkend="map_config_editor">mapping and configuration files editors</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Tools for organizing and controlling Reverse Engineering</para>
+ </entry>
+ <entry>
+ <para>Code Generation wizard provides powerful functionality for
+ generating a series of various artifacts like domain model classes,
+ mapping files, annotated EJB3 entity beans, etc. and reveng.xml file
+ editor allows to control this processes.</para>
+ </entry>
+ <entry><link linkend="code_gen">code generation</link>
+ <link linkend="rev_xml_editor">reveng.xml editor</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate Console</para>
+ </entry>
+ <entry>
+ <para>It is a new perspective in Eclipse which provides an overview of
+ your Hibernate Console configurations, were you also can get an
+ interactive view of your persistent classes and their relationships.
+ The console allows you to execute HQL queries against your database
+ and browse the result directly in Eclipse.</para>
+ </entry>
+ <entry><link linkend="hib_console">hibernate console</link></entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Functional Mapping Diagram</para>
+ </entry>
+ <entry>
+ <para>Makes possible to visualize structure of entities and
+ relationships between them.</para>
+ </entry>
+ <entry><link linkend="map_diagram">mapping diagram</link></entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>Eclipse JDT integration</para>
+ </entry>
+ <entry>
+ <para>Hibernate Tools integrates into the Java code completion and build
+ support of Java in Eclipse. This gives you code completion of HQL
+ inside Java code. Additionally, Hibernate Tools will add problem
+ markers if your queries are not valid against the console
+ configuration associated with the project.</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://www.jboss.com/products/devstudio/docs">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+ </section>
+
+</chapter>
+
+
+<chapter id="setup" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/setup.xml">
+ <title>Download and install Hibernate Tools</title>
+
+ <para><property moreinfo="none">Hibernate Tools</property> can be used "standalone" via Ant
+ 1.6.x or fully integrated into an Eclipse 3.3.x + WTP 2.x based IDE, such as <property moreinfo="none">JBoss
+ Tools</property> or a default Eclipse 3.3.x + WTP 2.x installation. The following describes
+ the install steps in these environments.</para>
+
+ <section>
+ <title>JBoss Tools</title>
+
+ <para><property moreinfo="none">JBoss Tools 2.x</property> includes <property moreinfo="none">Hibernate Tools</property> and
+ thus nothing is required besides <ulink url="http://labs.jboss.com/tools/download/index.html">downloading</ulink> and <ulink url="../../GettingStartedGuide/html_single/index.html#JBossToolsInstall">installing JBoss Tools</ulink>. If you need to update to a newer version of the
+ <property moreinfo="none">Hibernate Tools</property> just follow the instructions in the Eclipse IDE
+ section.</para>
+ </section>
+
+ <section>
+ <title>Eclipse IDE</title>
+
+ <para>To install into any <property moreinfo="none">Eclipse 3.3.x</property> based Eclipse IDE you can either
+ download the <property moreinfo="none">Hibernate Tools</property> distribution from the <ulink url="http://www.hibernate.org/6.html">Hibernate website</ulink> or use the <ulink url="http://download.jboss.org/jbosstools/updates/stable/">JBoss Tools Update Site</ulink>
+ (see also <ulink url="http://tools.hibernate.org">http://tools.hibernate.org</ulink> for links
+ to the update site).</para>
+
+ <para>If you download the <property moreinfo="none">Hibernate Tools</property> distribution you need to place
+ the <emphasis>
+ <property moreinfo="none">/plugins</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">/feature</property>
+ </emphasis> directory into your eclipse directory or eclipse extensions directory. Sometimes
+ Eclipse does not automatically detect new plugins and thus the tools will not be activated. To
+ ensure eclipse sees these changes just clean up the cached plugin information by running eclipse with the <emphasis>
+ <property moreinfo="none">-clean</property></emphasis> option, e.g. <emphasis>
+ <property moreinfo="none">eclipse
+ -clean</property>.</emphasis> Using the updatesite does not require any additional steps.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>If you need more basic instructions on installing plugins and general usage of eclipse
+ then check out <ulink url="https://eclipse-tutorial.dev.java.net/">https://eclipse-tutorial.dev.java.net/</ulink> and especially <ulink url="https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html">https://eclipse-tutorial.dev.java.net/visual-tutorials/updatemanager.html</ulink> which
+ covers using the update manager.</para>
+ </note>
+
+ <section>
+ <title>Usage of Eclipse WTP</title>
+
+ <para>The <property moreinfo="none">Hibernate Tools</property> plugins currently use <property moreinfo="none">WTP
+ 2.x</property> which at this time is the latest stable release from the Eclipse Webtools
+ project.</para>
+
+ <para>Because the WTP project not always have had proper versioning of their plugins there
+ might exist WTP plugins in your existing eclipse directory from other Eclipse based projects
+ that are from an earlier WTP release but has either the same version number or higher. It is
+ thus recommended that if you have issues with WTP provided features to try and install the
+ plugins on a clean install of eclipse to ensure there are no version collisions.</para>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Ant</title>
+
+ <para>To use the tools via Ant you need the <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> and associated libraries. The libraries are included in the distribution from the
+ Hibernate website and the Eclipse updatesite. The libraries are located in the eclipse plugins
+ directory at <emphasis>
+ <property moreinfo="none">/plugins/org.hibernate.eclipse.x.x.x/lib/tools/</property></emphasis>. These libraries are 100%
+ independent from the eclipse platform. How to use these via ant tasks are described in the
+ <link linkend="ant">Ant Tools</link> chapter.</para>
+ </section>
+</chapter>
+
+
+<chapter id="codegenarchitecture" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/codegenarchitecture.xml">
+ <title>Code generation architecture</title>
+
+ <para>The code generation mechanism in the <property moreinfo="none">Hibernate Tools</property> consists of a few
+ core concepts. This section explains their overall structure which are the same for the Ant and
+ Eclipse tools.</para>
+
+ <section>
+ <title>Hibernate Meta Model</title>
+
+ <para>The meta model is the model used by Hibernate Core to perform its object relational
+ mapping. The model includes information about tables, columns, classes, properties,
+ components, values, collections etc. The API is in <literal moreinfo="none">org.hibernate.mapping</literal>
+ and its main entry point is the <literal moreinfo="none">Configuration</literal> class, the same class that is
+ used to build a session factory.</para>
+
+ <para>The model represented by the <literal moreinfo="none">Configuration</literal> class can be build in many
+ ways. The following list the currently supported ones in <property moreinfo="none">Hibernate Tools</property>. </para>
+
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>A Core configuration uses Hibernate Core and supports reading <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> files, requires a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis>. Named core in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><configuration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>An Annotation configuration uses Hibernate Annotations and supports <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> and annotated classes, requires a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis>. Named annotations in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><annotationconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>A JPA configuration uses a Hibernate EntityManager and supports <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> and annotated classes requires that the project has a <emphasis>
+ <property moreinfo="none">META-INF/persistence.xml</property>
+ </emphasis> in its classpath. Named JPA in Eclipse and <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jpaconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+
+ <listitem>
+ <para>A JDBC configuration uses <property moreinfo="none">Hibernate Tools</property> reverse engineering
+ and reads its mappings via JDBC metadata + additional reverse engineering files
+ (reveng.xml). Automatically used in Eclipse when doing reverse engineering from JDBC and
+ named <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> in ant.</para>
+ </listitem>
+ </itemizedlist>
+ </para>
+
+ <para>In most projects you will normally use only one of the Core, Annotation or JPA
+ configuration and possibly the JDBC configuration if you are using the reverse engineering
+ facilities of <property moreinfo="none">Hibernate Tools</property>. </para>
+
+ <note>
+ <title>Note:</title>
+ <para>No matter which Hibernate Configuration type you are using <property moreinfo="none">Hibernate
+ Tools</property> supports them.</para>
+ </note>
+
+ <para>The following drawing illustrates the core concepts:</para>
+
+ <para>
+ <figure float="0">
+ <title>Hibernate Core Concepts</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/code_generation/code_generation_1.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+
+ <imagedata align="center" fileref="images/code_generation/code_generation_1.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </para>
+
+ <para>The code generation is done based on the Configuration model no matter which type of
+ configuration have been used to create the meta model, and thus the code generation is
+ independent on the source of the meta model and represented via Exporters.</para>
+ </section>
+
+ <section>
+ <title>Exporters</title>
+
+ <para>Code generation is done in so called Exporters. An <literal moreinfo="none">Exporter</literal> is handed a
+ Hibernate Meta Model represented as a <literal moreinfo="none">Configuration</literal> instance and it is then
+ the job of the exporter to generate a set of code artifacts.</para>
+
+ <para>The tools provides a default set of Exporter's which can be used in both Ant and the
+ Eclipse UI. Documentation for these Exporters is in the <link linkend="ant">Ant Tools</link>
+ and <link linkend="plugins">Eclipse Plugins</link> chapters.</para>
+
+ <para>Users can provide their own customer Exporter's, either by custom classes implementing the
+ Exporter interface or simply be providing custom templates. This is documented at <xref linkend="hbmtemplate"></xref></para>
+ </section>
+</chapter>
+
+
+<chapter id="plugins" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/plugins.xml">
+ <title>Eclipse Plugins</title>
+
+ <para>This chapter will introduce you to the functionality that <property moreinfo="none">Hibernate
+ Tools</property> provide within Eclipse. That is a set of wizards and editors for simplifying
+ the work with <property moreinfo="none">Hibernate</property>.</para>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>Hibernate Eclipse Tools include wizards for creating Hibernate mapping files,
+ configuration files (.cfg.xml), revenge.xml as well as wizards for adjusting Console
+ Configuration and Code Generation. Special structured and XML editors, editors for executing
+ HQL and Criteria queries are also provided in Hibernate Console. Refer to <link linkend="hibernate_key_features">Key Features</link> section to find all benefits that you
+ can take advantage of while using the tools within Eclipse.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Please note that these tools do not try to hide any functionality of
+ <property moreinfo="none">Hibernate</property>. The tools make working with <property moreinfo="none">Hibernate</property>
+ easier, but you are still encouraged/required to read the <ulink url="http://www.hibernate.org/5.html">Hibernate Documentation</ulink> to fully utilize
+ <property moreinfo="none">Hibernate Tools</property> and especially <property moreinfo="none">Hibernate</property> it
+ self.</para>
+ </note>
+ </section>
+
+ <section id="map_file_wizard" revisionflag="added">
+ <title>Creating a Hibernate Mapping File</title>
+
+ <para>Hibernate mapping files are used to specify how your objects are related to database
+ tables.</para>
+
+ <para>For creating a skeleton mapping file, i. e. any <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis>, Hibernate Tools provide a basic wizard which you can bring up by navigating <emphasis>
+ <property moreinfo="none">New > Hibernate XML mapping file</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Hibernate XML Mapping File Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>At first you'll be asked to specify the location and the name for a new mapping
+ file. On the next dialog you should type or browse the class to map.</para>
+ <figure float="0">
+ <title>Specifying the Class to Map</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Pressing finish creates the file and opens it in the <link linkend="map_config_struct_editor">structured hbm.xml editor</link>.</para>
+
+ <para> If you start the wizard from the selected class, all values will be detected there
+ automatically.</para>
+
+ <figure float="0">
+ <title>Creating Mapping File for Selected Class</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_0_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="hib_config_file">
+ <title>Creating a Hibernate Configuration File</title>
+
+ <para>To be able to reverse engineer, prototype queries, and of course to simply use
+ <property moreinfo="none">Hibernate Core</property> a <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file is needed. The <property moreinfo="none">Hibernate Tools</property> provide a wizard for
+ generating the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file if you do not already have such one.</para>
+
+ <para>Start the wizard by clicking <emphasis>
+ <property moreinfo="none">New > Other (Ctrl+N)</property>
+ </emphasis>, then <emphasis>
+ <property moreinfo="none">Hibernate > Hibernate Configuration File (cfg.xml)</property>
+ </emphasis> and press <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis>. After selecting the wanted location for the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> file, you will see the following page:</para>
+
+ <figure float="0">
+ <title>Hibernate Configuration File Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_1.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_1.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>The contents in the combo boxes for the JDBC driver class and JDBC URL change
+ automatically, depending on the Dialect and actual driver you have chosen.</para>
+ </note>
+
+ <para>Enter your configuration information in this dialog. Details about the configuration
+ options can be found in <ulink url="http://docs.jboss.org/ejb3/app-server/Hibernate3/reference/en/html_single">Hibernate
+ Reference Documentation</ulink>.</para>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to create the configuration file, after optionally creating a Console
+ configuration, the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> will be automatically opened in an editor. The last option <emphasis>
+ <property moreinfo="none">Create Console Configuration</property>
+ </emphasis> is enabled by default and when enabled, it will automatically use the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> for the basis of a Console configuration.</para>
+ </section>
+
+ <section id="console_conf" role="updated">
+ <title>Creating a Hibernate Console Configuration</title>
+
+ <para>A Console configuration describes how the <property moreinfo="none">Hibernate plugin</property> should
+ configure <property moreinfo="none">Hibernate</property> and what configuration files, including which
+ classpath are needed to load the POJO's, JDBC drivers etc. It is required to make usage of
+ query prototyping, reverse engineering and code generation. You can have multiple named
+ console configurations. Normally you would just need one per project, but more is definitely
+ possible if your project requires this.</para>
+
+ <para>You create a console configuration by running the <property moreinfo="none">Console Configuration
+ Wizard</property>, shown in the following screenshot. The same wizard will also be used if you
+ are coming from the <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> wizard and had enabled <emphasis>
+ <property moreinfo="none">Create Console Configuration</property>
+ </emphasis>.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>The wizard will look at the current selection in the IDE and try and auto-detect the
+ settings which you then can just approve or modify to suit your needs.</para>
+ </note>
+ <para></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The dialog consists of five tabs: </diffmk:wrapper></para>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Main</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">for the basic/required settings</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title> Creating Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_2.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_2.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <diffmk:wrapper diffmk:change="added">following</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">dialog consists of three tabs, </diffmk:wrapper><diffmk:wrapper diffmk:change="added">table
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">General
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">describes </diffmk:wrapper>the <diffmk:wrapper diffmk:change="added">available</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">basic/required settings,
+ Classpath
+ for classpath and
+ Mappings
+ for additional mappings. The two latter ones are normally not required if you
+ specify a project and it has
+
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">settings </diffmk:wrapper><diffmk:wrapper diffmk:change="added">on
+
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">the </diffmk:wrapper><emphasis>
+ <property moreinfo="none"><diffmk:wrapper diffmk:change="added">Main
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">/META-INF/persistence.xml
+ </diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">tab.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">in its project classpath.
+
+ The following table describes the available settings. </diffmk:wrapper>The wizard can automatically detect default values for most of these if you
+ started the wizard with the relevant java project or resource selected.</para>
+
+ <table>
+ <title>Hibernate Console Configuration Parameters</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec align="left" colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Name</para>
+ </entry>
+
+ <entry>
+ <para>The unique name of the console configuration</para>
+ </entry>
+
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="added">Type</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Choose between "Core", "Annotations" and
+ "JPA". Note that the two latter requires running Eclipse IDE with
+ a JDK 5 runtime, otherwise you will get classloading and/or version errors.</diffmk:wrapper></para>
+ </entry>
+
+ <entry diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">No default value</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added">
+ <para diffmk:change="added">Project</para>
+ </entry>
+
+ <entry>
+ <para>The name of a java project which classpath should be used in the console
+ configuration</para>
+ </entry>
+
+ <entry>
+ <para>Name of the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para><diffmk:wrapper diffmk:change="added">Database connection</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Type</diffmk:wrapper></para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">DTP provided connection that </diffmk:wrapper><diffmk:wrapper diffmk:change="added">you</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">and
+ "JPA". </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">can use instead of what is in cfg.xml and jpa
+ persistence.xml. It's possible to use already configured connection </diffmk:wrapper><diffmk:wrapper diffmk:change="added">or
+ specify</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">classloading </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">a new </diffmk:wrapper><diffmk:wrapper diffmk:change="added">one here.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">errors.</diffmk:wrapper></para>
+ </entry>
+
+ <entry>
+ <para><diffmk:wrapper diffmk:change="changed">[Hibernate Configured connection]</diffmk:wrapper></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Property file</para>
+ </entry>
+
+ <entry>
+ <para>Path to a hibernate.properties file</para>
+ </entry>
+
+ <entry>
+ <para>First hibernate.properties file found in the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Configuration file</para>
+ </entry>
+
+ <entry>
+ <para>Path to a hibernate.cfg.xml file</para>
+ </entry>
+
+ <entry>
+ <para>First hibernate.cfg.xml file found in the selected project</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Persistence unit</para>
+ </entry>
+
+ <entry>
+ <para>Name of the persistence unit to use</para>
+ </entry>
+
+ <entry>
+ <para>No default value (lets Hibernate Entity Manager find the persistence
+ unit)</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <tip diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Tip:</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The two latter settings are normally not required if you specify a project and it has </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none">
+ <literal diffmk:change="added" moreinfo="none"> <diffmk:wrapper diffmk:change="added">/hibernate.cfg.xml </diffmk:wrapper></literal>
+ </property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">or </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none">
+ <literal diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">/META-INF/persistence.xml</diffmk:wrapper></literal>
+ </property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">in its project classpath.</diffmk:wrapper></para>
+ </tip>
+
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added">
+ <emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Options</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">for the additional/optional settings</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Options Tab of the Console Configuration Wizard</diffmk:wrapper></title>
+
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_2_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The next table describes Hibernate Console Configuration options available on the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Options</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">tab.</diffmk:wrapper></para>
+
+ <table diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Hibernate Console Configuration Options</diffmk:wrapper></title>
+
+ <tgroup cols="3" diffmk:change="added">
+ <colspec align="left" colnum="1" colwidth="1*" diffmk:change="added"></colspec>
+
+ <colspec colnum="2" colwidth="3*" diffmk:change="added"></colspec>
+
+ <colspec align="left" colnum="3" colwidth="1*" diffmk:change="added"></colspec>
+
+ <thead diffmk:change="added">
+ <row diffmk:change="added">
+ <entry align="center" diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Parameter</diffmk:wrapper></para>
+ </entry>
+
+ <entry align="center" diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Description</diffmk:wrapper></para>
+ </entry>
+
+ <entry align="center" diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Auto detected value</diffmk:wrapper></para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody diffmk:change="added">
+
+
+ <row>
+ <entry>
+ <para>Naming strategy</para>
+ </entry>
+
+ <entry>
+ <para>Fully qualified classname of a custom NamingStrategy. Only required if you use a
+ special naming strategy.</para>
+ </entry>
+
+ <entry>
+ <para>No default value</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Entity resolver</para>
+ </entry>
+
+ <entry>
+ <para>Fully qualified classname of a custom EntityResolver. Only required if you have
+ special xml entity includes in your mapping files.</para>
+ </entry>
+
+ <entry>
+ <para>No default value</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Classpath</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">for classpath</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Specifying Classpath in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_3.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_3.png" format="PNG"></imagedata>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+
+ <para>The <diffmk:wrapper diffmk:change="changed">following </diffmk:wrapper>table specifies the parameters of the Classpath tab of the wizard.</para>
+
+ <table>
+ <title>Hibernate Console Configuration Classpath</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Classpath</para>
+ </entry>
+
+ <entry>
+ <para>The classpath for loading POJO and JDBC drivers; only needed if the default
+ classpath of the Project does not contain the required classes. Do not add Hibernate
+ core libraries or dependencies, they are already included. If you get ClassNotFound
+ errors then check this list for possible missing or redundant
+ directories/jars.</para>
+ </entry>
+
+ <entry>
+ <para>Empty</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Include default classpath from project</para>
+ </entry>
+
+ <entry>
+ <para>When enabled the project classpath will be appended to the classpath specified
+ above</para>
+ </entry>
+
+ <entry>
+ <para>Enabled</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Mappings</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">for additional mappings</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Specifying additional Mappings in Hibernate Console Configuration</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_4.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_4.png" format="PNG"></imagedata>
+
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+
+
+ <para>Parameters of the Mappings tab <diffmk:wrapper diffmk:change="changed">of </diffmk:wrapper>the <property moreinfo="none">Hibernate Console Configuration
+ wizard</property> are explained below:</para>
+ <table>
+ <title>Hibernate Console Configuration Mappings</title>
+
+ <tgroup cols="3">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="1*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Parameter</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+
+ <entry align="center">
+ <para>Auto detected value</para>
+
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Mapping files </para>
+ </entry>
+
+ <entry>
+ <para>List of additional mapping files that should be loaded. Note: A
+ hibernate.cfg.xml or persistence.xml can also contain mappings. Thus if these are
+ duplicated here, you will get "Duplicate mapping" errors when using the console
+ configuration.</para>
+ </entry>
+
+ <entry>
+ <para>empty</para>
+
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">and the last tab </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Common</diffmk:wrapper></property>
+ </emphasis></para>
+ </listitem>
+ </itemizedlist>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Common Tab of the Console Configuration Wizard</diffmk:wrapper></title>
+
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_4_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para><diffmk:wrapper diffmk:change="added">It allows to define general aspects of the launch configuration including storage
+ location, console encoding and some others.</diffmk:wrapper></para>
+
+ <para diffmk:change="added">Clicking <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> creates the configuration and shows it in the <property moreinfo="none">Hibernate Configurations
+ <diffmk:wrapper diffmk:change="changed">view</diffmk:wrapper></property>.</para>
+
+ <figure float="0">
+ <title>Console Overview</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_5.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_5.png" format="PNG"></imagedata>
+ </imageobject>
+
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Reverse Engineering and Code Generation</title>
+
+ <para>A "click-and-generate" reverse engineering and code generation facility is available. This
+ facility allows you to generate a range of artifacts based on database or an already existing
+ Hibernate configuration, be that mapping files or annotated classes. Some of these are POJO
+ Java source file, Hibernate <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> generation and schema documentation.</para>
+
+ <para>To start working with this process, start the <property moreinfo="none">Hibernate Code
+ Generation</property> which is available in the toolbar via the <property moreinfo="none">Hibernate</property>
+ icon or via the <emphasis>
+ <property moreinfo="none">Run > Hibernate Code Generation</property>
+ </emphasis> menu item.</para>
+
+ <section id="code_gen">
+ <title>Code Generation Launcher</title>
+
+ <para>When you click on <emphasis>
+ <property moreinfo="none">Open Hibernate Code Generation Dialog...</property>
+ </emphasis> the standard Eclipse launcher dialog will appear. In this dialog you can create,
+ edit and delete named Hibernate code generation "launchers".</para>
+
+ <figure float="0" id="hib_code_gen">
+ <title>Getting Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata fileref="images/plugins/plugins_6.png" format="PNG"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_6.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para></para>
+
+ <figure float="0">
+ <title>Hibernate Code Generation Wizard</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_7.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_7.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first time you create a code generation launcher you should give it a meaningful
+ name, otherwise the default prefix <emphasis>
+ <property moreinfo="none">New_Generation</property>
+ </emphasis> will be used.</para>
+
+ <tip>
+ <title>Tip:</title>
+ <para>The "At least one exporter option must be selected" is just a
+ warning stating that for this launch to work you need to select an exporter on the
+ Exporter tab. When an exporter has been selected the warning will disappear.</para>
+ </tip>
+
+ <para>The dialog also have the standard tabs <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Common</property>
+ </emphasis> that can be used to configure which directories should be automatically
+ refreshed and various general settings launchers, such as saving them in a project for
+ sharing the launcher within a team.</para>
+
+ <para>On the <emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> tab you see the following fields:</para>
+
+ <table>
+ <title>Code generation "Main" tab fields</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <colspec colnum="3" colwidth="0.5*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Console Configuration</para>
+ </entry>
+
+ <entry>
+ <para>The name of the console configuration which should be used when code
+ generating</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Output directory</para>
+ </entry>
+
+ <entry>
+ <para>Path to a directory where all output will be written by default. Be aware that
+ existing files will be overwritten, so be sure to specify the correct
+ directory.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Reverse engineer from JDBC Connection</para>
+ </entry>
+
+ <entry>
+ <para>If enabled, the tools will reverse engineer the database available via the
+ connection information in the selected Hibernate Console Configuration and
+ generate code based on the database schema. If not enabled, the code generation
+ will just be based on the mappings already specified in the Hibernate Console
+ configuration.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Package</para>
+ </entry>
+
+ <entry>
+ <para>The package name here is used as the default package name for any entities
+ found when reverse engineering</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reveng.xml</para>
+ </entry>
+
+ <entry>
+ <para>Path to a reveng.xml file. A reveng.xml file allows you to control certain
+ aspects of the reverse engineering. e.g. how jdbc types are mapped to hibernate
+ types and especially important which tables are included/excluded from the
+ process. Clicking "setup" allows you to select an existing reveng.xml file or
+ create a new one. See more details about the reveng.xml file in <xref linkend="reverseengineering"></xref>.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reveng. strategy</para>
+ </entry>
+
+ <entry>
+ <para>If reveng.xml does not provide enough customization you can provide your own
+ implementation of an ReverseEngineeringStrategy. The class needs to be in the
+ classpath of the Console Configuration, otherwise you will get class not found
+ exceptions. See <xref linkend="custom-reveng-strategy"></xref> for details and an
+ example of a custom strategy.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Generate basic typed composite ids</para>
+ </entry>
+
+ <entry>
+ <para>A table that has a multi-colum primary key a <composite-id>
+ mapping will always be created. If this option is enabled and there are matching
+ foreign-keys each key column is still considered a 'basic' scalar (string, long,
+ etc.) instead of a reference to an entity. If you disable this option a
+ <key-many-to-one> instead. Note: a <many-to-one>
+ property is still created, but is simply marked as non-updatable and
+ non-insertable.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Detect optimistic lock columns</para>
+ </entry>
+
+ <entry>
+ <para>Automatically detect optimistic lock columns. Controllable via reveng.
+ strategy; the current default is to use columns named VERSION or TIMESTAMP.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Detect many-to-many tables</para>
+ </entry>
+
+ <entry>
+ <para>Automatically detect many-to-many tables. Controllable via reveng.
+ strategy.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Use custom templates</para>
+ </entry>
+
+ <entry>
+ <para>If enabled, the Template directory will be searched first when looking up the
+ templates, allowing you to redefine how the individual templates process the
+ hibernate mapping model.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Template directory</para>
+ </entry>
+
+ <entry>
+ <para>A path to a directory with custom templates</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section>
+ <title>Exporters</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Exporters</property>
+ </emphasis> tab is used to specify which type of code that should be generated. Each
+ selection represents an Exporter that is responsible for generating the code, hence the
+ name.</para>
+
+ <figure float="0">
+ <title>Selecting Exporters</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_8.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_8.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes in short the various exporters. Remember you can
+ add/remove any Exporters depending on your needs.</para>
+
+ <table>
+ <title>Code generation "Exporter" tab fields</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Field</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Domain code</para>
+ </entry>
+
+ <entry>
+ <para>Generates POJO's for all the persistent classes and components found in the
+ given Hibernate configuration.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>DAO code</para>
+ </entry>
+
+ <entry>
+ <para>Generates a set of DAO's for each entity found.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate XML Mappings</para>
+ </entry>
+
+ <entry>
+ <para>Generate mapping (hbm.xml) files for each entity.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Hibernate XML Configuration</para>
+ </entry>
+
+ <entry>
+ <para>Generate a hibernate.cfg.xml file. Used to keep the hibernate.cfg.xml update
+ with any new found mapping files.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Schema Documentation (.html)</para>
+ </entry>
+
+ <entry>
+ <para>Generates a set of html pages that documents the database schema and some of
+ the mappings.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Generic Exporter (hbmtemplate)</para>
+ </entry>
+
+ <entry>
+ <para>Fully customizable exporter which can be used to perform custom
+ generation.</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Each Exporter listens to certain properties and these can be setup in the <emphasis>
+ <property moreinfo="none">Properties</property>
+ </emphasis> section where you can add/remove predefined or customer properties for each of
+ the exporters. The following table lists the time of writing predefined properties:</para>
+
+ <para>
+ <table>
+ <title>Exporter Properties</title>
+
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>jdk5</para>
+ </entry>
+
+ <entry>
+ <para>Generate Java 5 syntax</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>Generate EJB 3 annotations</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>for_each</para>
+ </entry>
+
+ <entry>
+ <para>Specifies for which type of model elements the exporter should create a file
+ and run through the templates. Possible values are: entity, component,
+ configuration</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>template_path</para>
+ </entry>
+
+ <entry>
+ <para>Custom template directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>template_name</para>
+ </entry>
+
+ <entry>
+ <para>Name for template relative to the template path</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>outputdir</para>
+ </entry>
+
+ <entry>
+ <para>Custom output directory for this specific exporter. You can use Eclipse
+ variables.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>file_pattern</para>
+ </entry>
+
+ <entry>
+ <para>Pattern to use for the generated files, relatively for the output dir.
+ Example: {package-name}/{class-name}.java .</para>
+ </entry>
+ </row>
+
+
+
+ <row>
+ <entry>
+ <para>dot.executable</para>
+ </entry>
+
+ <entry>
+ <para>Executable to run GraphViz (only relevant, but optional for Schema
+ documentation)</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+ </para>
+ </section>
+ </section>
+
+ <section id="map_config_editor">
+ <title>Hibernate Mapping and Configuration File Editor</title>
+
+ <para>The <property moreinfo="none">Hibernate Mapping File editor</property> provides XML editing functionality
+ for the <emphasis>
+ <property moreinfo="none">hbm.xml </property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> files. The editor is based on the Eclipse WTP tools and extends its functionality
+ to provide Hibernate specific code completion.</para>
+
+ <figure float="0">
+ <title>XML Editing Functionality</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_9.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_9.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section>
+ <title>Java property/class completion</title>
+
+ <para>Package, class, and field completion is enabled for relevant XML attributes. The
+ auto-completion detects its context and limits the completion for e.g. <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> and only shows the properties/fields available in the enclosing <emphasis>
+ <property moreinfo="none"><class></property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none"><subclass></property>
+ </emphasis> etc. It is also possible to navigate from the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> files to the relevant class/field in java code.</para>
+
+ <figure float="0">
+ <title>Navigation Functionality</title>
+
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_10.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_10.png" format="PNG"></imagedata>
+
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+
+ <para>This is done via the standard hyperlink navigation functionality in Eclipse; per default
+ it is done by pressing F3 while the cursor is on a class/field or by pressing <emphasis>
+ <property moreinfo="none">Ctrl</property>
+ </emphasis> and the mouse button to perform the same navigation.</para>
+
+ <para>For java completion and navigation to work the file needs to reside inside an Eclipse
+ Java project, otherwise no completion will occur.</para>
+ <note>
+ <title>Note:</title>
+ <para>Java completion does not require a Hibernate console configuration to be used.</para>
+ </note>
+ </section>
+
+ <section>
+ <title>Table/Column completion</title>
+
+ <para>Table and column completion is also available for all table and column attributes. </para>
+
+ <figure float="0">
+ <title>Table and Column Completion</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_11.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_11.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <important>
+ <title>Important:</title>
+ <para>Table/Column completion requires a proper configured hibernate console configuration
+ and this configuration should be the default for the project where the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> resides.</para>
+ </important>
+
+ <para>You can check which console configuration is selected under the Properties of a project
+ and look under the <emphasis>
+ <property moreinfo="none">Hibernate Settings</property>
+ </emphasis> page. When a proper configuration is selected it will be used to fetch the
+ table/column names in the background.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Currently it is not recommended to use this feature on large databases since it does
+ not fetch the information iteratively. It will be improved in future versions.</para>
+ </note>
+ </section>
+
+ <section>
+ <title>Configuration property completion</title>
+
+ <para>In <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> code completion for the value of <emphasis>
+ <property moreinfo="none"><property> name</property>
+ </emphasis> attributes is available.</para>
+
+
+ <figure float="0">
+ <title>Property Completion</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_12.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_12.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ </section>
+
+ <section id="map_config_struct_editor" revisionflag="added">
+ <title>Structured Hibernate Mapping and Configuration File Editor</title>
+ <para>The structured editor represents the file in the tree form. It also allows to modify the
+ structure of the file and its elements with the help of tables provided on the right-hand
+ area.</para>
+
+ <para>To open any mapping file in the editor, choose <emphasis>
+ <property moreinfo="none">Open With > Hibernate 3.0 XML Editor</property>
+ </emphasis> option from the context menu of the file. The editor should look as follows:</para>
+
+ <figure float="0">
+ <title>Structured hbm.xml Editor</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_12_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For the configuration file you should choose <emphasis>
+ <property moreinfo="none">Open With > Hibernate Configuration 3.0 XML Editor</property>
+ </emphasis>option.</para>
+
+ <figure float="0">
+ <title>Structured cfg.xml Editor</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_12_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="rev_xml_editor">
+ <title>Reveng.xml Editor</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none">reveng.xml </property>
+ </emphasis> file is used to customize and control how reverse engineering is performed by the
+ tools. The plugins provide an editor to ease the editing of this file and hence used to
+ configure the reverse engineering process.</para>
+
+ <para>The editor is intended to allow easy definition of type mappings, table include/excludes
+ and specific override settings for columns, e.g. define an explicit name for a column when the
+ default naming rules are not applicable.</para>
+
+ <note>
+ <title>Note:</title>
+ <para> Not all the features of the <emphasis>
+ <property moreinfo="none">.reveng.xml </property>
+ </emphasis> file are exposed or fully implemented in the editor, but the main functionality
+ is there. To understand the full flexibility of the <emphasis>
+ <property moreinfo="none">reveng.xml</property>
+ </emphasis>, please see <xref linkend="hibernaterevengxmlfile"></xref>
+ </para>
+ </note>
+
+ <para>The editor is activated as soon as an <emphasis>
+ <property moreinfo="none">.reveng.xml </property>
+ </emphasis> file is opened. To get an initial <emphasis>
+ <property moreinfo="none">reveng.xml </property>
+ </emphasis> file the <property moreinfo="none">Reverse Engineering File Wizard</property> can be started via <emphasis>
+ <property moreinfo="none">Ctrl+N</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Hibernate > Hibernate Reverse Engineering File (reveng.xml)</property>
+ </emphasis> then.</para>
+
+ <figure float="0">
+ <title>Overview Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_22.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_22.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Or you can get it via the <property moreinfo="none">Code Generation Launcher</property> by checking the
+ proper section in the <emphasis>
+ <property moreinfo="none">Main</property>
+ </emphasis> tab of the <link linkend="hib_code_gen">Hibernate Code Generation Wizard</link>.</para>
+
+ <para>The following screenshot shows the <emphasis>
+ <property moreinfo="none">Overview</property>
+ </emphasis> page where the wanted console configuration is selected (auto-detected if
+ Hibernate 3 support is enabled for the project)</para>
+
+ <figure float="0">
+ <title>Overview Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_13.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_13.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Table Filter</property>
+ </emphasis> page allows you to specify which tables to include and exclude. Pressing <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> shows the tables from the database that have not yet been excluded.</para>
+
+ <figure float="0">
+ <title>Table Filters Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_14.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_14.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Type Mappings</property>
+ </emphasis> page is used for specifying type mappings from JBDC types to any Hibernate type
+ (including usertypes) if the default rules are not applicable. Here again to see the database
+ tables press <emphasis>
+ <property moreinfo="none">Refresh</property>
+ </emphasis> button underneath. More about type mappings you can find further in the <link linkend="type_map">Type Mappings</link> section.</para>
+
+ <figure float="0">
+ <title>Type Mappings Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_15.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_15.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Table and Columns</property>
+ </emphasis> page allows you to explicit set e.g. which hibernatetype and propertyname that
+ should be used in the reverse engineered model. For more details on how to configure the
+ tables while reverse engineering read the <link linkend="tab_and_col">Specific table
+ configuration</link> section.</para>
+
+ <figure float="0">
+ <title>Table and Columns Page</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_16.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_16.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Now that you have configured all necessary parts, you can learn how to work with
+ <property moreinfo="none">Hibernate Console Perspective</property>.</para>
+ </section>
+
+ <section id="hib_console">
+ <title>Hibernate Console Perspective</title>
+
+ <para>The <property moreinfo="none">Hibernate Console Perspective</property> combines a set of views which allow
+ you to see the structure of your mapped entities/classes, edit HQL queries, execute the
+ queries, and see the results. To use this perspective you need to create a <link linkend="console_conf">Console configuration</link>.</para>
+
+ <section>
+ <title>Viewing the entity structure</title>
+
+ <para>To view your new configuration and entity/class structure, switch to <property moreinfo="none">Hibernate
+ Configurations View</property>. Expanding the tree allows you to browse the class/entity
+ structure and see the relationships.</para>
+
+ <figure float="0">
+ <title>Hibernate Console Perspective</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_17.png" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_17.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+
+ </figure>
+
+ <para>The <property moreinfo="none">Console Configuration</property> does not dynamically adjust to changes
+ done in mappings and java code. To reload the configuration select the configuration and
+ click the <emphasis>
+ <property moreinfo="none">Reload</property>
+ </emphasis> button in the view toolbar or in the context menu.</para>
+
+ <para>Besides, it's possible to open source and mapping files for objects showed in
+ <property moreinfo="none">Hibernate Configurations View</property>. Just bring up the context menu for a
+ necessary object and select <emphasis>
+ <property moreinfo="none">Open Source File</property>
+ </emphasis> to see appropriate Java class or <emphasis>
+ <property moreinfo="none">Open Mapping File</property>
+ </emphasis> to open a proper <emphasis>
+ <property moreinfo="none">.hbm.xml</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Opening Source for Objects</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_17_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section id="map_diagram">
+ <title>Mapping Diagram</title>
+
+ <para>In order to get a visual feel on how entities are related as well as view their
+ structures, a <property moreinfo="none">Mapping Diagram</property> is provided. It is available by right
+ clicking on the entity you want a mapping diagram for and then choosing <emphasis>
+ <property moreinfo="none">Open Mapping Diagram</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Mapping Diagram</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_18.png" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>For better navigating on the Diagram use <property moreinfo="none">Outline view</property> which is
+ available in the structural and graphical modes.</para>
+ <figure float="0">
+ <title>Navigating in the Structural Mode</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To switch over between the modes use the buttons in the top-right corner of the
+ <property moreinfo="none">Outline view</property>.</para>
+
+ <figure float="0">
+ <title>Navigating in the Graphical Mode</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As in <property moreinfo="none">Hibernate Configurations View</property> in <property moreinfo="none">Mapping
+ Diagram</property> it's also possible to open source/mapping file for a chosen
+ object by selecting appropriate option in the context menu. </para>
+
+ <figure float="0">
+ <title>Navigating on the Diagram</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If you ask to open source/mapping file by right clicking on any entity element, this
+ element will be highlighted in the open file.</para>
+
+ <figure float="0">
+ <title>Opening Source for Object</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_d.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Finally, if you need to have your Diagram exported as <emphasis><property moreinfo="none">.png
+ </property>,</emphasis>
+ <emphasis>
+ <property moreinfo="none">.jpeg</property>
+ </emphasis> or <emphasis><property moreinfo="none">.bmp </property>,</emphasis> you should right-click
+ anywhere in the <property moreinfo="none">Mapping Diagram editor</property> and select <emphasis>
+ <property moreinfo="none">Export as Image</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Mapping Diagram Export</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_18_e.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see on the figure above, <emphasis><property moreinfo="none">Undo</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">Redo</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Auto layout </property>
+ </emphasis> options are also available through the context menu.</para>
+ </section>
+ </section>
+
+ <section revisionflag="changed">
+ <title>Prototyping Queries</title>
+
+ <para>Queries can be prototyped by entering them in the <property moreinfo="none">HQL</property> or
+ <property moreinfo="none">Criteria Editor</property>. The query editors are opened by right-clicking the
+ <property moreinfo="none">Console Configuration</property> and selecting either <property moreinfo="none">HQL
+ Editor</property> or <property moreinfo="none">Hibernate Criteria Editor</property>. The editors
+ automatically detect the chosen configuration.</para>
+
+ <para>If the menu item is disabled then you need at first to create a <property moreinfo="none">Session
+ Factory</property>. That is done by simply expanding the <property moreinfo="none">Session
+ Factory</property> node.</para>
+
+ <para>By brining up the context menu for a chosen entity or property in the <property moreinfo="none">Console
+ Configuration</property> and opening <emphasis>
+ <property moreinfo="none">HQL Editor</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">Hibernate Criteria Editor</property>
+ </emphasis> you'll get a prefill query.</para>
+
+ <figure float="0">
+ <title>Entering Simple Queries</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_19.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_19.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>To copy a portion of code from .java file into a HQL or Criteria editor, make use of the
+ Quick Fix option (Ctrl + 1).</para>
+
+ <figure float="0">
+ <title>Quick Fix Option Demonstration</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>You can also update the original java code according to changes in the HQL or Criteria
+ editor. For that you should save your HQL/Criteria query and submit the replacing in
+ appeared confirmation dialog.</para>
+
+ <figure float="0">
+ <title>Updating Java Code</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/plugins/plugins_19_c.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Executing the query is done by clicking the green run button in the toolbar or pressing <emphasis>
+ <property moreinfo="none">Ctrl+Enter</property>
+ </emphasis>.</para>
+
+ <para>Errors during creation of the <property moreinfo="none">Session Factory</property> or running the
+ queries (e.g. if your configuration or query is incorrect) will be shown in a message dialog
+ or inclined in the view that detected the error, you may get more information about the
+ error in the <property moreinfo="none">Error Log View</property> on the right pane.</para>
+
+ <para>Results of a query will be shown in the <property moreinfo="none">Hibernate Query Result View</property>
+ and details of possible errors (syntax errors, database errors, etc.) can be seen in the
+ <property moreinfo="none">Error Log View</property>.</para>
+
+
+ <note>
+ <title>Note:</title>
+ <para>HQL queries are executed by default using <literal moreinfo="none">list()</literal> thus without any
+ limit of the size of the output the query could return a large result set. You might run
+ out of memory. To avoid this you can put a value in the Max results field to reduce the
+ number of elements returned.</para>
+ </note>
+
+ <section>
+ <title>Dynamic Query Translator</title>
+
+ <para>If the <property moreinfo="none">Hibernate Dynamic Query Translator View</property> is visible while
+ writing in the <property moreinfo="none">HQL Editor</property> it will show the generated SQL for a HQL
+ query.</para>
+
+ <figure float="0">
+ <title>Hibernate Dynamic Query Translator View</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_20.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_20.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The translation is done each time you stop typing into the editor, if there are errors
+ in the HQL the parse exception will be shown embedded in the view.</para>
+ </section>
+ </section>
+
+ <section>
+ <title>Properties View</title>
+
+ <para>As you can see on the figure, <property moreinfo="none">Properties view</property> shows the number of
+ query results as well as the time of executing.</para>
+
+ <figure float="0">
+ <title>Properties View</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_21_a.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_21_a.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>It also displays the structure of any persistent object selected in the
+ <property moreinfo="none">Hibernate Query Results View</property>. Editing is not yet supported.</para>
+
+ <figure float="0">
+ <title>Properties View for Selected Object</title>
+ <mediaobject>
+ <imageobject role="fo">
+ <imagedata align="center" fileref="images/plugins/plugins_21_b.png" format="PNG" scale="80"></imagedata>
+ </imageobject>
+
+ <imageobject role="html">
+ <imagedata align="center" fileref="images/plugins/plugins_21_b.png" format="PNG"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+ </section>
+
+ <section id="debug_log">
+ <title>Enable debug logging in the plugins</title>
+
+ <para>It is possible to configure the eclipse plugin to route all logging made by the plugins
+ and hibernate code it self to the <property moreinfo="none">Error Log View</property> in Eclipse.</para>
+
+ <para>This is done by editing the <emphasis>
+ <property moreinfo="none">hibernate-log4j.properties</property>
+ </emphasis> in <emphasis>
+ <property moreinfo="none">org.hibernate.eclipse/ directory/jar</property>
+ </emphasis>. This file includes a default configuration that only logs WARN and above to a set
+ of custom appenders (PluginFileAppender and PluginLogAppender). You can change these settings
+ to be as verbose or silent as you please - see <ulink url="http://www.hibernate.org/5.html">Hibernate Documentation</ulink> for interesting categories and Log4j documentation.</para>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>Find more on how to configure logging via a log4j property file in <ulink url="http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/...">Log4j documentation</ulink>.</para>
+ </section>
+ </section>
+
+ <section diffmk:change="added" id="dali_integration" role="new">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Hibernate support for Dali plugins in Eclipse WTP</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Starting from 3.0.0 Alpha1 version of </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss Tools</diffmk:wrapper></property> <diffmk:wrapper diffmk:change="added">Hibernate plugins
+ support Eclipse Dali integration what now makes it possible to use a Hibernate as a complete
+ JPA development platform.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">When starting your new JPA project from </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New > Other... > JPA > JPA Project</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">(or simply </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">New > JPA Project</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">in </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JPA Perspective</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">) on the JPA Facet page you'll be
+ prompted to choose Hibernate as a target platform.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Targeting at Hibernate Platform</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">By enabling Hibernate platform specific features you can now generate DDL and Entities.
+ For that find </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JPA Tools > Generate DDL.../Generate Entities...</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">options in the context menu of your JPA project.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Generate DDL/Entities</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The Generate DDL/Entities wizards first will ask you to choose the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Console
+ Configuration</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Generate Entities Wizard</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/plugins/plugins_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Please note, currently the wizards require that you have a </diffmk:wrapper><link diffmk:change="added" linkend="console_conf"><diffmk:wrapper diffmk:change="added">Hibernate Console Configuration</diffmk:wrapper></link> <diffmk:wrapper diffmk:change="added">already configured.</diffmk:wrapper></para>
+ </note>
+ </section>
+</chapter>
+
+
+<chapter id="ant" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/ant.xml">
+ <title>Ant Tools</title>
+
+ <para>Maybe somebody will find it more preferable to use Ant for generation purposes. Thus, this
+ chapter is intended to get you ready to start using Hibernate Tools via Ant tasks.</para>
+
+ <section>
+ <title>Introduction</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> contains the core for the <property moreinfo="none">Hibernate Tools</property>. It is used as the
+ basis for both the Ant tasks described in this document and the eclipse plugins both available
+ from tools.hibernate.org. The <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>
+ </emphasis> is located in your eclipse plugins directory at <emphasis>
+ <property moreinfo="none">/plugins/org.hibernate.eclipse.x.x.x/lib/tools/hibernate-tools.jar</property>.</emphasis></para>
+ <para>This jar is 100% independent from the eclipse platform and can thus be used independently
+ of eclipse.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>There might be incompatibilities with respect to the Hibernate3.jar bundled with the
+ tools and your own jar. Thus to avoid any confusion it is recommended to use the
+ hibernate3.jar and hibernate-annotations.jar bundled with the tools when you want to use the
+ Ant tasks. Do not worry about using e.g. Hibernate 3.2 jar's with e.g. a Hibernate 3.1
+ project since the output generated will work with previous Hibernate 3 versions. </para>
+ </note>
+ </section>
+
+ <section>
+ <title>The <hibernatetool> Ant Task</title>
+
+ <para>To use the ant tasks you need to have the <emphasis>
+ <property moreinfo="none">hibernatetool</property>
+ </emphasis> task defined. That is done in your <emphasis>
+ <property moreinfo="none">build.xml</property>
+ </emphasis> by inserting the following xml (assuming the jars are in the
+ <literal moreinfo="none">lib</literal> directory): </para>
+
+ <programlisting format="linespecific" role="XML"><path id="toolslib">
+ <path location="lib/hibernate-tools.jar" />
+ <path location="lib/hibernate3.jar" />
+ <path location="lib/freemarker.jar" />
+ <path location="${jdbc.driver.jar}" />
+</path>
+
+<taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="toolslib" />
+</programlisting>
+
+ <para>This <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><taskdef></literal>
+ </property>
+ </emphasis> defines an Ant task called <emphasis>
+ <property moreinfo="none"> hibernatetool </property>
+ </emphasis> which now can be used anywhere in your ant <emphasis>
+ <property moreinfo="none">build.xml</property>
+ </emphasis> files. It is important to include all the <property moreinfo="none">Hibernate Tools</property>
+ dependencies as well as the jdbc driver.</para>
+
+ <para>Notice that to use the annotation based Configuration you must <ulink url="http://annotations.hibernate.org">get a release</ulink>. </para>
+
+ <para></para>
+
+ <para>When using the <emphasis>
+ <property moreinfo="none"> hibernatetool </property>
+ </emphasis> task you have to specify one or more of the following:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool
+ destdir="defaultDestinationDirectory"
+ templatepath="defaultTemplatePath"
+>
+ <classpath ...>
+ <property key="propertyName" value="value"/>
+ <propertyset ...>
+ (<configuration ...>|<annotationconfiguration ...>|
+ <jpaconfiguration ...>|<jdbcconfiguration ...>)
+ (<hbm2java>,<hbm2cfgxml>,<hbmtemplate>,...)
+</hibernatetool></programlisting>
+
+ <table frame="topbot">
+ <title>Hibernatetool attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>destdir</para>
+ </entry>
+
+ <entry>
+ <para>Destination directory for files generated with exporters</para>
+ </entry>
+
+ <entry>
+ <para>Required</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>templatepath</para>
+ </entry>
+
+ <entry>
+ <para>A path to be used to look up user-edited templates</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>classpath</para>
+ </entry>
+
+ <entry>
+ <para>A classpath to be used to resolve resources, such as mappings and
+ usertypes</para>
+ </entry>
+
+ <entry>
+ <para>Optional, but very often required</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>property (and propertyset)</para>
+ </entry>
+
+ <entry>
+ <para>Used to set properties to control the exporters. Mostly relevant for providing
+ custom properties to user defined templates</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>configuration (annotationconfiguration, jpaconfiguration,
+ jdbcconfiguration)</para>
+ </entry>
+
+ <entry>
+ <para>One of four different ways of configuring the Hibernate Meta Model must be
+ specified</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>hbm2java (hbm2cfgxml, hbmtemplate, etc.)</para>
+ </entry>
+
+ <entry>
+ <para>One or more of the exporters must be specified</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Basic examples</title>
+
+ <para>The following example shows the most basic setup for generating pojo's via <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> from a normal <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">hibernate.cfg.xml</literal>
+ </property>. </emphasis> The output will be put in the <emphasis>
+ <property moreinfo="none">${build.dir}/generated</property>
+ </emphasis> directory.</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <classpath>
+ <path location="${build.dir}/classes"/>
+ </classpath>
+
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2java/>
+</hibernatetool></programlisting>
+
+
+ <para>The following example is similar, but now we are performing multiple exports from the
+ same configuration. We are exporting the schema via <emphasis>
+ <property moreinfo="none"><hbm2dll></property>, </emphasis> generates some DAO code via <emphasis>
+ <property moreinfo="none"><hbm2dao></property>
+ </emphasis> and finally runs a custom code generation via <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>. </emphasis> This is again from a normal <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> and the output is still put in the <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">${build.dir}/generated</literal>
+ </property>
+ </emphasis> directory. Furthermore the example also shows where a classpath is specified
+ when you e.g. have custom usertypes or some mappings that is needed to be looked up as a
+ classpath resource.</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <classpath>
+ <path location="${build.dir}/classes"/>
+ </classpath>
+
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2ddl/>
+ <hbm2dao/>
+ <hbmtemplate
+ filepattern="{package-name}/I{class-name}Constants.java"
+ templatepath="${etc.dir}/customtemplates"
+ template="myconstants.vm"
+ />
+</hibernatetool></programlisting>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Configurations</title>
+
+ <para><literal moreinfo="none">Hibernatetool</literal> supports four different Hibernate configurations: A
+ standard Hibernate configuration <emphasis>
+ (<property moreinfo="none"><configuration></property>), </emphasis> Annotation based
+ configuration <emphasis> (<property moreinfo="none"><annotationconfiguration></property>),
+ </emphasis> JPA persistence based configuration <emphasis>
+ (<property moreinfo="none"><jpaconfiguration></property>) </emphasis> and a JDBC based
+ configuration <emphasis> (<property moreinfo="none"><jdbcconfiguration></property>) </emphasis>
+ for use when reverse engineering.</para>
+
+ <para>Each have in common that they are able to build up a Hibernate Configuration object from
+ which a set of exporters can be run to generate various output. </para>
+
+ <note>
+ <title>Note:</title>
+ <para>Output can be anything, e.g. specific files, statements execution against a database,
+ error reporting or anything else that can be done in java code.</para>
+ </note>
+
+ <para>The following sections describe what the various configurations can do, plus lists the
+ individual settings they have.</para>
+
+ <section>
+ <title>Standard Hibernate Configuration (<configuration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><configuration></property>
+ </emphasis> is used to define a standard Hibernate configuration. A standard Hibernate
+ configuration reads the mappings from a <emphasis>
+ <property moreinfo="none">cfg.xml</property>
+ </emphasis> and/or a fileset.</para>
+
+ <programlisting format="linespecific" role="XML"><configuration
+ configurationfile="hibernate.cfg.xml"
+ propertyfile="hibernate.properties"
+ entityresolver="EntityResolver classname"
+ namingstrategy="NamingStrategy classname"
+>
+ <fileset...>
+
+ </configuration></programlisting>
+
+ <table frame="topbot">
+ <title>Configuration attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>configurationfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a Hibernate configuration file, e.g. "hibernate.cfg.xml"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>propertyfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a property file, e.g. "hibernate.properties"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>entity-resolver</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements org.xml.sax.EntityResolver. Used if the
+ mapping files require custom entity resolver</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>namingstrategy</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements org.hibernate.cfg.NamingStrategy. Used for
+ setting up the naming strategy in Hibernate which controls the automatic naming of
+ tables and columns.</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>fileset</para>
+ </entry>
+
+ <entry>
+ <para>A standard Ant fileset. Used to include hibernate mapping files. Remember that
+ if mappings are already specified in the hibernate.cfg.xml then it should not be
+ included via the fileset as it will result in duplicate import exceptions.</para>
+ </entry>
+
+ <entry>
+ <para></para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>This example shows an example where no <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none">hibernate.cfg.xml</literal>
+ </property>
+ </emphasis> exists, and a <emphasis>
+ <property moreinfo="none"> hibernate.properties </property>
+ </emphasis> and fileset is used instead. </para>
+
+ <note>
+ <title>Note:</title>
+ <para> Hibernate will still read any global <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> available in the classpath, but the specified properties file here will
+ override those values for any non-global property.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <configuration propertyfile="{etc.dir}/hibernate.properties">
+ <fileset dir="${src.dir}">
+ <include name="**/*.hbm.xml"/>
+ <exclude name="**/*Test.hbm.xml"/>
+ </fileset>
+ </configuration>
+
+ <!-- list exporters here -->
+
+</hibernatetool></programlisting>
+
+ </section>
+ </section>
+
+ <section>
+ <title>Annotation based Configuration (<annotationconfiguration>)</title>
+
+ <para>An <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from EJB3/Hibernate Annotations
+ based POJO's.</para>
+
+ <important>
+ <title>Important:</title>
+ <para>To use it remember to put the jar files needed for using hibernate annotations in the
+ classpath of the <emphasis>
+ <property moreinfo="none"><taskdef></property>, </emphasis> i. e.
+ hibernate-annotations.jar and hibernate-commons-annotations.jar.</para>
+ </important>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis> supports the same attributes as a <emphasis>
+ <property moreinfo="none"><configuration></property>
+ </emphasis> except that the configurationfile attribute is now required as that is from
+ where an <literal moreinfo="none">AnnotationConfiguration</literal> gets the list of classes/packages it
+ should load.</para>
+
+ <para>Thus the minimal usage is:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <annotationconfiguration
+ configurationfile="hibernate.cfg.xml"/>
+
+ <!-- list exporters here -->
+
+</hibernatetool>
+</programlisting>
+
+ </section>
+
+ <section>
+ <title>JPA based configuration (<jpaconfiguration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> is used when you want to read the metamodel from JPA/Hibernate Annotation where
+ you want to use the auto-scan configuration as defined in the JPA spec (part of EJB3). In
+ other words, when you do not have a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>, </emphasis> but instead have a setup where you use
+ a <emphasis>
+ <property moreinfo="none">persistence.xml</property>
+ </emphasis> packaged in a JPA compliant manner.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> will simply just try and auto-configure it self based on the available
+ classpath, e.g. look for <emphasis>
+ <property moreinfo="none">META-INF/persistence.xml</property>. </emphasis></para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">persistenceunit</property>
+ </emphasis> attribute can be used to select a specific persistence unit. If no <emphasis>
+ <property moreinfo="none">persistenceunit</property>
+ </emphasis> is specified it will automatically search for one and if a unique one is found,
+ use it, but if multiple persistence units are available it will error.</para>
+
+ <para>To use a <emphasis>
+ <property moreinfo="none"><jpaconfiguration></property>
+ </emphasis> you will need to specify some additional jars from Hibernate EntityManager in
+ the <emphasis>
+ <property moreinfo="none"><taskdef></property>
+ </emphasis> of the hibernatetool. The following shows a full setup:</para>
+
+ <programlisting format="linespecific" role="XML"><path id="ejb3toolslib">
+ <path refid="jpatoolslib"/> <!-- ref to previously defined toolslib -->
+ <path location="lib/hibernate-annotations.jar" />
+ <path location="lib/ejb3-persistence.jar" />
+ <path location="lib/hibernate-entitymanager.jar" />
+ <path location="lib/jboss-archive-browsing.jar" />
+ <path location="lib/javaassist.jar" />
+</path>
+
+<taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="jpatoolslib" />
+
+<hibernatetool destdir="${build.dir}">
+ <jpaconfiguration persistenceunit="caveatemptor"/>
+ <classpath>
+ <!-- it is in this classpath you put your classes dir,
+ and/or jpa persistence compliant jar -->
+ <path location="${build.dir}/jpa/classes" />
+ </classpath>
+
+ <!-- list exporters here -->
+
+</hibernatetool>
+</programlisting>
+
+
+ <note>
+ <title>Note:</title>
+ <para>ejb3configuration was the name used in previous versions. It still works but will emit
+ a warning telling you to use <literal moreinfo="none">jpaconfiguration</literal> instead.</para>
+ </note>
+
+ </section>
+
+ <section>
+ <title>JDBC Configuration for reverse engineering (<jdbcconfiguration>)</title>
+
+ <para>A <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> is used to perform reverse engineering of the database from a JDBC connection.</para>
+
+ <para>This configuration works by reading the connection properties either from <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">hibernate.properties</property>
+ </emphasis> with a fileset.</para>
+
+ <para>The <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> has the same attributes as a <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><configuration></literal>
+ </property>
+ </emphasis> plus the following additional attributes:</para>
+
+ <programlisting format="linespecific" role="XML"><jdbcconfiguration
+ ...
+ packagename="package.name"
+ revengfile="hibernate.reveng.xml"
+ reversestrategy="ReverseEngineeringStrategy classname"
+ detectmanytomany="true|false"
+ detectoptmisticlock="true|false"
+>
+ ...
+ </jdbcconfiguration></programlisting>
+
+ <table frame="topbot">
+ <title>Jdbcconfiguration attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>packagename</para>
+ </entry>
+
+ <entry>
+ <para>The default package name to use when mappings for classes are created</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>revengfile</para>
+ </entry>
+
+ <entry>
+ <para>The name of a property file, e.g. "hibernate.properties"</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>reversestrategy</para>
+ </entry>
+
+ <entry>
+ <para>Name of a class that implements
+ org.hibernate.cfg.reveng.ReverseEngineeringStrategy. Used for setting up the
+ strategy the tools will use to control the reverse engineering, e.g. naming of
+ properties, which tables to include/exclude etc. Using a class instead of (or as
+ addition to) a reveng.xml file gives you full programmatic control of the reverse
+ engineering.</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>detectManytoMany</para>
+ </entry>
+
+ <entry>
+ <para>If true, tables which are pure many-to-many link tables will be mapped as
+ such. A pure many-to-many table is one which primary-key contains exactly two
+ foreign-keys pointing to other entity tables and has no other columns.</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>detectOptimisticLock</para>
+ </entry>
+
+ <entry>
+ <para>If true, columns named VERSION or TIMESTAMP with appropriate types will be
+ mapped with the appropriate optimistic locking corresponding to
+ <version> or <timestamp>.</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Here is an example of using <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><jdbcconfiguration></literal>
+ </property>
+ </emphasis> to generate Hibernate xml mappings via <emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>.</emphasis> The connection settings here
+ is read from a <emphasis>
+ <property moreinfo="none"> hibernate.properties </property>
+ </emphasis> file but could just as well have been read from a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool>
+ <jdbcconfiguration propertyfile="etc/hibernate.properties" />
+ <hbm2hbmxml destdir="${build.dir}/src" />
+</hibernatetool>
+</programlisting>
+ </section>
+ </section>
+ </section>
+
+ <section>
+ <title>Exporters</title>
+
+ <para>Exporters are the parts that do the actual job of converting the hibernate metamodel into
+ various artifacts, mainly code. The following section describes the current supported set of
+ exporters in the <property moreinfo="none">Hibernate Tool</property> distribution. It is also possible for
+ userdefined exporters, that is done through the <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><hbmtemplate></literal>
+ </property>
+ </emphasis> exporter.</para>
+
+ <section>
+ <title>Database schema exporter (<hbm2ddl>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2ddl></property>
+ </emphasis> lets you run schemaexport and schemaupdate which generates the appropriate SQL
+ DDL and allow you to store the result in a file or export it directly to the database.
+ Remember that if a custom naming strategy is needed it is placed on the configuration
+ element.</para>
+
+ <programlisting format="linespecific" role="XML"><hbm2ddl
+ export="true|false"
+ update="true|false"
+ drop="true|false"
+ create="true|false"
+ outputfilename="filename.ddl"
+ delimiter=";"
+ format="true|false"
+ haltonerror="true|false"
+ ></programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2ddl exporter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>export</para>
+ </entry>
+
+ <entry>
+ <para>Executes the generated statements against the database</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>update</para>
+ </entry>
+
+ <entry>
+ <para>Try and create an update script representing the "delta"
+ between what is in the database and what the mappings specify. Ignores
+ create/update attributes. (<emphasis>Do *not* use against production databases, no
+ guarantees at all that the proper delta can be generated nor that the underlying
+ database can actually execute the needed operations</emphasis>).</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>drop</para>
+ </entry>
+
+ <entry>
+ <para>Output will contain drop statements for the tables, indices and
+ constraints</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+
+ <row>
+ <entry>
+ <para>create</para>
+ </entry>
+
+ <entry>
+ <para>Output will contain create statements for the tables, indices and
+ constraints</para>
+ </entry>
+
+ <entry>
+ <para>Default: true</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>outputfilename</para>
+ </entry>
+
+ <entry>
+ <para>If specified the statements will be dumped to this file</para>
+ </entry>
+
+ <entry>
+ <para>Optional</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>delimiter</para>
+ </entry>
+
+ <entry>
+ <para>If specified the statements will be dumped to this file</para>
+ </entry>
+
+ <entry>
+ <para>Default: ";"</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>format</para>
+ </entry>
+
+ <entry>
+ <para>Apply basic formatting to the statements</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>haltonerror</para>
+ </entry>
+
+ <entry>
+ <para>Halt build process if an error occurs</para>
+ </entry>
+
+ <entry>
+ <para>Default: false</para>
+ </entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic example of using <emphasis>
+ <property moreinfo="none"><hbm2ddl></property>, </emphasis> which does not export to the
+ database but simply dumps the sql to a file named <emphasis>
+ <property moreinfo="none">sql.ddl</property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2ddl export="false" outputfilename="sql.ddl"/>
+</hibernatetool></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>POJO java code exporter (<literal moreinfo="none"><hbm2java></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> is a java codegenerator. Options for controlling whether JDK 5 syntax can be
+ used and whether the POJO should be annotated with EJB3/Hibernate Annotations.</para>
+
+ <programlisting format="linespecific" role="XML"><hbm2java
+ jdk5="true|false"
+ ejb3="true|false"
+></programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2java exporter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>jdk</para>
+ </entry>
+
+ <entry>
+ <para>Code will contain JDK 5 constructs such as generics and static imports</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>Code will contain EJB 3 features, e.g. using annotations from
+ javax.persistence and org.hibernate.annotations</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic example of using <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> to generate POJO's that utilize jdk5 constructs.</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2java jdk5="true"/>
+</hibernatetool></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Mapping files exporter (<literal moreinfo="none"><hbm2hbmxml></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>
+ </emphasis> generates a set of .hbm files. Intended to be used together with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but can be used with any kind of
+ configuration. e.g. to convert from annotation based pojo's to <emphasis>
+ <property moreinfo="none">hbm.xml</property>. </emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para>Not every possible mapping transformation is possible/implemented (contributions
+ welcome) so some hand editing might be necessary.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><hbm2hbmxml/></programlisting>
+
+ <section>
+ <title>Example</title>
+
+ <para>Basic usage of <emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>. </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <hbm2hbmxml/>
+</hibernatetool></programlisting>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2hbmxml></property>
+ </emphasis> is normally used with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> like in the above example, but any other configuration can also be used to
+ convert between the different ways of performing mappings. Here is an example of that,
+ using an <emphasis>
+ <property moreinfo="none"><annotationconfiguration></property>
+ </emphasis>.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Not all conversions are implemented (contributions welcome), so some hand editing
+ might be necessary.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+ <annotationconfiguration configurationfile="hibernate.cfg.xml"/>
+ <hbm2hbmxml/>
+</hibernatetool></programlisting>
+ </section>
+ </section>
+
+ <section>
+ <title>Hibernate Configuration file exporter (<literal moreinfo="none"><hbm2cfgxml></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2cfgxml></property>
+ </emphasis> generates a <emphasis>
+ <property moreinfo="none">hibernate.cfg.xml</property>. </emphasis> Intended to be used together with a <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> when performing reverse engineering, but it can be used with any kind of
+ configuration. The <emphasis>
+ <property moreinfo="none"><hbm2cfgxml></property>
+ </emphasis> will contain the properties used and adds mapping entries for each mapped class.</para>
+
+ <programlisting format="linespecific" role="XML"><hbm2cfgxml
+ ejb3="true|false"
+/>
+</programlisting>
+
+ <table frame="topbot">
+ <title>Hbm2cfgxml exporter attribute</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>ejb3</para>
+ </entry>
+
+ <entry>
+ <para>The generated cfg.xml will have <mapping class=".."/>, opposed
+ to <mapping resource="..."/> for each mapping.</para>
+ </entry>
+
+ <entry>
+ <para>False</para>
+ </entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title>Documentation exporter (<literal moreinfo="none"><hbm2doc></literal>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><hbm2doc></property>
+ </emphasis> generates html documentation a'la javadoc for the database schema et.al.</para>
+
+ <programlisting format="linespecific" role="XML"><hbm2doc/></programlisting>
+ </section>
+
+ <section>
+ <title>Query exporter (<query>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><query></property>
+ </emphasis> is used to execute a HQL query statements and optionally sends the output to a
+ file. It can be used for verifying the mappings and for basic data extraction.</para>
+
+ <programlisting format="linespecific" role="XML"><query
+ destfile="filename">
+ <hql>[a HQL query string]</hql>
+</query>
+</programlisting>
+
+ <para>Currently one session is opened and used for all queries and the query is executed via
+ the list() method. In the future more options might become available, like performing
+ executeUpdate(), use named queries and etc.</para>
+
+ <para></para>
+
+ <section>
+ <title>Examples</title>
+
+ <para>The simplest usage of <emphasis>
+ <property moreinfo="none"><query></property>
+ </emphasis> will just execute the query without dumping to a file. This can be used to
+ verify that queries can actually be performed.</para>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool>
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <query>from java.lang.Object</query>
+</hibernatetool></programlisting>
+
+ <para>Multiple queries can be executed by nested <emphasis>
+ <property moreinfo="none"><hql></property>
+ </emphasis> elements. In this example we also let the output be dumped to <emphasis>
+ <property moreinfo="none">queryresult.txt</property>. </emphasis></para>
+
+ <note>
+ <title>Note:</title>
+ <para> Currently the dump is simply a call to toString on each element.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool>
+ <configuration configurationfile="hibernate.cfg.xml"/>
+ <query destfile="queryresult.txt">
+ <hql>select c.name from Customer c where c.age > 42</hql>
+ <hql>from Cat</hql>
+</hibernatetool></programlisting>
+
+ </section>
+ </section>
+
+ <section id="hbmtemplate">
+ <title>Generic Hibernate metamodel exporter (<literal moreinfo="none"><hbmtemplate></literal>)</title>
+
+ <para>Generic exporter that can be controlled by a user provides a template or class.</para>
+
+ <programlisting format="linespecific" role="XML"><hbmtemplate
+ filepattern="{package-name}/{class-name}.ftl"
+ template="somename.ftl"
+ exporterclass="Exporter classname"
+/></programlisting>
+
+ <note>
+ <title>Note:</title>
+ <para>Previous versions of the tools used Velocity. We are now using Freemarker which
+ provides us much better exception and error handling.</para>
+ </note>
+
+ <section>
+ <title>Exporter via <hbmtemplate></title>
+
+ <para>The following is an example of reverse engineering via <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>
+ </emphasis> and usage of a custom Exporter via the <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>
+ </emphasis>.</para>
+
+ <programlisting format="linespecific" role="XML"> <hibernatetool destdir="${destdir}">
+ <jdbcconfiguration
+ configurationfile="hibernate.cfg.xml"
+ packagename="my.model"/>
+
+ <!-- setup properties -->
+ <property key="appname" value="Registration"/>
+ <property key="shortname" value="crud"/>
+
+ <hbmtemplate
+ exporterclass="my.own.Exporter"
+ filepattern="."/>
+
+</hibernatetool>
+</programlisting>
+
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+
+ <para>Read more about <ulink url="http://velocity.apache.org/">Velocity</ulink> and <ulink url="http://freemarker.org/">Freemarker</ulink> to find out why using the last is better
+ or refer to Max Andersen discussion on the topic in <ulink url="http://in.relation.to/2110.lace;jsessionid=3462F47B17556604C15DF1B96572E940">"A story about FreeMarker and Velocity"</ulink>.</para>
+ </section>
+ </section>
+ </section>
+
+
+
+ <section>
+ <title>Using properties to configure Exporters</title>
+
+ <para>Exporters can be controlled by user properties. The user properties are specified via <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> or <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> and each exporter will have access to them directly in the templates and via
+ <property moreinfo="none">Exporter.setProperties()</property>.</para>
+
+ <section>
+ <title><literal moreinfo="none"><property></literal> and
+ <literal moreinfo="none"><propertyset></literal></title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> allows you bind a string value to a key. The value will be available in the
+ templates via <emphasis>
+ <property moreinfo="none">$<key></property>
+ </emphasis>. The following example will assign the string value <emphasis>
+ <property moreinfo="none">"true"</property>
+ </emphasis> to the variable <emphasis>
+ <property moreinfo="none">$descriptors</property>
+ </emphasis>.</para>
+
+ <programlisting format="linespecific" role="XML"><property key="descriptors" value="true"/></programlisting>
+
+ <para>Most times using <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><property></literal>
+ </property>
+ </emphasis> is enough for specifying the properties needed for the exporters. Still the ant
+ tools supports the notion of <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> that is used for grouping a set of properties. More about the functionality of <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><propertyset></literal>
+ </property>
+ </emphasis> is explained in detail in the <ulink url="http://ant.apache.org/manual/">Ant
+ manual</ulink>.</para>
+ </section>
+
+ <section>
+ <title>Getting access to user specific classes</title>
+
+ <para>If the templates need to access some user class it becomes possible by specifying a <emphasis>
+ <property moreinfo="none">"toolclass"</property>
+ </emphasis> in the properties.</para>
+
+ <programlisting format="linespecific" role="XML"><property key="hibernatetool.sometool.toolclass" value="x.y.z.NameOfToolClass"/>
+</programlisting>
+
+ <para>Placing the above <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><property></literal>
+ </property>
+ </emphasis> tag in <emphasis>
+ <property moreinfo="none">
+ <literal moreinfo="none"><hibernatetool></literal>
+ </property>
+ </emphasis> or inside any exporter will automatically create an instance of
+ <literal moreinfo="none">x.y.z.NameOfToolClass</literal> and it will be available in the templates as
+ <literal moreinfo="none">$sometool</literal>. This is useful to delegate logic and code generation to java
+ code instead of placing such logic in the templates.</para>
+
+ <section>
+ <title>Example</title>
+
+ <para>Here is an example that uses <emphasis>
+ <property moreinfo="none"><hbmtemplate></property>
+ </emphasis> together with <emphasis>
+ <property moreinfo="none"><property></property>
+ </emphasis> which will be available to the templates/exporter. </para>
+ <note>
+ <title>Note:</title>
+ <para> This example actually simulates what <hbm2java> actually does.</para>
+ </note>
+
+ <programlisting format="linespecific" role="XML"><hibernatetool destdir="${build.dir}/generated">
+<configuration
+ configurationfile="etc/hibernate.cfg.xml"/>
+ <hbmtemplate
+ templateprefix="pojo/"
+ template="pojo/Pojo.ftl"
+ filepattern="{package-name}/{class-name}.java">
+ <property key="jdk5" value="true" />
+ <property key="ejb3" value="true" />
+ </hbmtemplate>
+</hibernatetool>
+</programlisting>
+ </section>
+ </section>
+ </section>
+</chapter>
+
+
+<chapter id="reverseengineering" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml">
+ <title>Controlling reverse engineering</title>
+
+ <para>When using the <emphasis>
+ <property moreinfo="none"><jdbcconfiguration></property>, </emphasis> the ant task will read the
+ database metadata and thus will perform a reverse engineering of the database schema into a
+ normal Hibernate Configuration. It is from this object e.g. <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis>can generate other artifacts such as <emphasis>
+ <property moreinfo="none">.java</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis> etc.</para>
+
+ <para>To govern this process <property moreinfo="none">Hibernate</property> uses a reverse engineering strategy. A
+ reverse engineering strategy is mainly called to provide more java like names for tables, column
+ and foreignkeys into classes, properties and associations. It also used to provide mappings from
+ SQL types to <property moreinfo="none">Hibernate</property> types. The strategy can be customized by a user. The
+ user can even provide its own custom reverse engineering strategy if the provided strategy is
+ not enough, or simply just provide a small part of the strategy and delegate the rest to the
+ default strategy.</para>
+
+ <para>Thus, further in this chapter we will discuss how you can configure the process of a reverse
+ engineering, what default reverse engineering strategy includes as well as some custom concepts.</para>
+
+ <section>
+ <title>Default reverse engineering strategy</title>
+
+ <para>The default strategy uses some rules for mapping JDBC artifact names to java artifact
+ names. It also provide basic typemappings from JDBC types to <property moreinfo="none">Hibernate</property>
+ types. It is the default strategy that uses the packagename attribute to convert a table name
+ to a fully qualified classname.</para>
+ </section>
+
+ <section id="hibernaterevengxmlfile">
+ <title>hibernate.reveng.xml file</title>
+
+ <para>To have fine control over the process a <emphasis>
+ <property moreinfo="none">hibernate.reveng.xml</property>
+ </emphasis> file can be provided. In this file you can specify type mappings and table
+ filtering. This file can be created by hand (it's just basic XML) or you can use the
+ <ulink url="http://www.hibernate.org/30.html">Hibernate plugins</ulink> which have a
+ specialized editor.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Many databases are case-sensitive with their names and thus if you cannot make some
+ table match and you are sure it is not excluded by a <table-filter> then check
+ if the case matches; most databases stores table names in uppercase.</para>
+ </note>
+
+ <para>Below you can see an example of a <emphasis>
+ <property moreinfo="none">reveng.xml</property>. </emphasis> Following the example gives you more details
+ about the format.</para>
+
+ <programlisting format="linespecific" role="XML"><?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-reverse-engineering
+ SYSTEM "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
+
+<hibernate-reverse-engineering>
+
+<type-mapping>
+ <!-- jdbc-type is name fom java.sql.Types -->
+ <sql-type jdbc-type="VARCHAR" length='20' hibernate-type="SomeUserType" />
+ <sql-type jdbc-type="VARCHAR" length='1' hibernate-type="yes_no" />
+ <!-- length, scale and precision can be used to specify the mapping precisly -->
+ <sql-type jdbc-type="NUMERIC" precision='1' hibernate-type="boolean" />
+ <!-- the type-mappings are ordered. This mapping will be consulted last,
+ thus overriden by the previous one if precision=1 for the column -->
+ <sql-type jdbc-type="NUMERIC" hibernate-type="long" />
+</type-mapping>
+
+<!-- BIN$ is recycle bin tables in Oracle -->
+<table-filter match-name="BIN$.*" exclude="true" />
+
+<!-- Exclude DoNotWantIt from all catalogs/schemas -->
+<table-filter match-name="DoNotWantIt" exclude="true" />
+
+<!-- exclude all tables from the schema SCHEMA in catalog BAD. -->
+<table-filter match-catalog="BAD" match-schema="SCHEMA" match-name=".*" exclude="true" />
+
+<!-- table allows you to override/define how reverse engineering
+ is done for a specific table -->
+<table name="ORDERS">
+ <primary-key>
+ <!-- setting up a specific id generator for a table -->
+ <generator class="sequence">
+ <param name="table">seq_table</param>
+ </generator>
+ <key-column name="CUSTID"/>
+ </primary-key>
+ <column name="NAME" property="orderName" type="string" />
+ <!-- control many-to-one and set names for a specific named foreign key constraint -->
+ <foreign-key constraint-name="ORDER_CUST">
+ <many-to-one property="customer"/>
+ <set property="orders"/>
+ </foreign-key>
+ <diffmk:wrapper diffmk:change="added"><!-- can also control a pure (shared pk) one-to-one -->
+ <foreign-key constraint-name="ADDRESS_PERSON">
+ <one-to-one exclude="false"/>
+ <inverse-one-to-one exclude="true"/>
+ </foreign-key>
+</diffmk:wrapper></table>
+
+</hibernate-reverse-engineering></programlisting>
+
+
+ <section>
+ <title>Schema Selection (<schema-selection>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><schema-selection></property>
+ </emphasis> is used to drive which schemas the reverse engineering will try and
+ process.</para>
+
+ <para>By default the reverse engineering will read all schemas and then use <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> to decide which tables get reverse engineered and which do not; this makes it
+ easy to get started but can be inefficient on databases with many schemas.</para>
+
+ <para>With <emphasis>
+ <property moreinfo="none"><schema-selection></property>
+ </emphasis> it is thus possible to limit the actual processed schemas and thus significantly
+ speed-up the reverse engineering. <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> is still used to then decide which tables will be included/excluded.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>If no <literal moreinfo="none"><schema-selection></literal> is specified, the reverse
+ engineering works as if all schemas should be processed. This is equal to:
+ <schema-selection/>. Which in turn is equal to:
+ <schema-selection match-catalog=".*" match-schema=".*" match-table=".*"/></para>
+ </note>
+
+ <section>
+ <title>Examples</title>
+
+ <para>The following will process all tables from <emphasis>
+ <property moreinfo="none">"MY_SCHEMA"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><schema-selection match-schema="MY_SCHEMA"/></programlisting>
+
+ <para>It is possible to have multiple <literal moreinfo="none">schema-selection</literal>'s to support
+ multi-schema reading or simply to limit the processing to very specific tables. The
+ following example processes all tables in <emphasis>
+ <property moreinfo="none">"MY_SCHEMA"</property>,
+ </emphasis> a specific <emphasis>
+ <property moreinfo="none">"CITY"</property>
+ </emphasis> table plus all tables that starts with <emphasis>
+ <property moreinfo="none">"CODES_"</property>
+ </emphasis> in <emphasis>
+ <property moreinfo="none">"COMMON_SCHEMA"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><schema-selection match-schema="MY_SCHEMA"/>
+<schema-selection match-schema="COMMON_SCHEMA" match-table="CITY"/>
+<schema-selection match-schema="COMMON_SCHEMA" match-table="CODES_.*"/></programlisting>
+ </section>
+ </section>
+
+ <section id="type_map">
+ <title>Type mappings (<type-mapping>)</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><type-mapping></property>
+ </emphasis> section specifies how the JDBC types found in the database should be mapped to
+ Hibernate types. e.g. <emphasis>
+ <property moreinfo="none">java.sql.Types.VARCHAR</property></emphasis> with a length of 1 should be mapped to the
+ Hibernate type <emphasis>
+ <property moreinfo="none">yes_no</property></emphasis> or <emphasis>
+ <property moreinfo="none">java.sql.Types.NUMERIC</property></emphasis> should generally just be
+ converted to the Hibernate type <literal moreinfo="none">long</literal>.</para>
+
+ <programlisting format="linespecific" role="XML"><type-mapping>
+ <sql-type
+ jdbc-type="integer value or name from java.sql.Types"
+ length="a numeric value"
+ precision="a numeric value"
+ scale="a numeric value"
+ not-null="true|false"
+ hibernate-type="hibernate type name"
+ />
+</type-mapping></programlisting>
+
+ <para>The number of attributes specified and the sequence of the <literal moreinfo="none">sql-type</literal>'s
+ is important. Meaning that <property moreinfo="none">Hibernate</property> will search for the most specific
+ first, and if no specific match is found it will seek from top to bottom when trying to
+ resolve a type mapping.</para>
+
+ <section>
+ <title>Example</title>
+
+ <para>The following is an example of a type-mapping which shows the flexibility and the
+ importance of ordering of the type mappings.</para>
+
+ <programlisting format="linespecific" role="XML"><type-mapping>
+ <sql-type jdbc-type="NUMERIC" precision="15" hibernate-type="big_decimal"/>
+ <sql-type jdbc-type="NUMERIC" not-null="true" hibernate-type="long" />
+ <sql-type jdbc-type="NUMERIC" not-null="false" hibernate-type="java.lang.Long" />
+ <sql-type jdbc-type="VARCHAR" length="1" not-null="true"
+ hibernate-type="java.lang.Character"/>
+ <sql-type jdbc-type="VARCHAR" hibernate-type="your.package.TrimStringUserType"/>
+ <sql-type jdbc-type="VARCHAR" length="1" hibernate-type="char"/>
+ <sql-type jdbc-type="VARCHAR" hibernate-type="string"/>
+</type-mapping></programlisting>
+
+ <para>The following table shows how this affects an example table named <emphasis>
+ <property moreinfo="none">CUSTOMER</property>:</emphasis></para>
+
+ <table frame="topbot">
+ <title>sql-type examples</title>
+
+ <tgroup cols="7">
+ <colspec colwidth="0.4*"></colspec>
+
+ <colspec colwidth="0.4*"></colspec>
+
+ <colspec colwidth="0.2*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="0.2*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.7*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Column</entry>
+
+ <entry>jdbc-type</entry>
+
+ <entry>length</entry>
+
+ <entry>precision</entry>
+
+ <entry>not-null</entry>
+
+ <entry>Resulting hibernate-type</entry>
+
+ <entry>Rationale</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>ID</entry>
+
+ <entry>INTEGER</entry>
+
+ <entry></entry>
+
+ <entry>10</entry>
+
+ <entry>true</entry>
+
+ <entry>int</entry>
+
+ <entry>Nothing is defined for INTEGER. Falling back to default behavior.</entry>
+ </row>
+
+ <row>
+ <entry>NAME</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>30</entry>
+
+ <entry></entry>
+
+ <entry>false</entry>
+
+ <entry>your.package.TrimStringUserType</entry>
+
+ <entry>No type-mapping matches length=30 and not-null=false, but type-mapping
+ matches the 2 mappings which only specifies VARCHAR. The type-mapping that comes
+ first is chosen.</entry>
+ </row>
+
+ <row>
+ <entry>INITIAL</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>1</entry>
+
+ <entry></entry>
+
+ <entry>false</entry>
+
+ <entry>char</entry>
+
+ <entry>Even though there is a generic match for VARCHAR, the more specific
+ type-mapping for VARCHAR with not-null="false" is chosen. The first VARCHAR
+ sql-type matches in length but has no value for not-null and thus is not
+ considered.</entry>
+ </row>
+
+ <row>
+ <entry>CODE</entry>
+
+ <entry>VARCHAR</entry>
+
+ <entry>1</entry>
+
+ <entry></entry>
+
+ <entry>true</entry>
+
+ <entry>java.lang.Character</entry>
+
+ <entry>The most specific VARCHAR with not-null="true" is selected</entry>
+ </row>
+
+ <row>
+ <entry>SALARY</entry>
+
+ <entry>NUMERIC</entry>
+
+ <entry></entry>
+
+ <entry>15</entry>
+
+ <entry>false</entry>
+
+ <entry>big_decimal</entry>
+
+ <entry>There is a precise match for NUMERIC with precision 15</entry>
+ </row>
+
+ <row>
+ <entry>AGE</entry>
+
+ <entry>NUMERIC</entry>
+
+ <entry></entry>
+
+ <entry>3</entry>
+
+ <entry>false</entry>
+
+ <entry>java.lang.Long</entry>
+
+ <entry>type-mapping for NUMERIC with not-null="false"</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para></para>
+ </section>
+ </section>
+
+ <section>
+ <title>Table filters (<table-filter>)</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><table-filter></property>
+ </emphasis> let you specify matching rules for performing general filtering/setup for
+ tables, e.g. let you include or exclude specific tables based on the schema or even a
+ specific prefix.</para>
+
+ <programlisting format="linespecific" role="XML"><table-filter
+ match-catalog="catalog_matching_rule"
+ match-schema="schema_matching_rule"
+ match-name="table_matching_rule"
+ exclude="true|false"
+ package="package.name"
+/></programlisting>
+
+ <table frame="topbot">
+ <title>Table-filter attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Default value</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>match-catalog</para></entry>
+
+ <entry><para>Pattern for matching catalog part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>match-schema</para></entry>
+
+ <entry><para>Pattern for matching schema part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>match-table</para></entry>
+
+ <entry><para>Pattern for matching table part of the table</para></entry>
+
+ <entry><para>.*</para></entry>
+ </row>
+
+ <row>
+ <entry><para>exclude </para></entry>
+
+ <entry><para>If true the table will not be part of the reverse
+ engineering</para></entry>
+
+ <entry><para>false</para></entry>
+ </row>
+
+ <row>
+ <entry><para>package</para></entry>
+
+ <entry><para>The default package name to use for classes based on tables
+ matched by this table-filter</para></entry>
+
+ <entry><para>""</para></entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section id="tab_and_col">
+ <title>Specific table configuration (<table>)</title>
+
+ <para><emphasis>
+ <property moreinfo="none"><table></property>
+ </emphasis> allows you to provide explicit configuration on how a table should be reverse
+ engineered. Amongst other things it allows controlling over the naming of a class for the
+ table, specifying which identifier generator should be used for the primary key etc.</para>
+
+ <programlisting format="linespecific" role="XML"><table
+ catalog="catalog_name"
+ schema="schema_name"
+ name="table_name"
+ class="ClassName"
+>
+ <primary-key.../>
+ <column.../>
+ <foreign-key.../>
+ </table></programlisting>
+
+ <table frame="topbot">
+ <title>Table attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>catalog</para></entry>
+
+ <entry><para>Catalog name for a table. It has to be specified if you are
+ reverse engineering multiple catalogs or if it is not equal to
+ hiberante.default_catalog.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>schema</para></entry>
+
+ <entry><para>Schema name for a table. It has to be specified if you are
+ reverse engineering multiple schemas or if it is not equal to
+ hiberante.default_schema.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>name</para></entry>
+
+ <entry><para>Name for a table.</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>class</para></entry>
+
+ <entry><para>The class name for a table. Default name is a camelcase version
+ of the table name.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ <section>
+ <title><primary-key></title>
+
+ <para>A <emphasis>
+ <property moreinfo="none"><primary-key></property>
+ </emphasis> allows you to define a primary-key for tables that don't have it
+ defined in the database, and probably more importantly it allows you to define which
+ identifier strategy should be used (even for already existing primary-key's).</para>
+
+ <programlisting format="linespecific" role="XML"><primary-key
+ <generator class="generatorname">
+ <param name="param_name">parameter value</param>
+ </generator>
+ <key-column...>
+ </primary-key></programlisting>
+
+ <table frame="topbot">
+ <title>Primary-key attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>generator/class</para></entry>
+
+ <entry><para>Defines which identifier generator should be used.
+ The class name is any hibernate short hand name or fully qualified class name for an
+ identifier strategy.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>generator/param</para></entry>
+
+ <entry><para>Allows to specify which parameter with a name and
+ value should be passed to the identifier generator.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>key-column</para></entry>
+
+ <entry><para>Specifies which column(s ) the primary-key consists of. A
+ key-column is same as column, but does not have the exclude property.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title><column></title>
+
+ <para>With a <emphasis>
+ <property moreinfo="none"><column></property>
+ </emphasis> it is possible to explicitly name the resulting property for a column. It is
+ also possible to redefine what jdbc and/or Hibernate type a column should be processed as
+ and finally it is possible to completely exclude a column from processing.</para>
+
+ <programlisting format="linespecific" role="XML"><column
+ name="column_name"
+ jdbc-type="java.sql.Types type"
+ type="hibernate_type"
+ property="propertyName"
+ exclude="true|false"
+/></programlisting>
+
+ <table frame="topbot">
+ <title>Column attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>name</para></entry>
+
+ <entry><para>Column name</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>jdbc-type</para></entry>
+
+ <entry><para>Which jdbc-type this column should be processed as. A
+ value from java.sql.Types, either numerical (93) or the constant name
+ (TIMESTAMP).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>type</para></entry>
+
+ <entry><para>Which hibernate-type to use for this specific column</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+
+ <row>
+ <entry><para>property</para></entry>
+
+ <entry><para>What property name will be generated for this
+ column</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>exclude</para></entry>
+
+ <entry><para>Set to true if this column should be ignored</para></entry>
+
+ <entry><para>default: false</para></entry>
+ </row>
+
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+
+ <section>
+ <title><foreign-key></title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><foreign-key></property>
+ </emphasis> has two purposes. One for allowing to define foreign-keys in databases that
+ does not support them or does not have them defined in their schema. Secondly, to allow
+ defining the name of the resulting properties <diffmk:wrapper diffmk:change="added">(many-to-one, one-to-one</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">(many-to-one </diffmk:wrapper>and one-to-many's).</para>
+
+ <programlisting format="linespecific" role="XML"><foreign-key
+ constraint-name="foreignKeyName"
+ foreign-catalog="catalogName"
+ foreign-schema="schemaName"
+ foreign-table="tableName"
+ >
+ <column-ref local-column="columnName" foreign-column="foreignColumnName"/>
+ <many-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ <set
+ property="aCollectionName"
+ <diffmk:wrapper diffmk:change="added">exclude="true|false"
+
+ <one-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ <inverse-one-to-one
+ property="aPropertyName"
+ </diffmk:wrapper>exclude="true|false"/>
+ </foreign-key></programlisting>
+ <table frame="topbot">
+ <title>Foreign-key attributes</title>
+
+ <tgroup cols="3">
+
+ <colspec colwidth="0.3*"></colspec>
+
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="0.3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry>Attribute name</entry>
+
+ <entry>Definition</entry>
+
+ <entry>Attribute use</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry><para>constraint-name</para></entry>
+
+ <entry><para>Name of the foreign key constraint. Important when
+ naming <diffmk:wrapper diffmk:change="changed">many-to-one, </diffmk:wrapper><diffmk:wrapper diffmk:change="added">one-to-one </diffmk:wrapper>and set. It is the constraint-name that is used to link the
+ processed foreign-keys with the resulting property names.</para></entry>
+
+ <entry><para>Required</para></entry>
+ </row>
+
+ <row>
+ <entry><para>foreign-catalog</para></entry>
+
+ <entry><para>Name of the foreign table's catalog. (Only
+ relevant if you want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>foreign-schema</para></entry>
+
+ <entry><para>Name of the foreign table's schema. (Only relevant
+ if you want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+
+ <row>
+ <entry><para>foreign-table</para></entry>
+
+ <entry><para>Name of the foreign table. (Only relevant if you
+ want to explicitly define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>column-ref </para></entry>
+
+ <entry><para>Defines that the foreign-key constraint between a
+ local-column and foreign-column name. (Only relevant if you want to explicitly
+ define a foreign key).</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>many-to-one</para></entry>
+
+ <entry><para>Defines that a many-to-one should be created and the
+ property attribute specifies the name of the resulting property. Exclude can be
+ used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>set</para></entry>
+
+ <entry><para>Defines that a set should be created based on this foreign-key
+ and the property attribute specifies the name of the resulting (set) property.
+ Exclude can be used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">one-to-one</diffmk:wrapper></para></entry>
+
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Defines that a one-to-one should be created and the
+ property attribute specifies the name of the resulting property. Exclude can be
+ used to explicitly define that it should be created or not.</diffmk:wrapper></para></entry>
+
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Optional</diffmk:wrapper></para></entry>
+ </row>
+
+ <row diffmk:change="added">
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">inverse-one-to-one</diffmk:wrapper></para></entry>
+
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Defines that an inverse one-to-one should be created based on this foreign-key
+ and the property attribute specifies the name of the resulting property.
+ Exclude can be used to explicitly define that it should be created or not.</diffmk:wrapper></para></entry>
+
+ <entry diffmk:change="added"><para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Optional</diffmk:wrapper></para></entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+
+ </section>
+ </section>
+ </section>
+
+ <section id="custom-reveng-strategy">
+ <title>Custom strategy</title>
+
+ <para>It is possible to implement a user strategy. Such strategy must implement <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.ReverseEngineeringStrategy</property>.
+ </emphasis> It is recommended that one uses the
+ <property moreinfo="none">DelegatingReverseEngineeringStrategy</property> and provide a public constructor
+ which takes another <property moreinfo="none">ReverseEngineeringStrategy </property> as an argument. This will
+ allow you to only implement the relevant methods and provide a fallback strategy. Example of
+ custom delegating strategy which converts all column names that ends with <emphasis>
+ <property moreinfo="none">"PK"</property>
+ </emphasis> into a property named <emphasis>
+ <property moreinfo="none">"id"</property>.
+ </emphasis></para>
+
+ <programlisting format="linespecific" role="JAVA">public class ExampleStrategy extends DelegatingReverseEngineeringStrategy {
+
+ public ExampleStrategy(ReverseEngineeringStrategy delegate) {
+ super(delegate);
+ }
+
+ public String columnToPropertyName(TableIdentifier table, String column) {
+ if(column.endsWith("PK")) {
+ return "id";
+ } else {
+ return super.columnToPropertyName(table, column);
+ }
+ }
+}</programlisting>
+ </section>
+
+ <section>
+ <title>Custom Database Metadata</title>
+
+ <para>By default the reverse engineering is performed by reading using the JDBC database
+ metadata API. This is done via the class <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect</property>
+ </emphasis> which is an implementation of <emphasis>
+ <property moreinfo="none">org.hibernate.cfg.reveng.dialect.MetaDataDialect</property>.
+ </emphasis></para>
+
+ <para>The default implementation can be replaced with an alternative implementation by setting
+ the property <emphasis>
+ <property moreinfo="none">hibernatetool.metadatadialect</property>
+ </emphasis> to a fully qualified classname for a class that implements
+ <property moreinfo="none">JDBCMetaDataDialect</property>.</para>
+
+ <para>This can be used to provide database specific optimized metadata reading. If you create an
+ optimized/better metadata reading for your database it will be a very welcome
+ contribution.</para>
+ </section>
+</chapter>
+
+
+<chapter id="codegen" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/hibernatetools/docs/reference/en/modules/codegen.xml">
+ <title>Controlling POJO code generation</title>
+
+ <para>When using <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> or the eclipse plugin to generate POJO java code you have the possibility to control
+ certain aspects of the code generation. This is primarily done with the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag in the mapping files. The following section describes the possible <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tags and their use.</para>
+
+ <section>
+ <title>The <literal moreinfo="none"><meta></literal> attribute</title>
+
+ <para>The <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag is a simple way of annotating the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> with information, so tools have a natural place to store/read information that is
+ not directly related to the Hibernate core.</para>
+
+ <para>You can use the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag to e.g. tell <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> to only generate <emphasis>
+ <property moreinfo="none">"protected"</property>
+ </emphasis> setters, have classes always implement a certain set of interfaces or even have
+ them extend a certain base class and even more.</para>
+
+ <para>The following example shows how to use various <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes and the resulting java code.</para>
+
+ <programlisting format="linespecific" role="XML"><class name="Person">
+ <meta attribute="class-description">
+ Javadoc for the Person class
+ @author Frodo
+ </meta>
+ <meta attribute="implements">IAuditable</meta>
+ <id name="id" type="long">
+ <meta attribute="scope-set">protected</meta>
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string">
+ <meta attribute="field-description">The name of the person</meta>
+ </property>
+</class></programlisting>
+
+ <para>The above <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> will produce something like the following (code shortened for better
+ understanding). Notice the Javadoc comment and the protected set methods:</para>
+
+ <programlisting format="linespecific" role="JAVA">// default package
+
+import java.io.Serializable;
+import org.apache.commons.lang.builder.EqualsBuilder;
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.commons.lang.builder.ToStringBuilder;
+
+/**
+ * Javadoc for the Person class
+ * @author Frodo
+ */
+public class Person implements Serializable, IAuditable {
+
+ public Long id;
+
+ public String name;
+
+ public Person(java.lang.String name) {
+ this.name = name;
+ }
+
+ public Person() {
+ }
+
+ public java.lang.Long getId() {
+ return this.id;
+ }
+
+ protected void setId(java.lang.Long id) {
+ this.id = id;
+ }
+
+ /**
+ * The name of the person
+ */
+ public java.lang.String getName() {
+ return this.name;
+ }
+
+ public void setName(java.lang.String name) {
+ this.name = name;
+ }
+
+}</programlisting>
+
+ <table frame="topbot">
+ <title>Supported meta tags</title>
+
+ <tgroup cols="2">
+ <colspec colwidth="1.0*"></colspec>
+
+ <colspec colwidth="2*"></colspec>
+
+ <thead>
+ <row>
+ <entry>Attribute</entry>
+
+ <entry>Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <literal moreinfo="none">class-description</literal>
+ </entry>
+
+ <entry>inserted into the javadoc for classes</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">field-description</literal>
+ </entry>
+
+ <entry>inserted into the javadoc for fields/properties</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">interface</literal>
+ </entry>
+
+ <entry>If true, an interface is generated instead of an class.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">implements</literal>
+ </entry>
+
+ <entry>interface the class should implement</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">extends</literal>
+ </entry>
+
+ <entry>class that the current class should extend (ignored for subclasses)</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">generated-class</literal>
+ </entry>
+
+ <entry>overrule the name of the actual class generated</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-class</literal>
+ </entry>
+
+ <entry>scope for class</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-set</literal>
+ </entry>
+
+ <entry>scope for setter method</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-get</literal>
+ </entry>
+
+ <entry>scope for getter method</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">scope-field</literal>
+ </entry>
+
+ <entry>scope for actual field</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">default-value</literal>
+ </entry>
+
+ <entry>default initialization value for a field</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">use-in-tostring</literal>
+ </entry>
+
+ <entry>include this property in the <literal moreinfo="none">toString()</literal></entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">use-in-equals</literal>
+ </entry>
+
+ <entry>include this property in the <literal moreinfo="none">equals()</literal> and
+ <literal moreinfo="none">hashCode()</literal> method. If no use-in-equals is specified, no
+ equals/hashcode will be generated.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">gen-property</literal>
+ </entry>
+
+ <entry>property will not be generated if false (use with care)</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">property-type</literal>
+ </entry>
+
+ <entry>Overrides the default type of property. Use this with any tag's to specify the
+ concrete type instead of just Object.</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">class-code</literal>
+ </entry>
+
+ <entry>Extra code that will inserted at the end of the class</entry>
+ </row>
+
+ <row>
+ <entry>
+ <literal moreinfo="none">extra-import</literal>
+ </entry>
+
+ <entry>Extra import that will inserted at the end of all other imports</entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Attributes declared via the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag are per default <emphasis>
+ <property moreinfo="none">"inherited"</property>
+ </emphasis> inside an <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file.</para>
+
+ <para>What does that mean? It means that if you e.g want to have all your classes implement
+ <literal moreinfo="none">IAuditable</literal> then you just add an <emphasis> <meta
+ attribute="implements">IAuditable</meta></emphasis> in the top of the <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file, just after <emphasis>
+ <property moreinfo="none"><hibernate-mapping></property>. </emphasis> Now all classes defined
+ in that <emphasis>
+ <property moreinfo="none">hbm.xml</property>
+ </emphasis> file will implement <literal moreinfo="none">IAuditable</literal>!</para>
+
+ <note>
+ <title>Note:</title>
+ <para>This applies to <emphasis>all</emphasis>
+ <literal moreinfo="none"><meta></literal>-tags. Thus it can also e.g. be used to specify that
+ all fields should be declare protected, instead of the default private. This is done by
+ adding <literal moreinfo="none"><meta
+ attribute="scope-field">protected</meta></literal> at e.g. just under
+ the <literal moreinfo="none"><class></literal> tag and all fields of that class will be
+ protected.</para>
+ </note>
+
+ <para>To avoid having a <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> tag inherited then you can simply specify <emphasis> inherit = "false"</emphasis>
+ for the attribute, e.g. <emphasis> <meta attribute = "scope-class" inherit =
+ "false">public abstract</meta></emphasis> will restrict the <emphasis>
+ <property moreinfo="none">"class-scope"</property>
+ </emphasis> to the current class, not the subclasses.</para>
+
+ <section>
+ <title>Recommendations</title>
+
+ <para>The following are some good practices when using <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes.</para>
+
+ <section>
+ <title>Dangers of a class level <literal moreinfo="none">use-in-string and use-in-equals</literal> meta
+ attributes when having bi-directional associations</title>
+
+ <para>If we have two entities with a bi-directional association between them and define at
+ class scope level the meta attributes: <emphasis>
+ <property moreinfo="none">use-in-string</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">use-in-equals</property>: </emphasis></para>
+
+ <programlisting format="linespecific" role="XML"><hibernate-mapping>
+ <class name="Person">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ ...
+ </class>
+</hibernate-mapping></programlisting>
+
+ <para>And for <emphasis>
+ <property moreinfo="none">Event.hbm</property>
+ </emphasis> file:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernate-mapping>
+ <class name="events.Event" table="EVENTS">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ <id name="id" column="EVENT_ID">
+ <generator class="native"/>
+ </id>
+ <property name="date" type="timestamp" column="EVENT_DATE"/>
+ <property name="title"/>
+ <set name="participants" table="PERSON_EVENT" inverse="true">
+ <key column="EVENT_ID"/>
+ <many-to-many column="PERSON_ID" class="events.Person"/>
+ </set>
+ </class>
+</hibernate-mapping></programlisting>
+
+ <para>Then <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> will assume you want to include all properties and collections in the
+ <property moreinfo="none">toString()/equals()</property> methods and this can result in infinite
+ recursive calls.</para>
+
+ <para>To remedy this you have to decide which side of the association will include the other
+ part (if at all) in the <property moreinfo="none">toString()/equals()</property> methods. Therefore it is
+ not a good practice to put at class scope such <emphasis>
+ <property moreinfo="none">meta</property>
+ </emphasis> attributes, unless you are defining a class without bi-directional
+ associations.</para>
+
+ <para>We recomend instead to add the <emphasis>
+ <property moreinfo="none">meta</property>
+ </emphasis> attributes at the property level:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernate-mapping>
+ <class name="events.Event" table="EVENTS">
+ <id name="id" column="EVENT_ID">
+ <meta attribute="use-in-tostring">true</meta>
+ <generator class="native"/>
+ </id>
+ <property name="date" type="timestamp" column="EVENT_DATE"/>
+ <property name="title">
+ <meta attribute="use-in-tostring">true</meta>
+ <meta attribute="use-in-equals">true</meta>
+ </property>
+ <set name="participants" table="PERSON_EVENT" inverse="true">
+ <key column="EVENT_ID"/>
+ <many-to-many column="PERSON_ID" class="events.Person"/>
+ </set>
+ </class>
+</hibernate-mapping></programlisting>
+
+ <para>and now for <property moreinfo="none">Person</property>:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernate-mapping>
+ <class name="Person">
+ <meta attribute="class-description">
+ Javadoc for the Person class
+ @author Frodo
+ </meta>
+ <meta attribute="implements">IAuditable</meta>
+ <id name="id" type="long">
+ <meta attribute="scope-set">protected</meta>
+ <meta attribute="use-in-tostring">true</meta>
+ <generator class="increment"/>
+ </id>
+ <property name="name" type="string">
+ <meta attribute="field-description">The name of the person</meta>
+ <meta attribute="use-in-tostring">true</meta>
+ </property>
+ </class>
+</hibernate-mapping></programlisting>
+ </section>
+
+ <section>
+ <title>Be aware of putting at class scope level <literal moreinfo="none"><meta></literal>
+ attribute <literal moreinfo="none">use-in-equals</literal></title>
+
+ <para>For <property moreinfo="none">equal()/hashCode()</property> method generation, you have to take into
+ account that the attributes that participate on such method definition, should take into
+ account only attributes with business meaning (the name, social security number, etc, but
+ no generated id's, for example).</para>
+
+ <para>This is important because Java's hashbased collections, such as
+ <property moreinfo="none">java.util.Set</property> relies on <property moreinfo="none">equals()</property> and
+ <property moreinfo="none">hashcode()</property> to be correct and not change for objects in the set;
+ this can be a problem if the id gets assigned for an object after you inserted it into a
+ set.</para>
+
+ <para>Therefore automatically configuration of the generation of
+ <property moreinfo="none">equals()/hashCode()</property> methods specifying at class scope level the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attribute <emphasis>
+ <property moreinfo="none">use-in-equals</property>
+ </emphasis> could be a dangerous decision that could produce non expected side-effect.</para>
+
+ <para><ulink url="http://www.hibernate.org/109.html">Here</ulink> you can get more in-depth
+ explanation on the subject of <property moreinfo="none">equals()</property> and
+ <property moreinfo="none">hashcode()</property>.</para>
+ </section>
+ </section>
+
+ <section>
+ <title>Advanced <meta> attribute examples</title>
+
+ <para>This section shows an example for using meta attributes (including userspecific
+ attributes) together with the code generation features in <property moreinfo="none">Hibernate
+ Tools</property>.</para>
+
+ <para>The usecase being implemented is to automatically insert some pre- and post-conditions
+ into the getter and setters of the generated POJO. </para>
+
+ <section>
+ <title>Generate pre/post-conditions for methods</title>
+
+ <para>With a <emphasis> <meta attribute="class-code"></emphasis>, you can add
+ additional methods on a given class, nevertheless such <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attribute can not be used at a property scope level and <property moreinfo="none">Hibernate
+ Tools</property> does not provide such <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes.</para>
+
+ <para>A possible solution for this is to modify the freemarker templates responsible for
+ generating the POJO's. If you look inside <emphasis>
+ <property moreinfo="none">hibernate-tools.jar</property>, </emphasis> you can find the template: <emphasis>
+ <property moreinfo="none">pojo/PojoPropertyAccessor.ftl</property>
+ </emphasis></para>
+
+ <para>This file is as the name indicates used to generate property accessors for pojo's.</para>
+
+ <para>Extract the <emphasis>
+ <property moreinfo="none">PojoPropertyAccessor.ftl</property>
+ </emphasis> into a local folder i.e. <emphasis>
+ <property moreinfo="none">${hbm.template.path}</property>, </emphasis> respecting the whole path, for
+ example: <emphasis>
+ <property moreinfo="none">${hbm.template.path}/pojo/PojoPropertyAccessor.ftl</property>
+ </emphasis></para>
+
+ <para>The contents of the file is something like this:</para>
+
+ <programlisting format="linespecific" role="XML"><#foreach property in pojo.getAllPropertiesIterator()>
+ ${pojo.getPropertyGetModifiers(property)}
+ ${pojo.getJavaTypeName(property, jdk5)}
+ ${pojo.getGetterSignature(property)}() {
+ return this.${property.name};
+ }
+
+ ${pojo.getPropertySetModifiers(property)} void set${pojo.getPropertyName(property)}
+ (${pojo.getJavaTypeName(property, jdk5)} ${property.name})
+ {
+ this.${property.name} = ${property.name};
+ }
+</#foreach></programlisting>
+
+ <para>We can add conditionally pre/post-conditions on our <literal moreinfo="none">set</literal> method
+ generation just adding a little Freemarker syntax to the above source code:</para>
+
+ <programlisting format="linespecific" role="XML"><#foreach property in pojo.getAllPropertiesIterator()>
+ ${pojo.getPropertyGetModifiers(property)}
+ ${pojo.getJavaTypeName(property, jdk5)}
+ ${pojo.getGetterSignature(property)}()
+ {
+ return this.${property.name};
+ }
+
+ ${pojo.getPropertySetModifiers(property)} void set${pojo.getPropertyName(property)}
+ (${pojo.getJavaTypeName(property, jdk5)} ${property.name})
+ {
+ <#if pojo.hasMetaAttribute(property, "pre-cond")>
+ ${c2j.getMetaAsString(property, "pre-cond","\n")}
+ </#if>
+ this.${property.name} = ${property.name};
+ <#if pojo.hasMetaAttribute(property, "post-cond")>
+ ${c2j.getMetaAsString(property, "post-cond","\n")}
+ </#if>
+}
+</#foreach>
+</programlisting>
+
+ <para>Now if in any <emphasis>
+ <property moreinfo="none">.hbm.xml</property>
+ </emphasis> file we define the <emphasis>
+ <property moreinfo="none"><meta></property>
+ </emphasis> attributes: <literal moreinfo="none">pre-cond</literal> or <literal moreinfo="none">post-cond</literal>, their
+ contents will be generated into the body of the relevant <literal moreinfo="none">set</literal> method.</para>
+
+ <para>As an example let us add a pre-condition for property <literal moreinfo="none">name</literal>
+ preventing no <property moreinfo="none">Person</property> can have an empty name. Hence we have to modify the <emphasis>
+ <property moreinfo="none">Person.hbm.xml</property>
+ </emphasis> file like this:</para>
+
+ <programlisting format="linespecific" role="XML"><hibernate-mapping>
+ <class name="Person">
+ <id name="id" type="long">
+ <generator class="increment"/>
+ </id>
+ <property name="firstName" type="string">
+ <meta attribute="pre-cond">
+ if ((firstName != null) &amp;&amp; (firstName.length() == 0) ) {
+ throw new IllegalArgumentException("firstName can not be an empty String");
+ }
+ </meta>
+ </property>
+</class>
+</hibernate-mapping></programlisting>
+
+ <note>
+ <title>Note:</title>
+ <para>I) To escape the & symbol we put &amp;. You can use
+ <![CDATA[]]> instead.</para>
+ <para>II) Note that we are referring to "firstName" directly and this is the parameter
+ name not the actual field name. If you want to refer the field you have to use
+ "this.firstName" instead. </para>
+ </note>
+
+ <para>Finally we have to generate the <emphasis>
+ <property moreinfo="none">Person.java</property>
+ </emphasis> class, for this we can use both Eclipse and Ant as long as you remember to set
+ or fill in the templatepath setting. For Ant we configure <emphasis>
+ <property moreinfo="none"><hibernatetool></property>
+ </emphasis> task via <literal moreinfo="none">the templatepath</literal> attribute as in:</para>
+
+ <programlisting format="linespecific" role="XML">
+ <target name="hbm2java">
+ <taskdef name="hibernatetool"
+ classname="org.hibernate.tool.ant.HibernateToolTask"
+ classpathref="lib.classpath"/>
+ <hibernatetool destdir="${hbm2java.dest.dir}"
+ templatepath="${hbm.template.path}">
+ <classpath>
+ <path refid="pojo.classpath"/>
+ </classpath>
+ <configuration>
+ <fileset dir="${hbm2java.src.dir}">
+ <include name="**/*.hbm.xml"/>
+ </fileset>
+ </configuration>
+ <hbm2java/>
+ </hibernatetool>
+ </target></programlisting>
+
+ <para>Invoking the target <emphasis>
+ <property moreinfo="none"><hbm2java></property>
+ </emphasis> will generate on the <emphasis>
+ <property moreinfo="none">${hbm2java.dest.dir}</property>
+ </emphasis> the file <emphasis>
+ <property moreinfo="none">Person.java</property>
+ </emphasis>:</para>
+
+ <programlisting format="linespecific" role="JAVA">// default package
+import java.io.Serializable;
+public class Person implements Serializable {
+
+ public Long id;
+
+ public String name;
+
+ public Person(java.lang.String name) {
+ this.name = name;
+ }
+
+ public Person() {
+ }
+
+ public java.lang.Long getId() {
+ return this.id;
+ }
+
+ public void setId(java.lang.Long id) {
+ this.id = id;
+ }
+
+ public java.lang.String getName() {
+ return this.name;
+ }
+
+ public void setName(java.lang.String name) {
+ if ((name != null) &amp;&amp; (name.length() == 0)) {
+ throw new IllegalArgumentException("name can not be an empty String");
+ }
+ this.name = name;
+ }
+ }</programlisting>
+
+
+
+
+
+
+ <para>To find additional information about <property moreinfo="none">Hibernate Tools</property> we suggest that you
+ visit our <ulink url="http://www.hibernate.org/255.html">website</ulink>. If you have questions, you are always welcome in our
+ <ulink url="http://forum.hibernate.org/viewforum.php?f=6">forum</ulink>.</para>
+ </section>
+ </section>
+
+ </section>
+
+</chapter>
+
+
+
+
+ </book>
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/pom.xml 2008-10-29 16:17:50 UTC (rev 11301)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/docs/reference/pom.xml 2008-10-29 16:24:29 UTC (rev 11302)
@@ -32,7 +32,7 @@
</dependency>
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11301 - in branches/jbosstools-3.0.0.Beta1: as/docs/reference/en and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-29 12:17:50 -0400 (Wed, 29 Oct 2008)
New Revision: 11301
Added:
branches/jbosstools-3.0.0.Beta1/as/docs/reference/en/master_output.xml
branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/en/master_output.xml
Modified:
branches/jbosstools-3.0.0.Beta1/as/docs/reference/pom.xml
branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463
markers for new and updated are added
Added: branches/jbosstools-3.0.0.Beta1/as/docs/reference/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/docs/reference/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/as/docs/reference/en/master_output.xml 2008-10-29 16:17:50 UTC (rev 11301)
@@ -0,0 +1,1763 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY quick_start SYSTEM "modules/quick_start.xml">
+<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
+<!ENTITY perspective SYSTEM "modules/perspective.xml">
+<!ENTITY webtools SYSTEM "modules/webtools.xml">
+<!ENTITY modules SYSTEM "modules/modules.xml">
+<!ENTITY tptp_support SYSTEM "modules/tptp_support.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+
+ <bookinfo>
+ <title>JBoss Server Manager Reference Guide</title>
+
+ <author><firstname>Anatoly</firstname><surname>Fedosik</surname></author>
+ <author><firstname>Olga</firstname><surname>Chikvina</surname></author>
+ <author><firstname>Rob</firstname><surname>Stryker</surname><email>rob.stryker(a)jboss.com</email></author>
+ <author><firstname>Svetlana</firstname><surname>Mukhina</surname><email>smukhina(a)exadel.com</email></author>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo>
+ Version: <diffmk:wrapper diffmk:change="changed">3.0.0.beta1
+ </diffmk:wrapper></releaseinfo>
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/as/pdf/AS_Reference_..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+ </bookinfo>
+
+
+ <toc></toc>
+
+<chapter id="quick_start" revisionflag="added" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/quick_start.xml">
+ <title>Quick Start with JBoss Server</title>
+
+ <para>This chapter covers the basics of working with the JBoss server. If you already have
+ installed JBoss server and runtime you can quickly learn how to configure, start, stop the
+ server, to know deployment and archiving processes. How to install runtimes and servers read in
+ the <link linkend="runtimes_servers">Runtimes and Servers in the JBoss AS plugin</link> chapter.</para>
+
+ <para>To start working with JBoss AS, select a <property moreinfo="none">JBoss AS Perspective</property> via
+ <emphasis><property moreinfo="none">Window > Open Perspective > Other > JBoss AS</property>.</emphasis></para>
+
+ <section id="starting">
+ <title>Starting JBoss server</title>
+
+ <para>Starting JBoss server is quite simple. You can control the server behaviour with the help
+ of a special toolbar in the <property moreinfo="none">JBoss Server View</property> where you could
+ <property moreinfo="none">start</property> it in a regular or debug mode, <property moreinfo="none">stop</property> it or
+ <property moreinfo="none">restart</property> it, <property moreinfo="none">publish</property> to the server.</para>
+
+ <figure float="0">
+ <title>JBoss Server Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To launch the server click the green-with-white-arrow icon on the <property moreinfo="none">JBoss Server
+ View </property>or right click server name in this view and select <emphasis>
+ <property moreinfo="none">Start</property>
+ </emphasis>. If this view is not open, select <emphasis><property moreinfo="none">Window > Show View
+ > Other > Server > JBoss Server View</property>.</emphasis></para>
+
+ <figure float="0">
+ <title>Start JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ <section id="stopping">
+ <title>Stopping JBoss Server</title>
+
+ <para>To stop the server, click the <property moreinfo="none">Stop</property> icon in JBoss Server View or right
+ click the server name and press <property moreinfo="none">Stop</property>.</para>
+
+ <figure float="0">
+ <title>Stop JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>When the server is stopped you will see <property moreinfo="none">Stopped</property> next to its name in
+ the State column.</para>
+ <para>Learn more about the JBoss Server View <link linkend="JBossServerView">here</link>.</para>
+ </section>
+
+ <section id="archiving">
+
+ <title>Project Archiving</title>
+
+ <para>JBoss Tools comes with our own archives tool. The Project Archives plugin consists
+ primarily of a view to set up each packaging configuration (<emphasis>
+ <property moreinfo="none">Window > Show View > Other > JBoss Tools > Project archives</property>
+ </emphasis>).</para>
+ <para>Right clicking in the <property moreinfo="none">Project Archives View</property> you can create War, EJB
+ War or EAR archive.</para>
+
+ <figure float="0">
+ <title>Archive Creating</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Using the context menu on the item you can initiate a full <property moreinfo="none">build</property> on
+ archive, <property moreinfo="none">edit</property>, <property moreinfo="none">delete</property> or
+ <property moreinfo="none">publish</property> it.</para>
+
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Learn more about the <property moreinfo="none">Project Archives View</property>
+ <link linkend="Project_archivesView">here</link>.</para>
+
+ </section>
+ <section id="deployment">
+ <title>Deploying an Application to a Server</title>
+
+ <para>There are two times to deploy your application:</para>
+ <itemizedlist>
+ <listitem>
+ <para>While creating it</para>
+ </listitem>
+ <listitem>
+ <para>After it already exists</para>
+ </listitem>
+ </itemizedlist>
+
+ <para>When you create a new project (Seam, JSF or Struts) with the New Project or Import Project
+ wizards, the one of wizards steps has a <emphasis>
+ <property moreinfo="none">Target Runtime</property>
+ </emphasis> and <emphasis>
+ <property moreinfo="none">Target Server</property>
+ </emphasis> sections. You can deploy the application through the appropriate selection in
+ these sections.</para>
+
+ <figure float="0">
+ <title>Runtime and Server Sections in the New Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_4a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Runtime and Server Sections in the Import Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_4b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>You can deploy an existing application to a server by right-clicking the target defined
+ server in the <property moreinfo="none">JBoss Servers View</property> and then selecting <property moreinfo="none">Add and
+ Remove Projects</property> from the context menu.</para>
+
+ <figure float="0">
+ <title>Add and Remove Projects From the Context Menu.</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If this application is not assigned to a server, it will be in the left-hand available
+ projects list. Clicking on the <property moreinfo="none">Add ></property> button will add it to the right-hand
+ configured projects list and deploy the application to this server.</para>
+
+ <figure float="0">
+ <title>Modifying The Projects that are Configured on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/quick_start/quick_start_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here, we have just performed the basic steps you should know to quick start with JBoss
+ server. In fact, there are more functionalities which you can make use of. Further we will talk about them in detail.</para>
+ </section>
+
+
+ <section>
+ <title>Other relevant resources on the topic</title>
+
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools/2.1.0.GA">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="runtimes_servers" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/runtimes_servers.xml" xreflabel="runtimes_servers">
+ <?dbhtml filename="runtimes_servers.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>Runtimes and Servers in the JBoss AS plugin</title>
+
+ <para>In this chapter we will discuss how to install runtimes and servers.</para>
+
+ <para>First of all it's necessary to mention that the JBoss AS plugin makes use of WTP.
+ This includes starting and stopping servers in run or debug mode. It also includes targeting WTP
+ projects, such as Dynamic Web Projects, to certain server runtimes in order to ensure that the
+ proper jars from a specific server are added to the project's classpath properly.</para>
+ <para>In order to get started creating, running, and debugging J2EE applications, we should create
+ our <property moreinfo="none">runtime</property> and <property moreinfo="none">server</property> instances.</para>
+
+ <section>
+ <title>Runtimes</title>
+ <para>In JBoss Tools, the main purpose of Server Runtimes is to point to a server installation
+ somewhere on disk. In our case, this will be a JBoss installation, and it can then be used for
+ two primary purposes:</para>
+ <itemizedlist>
+ <listitem>
+ <para>it provides classpath additions to WTP projects that require them.</para>
+ </listitem>
+ <listitem>
+ <para>for <property moreinfo="none">JBoss server</property> at least, it provides information necessary for
+ the starting and stopping of the server, it tells which jars to run and which
+ configuration to use.</para>
+ </listitem>
+ </itemizedlist>
+
+ <section id="InstNewRuntime">
+ <title>Installing a new Runtime</title>
+ <para>You can install runtimes into eclipse from the <emphasis>
+ <property moreinfo="none">Window > Preferences... </property>
+ </emphasis> menu, and then select <emphasis>
+ <property moreinfo="none">Server > Installed Runtimes</property>
+ </emphasis> from the categories available.</para>
+ <figure float="0">
+ <title>Installed Runtimes</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>From this preference page you can see all declared runtimes and their types as well.
+ Figure above shows two declared runtimes that include a JBoss 4.2 instance. Here,
+ it's possible to edit or remove existing runtimes as well as add a new one.</para>
+
+ <para>To create a JBoss runtime click <emphasis>
+ <property moreinfo="none">Add</property>
+ </emphasis> button and choose a necessary type of runtime from the appeared dialog. </para>
+
+ <figure float="0">
+ <title>Adding a Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As you can see, <property moreinfo="none">JBoss Tools</property> provide its own adapters such as JBoss
+ 3.2, 4.0, 4.2 and 5.0 as well. The last one comes with its own new feature, that is a safer
+ incremental deployment, which prevents partial deployments to be picked up by the server. It
+ means that scanning for auto-deployment is suspended while files are being copied to the
+ deployment location and resumed when the copy is completed.</para>
+
+ <note>
+ <title>Note:</title>
+ <para>Currently we recommend you to use a fully supported JBoss 4.2 server adapter.</para>
+ </note>
+
+ <para>You'll also note a Deploy-Only Runtime type. This type provides no classpath
+ for WTP projects. It is used solely by its server type for the purpose of setting up a
+ deploy directory for users who don't wish to make use of starting, stopping, or
+ debugging their projects inside eclipse.</para>
+
+ <figure float="0" id="add_runtime_figure">
+ <title>Adding a JBoss 4.2 Runtime</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes all the available options of the wizard.</para>
+ <table>
+ <title>Server Runtime Wizard Parameters</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>Name</para>
+ </entry>
+ <entry>
+ <para>The name of a new Runtime for a chosen server. We suggest that you
+ don't leave a default value. It's better to give descriptive
+ names that will help to distinguish one runtime from another.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Home directory</para>
+ </entry>
+ <entry>
+ <para>The path to a directory where the runtime is installed.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>jRE</para>
+ </entry>
+ <entry>
+ <para>The proper Java Runtime Environment. Because of the open-source nature of
+ JBoss, a user is likely to want to modify and repackage some of the
+ configuration-specific jboss jars and create their own configuration. Thus, rather
+ than forcing you to copy his entire JBoss installation, the structure of the
+ wizard allows to create only a new configuration instead.</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Configuration</para>
+ </entry>
+ <entry>
+ <para>The list of configurations (all, default, minimal) that is updated as soon as
+ you browse to a valid runtime installation folder. After the runtime is created
+ the configuration becomes an unchanging property of that runtime. To compile
+ against a different configuration's jars, you will need to create a new runtime
+ from that configuration.</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>As a result of having each runtime represent a specific configuration rather than the
+ server installation as a whole, it is very likely you'll create several different
+ runtimes to test each of your configurations. It becomes important to ensure your runtimes,
+ and later your servers, are given descriptive names that help you remember which is which.</para>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to see your new runtime in the list.</para>
+ </section>
+
+ </section>
+
+ <section>
+ <title>Servers</title>
+ <para>WTP servers are eclipse-representations of a backing server installation. They are used to
+ start or stop servers, deploy to servers, or debug code that will run on the server. They keep
+ track of the modules (jars, wars, etc) you deploy to the server and also allow you to undeploy
+ those modules (see <link linkend="run_on_server_wizard">Deploying with Run On Server
+ Wizard</link> section). </para>
+ <para>Servers can be started or stopped with different <link linkend="com_line_arg">command-line
+ arguments</link>. They are often backed by a runtime object representing that server's
+ location.</para>
+
+ <section revisionflag="changed">
+ <title>Creating a New Server</title>
+
+ <para>There are many ways to get to the new server wizard. One way is to use the old standard <emphasis>
+ <property moreinfo="none">File > New > Other... </property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Server</property>
+ </emphasis>. This should show the wizard like below.</para>
+ <figure float="0">
+ <title>Adding a JBoss Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>A server object is that keeps track of things like command line arguments when starting
+ or stopping, and runtimes keep track of the location of the installation. Thus, each server
+ instance must be backed by an appropriate runtime. </para>
+
+ <para>From the list of already declared runtimes in the combo box below the view it's
+ possible to select which runtime you want your server to be backed by. If there is no
+ runtime that matches your needs just press <emphasis>
+ <property moreinfo="none">Installed Runtimes... </property>
+ </emphasis> to bring up the familiar preference page like in <link linkend="InstNewRuntime">
+ the previous section</link>. Here, it becomes possible to edit already existing runtime or
+ add a new one with necessary configuration.</para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_5a.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>If the server you want to create doesn't have any installed runtime yet, the combo box
+ and button will disappear.</para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_5b.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In this case the next page in the wizard which has the same form as in <link linkend="add_runtime_figure">the previous section</link> will ask you to create the
+ associated runtime.</para>
+ <para>Either way, after targeting your server to a runtime, the final screen in this wizard is
+ largely confirmational, giving you a chance to verify that you've selected the
+ appropriate runtime. It also allows to name the server appropriately. </para>
+
+ <figure float="0">
+ <title>Installed Server Runtime Environments</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Press <emphasis>
+ <property moreinfo="none">Finish</property>
+ </emphasis> to complete the process of the server creation.</para>
+ <para>Now that we've created our runtimes and servers, we can dwell on all services
+ and tools that JBoss Server Manager provides.</para>
+ </section>
+
+ </section>
+
+</chapter>
+
+
+<chapter id="perspective" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/perspective.xml" xreflabel="perspective">
+ <?dbhtml filename="perspective.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>Eclipse</keyword>
+ <keyword>Deploy</keyword>
+ <keyword>Deployment</keyword>
+ <keyword>JBoss</keyword>
+ </keywordset>
+ </chapterinfo>
+ <title>JBoss AS Perspective</title>
+
+ <para>This chapter tells how to manage installed JBoss Servers via <property moreinfo="none">JBoss AS
+ Perspective</property>.</para>
+
+ <para>The <property moreinfo="none">JBoss AS Perspective</property> is similar to the <property moreinfo="none">Java
+ Perspective</property>, but it contains a few additional views. Two of the additional views
+ are standard views, specifically the <property moreinfo="none">Console View</property> and the
+ <property moreinfo="none">Properties View</property>. The other two views that are added are the
+ <property moreinfo="none">Project Archives View</property> and the <property moreinfo="none">JBoss Server
+ View</property>.</para>
+
+ <section id="JBossServerView">
+ <?dbhtml filename="JBossServerView.html"?>
+ <title>The JBoss Server View</title>
+ <para>Let's have a look at the <property moreinfo="none">JBoss Server View</property> and inspect
+ in detail all parts it consists of. </para>
+
+ <para>The <property moreinfo="none">JBoss Server View</property> is based on the WTP view, Server View. The
+ top part of the <property moreinfo="none">JBoss Servers View</property> essentially embeds the original
+ Server View directly into it, making slight changes to the context menu. A second part
+ was added to provide additional information about the server selected in the top part. </para>
+
+ <figure float="0">
+ <title>The JBoss Server View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <para>The view's toolbar provides quick access to starting a server (in debug mode, run
+ mode, or profile mode), restarting a server, stopping a server, or publishing to a
+ server.</para>
+ <figure float="0">
+ <title>The JBoss Server View Toolbar</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_19.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In order to debug your applications or EJB's that are deployed to the server, you must
+ start the server in debug mode. By starting the server in debug mode, eclipse will allow
+ you to set breakpoints on code in your workspace and step through the code.</para>
+
+ <para><emphasis>
+ <property moreinfo="none">Start the server in profiling mode</property>
+ </emphasis> button allows to enable profiling actions for your application. For more
+ details on how to start using TPTP profiling with <property moreinfo="none">JBoss Tools</property> refer
+ to <link linkend="tptp_support">TPTP Support</link> chapter.</para>
+
+ <para><emphasis>
+ <property moreinfo="none">Publish to the server</property>
+ </emphasis> button on the extreme right will republish any modules where it has
+ determined the workspace is out of sync with the server. It will attempt to do an
+ incremental publish if it turns out that the module in question is capable of doing one.</para>
+
+ <para>Now, let's get to know with both of the <property moreinfo="none">JBoss Server
+ View</property> parts.</para>
+
+ <section role="updated">
+ <title>Top Part of the JBoss Server View</title>
+ <para>In the top part of the <property moreinfo="none">JBoss Server View</property> all declared servers
+ are represented as well as their current states, that is, whether they are started
+ or stopped. </para>
+ <figure float="0">
+ <title>Server Publish Status</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_18.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The top part also shows the server's publish status. The fallowing table
+ lists possible statuses.</para>
+
+ <table>
+ <title>Server Publish Status</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">Status</entry>
+
+ <entry align="center">Description</entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry align="center">
+ <para>Republish</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which allows you to see if changes are
+ awaiting</para>
+ </entry>
+ </row>
+ <row>
+ <entry align="center">
+ <para>Publishing...</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which shows if changes are being updated</para>
+ </entry>
+ </row>
+ <row>
+ <entry align="center">
+ <para>Synchronized</para>
+ </entry>
+
+ <entry align="center">
+ <para>The status which allows you to see if changes are
+ in-sync</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>By double-clicking on any server, an editor window will appear allowing you to
+ edit parts of that server. On the figure you can see that a username/password is
+ available in the UI when configuring the server. If you get an SecurityException
+ when trying to launch the server, it is most likely because your server is protected
+ and hence you need to fill the username/password fields with appropriate values.</para>
+
+ <figure float="0">
+ <title>Preferences Page for the Chosen Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_20.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">It should be pointed out that our server adapter by default tries to automatically
+ detect the ports it needs for integrating with a </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss server</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.
+ Sometimes it can though be relevant to override this automatic detection if you are
+ using some custom configuration. For this purposes the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Ports</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">section in the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">The </diffmk:wrapper>editor</property> <diffmk:wrapper diffmk:change="added">is provided where the
+ port settings are configurable.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">The settings relating to </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Publishing</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="added">, </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Timeouts</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">or </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server Polling</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="deleted">will </diffmk:wrapper><diffmk:wrapper diffmk:change="added">can </diffmk:wrapper>also <diffmk:wrapper diffmk:change="changed">be </diffmk:wrapper><diffmk:wrapper diffmk:change="added">adjusted here.</diffmk:wrapper></para>
+
+ <para diffmk:change="added" id="com_line_arg"><diffmk:wrapper diffmk:change="added">In the </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Server editor</diffmk:wrapper></property><diffmk:wrapper diffmk:change="deleted">you </diffmk:wrapper><diffmk:wrapper diffmk:change="added">it's possible
+ </diffmk:wrapper>to modify <diffmk:wrapper diffmk:change="changed">the </diffmk:wrapper>server's launch <diffmk:wrapper diffmk:change="added">configuration as well.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">configuration. </diffmk:wrapper>It's just
+ after clicking <emphasis>
+ <property moreinfo="none">Open launch configuration</property>
+ </emphasis> link. In the open window there are the tabs for setting command line
+ arguments and other things that are relevant to launching the server.</para>
+
+ <figure float="0">
+ <title>Launch Configuration Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_22.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Look up <ulink url="http://docs.jboss.org/jbossas/guides/installguide/r1/en/html/start-stop.html">here</ulink> to find parameters which can be specified for <property moreinfo="none">JBoss
+ Server</property>.</para>
+
+ <para>As the JBoss Servers have few properties to modify in this editor, a shortcut to
+ the launch configuration has been provided in the context menu when right-clicking
+ on a server.</para>
+
+ <figure float="0">
+ <title>Twiddle Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_21.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The following table describes all these additional properties.</para>
+ <table>
+ <title>Server Properties through the Context Menu</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+ <row>
+ <entry>
+ <para>New Server</para>
+ </entry>
+ <entry>
+ <para>The option allows to define a new server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Delete</para>
+ </entry>
+ <entry>
+ <para>Standard option that allows to delete the chosen server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Start</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a run mode</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Debug</para>
+ </entry>
+ <entry>
+ <para>The action for stating a server in a debug mode</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Stop</para>
+ </entry>
+ <entry>
+ <para>The action for stopping a declared server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Publish</para>
+ </entry>
+ <entry>
+ <para>The action for synching the publish information between the
+ server and workspace</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Clean</para>
+ </entry>
+ <entry>
+ <para>The option for complete redeploying the resources</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Twiddle Server</para>
+ </entry>
+ <entry>
+ <para>The option provides a dialog for running Twiddle commands
+ against the Twiddle Server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Edit Launch Configuration</para>
+ </entry>
+ <entry>
+ <para>The option that provides an editor for editing launch
+ configuration properties of the proper server</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Add and Remove Projects</para>
+ </entry>
+ <entry>
+ <para>The option allows to publish a new project to the server (if
+ its type is supported)</para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ <para>Mentioned above Twiddle is a JMX library that comes with JBoss, and you can use it
+ to access any variables that exposed via the JBoss JMX interfaces.</para>
+ </section>
+
+ <section>
+ <title>Bottom Part of the JBoss Server View</title>
+
+ <para>Here, we dwell on the bottom part of the <property moreinfo="none">JBoss Server View</property>.</para>
+ <para>First, we should say that the bottom part is meant to provide additional
+ functionality relevant to the server selected in the top part of the view. If a
+ standard server element is selected from above, some of the extensions may still
+ provide the additional information. Others may not. So, let's look at the
+ currently available extensions to the bottom part of the <property moreinfo="none">JBoss Server
+ View</property>.</para>
+
+ <figure float="0">
+ <title>View Extensions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>In order to access the view's preferences, you should access <emphasis>
+ <property moreinfo="none">Window > Preferences > JBoss Tools > JBoss
+ Servers > View</property>
+ </emphasis>. This preference page allows you to select which view extensions you
+ want on or off, the order they appear in the view, as well as any other
+ extension-specific preferences that may be available.</para>
+
+ <figure float="0">
+ <title>View Preferences</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_2.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The first view extension is <emphasis>
+ <property moreinfo="none">Modules</property>
+ </emphasis> section. It shows which modules are currently deployed to the server,
+ and allows you to remove them from the server, or force a full republish upon them.
+ It only shows which modules have been deployed through Eclipse, not any and all
+ modules that happen to be in the deploy directory.</para>
+
+ <figure float="0">
+ <title>Modules Action</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">Event Log</property>
+ </emphasis> will show relevant information to your server's startup,
+ shutdown, and publish processes. This allows you to keep an eye on what's
+ going on (such as automatic incremental deployment if you have it enabled). The only
+ action available is to clear the <emphasis>
+ <property moreinfo="none">Event Log</property>
+ </emphasis>. However, if the <property moreinfo="none">Properties View</property> is opened, you can
+ receive further information on each <emphasis>
+ <property moreinfo="none">Event Log</property>
+ </emphasis> item (when available).</para>
+
+ <figure float="0">
+ <title>Event Log Actions</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Starting the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis> category allows you to quickly browse to descriptor files in your
+ server's deploy directory and check or change the values. Its use requires the
+ <property moreinfo="none">Properties view</property>. Basically, <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis> includes XML XPaths where a xpath is a path used to access some specific
+ part of an xml document. </para>
+
+ <figure float="0">
+ <title>XML Configuration and Properties View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note>
+ <title>Note:</title>
+ <para>You are assumed to be familiar with XPath. If not, we highly suggested that
+ you look through an appropriate manual or tutorial on the topic.</para>
+ </note>
+
+ <para>The <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis> category itself contains only a list of categories. <emphasis>
+ <property moreinfo="none">Ports</property>
+ </emphasis> are provided by default and is filled with many of the most commonly
+ used ports in the <property moreinfo="none">JBoss Server</property>. In the <property moreinfo="none">Properties
+ view</property> you can see an identifier and nested files underneath in which
+ that xpath can be found as well as its current value. The details of the xpath are
+ hidden as all you need to see is only which file you're referring to and
+ what its current value is.</para>
+
+ <para> By right-clicking on <emphasis>
+ <property moreinfo="none">XML Configuration</property>, </emphasis> you can create a new
+ category. Besides, context menu for <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis> category makes possible to disable it. You can disable any category in
+ the bottom part of the <emphasis>
+ <property moreinfo="none">JBoss Server View</property>.</emphasis> Look for them in the <emphasis>
+ <property moreinfo="none">Inactive Categories</property>
+ </emphasis> afterwards to re-enable.</para>
+
+ <figure float="0">
+ <title>Adding New Category</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>By right-clicking on <emphasis>
+ <property moreinfo="none">Ports</property>
+ </emphasis> or any other category in <emphasis>
+ <property moreinfo="none">XML Configuration</property>
+ </emphasis>, you can create a new xpath.</para>
+
+ <figure float="0">
+ <title>Adding New XPath</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>After that, the dialog shown below will appear.</para>
+
+ <figure float="0">
+ <title>Adding New XPath</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The goal here is to get an end result where the XPath matches up with a necessary
+ property. With that in mind, let's look how it works. If the property you
+ want to reach is the value of the <emphasis>name</emphasis> attribute in the element
+ <emphasis><mbean></emphasis>, then your <emphasis>
+ <property moreinfo="none">XPath Patten</property>
+ </emphasis>should end with <emphasis>mbean</emphasis> and your <emphasis>
+ <property moreinfo="none">Attribute Name</property>
+ </emphasis> should be <emphasis>name</emphasis> like on the next figure.</para>
+
+ <programlisting format="linespecific" role="XML">...
+<server>
+...
+ <mbean code="org.jboss.ejb.EJBDeployer"
+ name="jboss.ejb:service=EJBDeployer" xmbean-dd="">
+
+ <!-- Inline XMBean Descriptor BEGIN -->
+ <xmbean>
+ <description>
+ The EJBDeployer responsible for ejb jar deployment</description>
+ ...
+ </xmbean>
+ </mbean>
+</server>
+</programlisting>
+
+ <figure float="0">
+ <title>XPath Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_23.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <tip>
+ <title>Tip:</title>
+ <para>Notice, when you type the fields autocomplete to help you locate exactly what
+ xpath you're looking for.</para>
+ </tip>
+
+ <para>Then, on the other hand, if your desired field is the text of an element
+ <emphasis><description></emphasis>, your <emphasis>
+ <property moreinfo="none">XPath Patten</property>
+ </emphasis> should end with <emphasis>description</emphasis> and <emphasis>
+ <property moreinfo="none">Attribute Name</property>
+ </emphasis> field should be left blank. When finished, click <emphasis>
+ <property moreinfo="none">Preview</property>
+ </emphasis> to see how many matches you have for that particular XPath.</para>
+
+ <figure float="0">
+ <title>XPath Preview</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_24.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>As part of the <property moreinfo="none">JBoss Server View</property> there is a <emphasis>
+ <property moreinfo="none">JMX Console</property>
+ </emphasis> section which allows you to browse and use the JMX exposed beans on the
+ server.</para>
+ <figure float="0">
+ <title>JMX Console</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_17.png" scale="75"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>Find more about XPath in the <ulink url="http://www.w3.org/TR/xpath20/">XPath
+ Documentation</ulink>.</para>
+ </section>
+ </section>
+
+ </section>
+
+ <section id="Project_archivesView">
+ <title>Project Archives View</title>
+ <para>Every application, whether Plain Old Java, J2EE, or some other language altogether,
+ needs to be packaged in some way. In Java-related projects, many people use ANT. JBoss
+ Tools comes with our own Archives tool with a bit easier and less-verbose XML and a
+ handy user interface. The Project Archives plugin consists primarily of a view, that is
+ <property moreinfo="none">Project Archives View</property>, to set up each packaging configuration.</para>
+ <para>So far, let's look through all functionality that the <property moreinfo="none">Project
+ Archives View</property> provides.</para>
+
+ <section id="archives_overview">
+ <title>Overview</title>
+
+ <para>The packaging configuration for each project is stored in the project's root
+ folder, and is in a file named <emphasis>
+ <property moreinfo="none">.packages</property>
+ </emphasis>, which has a fairly simple XML structure. Modifying the file by hand is
+ neither required nor recommended, and using the UI is the official way of modifying
+ your packaging structure.</para>
+
+ <figure float="0">
+ <title>Archives View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_25.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>A project's configuration contains archives. On the image above there is
+ only one archive, but a project can contain many. Inside the archive folders
+ (testFolder), filesets, or other internal archives can be located. Internal archives
+ and filesets may be directly inside of an archive, or in some sub-folder of that
+ archive.</para>
+
+ <para>In the upper right corner of the view you can see an icon which, when clicked,
+ will build the selected top-level archive. Additionally, you can select <emphasis>
+ <property moreinfo="none">Project > Build Packages</property>
+ </emphasis> when a project is selected in the <property moreinfo="none">Packages View</property> to
+ build all declared packages in that project's <emphasis>
+ <property moreinfo="none">.packages</property>
+ </emphasis> file. This will execute a full build on all declared archives.</para>
+ </section>
+
+ <section id="Creating_Archive">
+ <title>Creating an Archive</title>
+ <para>When creating a new archive, you have some different options at your disposal. If
+ the project has no <emphasis>
+ <property moreinfo="none">.packages</property>
+ </emphasis> file, your options will be presented to you all at once to choose from.
+ Otherwise you will right-click inside the view and select <emphasis>
+ <property moreinfo="none">New Archive</property>
+ </emphasis> to see your archive type options.</para>
+ <figure float="0">
+ <title>Create an Archive</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_12.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <note diffmk:change="added">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Note:</diffmk:wrapper></title>
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you see only JAR from the list of available archive types, you should
+ verify whether AS Tools plugins/features are in place. EAR, EJB JAR and WAR options are
+ contributed by the AS Tools independently from webtools and the virtual
+ project model. Thus, without them only JAR will show up.</diffmk:wrapper></para>
+ </note>
+
+ <para><property moreinfo="none">JAR</property> is the standard archive type, and does very little
+ configuration, leaving most of the work up to you. You can customize the name, add
+ folders, filesets, and inner jars to it.</para>
+ <para>The other types, for the most part, simply start off with a default setting,
+ usually the jar with some specific children based on an expected structure of the
+ project. For example, if the project is a Dynamic Web Project, and you create a
+ <property moreinfo="none">WAR</property> archive, the archive will be created with a few
+ filesets relevant to the known structure of the project.</para>
+
+ <para>Here is the first page of all New archive wizards. It is the same for any archive
+ type and the only page in the <property moreinfo="none">New Jar Wizard</property>.</para>
+ <figure float="0">
+ <title>New JAR Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_13.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>The page is pretty simple. All it asks for is the name of your new archive, a
+ destination, which we'll get to in a moment, and whether the archive is exploded or
+ packaged up.</para>
+ <para>The destination of an archive can be anywhere on the filesystem, anywhere in the
+ workspace, inside some other archive, or inside a folder declared inside an archive.
+ You can browse to workspace or filesystem destinations by clicking on their
+ respective buttons. To select a destination inside some other archive, you'll need
+ to press the <emphasis>
+ <property moreinfo="none">Workspace...</property>
+ </emphasis> button. At the bottom of the list, you'll see archives that
+ have been declared in the workspace.</para>
+ <section id="CreatingaFolder">
+ <title>Creating a Folder</title>
+ <para>Creating a folder is much easier. You simply right-click on an archive or
+ folder you want your new folder to be a child under. The only piece of required
+ information is naming the file.</para>
+ </section>
+ <section id="CreatingaFileSet">
+ <title>Creating a FileSet</title>
+ <para>To create a new fileset, you click on an available target location such as an
+ archive, a nested archive, or a folder within an archive, and select <emphasis>
+ <property moreinfo="none">New Fileset</property>
+ </emphasis>.</para>
+ <para>The <property moreinfo="none">New Fileset Wizard</property> requires a destination (where the
+ files will go), and a root directory (or where the files are coming from). The
+ source can be anywhere in the workspace or from the filesystem at large.</para>
+
+ <figure float="0">
+ <title>Adding a New FileSet</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_26.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Below that, the fileset requires only an includes pattern and an excludes
+ pattern. As you type in either of these fields, the preview viewer should update
+ itself with which files are matched.</para>
+ </section>
+ </section>
+ <section id="View_Actions">
+ <title>Archive Actions</title>
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_14.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The context menu on the items in the view is extendable, but there are several
+ that come standard.</para>
+
+ <table>
+ <title>Context Menu on the Item</title>
+ <tgroup cols="2">
+ <colspec align="left" colnum="1" colwidth="1*"></colspec>
+ <colspec colnum="2" colwidth="3*"></colspec>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Name</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry>
+ <para>Build Archive (Full)</para>
+ </entry>
+
+ <entry>
+ <para>The action enabled only on top-level archives, which initiates
+ a full build on that archive</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Edit Archive</para>
+ </entry>
+
+ <entry>
+ <para>Standard action that brings up the wizard associated with that
+ particular node type and allows the details to be changed</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Delete Archive</para>
+ </entry>
+
+ <entry>
+ <para>Deleting node is standard action with deletion not needing an
+ explanation</para>
+ </entry>
+ </row>
+
+ <row>
+ <entry>
+ <para>Publish To Server</para>
+ </entry>
+
+ <entry>
+ <para>The action means the ability to publish to a declared
+ server</para>
+ </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+
+ <section id="PublishToServer">
+ <title>Publishing to Server</title>
+ <para>Finally, you'll need to publish your application to a server. Here, we
+ show you how to do it with the help of <emphasis>
+ <property moreinfo="none">Archives View</property>
+ </emphasis>.</para>
+
+ <figure float="0">
+ <title>Context Menu on the Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/perspective/perspective_15.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The dialog above appears after selecting <emphasis>
+ <property moreinfo="none">Publish To Server</property>
+ </emphasis>. To simply publish once, you just select the server(s) that you want,
+ and finish. If you want the <emphasis>
+ <property moreinfo="none">Publish to Server</property>
+ </emphasis> action on that particular Archive to publish always to that set of
+ servers, then check the appropriate checkbox. And finally, to enable automatic
+ publishing upon build events, check the last checkbox.</para>
+ <para>The automatic publishing feature is nice if, for example, your package's
+ destination (where it is built) is a temporary folder and you want the archive
+ published to several servers. If you only really want your archive published to one
+ server, it might be easier to have the archive's destination folder be the deploy
+ folder of the server.</para>
+ </section>
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>Refer to <ulink url="http://ant.apache.org/manual/index.html">Ant manual</ulink>
+ to find more on how to build your applications with help of Ant.</para>
+
+ <para>At this point, you are guessed to be familiar with <property moreinfo="none">JBoss AS
+ Perspective</property> and your next step now is to explore how to work with
+ different kinds of projects.</para>
+ </section>
+
+ </section>
+
+
+</chapter>
+
+
+<chapter id="webtools" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/webtools.xml">
+ <title>Projects</title>
+ <para>The most popular of the projects we deal with are the J2EE ones, such as Dynamic Web
+ Project, EJB Project, or EAR project. Web projects of <property diffmk:change="added" moreinfo="none">JBoss Tools</property> are
+ Struts, JSF and Seam projects. All of them are called faceted projects. Thus, in this
+ chapter we are going to tell you about facets the main benefit of which to provide proper
+ structuring and packaging for any type of project.</para>
+
+ <section>
+ <title>Faceted Projects Overview</title>
+ <para>The idea behind faceted projects is that each project can accept units of
+ functionality, or facets, which can be added or removed by the user. Most often, these
+ facets either add to the project's classpath, enable a builder, or watch the project in
+ some other fashion. Generally, every project concerned has at least one facet when
+ it's created. As an example, a Web project has a WebDoclet facet, or an EJB
+ Project has an EJB Module facet as prerequisites.</para>
+
+ <para> WTP projects have undergone some criticism as being
+ <emphasis>over-engineered</emphasis> or too restrictive in their design. WTP projects
+ are set up in a tree-relationship to each other, where one project can be a child of
+ another. For example, an EAR project may have a Web Project child, an EJB project child,
+ or other types.</para>
+
+ <para> However, the benefit of this is that the structure of your projects is then known,
+ and packaging it up *should* be trivial. Apparently, if your project is non-standard, or
+ you feel too confined by such rigid structural requirements, you can still choose to
+ package your project using the <link linkend="Project_archivesView">Archives
+ plugin</link>.</para>
+ </section>
+
+
+ <section revisionflag="changed">
+ <title>Adding Facets to a Project</title>
+
+ <para><diffmk:wrapper diffmk:change="added">In</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">There are two ways to add facets to a project. </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">this section we're going </diffmk:wrapper>to <diffmk:wrapper diffmk:change="added">consider</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">include facets into
+ already existing project. For that you should bring up </diffmk:wrapper>the <diffmk:wrapper diffmk:change="added">facets</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">context menu for selected
+ project </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">added by
+ </diffmk:wrapper><property moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Properties.
+ At this point, choose
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Tools</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Project Facets</diffmk:wrapper></property>
+ <diffmk:wrapper diffmk:change="deleted">from </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">and show how you can configure them in a project: add new ones or
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">give opportunity to </diffmk:wrapper>modify <diffmk:wrapper diffmk:change="added">already</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">it by </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">existing configuration </diffmk:wrapper><diffmk:wrapper diffmk:change="added">of
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Modify </diffmk:wrapper><diffmk:wrapper diffmk:change="added">the</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Project...
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">facets.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">One
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Adding </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">way </diffmk:wrapper>to <diffmk:wrapper diffmk:change="added">configure</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">the Existing Project
+
+
+
+
+
+
+
+ The </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">the facets </diffmk:wrapper>is <diffmk:wrapper diffmk:change="added">doing</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">adding necessary </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">it </diffmk:wrapper>while organizing a new project. To
+ demonstrate <diffmk:wrapper diffmk:change="changed">this </diffmk:wrapper>let's create a new <property moreinfo="none">Dynamic Web Project</property> <diffmk:wrapper diffmk:change="added">by
+ </diffmk:wrapper>selecting <diffmk:wrapper diffmk:change="deleted">as usual </diffmk:wrapper><emphasis>
+ <property moreinfo="none">File > New > Other...</property>
+ </emphasis> and then <emphasis>
+ <property moreinfo="none">Web > Dynamic Web Project</property>. </emphasis></para>
+ <figure float="0">
+ <title>New Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> and you will see Dynamic Web Project <diffmk:wrapper diffmk:change="added">page</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">page.
+
+ Faceted </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">like on the </diffmk:wrapper><diffmk:wrapper diffmk:change="added">figure below.</diffmk:wrapper></para>
+
+ <diffmk:wrapper diffmk:change="deleted">Page
+
+
+
+
+
+
+ </diffmk:wrapper><para> The first page of most WTP projects allows you to target a specific runtime,
+ representing a server's library location. It will also provide you the ability to add
+ this project to an EAR project, and select a pre-selected default set of facets, called
+ a configuration, rather than manually select each facet you might want.</para>
+ <para> Selecting the runtime, again, allows the project to install the proper classpaths to
+ the project so it knows what code to compile against.</para>
+
+ <figure float="0" id="dyn_web_project">
+ <title><diffmk:wrapper diffmk:change="added">New</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Faceted Project </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">Dynamic Web Project</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">Click </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">on the </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Modify</diffmk:wrapper></property>
+ </emphasis><diffmk:wrapper diffmk:change="deleted">page </diffmk:wrapper><diffmk:wrapper diffmk:change="added">button next to </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Configuration</diffmk:wrapper></property> <diffmk:wrapper diffmk:change="added">section in</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">of </diffmk:wrapper><diffmk:wrapper diffmk:change="added">order to open
+ </diffmk:wrapper>the wizard <diffmk:wrapper diffmk:change="added">which </diffmk:wrapper>allows you to <diffmk:wrapper diffmk:change="changed">modify a chosen configuration. </diffmk:wrapper><diffmk:wrapper diffmk:change="added">The wizard looks</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">facets, </diffmk:wrapper>as
+ <diffmk:wrapper diffmk:change="added">follows.</diffmk:wrapper></para>
+
+ <figure diffmk:change="added" float="0" id="project_facets">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Project</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">described </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">Facets </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Wizard</diffmk:wrapper></title>
+ <mediaobject diffmk:change="added">
+ <imageobject diffmk:change="added">
+ <imagedata diffmk:change="added" fileref="images/webtools/webtools_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Here</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Some </diffmk:wrapper><diffmk:wrapper diffmk:change="added">part of the listed </diffmk:wrapper>facets <diffmk:wrapper diffmk:change="changed">are those which are provided by WTP. Some of </diffmk:wrapper><diffmk:wrapper diffmk:change="added">them are</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">but
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">added by </diffmk:wrapper><property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">whole </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Tools</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">this </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">They </diffmk:wrapper><diffmk:wrapper diffmk:change="added">are:</diffmk:wrapper></para>
+ <itemizedlist diffmk:change="added">
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">BIRT</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">allows </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">Charting Runtime </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Component</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">BIRT</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">add </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">Reporting Runtime </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Component</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">of </diffmk:wrapper><diffmk:wrapper diffmk:change="added">ESB</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">facets </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Portlets</diffmk:wrapper></para>
+ </listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">JBoss</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">that </diffmk:wrapper><diffmk:wrapper diffmk:change="added">Web Services</diffmk:wrapper></para><diffmk:wrapper diffmk:change="deleted">don't
+ </diffmk:wrapper></listitem>
+ <listitem diffmk:change="added">
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Seam</diffmk:wrapper></para>
+ </listitem>
+ </itemizedlist>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">On</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">conflict </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">this wizard page you can enable or disable any facet as well </diffmk:wrapper><diffmk:wrapper diffmk:change="added">as change it version.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">that
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">What you should note here is that some facets or facets versions </diffmk:wrapper><diffmk:wrapper diffmk:change="added">may conflict with each</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">and
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">other. In case of incompatibility you'll be prompted about this in </diffmk:wrapper><diffmk:wrapper diffmk:change="added">the
+ </diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Show </diffmk:wrapper><diffmk:wrapper diffmk:change="added">combo
+ box underneath.</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Constraints.</diffmk:wrapper></para>
+ <figure float="0">
+ <title>Facet Constraints</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">When</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Notice that here it is also possible </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">switching on </diffmk:wrapper>the <emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Runtimes</diffmk:wrapper></property><diffmk:wrapper diffmk:change="deleted">version of any facet. If
+ </diffmk:wrapper></emphasis><diffmk:wrapper diffmk:change="deleted">the chosen version isn't compatible with </diffmk:wrapper><diffmk:wrapper diffmk:change="changed">tab on the right </diffmk:wrapper>you'll <diffmk:wrapper diffmk:change="added">see</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">be prompted
+ about this in </diffmk:wrapper>the <diffmk:wrapper diffmk:change="changed">currant Server Runtime.</diffmk:wrapper></para>
+ <figure float="0">
+ <title><diffmk:wrapper diffmk:change="changed">Runtimes </diffmk:wrapper><diffmk:wrapper diffmk:change="added">on the Project Facets Wizard</diffmk:wrapper><diffmk:wrapper diffmk:change="deleted">Constraints</diffmk:wrapper></title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para><diffmk:wrapper diffmk:change="added">On this tab you can also create a new Server Runtime and make it primary by pressing </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Make Primary</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">button after enabling it.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">Clicking on </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">OK</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">will save the chosen configuration of the facets and return you to the </diffmk:wrapper><link diffmk:change="added" linkend="dyn_web_project"><diffmk:wrapper diffmk:change="added">Dynamic Web Project wizard</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper>Further pages in the
+ wizard are specific to either the project <diffmk:wrapper diffmk:change="changed">type </diffmk:wrapper>or the facets selected.</para>
+
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">If you need to configure the facets for the existing project, you should bring up the
+ context menu for selected project and click </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Properties</diffmk:wrapper></property>
+ </emphasis> <diffmk:wrapper diffmk:change="added">and then </diffmk:wrapper><emphasis diffmk:change="added">
+ <property diffmk:change="added" moreinfo="none"><diffmk:wrapper diffmk:change="added">Project Facets</diffmk:wrapper></property><diffmk:wrapper diffmk:change="added">. </diffmk:wrapper></emphasis> <diffmk:wrapper diffmk:change="added">This will bring up the familiar
+ </diffmk:wrapper><link diffmk:change="added" linkend="project_facets"><diffmk:wrapper diffmk:change="added">Project Facets wizard</diffmk:wrapper></link><diffmk:wrapper diffmk:change="added">, where you can create
+ your own custom facets configuration.</diffmk:wrapper></para>
+
+ <para diffmk:change="added"></para>
+
+ </section>
+ <section diffmk:change="added" id="rel_resources_links">
+ <title diffmk:change="added"><diffmk:wrapper diffmk:change="added">Relevant Resources Links</diffmk:wrapper></title>
+
+ <para diffmk:change="added"><diffmk:wrapper diffmk:change="added">More on the WTP facets you can read in the </diffmk:wrapper><ulink diffmk:change="added" url="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.jst.j2ee.do..."><diffmk:wrapper diffmk:change="added">eclipse help</diffmk:wrapper></ulink><diffmk:wrapper diffmk:change="added">.</diffmk:wrapper></para>
+ </section>
+</chapter>
+
+
+<chapter id="modules" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/modules.xml">
+ <title>Deploying Modules</title>
+
+ <para>In this chapter it will be described how to deploy modules onto the server.</para>
+ <para> First of all it is necessary to say that deploying to a server is mostly painless. There
+ are several ways to do it provided by WTP, and some additional methods provided by JBoss
+ Tools. These methods are described further in this chapter.</para>
+
+ <section revisionflag="changed">
+ <title>Deploying on the Package Explorer</title>
+
+ <para>On the package explorer it is possible to publish either a project to a server or just
+ a signal file. Let's look at how to do this.</para>
+ <section id="run_on_server_wizard">
+ <title>Deploying with Run On Server Wizard</title>
+ <para> The first WTP method is to right-click on a project, such as a Dynamic Web
+ project, EJB project, or EAR project and then select <emphasis>
+ <property moreinfo="none">Run As > Run on Server</property>
+ </emphasis>. The resulting dialog allows you to select which supporting server the
+ project can be published to.</para>
+ <figure float="0">
+ <title>Define a New Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property moreinfo="none">Next</property>
+ </emphasis> button to see add or remove projects page where you can choose projects
+ to configure them on server.</para>
+ <figure float="0" id="add_rem_proj">
+ <title>Add or Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>This page of the wizard also allows to undeploy modules from the server. For that
+ choose proper module(s) from the right and click <emphasis>
+ <property moreinfo="none"> < Remove</property>
+ </emphasis>. The modules will be completely undeployed after restarting your server
+ or republishing.</para>
+ <para>Generally, for the JBoss AS Server Adapters, publishing using this method will
+ force a default, best-guess, packaging configuration for your project. This
+ best-guess does not publish incrementally, but instead repackages your entire
+ project into a <emphasis>
+ <property moreinfo="none">.war</property>
+ </emphasis>, <emphasis>
+ <property moreinfo="none">.jar</property>
+ </emphasis>, or <emphasis>
+ <property moreinfo="none">.ear</property>
+ </emphasis> as appropriate, and then copies that file into the proper deploy
+ directory. For quicker smarter deployment, you will need to create archives using
+ the <link linkend="Project_archivesView">Project Archives view</link> and customize
+ packaging yourself.</para>
+ </section>
+
+ <section id="single_file_deployment">
+ <?dbhtml filename="DeployToServer.html"?>
+ <title>Deploying single files</title>
+
+ <para>Sometimes it becomes necessary to deploy one or more files to a server. For
+ that in order not to do a full republish in the context menu of files a <emphasis><property moreinfo="none">Deploy To Server</property></emphasis>
+ option is provided that allows a single file deployment. To deploy these non-WTP files/projects
+ right click on the file (<emphasis>
+ <property moreinfo="none">-ds.xml</property></emphasis>, <emphasis>
+ <property moreinfo="none">.ear</property></emphasis>, <emphasis>
+ <property moreinfo="none">.jar</property></emphasis> etc.) and select <emphasis>
+ <property moreinfo="none">Deploy To Server</property>
+ </emphasis> and it will be automatically deployed.</para>
+ <figure float="0">
+ <title>Deploy to Sever</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The deployed files are listed side-by-side with other modules that are deployed to
+ the server.</para>
+
+ <figure float="0">
+ <title>Deployed files on the Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+
+ </section>
+ <section>
+ <title>Deploying with JBoss Server View</title>
+ <para>As it has been already mentioned <property moreinfo="none">JBoss Server View</property> contains two
+ parts: the top part that displays all defined servers and the bottom part which provides
+ categories with additional information. Thus, in this section we suggest two more ways
+ to deploy resources onto the server.</para>
+ <section>
+ <title>Top part of JBoss Server View</title>
+ <para>In the top part of the <property moreinfo="none">JBoss Servers View</property> like in the Servers
+ View you should right click on a server and select the <emphasis>
+ <property moreinfo="none">Add and Remove Projects</property>
+ </emphasis> menu item.</para>
+ <figure float="0">
+ <title>Add and Remove Projects</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>This will bring up a <link linkend="add_rem_proj">familiar dialog</link> allowing
+ you to either publish projects or modules to a server, or remove them from the
+ server. If the selected module is a project like a Dynamic Web project, EJB project,
+ or EAR project, it will be published as through <emphasis>
+ <property moreinfo="none">Run on Server</property>
+ </emphasis> wizard, with a best-guess full package. If, however, the selected
+ element is an archive from the <link linkend="Project_archivesView">Project Archives
+ view</link>, it will be published according to the rules of that module
+ type.</para>
+ </section>
+
+ <section>
+ <title>Bottom part of JBoss Server View</title>
+ <para>In the bottom part of <emphasis>
+ <property moreinfo="none">JBoss Server View</property>
+ </emphasis> there is a category called <emphasis>
+ <property moreinfo="none">Modules</property>
+ </emphasis> which should display all currently-published modules on the server.
+ Right-clicking on the desired module and selecting <emphasis>
+ <property moreinfo="none">Full Publish</property>
+ </emphasis> will force a full rebuild of the entire module.</para>
+ <figure float="0">
+ <title>Full Publish</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Here, <emphasis>
+ <property moreinfo="none">Incremental Publish</property>
+ </emphasis> is meant to enable publishing of only those parts where changes have
+ been made.</para>
+ </section>
+ </section>
+ <section>
+ <title>Deploying with Project Archives View</title>
+ <para>In the <property moreinfo="none">Project Archives View</property> you can right-click on any declared
+ archive and select the <emphasis>
+ <property moreinfo="none">Publish To Server</property>
+ </emphasis> element. For more on this subject, see <link linkend="PublishToServer">Publishing to Server</link> in the Project Archives View section.</para>
+ <figure float="0">
+ <title>Publish to Server</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/modules/modules_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> The only way to ensure an <emphasis>
+ <property moreinfo="none">Incremental Build</property>
+ </emphasis>, such as changes to one <emphasis>
+ <property moreinfo="none">.jsp</property>, </emphasis>
+ <emphasis>
+ <property moreinfo="none">.html</property>, </emphasis> or <emphasis>
+ <property moreinfo="none">.class</property>
+ </emphasis> file, is to enable the builder for that project. This is done by either
+ changing the global preferences for the <property moreinfo="none">Archives View</property>, or by
+ enabling project-specific preferences and ensuring the builder is on.</para>
+
+
+
+ <para>The last chapter covers a variety of methods on how you can deploy needed modules onto a
+ server.</para>
+ </section>
+</chapter>
+
+
+<chapter id="tptp_support" role="new" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/as/docs/reference/en/modules/tptp_support.xml">
+ <title>TPTP Support</title>
+ <para>This chapter provides an overview on how to enable TPTP Profiling for <property moreinfo="none">JBoss
+ AS</property> adapters in <property moreinfo="none">JBoss Tools</property>.</para>
+
+ <section>
+ <title>TPTP Profiling</title>
+
+ <para>To get TPTP profiling work on <property moreinfo="none">JBoss Application Server</property> you should
+ first download <ulink url="http://www.eclipse.org/downloads/download.php?file=/tptp/4.5.0/TPTP-4.5.0...">TPTP 4.5.0 Runtime</ulink> and install it, i. e. just add the content of <emphasis>
+ <property moreinfo="none">plugins/features</property>
+ </emphasis> folders from downloaded directory to the same folders in your eclipse
+ installation directory.</para>
+
+ <para>And now all profile actions should work for you. To start <property moreinfo="none">JBoss
+ AS</property> in profiling mode use <emphasis>
+ <property moreinfo="none">Start the server in profiling mode</property>
+ </emphasis> button or <emphasis>
+ <property moreinfo="none">Profile As > Profile on Server</property>
+ </emphasis> option in the context menu of the project.</para>
+
+ <figure float="0">
+ <title>Start the Server in Profiling mode</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>To enable TPTP features in your workbench use <property moreinfo="none">Profiling and Logging
+ Perspective</property> that you can find in the list of proposed perspectives: <emphasis>
+ <property moreinfo="none">Window > Open Perspective > Other…</property>
+ </emphasis>
+ </para>
+
+ <figure float="0">
+ <title>Profiling and Logging Perspective</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/tptp_support/tptp_support_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ </section>
+
+ <section>
+ <title>Relevant Resources Links</title>
+ <para>All additional information on TPTP(Test and Performance Tools Platform) you can find
+ in <ulink url="http://www.eclipse.org/tptp/home/downloads/4.5.0/documents/quicktour/quic...">eclipse documentation</ulink>.</para>
+
+
+
+ <para>In summary, this reference should help you to start with <ulink url="http://www.jboss.org/jbossas">JBoss AS</ulink> and get to know with functionality
+ for work with it.</para>
+ </section>
+</chapter>
+
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/as/docs/reference/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/as/docs/reference/pom.xml 2008-10-29 16:10:20 UTC (rev 11300)
+++ branches/jbosstools-3.0.0.Beta1/as/docs/reference/pom.xml 2008-10-29 16:17:50 UTC (rev 11301)
@@ -34,7 +34,7 @@
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
Added: branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/en/master_output.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/en/master_output.xml (rev 0)
+++ branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/en/master_output.xml 2008-10-29 16:17:50 UTC (rev 11301)
@@ -0,0 +1,423 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
+
+[<!ENTITY jsf_struts SYSTEM "modules/jsf_struts.xml">
+<!ENTITY jsf_struts_war SYSTEM "modules/jsf_struts_war.xml">
+<!ENTITY introduction SYSTEM "modules/introduction.xml">
+<!ENTITY workspace SYSTEM "modules/workspace.xml">
+
+<!ENTITY seamlink "../../seam/html_single/index.html">
+<!ENTITY aslink "../../as/html_single/index.html">
+<!ENTITY esblink "../../esb_ref_guide/html_single/index.html">
+<!ENTITY gsglink "../../GettingStartedGuide/html_single/index.html">
+<!ENTITY hibernatelink "../../hibernatetools/html_single/index.html">
+<!ENTITY jbpmlink "../../jbpm/html_single/index.html">
+<!ENTITY jsflink "../../jsf/html_single/index.html">
+<!ENTITY jsfreflink "../../jsf_tools_ref_guide/html_single/index.html">
+<!ENTITY jsftutoriallink "../../jsf_tools_tutorial/html_single/index.html">
+<!ENTITY strutsreflink "../../struts_tools_ref_guide/html_single/index.html">
+<!ENTITY strutstutoriallink "../../struts_tools_tutorial/html_single/index.html">
+<!ENTITY migrationlink "../../Exadel-migration/html_single/index.html">
+
+]><book xmlns:diffmk="http://diffmk.sf.net/ns/diff">
+ <bookinfo>
+ <title>Exadel Studio Migration Guide</title>
+
+ <pubdate>April 2008</pubdate>
+ <copyright>
+ <year>2007</year>
+ <year>2008</year>
+ <holder>JBoss, a division of Red Hat Inc.</holder>
+ </copyright>
+ <releaseinfo>
+Version: 1.1.0.GA
+</releaseinfo>
+
+<abstract diffmk:change="added">
+ <title diffmk:change="added"></title>
+ <para diffmk:change="added">
+ <ulink diffmk:change="added" url="http://download.jboss.org/jbosstools/nightly-docs/en/Exadel-migration/pdf..."><diffmk:wrapper diffmk:change="added">PDF version</diffmk:wrapper></ulink>
+ </para>
+</abstract>
+
+
+
+ </bookinfo>
+
+ <toc></toc>
+
+<chapter id="introduction" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/introduction.xml" xreflabel="introduction">
+ <?dbhtml filename="introduction.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Introduction </title>
+ <para>This document is intended to help you to migrate an existing Exadel JSF or Struts projects
+ into <property moreinfo="none">JBoss Developer Studio</property>. Preferences can be exported from Eclipse 3.2.0 (3.2.1 or 3.2.2) and imported in Eclipse 3.3 by the standard Eclipse means.
+ </para>
+<section>
+ <title>Other relevant resources on the topic</title>
+ <para>All JBoss Developer Studio/JBoss Tools documentation you can find <ulink url="http://docs.jboss.org/tools">here</ulink>.</para>
+ <para>The latest documentation builds are available <ulink url="http://download.jboss.org/jbosstools/nightly-docs/">here</ulink>.</para>
+
+</section>
+
+ </chapter>
+
+
+<chapter id="workspace" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/workspace.xml" xreflabel="workspace">
+ <?dbhtml filename="workspace.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migrate workspace</title>
+ <para>You will not be able to run projects in JBoss Developer Studio
+ using <property moreinfo="none">Exadel Studio workspace</property>. In this case, project capabilities and settings specified in Exadel Studio will be lost. The simplest way to avoid this, is to copy your projects in <property moreinfo="none">JBoss Developer Studio workspace</property> and make an import as it is described in the following chapters.</para>
+</chapter>
+
+
+<chapter id="jsf_struts" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts.xml" xreflabel="jsf_struts">
+ <?dbhtml filename="jsf_struts.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+ <keyword>JBDS</keyword>
+ <keyword>Exadel Studio Pro</keyword>
+ <keyword>Migration</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migration of JSF and Struts Projects</title>
+ <para>In this chapter you can find concise description of migration of JSF and Struts Projects.</para>
+ <section id="import_jsf">
+ <title>JSF</title>
+ <para>JBoss Developer Studio includes an Import <property moreinfo="none">JSF Project</property> Wizard that radically simplifies the process of bringing your existing JSF applications
+ into your JBoss Developer Studio workspace as JSF projects. You just need to follow these four steps:</para>
+ <itemizedlist>
+ <listitem><para><emphasis><property moreinfo="none">Select File > Import...</property></emphasis> from the menu bar, and then select <emphasis><property moreinfo="none">Other > JSF Project </property></emphasis>from the Import dialog box that appears.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Import JSF Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the first screen of the wizard, select the <emphasis><property moreinfo="none">Change...</property></emphasis> button next to the <emphasis><property moreinfo="none">web.xml Location</property></emphasis> field. Browse to the location of the web.xml file for the application you
+ want to import as a <property moreinfo="none">JSF project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
+ You can edit this project name, if you wish.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Web.xml File in the Project Location Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist id="import_jsf_screen">
+ <listitem><para>In the <emphasis><property moreinfo="none">Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para></listitem>
+ </itemizedlist>
+ <para>On this step JBoss Developer Studio will try to determine your project
+ structure and set the values for: <emphasis><property moreinfo="none">Web Root</property></emphasis>, <emphasis><property moreinfo="none">Source Folder</property></emphasis>, <emphasis><property moreinfo="none">Classes Folder</property></emphasis>, <emphasis><property moreinfo="none">Lib Folder</property></emphasis>. If your project has a custom structure, some values might not be
+ set. If this is the case, you can manually set those values by clicking the <emphasis><property moreinfo="none">Change...</property></emphasis> button.</para>
+ <para>After dealing with these settings, you have to work through a few more configuration settings. These settings deal primarily with how the project will be deployed within JBoss Developer Studio.</para>
+ <para>First, if the project you are importing is not already a JSF project, select the <emphasis><property moreinfo="none">Add Libraries</property></emphasis> check box to add all the JSF-related libraries to your project. </para>
+ <para>Then, you may select the JavaServer Faces implementation (<emphasis><property moreinfo="none">Environment</property></emphasis>) and <emphasis><property moreinfo="none">Servlet Version</property></emphasis>.</para>
+ <para>The <emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be deployed. </para>
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in order to build the project. It is not possible to finish the importing of a project without selecting a Runtime. If you don't have any choices displayed for this, select <emphasis><property moreinfo="none">New...</property></emphasis> to add a new Runtime.</para>
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application under. The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this value.</para>
+
+
+ <figure float="0">
+ <title>The Project Folders Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Imported Project in the Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+ <section>
+ <title>Struts</title>
+ <itemizedlist>
+ <listitem><para><emphasis><property moreinfo="none">Select File > Import...</property></emphasis> from the menu bar, and then select <emphasis><property moreinfo="none">Other > Struts Project</property></emphasis> from the Import dialog box that appears.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Import Struts Project Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_6.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the Project Location screen of the wizard, select the <emphasis><property moreinfo="none">Change... </property></emphasis>button next to the <emphasis><property moreinfo="none">web.xml Location</property></emphasis> field. Browse the location of the web.xml file for the application you
+ want to import as a <property moreinfo="none">Struts project</property>. Once you select it, you'll be returned to the dialog box to see a project name derived from the web.xml file you selected.
+ You can edit this project name, if you wish.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Project Location Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_10.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the next screen, JBoss Developer Studio will try to determine your project structure. The upper pane shows the modules in this project.
+ The lower pane allows you to edit the details of the select module. If the project structure is non-standard, some values might be left blank.
+ You can edit any values by hand or by using the <emphasis><property moreinfo="none">Change...</property></emphasis> button.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Project Modules Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_7.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>In the <emphasis><property moreinfo="none">Project Folders</property></emphasis> screen, you can configure the rest of your project. Afterwards click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>On this step JBoss Developer Studio will try to determine your project structure and set the values for: <emphasis><property moreinfo="none">Classes Folder</property></emphasis>, <emphasis><property moreinfo="none">Lib Folder</property></emphasis>, and <emphasis><property moreinfo="none">Ant Build File</property></emphasis>. If your project has a custom structure, some values might not be set. If this is the case, you can manually set those values by clicking <emphasis><property moreinfo="none">Change</property></emphasis>.</para>
+ <para>After dealing with these settings, you have to work through a few more configuration settings. These settings deal primarily with how the project will be deployed within JBoss Developer Studio.</para>
+ <para>First, if the project you are importing is not already a Struts project, select the <emphasis><property moreinfo="none">Add Libraries</property></emphasis> check box to add all the Struts-related libraries to your project. </para>
+ <para>Then, you may select the Struts <emphasis><property moreinfo="none">Environment</property></emphasis> and <emphasis><property moreinfo="none">Servlet Version</property></emphasis>.</para>
+ <para>The <emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be deployed. </para>
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in order to build the project. It is not possible to finish the importing of a project without selecting a Runtime. If you don't have any choices displayed for this, select<emphasis><property moreinfo="none"> New...</property></emphasis> to add a new Runtime.</para>
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application under. The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this value.</para>
+
+
+ <figure float="0">
+ <title>The Project Folders Screen</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_8.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>Once the project is imported, it will appear in the Package Explorer view.</para></listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Imported Project in the Package Explorer View</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts/migration_9.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ </section>
+</chapter>
+
+
+<chapter id="jsf_struts_war" xml:base="file:///home/ochikvina/WORK/for_compare/trunk/documentation/guides/Exadel-migration/en/modules/jsf_struts_war.xml" xreflabel="jsf_struts_war">
+ <?dbhtml filename="jsf_struts_war.html"?>
+
+ <chapterinfo>
+ <keywordset>
+ <keyword>JBoss Developer Studio</keyword>
+
+ <keyword>JBDS</keyword>
+
+ <keyword>Exadel Studio Pro</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Migrate JSF and Struts projects from *.war file</title>
+ <para>After you familiarized oneself with last chapter you can read this chapter. It looks as if you read in last chapter.</para>
+ <section>
+ <title>JSF</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis><property moreinfo="none">File > Import...</property></emphasis> from the menu bar, and then select
+ <emphasis><property moreinfo="none">Other > JSF Project From *.war</property></emphasis> from the Import dialog box that
+ appears.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the JSF Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_2.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>In the wizard screen, select the <emphasis><property moreinfo="none">Change...</property></emphasis> button next to
+ the <emphasis><property moreinfo="none">*.war Location</property></emphasis> field. Browse to the location of the *.war file for
+ the application you want to import as a JSF project. Once you select
+ it, you'll be returned to the dialog box to see a project name
+ derived from the *.war file you selected. You can edit this name, if
+ you wish.</para>
+
+ <para>Uncheck the <emphasis><property moreinfo="none">Use Default Path</property></emphasis> check box if you want to import
+ your project outside of the Eclipse workspace. In this case, you would
+ use <emphasis><property moreinfo="none"> Change... </property></emphasis> button next to the <emphasis><property moreinfo="none">Location</property></emphasis> field to choose a
+ location.</para>
+
+ <para><emphasis><property moreinfo="none">Context Path</property></emphasis> is the name under which the application will be
+ deployed.</para>
+
+ <para>The <emphasis><property moreinfo="none">Runtime</property></emphasis> value tells Eclipse where to find Web libraries in
+ order to build the project. It is not possible to finish project
+ import without selecting Runtime. If you don't have any options
+ here, select <emphasis><property moreinfo="none">New...</property></emphasis> to add a new Runtime.</para>
+
+ <para>Finally, <emphasis><property moreinfo="none">Target Server</property></emphasis> sets the server to deploy the application
+ under. The Target Server corresponds to the Runtime value selected
+ above. If you don't want to deploy the application, uncheck this
+ value.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The JSF Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_3.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ </section>
+
+ <section>
+ <title>Struts</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Select <emphasis><property moreinfo="none">File > Import...</property></emphasis> from the menu bar, and then select
+ <emphasis><property moreinfo="none">Other > Struts Project From *.war</property></emphasis> from the Import dialog box that
+ appears.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>Selecting the Import Menu Item</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_1.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <figure float="0">
+ <title>Selecting the Struts Project From *.war Import Wizard</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_4.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Follow the same steps as with the JSF Project From <property moreinfo="none">*.war</property> import
+ wizard.</para>
+ </listitem>
+ </itemizedlist>
+
+ <figure float="0">
+ <title>The Struts Project From *.war Import Wizard</title>
+
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/jsf_struts_war/migration_war_5.png"></imagedata>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem>
+ <para>Click on the <emphasis><property moreinfo="none">Finish</property></emphasis> button.</para>
+ </listitem>
+ </itemizedlist>
+ <para>The migration process is completed</para>
+ </section>
+</chapter>
+
+
+</book>
Modified: branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/pom.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/pom.xml 2008-10-29 16:10:20 UTC (rev 11300)
+++ branches/jbosstools-3.0.0.Beta1/documentation/guides/Exadel-migration/pom.xml 2008-10-29 16:17:50 UTC (rev 11301)
@@ -37,7 +37,7 @@
</dependency>
</dependencies>
<configuration>
- <sourceDocumentName>master.xml</sourceDocumentName>
+ <sourceDocumentName>master_output.xml</sourceDocumentName>
<sourceDirectory>${pom.basedir}/en</sourceDirectory>
<imageResource>
<directory>${pom.basedir}/en</directory>
17 years, 2 months
JBoss Tools SVN: r11300 - trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-29 12:10:20 -0400 (Wed, 29 Oct 2008)
New Revision: 11300
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - commenting nightly builds label displaying;
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-29 16:09:34 UTC (rev 11299)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2008-10-29 16:10:20 UTC (rev 11300)
@@ -2,7 +2,7 @@
/* -----Override jbossorg.css----- */
-/* body {
+body {
background-image:url(../images/community/bkg_gradient.gif);
background-repeat:repeat-x;
background-image:url(../images/richfaces_label2.png);
@@ -26,8 +26,8 @@
left:0px;
z-index:-1;
}
-*/
+/*
body {
background-image:url(../images/jbosstools_label2.png);
background-repeat:no-repeat;
@@ -53,7 +53,7 @@
left:0px;
z-index:-1;
}
-
+*/
div.book{
font-family:'Lucida Grande', Geneva, Verdana, Arial, sans-serif;
font-size:12px;
17 years, 2 months
JBoss Tools SVN: r11299 - trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-29 12:09:34 -0400 (Wed, 29 Oct 2008)
New Revision: 11299
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - commenting nightly builds label displaying;
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-29 16:08:46 UTC (rev 11298)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2008-10-29 16:09:34 UTC (rev 11299)
@@ -2,7 +2,7 @@
/* -----Override jbossenterprise-single.css----- */
-/*body {
+body {
background-image:url(../images/richfaces_label2.png);
background-repeat:no-repeat;
background-attachment:fixed;
@@ -14,7 +14,6 @@
}
div#overlay{
-background-image:url(../images/community/bkg_gradient.gif);
background-repeat:repeat-x;
width:100%;
height:100%;
@@ -23,9 +22,8 @@
left:0px;
z-index:-1;
}
-*/
+/*
-
body {
background-image:url(../images/jbds_label2.png);
background-repeat:no-repeat;
@@ -42,7 +40,6 @@
}
div#overlay{
-/*background-image:url(../images/community/bkg_gradient.gif);*/
background-repeat:repeat-x;
width:100%;
height:100%;
@@ -51,11 +48,11 @@
left:0px;
z-index:-1;
}
-
+*/
div.book, div.chapter{
text-align:justify;
width: 70em;
- margin-left:50px;
+ /*margin-left:50px;*/
}
div.abstract {
17 years, 2 months
JBoss Tools SVN: r11298 - trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-29 12:08:46 -0400 (Wed, 29 Oct 2008)
New Revision: 11298
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - adding highlighting for the diffmkwrapper;
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-29 16:08:27 UTC (rev 11297)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2008-10-29 16:08:46 UTC (rev 11298)
@@ -120,7 +120,14 @@
</span>
</xsl:template>
<!-- XHTML and PDF -->
- <xsl:template match="//node()[@diffmk:change]">
+
+ <xsl:template match="//diffmk:wrapper">
+ <span class="diffmkwrapper">
+ <xsl:value-of select="."/>
+ </span>
+ </xsl:template>
+
+ <!--xsl:template match="//node()[@diffmk:change]">
<xsl:choose>
<xsl:when test="local-name()='note' or local-name()='tip' or local-name()='important' or local-name()='warning' or local-name()='caution'">
<xsl:call-template name="my.graphical.admonition"/>
@@ -167,7 +174,7 @@
<xsl:apply-templates />
</div>
</div>
- </xsl:template>
+ </xsl:template-->
<xsl:template match="abstract" mode="titlepage.mode">
<xsl:apply-templates select="." mode="class.attribute"/>
17 years, 2 months
JBoss Tools SVN: r11297 - trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-29 12:08:27 -0400 (Wed, 29 Oct 2008)
New Revision: 11297
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - adding highlighting for the diffmkwrapper;
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-29 15:46:17 UTC (rev 11296)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2008-10-29 16:08:27 UTC (rev 11297)
@@ -131,7 +131,14 @@
</xsl:template>
<!-- XHTML and PDF -->
- <xsl:template match="//node()[@diffmk:change]">
+
+ <xsl:template match="//diffmk:wrapper">
+ <span class="diffmkwrapper">
+ <xsl:value-of select="."/>
+ </span>
+ </xsl:template>
+
+ <!--xsl:template match="//node()[@diffmk:change]">
<xsl:choose>
<xsl:when test="local-name()='note' or local-name()='tip' or local-name()='important' or local-name()='warning' or local-name()='caution'">
<xsl:call-template name="my.graphical.admonition"/>
@@ -178,7 +185,9 @@
<xsl:apply-templates />
</div>
</div>
- </xsl:template>
+ </xsl:template-->
+
+
<xsl:template match="abstract" mode="titlepage.mode">
<xsl:apply-templates select="." mode="class.attribute"/>
<xsl:call-template name="paragraph">
17 years, 2 months
JBoss Tools SVN: r11296 - branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-10-29 11:46:17 -0400 (Wed, 29 Oct 2008)
New Revision: 11296
Modified:
branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
Log:
JBIDE-3010 Issue is fixed
Modified: branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-29 15:44:05 UTC (rev 11295)
+++ branches/jbosstools-3.0.0.Beta1/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-29 15:46:17 UTC (rev 11296)
@@ -104,6 +104,7 @@
} else {
elProposalPrefix = "#{"; //$NON-NLS-1$
}
+ delta = matchString.length() - elQueryString.length();
if (matchString.startsWith("\"") || matchString.startsWith("'")) {
queryString = matchString.substring(1);
}
17 years, 2 months
JBoss Tools SVN: r11295 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-29 11:44:05 -0400 (Wed, 29 Oct 2008)
New Revision: 11295
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
Log:
Fix pmd errors, JBIDE-883
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2008-10-29 15:32:53 UTC (rev 11294)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2008-10-29 15:44:05 UTC (rev 11295)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.mozilla;
-import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -122,7 +121,7 @@
* @see org.mozilla.interfaces.nsIDOMEventListener#handleEvent(org.mozilla.interfaces.nsIDOMEvent)
*/
public void handleEvent(nsIDOMEvent domEvent) {
- try{
+
if(getEditorDomEventListener()==null){
return;
@@ -184,11 +183,6 @@
getEditorDomEventListener().onRefresh();
}
- }catch(Throwable th) {
-
- VpePlugin.getPluginLog().logError("Event Handling Error", th); //$NON-NLS-1$
- throw new RuntimeException(th);
- }
}
/* (non-Javadoc)
17 years, 2 months
JBoss Tools SVN: r11294 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-10-29 11:32:53 -0400 (Wed, 29 Oct 2008)
New Revision: 11294
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
Log:
JBIDE-3010 Issue is fixed
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-29 15:26:30 UTC (rev 11293)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPActiveContentAssistProcessor.java 2008-10-29 15:32:53 UTC (rev 11294)
@@ -104,6 +104,7 @@
} else {
elProposalPrefix = "#{"; //$NON-NLS-1$
}
+ delta = matchString.length() - elQueryString.length();
if (matchString.startsWith("\"") || matchString.startsWith("'")) {
queryString = matchString.substring(1);
}
17 years, 2 months
JBoss Tools SVN: r11293 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-29 11:26:30 -0400 (Wed, 29 Oct 2008)
New Revision: 11293
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
Code adjustment, fix pmd errors, JBIDE-883
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-29 14:37:15 UTC (rev 11292)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-10-29 15:26:30 UTC (rev 11293)
@@ -10,11 +10,11 @@
******************************************************************************/
package org.jboss.tools.vpe.editor;
+import java.lang.reflect.InvocationTargetException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
@@ -31,6 +31,7 @@
import org.eclipse.jface.bindings.Binding;
import org.eclipse.jface.bindings.keys.KeySequence;
import org.eclipse.jface.bindings.keys.KeyStroke;
+import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.jface.viewers.ISelection;
@@ -261,8 +262,7 @@
dropWindow = new VpeDropWindow(editPart.getSite().getShell());
}
- void init(StructuredTextEditor sourceEditor, MozillaEditor visualEditor)
- throws Exception {
+ void init(StructuredTextEditor sourceEditor, MozillaEditor visualEditor) {
this.sourceEditor = sourceEditor;
if (sourceEditor instanceof IJSPTextEditor) {
((IJSPTextEditor) sourceEditor).setVPEController(this);
@@ -1868,16 +1868,28 @@
}
ExtendedProperties createExtendedProperties(Node node) {
- try {
+
Class c = ModelFeatureFactory.getInstance().getFeatureClass(
"org.jboss.tools.jst.jsp.outline.VpeProperties"); //$NON-NLS-1$
- return (ExtendedProperties) c.getDeclaredConstructor(
- new Class[] { Node.class }).newInstance(
- new Object[] { node });
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
+ try {
+ return (ExtendedProperties) c.getDeclaredConstructor(
+ new Class[] { Node.class }).newInstance(
+ new Object[] { node });
+ } catch (IllegalArgumentException e) {
+ VpePlugin.getPluginLog().logError(e);
+ } catch (SecurityException e) {
+ VpePlugin.getPluginLog().logError(e);
+ } catch (InstantiationException e) {
+ VpePlugin.getPluginLog().logError(e);
+ } catch (IllegalAccessException e) {
+ VpePlugin.getPluginLog().logError(e);
+ } catch (InvocationTargetException e) {
+ VpePlugin.getPluginLog().logError(e);
+ } catch (NoSuchMethodException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
return null;
- }
+
}
private void test(Node node) {
@@ -2200,7 +2212,7 @@
}
public void run() {
- try {
+
String tagName = item.getAttributeValue("name"); //$NON-NLS-1$
XModelObject parent = item.getParent();
@@ -2267,9 +2279,6 @@
p.put("selectionProvider", selProvider); //$NON-NLS-1$
PaletteInsertHelper.insertIntoEditor(sourceEditor
.getTextViewer(), p);
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
}
@@ -2320,12 +2329,14 @@
this.offset = offset;
this.length = length;
if (length > 0) {
- try {
- text = sourceEditor.getTextViewer().getDocument().get(
- offset, length);
- } catch (Exception ex) {
- VpePlugin.reportProblem(ex);
- }
+
+ try {
+ text = sourceEditor.getTextViewer().getDocument().get(
+ offset, length);
+ } catch (BadLocationException e) {
+ VpePlugin.getPluginLog().logError(e);
+ }
+
}
}
@@ -2335,7 +2346,7 @@
try {
text = sourceEditor.getTextViewer().getDocument().get(offset,
length);
- } catch (Exception ex) {
+ } catch (BadLocationException ex) {
VpePlugin.reportProblem(ex);
}
}
@@ -2747,11 +2758,8 @@
.getInnerDropInfo(mouseEvent);
caretParent = visualDropInfo.getDropContainer();
caretOffset = visualDropInfo.getDropOffset();
- try {
- canDrop = true;
- } catch (Exception ex) {
- VpePlugin.reportProblem(ex);
- }
+ canDrop = true;
+
}
if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out
@@ -3048,12 +3056,10 @@
}
public VpeIncludeList getIncludeList() {
- try {
- if (includeList == null)
- throw new Exception("includeList - NULL!!!"); //$NON-NLS-1$
- } catch (Exception e) {
- VpePlugin.getPluginLog().logError(e);
- }
+
+ if (includeList == null)
+ VpePlugin.getPluginLog().logError("includeList - NULL!!!");
+
return includeList;
}
17 years, 2 months
JBoss Tools SVN: r11292 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-29 10:37:15 -0400 (Wed, 29 Oct 2008)
New Revision: 11292
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2828Test.java
Log:
Pool for EL parsers implemented.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2828Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2828Test.java 2008-10-29 14:28:24 UTC (rev 11291)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2828Test.java 2008-10-29 14:37:15 UTC (rev 11292)
@@ -77,15 +77,15 @@
private void checkELParser(ELParser elParser) {
ELModel elModel1 = elParser.parse("#{faces.context}"); //$NON-NLS-1$
assertNotNull(elModel1);
- assertEquals("There shouldn't be errors",elParser.getSyntaxErrors().size(),0); //$NON-NLS-1$
+ assertEquals("There shouldn't be errors",elModel1.getSyntaxErrors().size(),0); //$NON-NLS-1$
ELModel elModel2 = elParser.parse("#{org.richfaces.SKIN}"); //$NON-NLS-1$
assertNotNull(elModel2);
- assertEquals("There shouldn't be errors",elParser.getSyntaxErrors().size(),0); //$NON-NLS-1$
+ assertEquals("There shouldn't be errors",elModel2.getSyntaxErrors().size(),0); //$NON-NLS-1$
ELModel elModel3 = elParser.parse("#{klsjdf lsaijf aslkjd; sikjfd}"); //$NON-NLS-1$
assertNotNull(elModel3);
- assertTrue("There should be errorrs", elParser.getSyntaxErrors().size()>0); //$NON-NLS-1$
+ assertTrue("There should be errorrs", elModel3.getSyntaxErrors().size()>0); //$NON-NLS-1$
}
17 years, 2 months
JBoss Tools SVN: r11291 - trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-29 10:28:24 -0400 (Wed, 29 Oct 2008)
New Revision: 11291
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
Log:
Pool for EL parsers implemented.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-29 14:13:50 UTC (rev 11290)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/VpeElVariableValidator.java 2008-10-29 14:28:24 UTC (rev 11291)
@@ -12,6 +12,7 @@
import java.util.Properties;
+import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.core.parser.ELParser;
import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.meta.action.impl.DefaultWizardDataValidator;
@@ -45,8 +46,8 @@
}
String location = (String) data.get("location"); //$NON-NLS-1$
ELParser elParser = ELParserUtil.getDefaultFactory().createParser();
- elParser.parse("#{"+location+'}'); //$NON-NLS-1$
- if(elParser.getSyntaxErrors().size()>0) {
+ ELModel model = elParser.parse("#{"+location+'}'); //$NON-NLS-1$
+ if(model == null || model.getSyntaxErrors().size()>0) {
message=Messages.INVALID_EL_EXPRESSION;
}
17 years, 2 months
JBoss Tools SVN: r11290 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 10:13:50 -0400 (Wed, 29 Oct 2008)
New Revision: 11290
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
Log:
JBIDE-3033 - fix: use user suggestions
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 14:13:37 UTC (rev 11289)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 14:13:50 UTC (rev 11290)
@@ -140,13 +140,70 @@
if (pi.refEntityInfo == null || pi.refEntityInfo2 == null) {
return false;
}
- boolean hasPrompt = false;
+ int hasPrompt = 0; // no user prompt
// - use it as prompting from the user
- if ((pi.fieldId != null && pi.fieldId.equals(pi.refEntityInfo2.mappedBy)) ||
- (pi.fieldId2 != null && pi.fieldId2.equals(pi.refEntityInfo.mappedBy))) {
- hasPrompt = true;
+ if ((pi.fieldId != null && pi.fieldId.equals(pi.refEntityInfo2.mappedBy))) {
+ hasPrompt |= 1;
}
- if (hasPrompt) {
+ if ((pi.fieldId2 != null && pi.fieldId2.equals(pi.refEntityInfo.mappedBy))) {
+ hasPrompt |= 2;
+ }
+ if (hasPrompt != 0) {
+ // remember: in case of incorrect user prompts - we proceed his suggestions
+ if (hasPrompt == 1) {
+ if (pi.refEntityInfo2.refType == RefType.ONE2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.MANY2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.MANY2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.MANY2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ }
+ else if (hasPrompt == 2) {
+ if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.ONE2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.refType = RefType.ONE2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.MANY2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.MANY2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.ONE2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.MANY2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ }
+ //if (hasPrompt == 3) - this is case where we get prompt from both sides -
+ // and it is possible this is not correct info... so try to adjust it.
if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
if (pi.refEntityInfo2.refType == RefType.ONE2ONE) {
pi.refEntityInfo.refType = RefType.ONE2ONE;
17 years, 2 months
JBoss Tools SVN: r11289 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 10:13:37 -0400 (Wed, 29 Oct 2008)
New Revision: 11289
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
Log:
JBIDE-3033 - fix: use user suggestions
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 13:13:08 UTC (rev 11288)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 14:13:37 UTC (rev 11289)
@@ -140,13 +140,70 @@
if (pi.refEntityInfo == null || pi.refEntityInfo2 == null) {
return false;
}
- boolean hasPrompt = false;
+ int hasPrompt = 0; // no user prompt
// - use it as prompting from the user
- if ((pi.fieldId != null && pi.fieldId.equals(pi.refEntityInfo2.mappedBy)) ||
- (pi.fieldId2 != null && pi.fieldId2.equals(pi.refEntityInfo.mappedBy))) {
- hasPrompt = true;
+ if ((pi.fieldId != null && pi.fieldId.equals(pi.refEntityInfo2.mappedBy))) {
+ hasPrompt |= 1;
}
- if (hasPrompt) {
+ if ((pi.fieldId2 != null && pi.fieldId2.equals(pi.refEntityInfo.mappedBy))) {
+ hasPrompt |= 2;
+ }
+ if (hasPrompt != 0) {
+ // remember: in case of incorrect user prompts - we proceed his suggestions
+ if (hasPrompt == 1) {
+ if (pi.refEntityInfo2.refType == RefType.ONE2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.ONE2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.MANY2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ else if (pi.refEntityInfo2.refType == RefType.MANY2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId2;
+ pi.refEntityInfo2.refType = RefType.MANY2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId;
+ }
+ }
+ else if (hasPrompt == 2) {
+ if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
+ pi.refEntityInfo.refType = RefType.ONE2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.ONE2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.ONE2MANY) {
+ pi.refEntityInfo.refType = RefType.ONE2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.MANY2ONE;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2ONE) {
+ pi.refEntityInfo.refType = RefType.MANY2ONE;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.ONE2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ else if (pi.refEntityInfo.refType == RefType.MANY2MANY) {
+ pi.refEntityInfo.refType = RefType.MANY2MANY;
+ pi.refEntityInfo.mappedBy = pi.fieldId;
+ pi.refEntityInfo2.refType = RefType.MANY2MANY;
+ pi.refEntityInfo2.mappedBy = pi.fieldId2;
+ }
+ }
+ //if (hasPrompt == 3) - this is case where we get prompt from both sides -
+ // and it is possible this is not correct info... so try to adjust it.
if (pi.refEntityInfo.refType == RefType.ONE2ONE) {
if (pi.refEntityInfo2.refType == RefType.ONE2ONE) {
pi.refEntityInfo.refType = RefType.ONE2ONE;
17 years, 2 months
JBoss Tools SVN: r11288 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 09:13:08 -0400 (Wed, 29 Oct 2008)
New Revision: 11288
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
fix: empty selection
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 13:12:20 UTC (rev 11287)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 13:13:08 UTC (rev 11288)
@@ -327,7 +327,7 @@
synchronized public void setSelection(ISelection selection) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
- if (selection instanceof StructuredSelection) {
+ if (selection instanceof StructuredSelection && selection.isEmpty()) {
//System.out.println("This! " + this.selection); //$NON-NLS-1$
clearSelectionCU();
this.selection = null;
17 years, 2 months
JBoss Tools SVN: r11287 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 09:12:20 -0400 (Wed, 29 Oct 2008)
New Revision: 11287
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
fix: empty selection
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 13:09:09 UTC (rev 11286)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 13:12:20 UTC (rev 11287)
@@ -327,7 +327,7 @@
synchronized public void setSelection(ISelection selection) {
//System.out.println("Blah! " + selection); //$NON-NLS-1$
- if (selection instanceof StructuredSelection) {
+ if (selection instanceof StructuredSelection && selection.isEmpty()) {
//System.out.println("This! " + this.selection); //$NON-NLS-1$
clearSelectionCU();
this.selection = null;
17 years, 2 months
JBoss Tools SVN: r11286 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-29 09:09:09 -0400 (Wed, 29 Oct 2008)
New Revision: 11286
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
JBIDE-3030
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-10-29 13:02:13 UTC (rev 11285)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/ComponentUtil.java 2008-10-29 13:09:09 UTC (rev 11286)
@@ -467,6 +467,10 @@
public static void setImgFromResources(VpePageContext pageContext, nsIDOMElement img, String fileImageName, String undefinedImgName) {
IEditorInput input = pageContext.getEditPart().getEditorInput();
IPath inputPath = getInputParentPath(input);
+ //Fix For JBIDE-3030
+ if(pageContext.getVisualBuilder().getCurrentIncludeInfo()==null) {
+ return;
+ }
String path = ElService.getInstance().replaceEl(pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile(), fileImageName);
File file = new File(inputPath.toOSString() + File.separator + path);
if (file.exists()) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-10-29 13:02:13 UTC (rev 11285)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-10-29 13:09:09 UTC (rev 11286)
@@ -2208,7 +2208,10 @@
VpeIncludeInfo info = (VpeIncludeInfo) includeStack.get(1);
return ((IndexedRegion) info.getElement()).getStartOffset();
}
-
+ /**
+ * Can be a null in some cases, for example when we open an external file, see JBIDE-3030
+ * @return file include info
+ */
public VpeIncludeInfo getCurrentIncludeInfo() {
if (includeStack.size() <= 0)
return null;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-10-29 13:02:13 UTC (rev 11285)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2008-10-29 13:09:09 UTC (rev 11286)
@@ -1488,10 +1488,12 @@
// System.err.println("Hello world4");
}
- @SuppressWarnings("restriction")
public void beforeTemplateCreated(VpePageContext pageContext, Node sourceNode, nsIDOMDocument domDocument) {
- final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
-
+ IFile file = null;
+ //Fix for JBIDE-3030
+ if(pageContext.getVisualBuilder().getCurrentIncludeInfo()!=null) {
+ file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
+ }
if ((file != null)) {
// Node first((Element
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-10-29 13:02:13 UTC (rev 11285)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionSrc.java 2008-10-29 13:09:09 UTC (rev 11286)
@@ -238,6 +238,10 @@
*/
protected String resolveEL(VpePageContext pageContext, String value) {
String resolvedValue = value.replaceFirst("^\\s*(\\#|\\$)\\{facesContext.externalContext.requestContextPath\\}", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ //Fix for JBIDE-3030
+ if(pageContext.getVisualBuilder().getCurrentIncludeInfo()==null){
+ return resolvedValue;
+ }
final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
resolvedValue = ElService.getInstance().replaceEl(file, resolvedValue);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-10-29 13:02:13 UTC (rev 11285)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-10-29 13:09:09 UTC (rev 11286)
@@ -376,7 +376,7 @@
}
public String replaceElAndResources(VpePageContext pageContext, Node attributeNode) {
- final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
+
String attribuString = null;
if (attributeNode instanceof Attr) {
@@ -387,6 +387,11 @@
String rst = attribuString;
rst = ResourceUtil.getBundleValue(pageContext, attributeNode);
+ //fix for JBIDE-3030
+ if(pageContext.getVisualBuilder().getCurrentIncludeInfo()==null) {
+ return rst;
+ }
+ final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
rst = replaceEl(file, rst);
return rst;
17 years, 2 months
JBoss Tools SVN: r11285 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-29 09:02:13 -0400 (Wed, 29 Oct 2008)
New Revision: 11285
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
Log:
Pool for EL parsers implemented.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-29 12:58:56 UTC (rev 11284)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamELValidator.java 2008-10-29 13:02:13 UTC (rev 11285)
@@ -259,7 +259,7 @@
if(startEl>-1) {
ELParser parser = ELParserUtil.getJbossFactory().createParser();
ELModel model = parser.parse(string);
- List<SyntaxError> errors = parser.getSyntaxErrors();
+ List<SyntaxError> errors = model.getSyntaxErrors();
if(errors.size() > 0) {
for (SyntaxError error: errors) {
//TODO 1) make message more informative
17 years, 2 months
JBoss Tools SVN: r11284 - trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-29 08:58:56 -0400 (Wed, 29 Oct 2008)
New Revision: 11284
Modified:
trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
Log:
Pool for EL parsers implemented.
Modified: trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java
===================================================================
--- trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-29 12:57:57 UTC (rev 11283)
+++ trunk/common/tests/org.jboss.tools.common.el.core.test/src/org/jboss/tools/common/el/core/test/ELParserTest.java 2008-10-29 12:58:56 UTC (rev 11284)
@@ -11,7 +11,12 @@
package org.jboss.tools.common.el.core.test;
import java.util.List;
+import java.util.Random;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserFactory;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.core.parser.SyntaxError;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -194,4 +199,72 @@
return sb.toString();
}
+ static int TREAD_NUMBER = 20;
+ static int CALL_NUMBER = 1000;
+
+ public void testMultiThreadAccess() {
+
+ final ELParserFactory factory = ELParserUtil.getJbossFactory();
+ final Random random = new Random();
+ class Z {
+ int counter = 0;
+ int parserErrors = 0;
+ int syntaxErrors = 0;
+ int expectedSyntaxErrors = 0;
+ synchronized void addParserError() {
+ parserErrors++;
+ }
+ synchronized void addSyntaxError() {
+ syntaxErrors++;
+ }
+ synchronized void addExpectedSyntaxError() {
+ expectedSyntaxErrors++;
+ }
+ }
+ final Z z = new Z();
+
+ for (int i = 0; i < TREAD_NUMBER; i++) {
+ Runnable r = new Runnable() {
+ public void run() {
+ z.counter++;
+ try {
+ for (int j = 0; j < CALL_NUMBER; j++) {
+ boolean addError = random.nextInt(100) < 50;
+ if(addError) z.addExpectedSyntaxError();
+ ELParser parser = factory.createParser();
+ String el = "#{(a + b(c.d" + random.nextInt(1000) + ") + c().k" + (addError ? "." : "") + ") + 9.7}";
+ ELModel model = parser.parse(el);
+ LexicalToken t = model.getFirstToken();
+ if(!el.equals(restore(t))) {
+ z.addParserError();
+ }
+ if(model.getSyntaxErrors() != null && model.getSyntaxErrors().size() > 0) {
+ z.addSyntaxError();
+ }
+ }
+ } finally {
+ z.counter--;
+ }
+ }
+ };
+ new Thread(r).start();
+ }
+
+ while(z.counter > 0) {
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+
+ }
+ }
+
+ System.out.println("testMultiThreadAccess: Expected syntax errors=" + z.expectedSyntaxErrors);
+
+ assertEquals(0, z.parserErrors);
+
+ assertEquals(z.expectedSyntaxErrors, z.syntaxErrors);
+
+
+ }
+
}
17 years, 2 months
JBoss Tools SVN: r11283 - in trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el: core/parser and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-10-29 08:57:57 -0400 (Wed, 29 Oct 2008)
New Revision: 11283
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParser.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
Log:
Pool for EL parsers implemented.
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELModel.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -12,6 +12,8 @@
import java.util.List;
+import org.jboss.tools.common.el.core.parser.SyntaxError;
+
/**
* ELModel object is the result of EL parsing that includes
* all found instances of EL in the source string.
@@ -25,6 +27,8 @@
public List<ELInstance> getInstances();
+ public List<SyntaxError> getSyntaxErrors();
+
public void shift(int delta);
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParser.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParser.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParser.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -25,6 +25,4 @@
public ELModel parse(String source, int start, int length);
- public List<SyntaxError> getSyntaxErrors();
-
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/ELParserUtil.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -11,6 +11,7 @@
package org.jboss.tools.common.el.core.parser;
import java.util.List;
+import java.util.Stack;
import org.jboss.tools.common.el.core.model.ELModel;
import org.jboss.tools.common.el.internal.core.model.ELModelImpl;
@@ -23,53 +24,104 @@
*/
public class ELParserUtil {
+ private static ELParserFactory DEFAULT_FACTORY = new DefaultFactory() {
+ public ELParser newParser() {
+ return new DefaultParser() {
+ protected Tokenizer createTokenizer() {
+ return TokenizerFactory.createDefaultTokenizer();
+ }
+ public void dispose() {
+ super.dispose();
+ release(this);
+ }
+ };
+ }
+ };
+
public static ELParserFactory getDefaultFactory() {
- return new ELParserFactory() {
- public ELParser createParser() {
- return new DefaultParser() {
- protected Tokenizer createTokenizer() {
- return TokenizerFactory.createDefaultTokenizer();
- }
- };
- }
- };
+ return DEFAULT_FACTORY;
}
+ private static ELParserFactory JBOSS_FACTORY = new DefaultFactory() {
+ public ELParser newParser() {
+ return new DefaultParser() {
+ protected Tokenizer createTokenizer() {
+ return TokenizerFactory.createJbossTokenizer();
+ }
+ public void dispose() {
+ super.dispose();
+ release(this);
+ }
+ };
+ }
+ };
+
public static ELParserFactory getJbossFactory() {
- return new ELParserFactory() {
- public ELParser createParser() {
- return new DefaultParser() {
- protected Tokenizer createTokenizer() {
- return TokenizerFactory.createJbossTokenizer();
- }
- };
+ return JBOSS_FACTORY;
+ }
+
+ private static abstract class DefaultFactory implements ELParserFactory {
+ protected Stack<ELParser> inUse = new Stack<ELParser>();
+ protected Stack<ELParser> free = new Stack<ELParser>();
+
+ public ELParser createParser() {
+ synchronized(this) {
+ if(!free.isEmpty()) {
+ //reuse
+ ELParser parser = free.pop();
+ inUse.push(parser);
+ return parser;
+ }
}
- };
+ ELParser parser = newParser();
+ synchronized(this) {
+ //new
+ inUse.push(parser);
+ }
+ return parser;
+ }
+
+ protected abstract ELParser newParser();
+
+ public void release(ELParser parser) {
+ synchronized(this) {
+ //release
+ boolean b = inUse.remove(parser);
+ if(!b) return;
+ free.push(parser);
+ }
+ }
}
private static abstract class DefaultParser implements ELParser {
ELParserImpl impl = new ELParserImpl();
List<SyntaxError> errors = null;
+ Tokenizer t = createTokenizer();
public ELModel parse(String source) {
return parse(source, 0, source.length());
}
public ELModel parse(String source, int start, int length) {
- Tokenizer t = createTokenizer();
- LexicalToken token = t.parse(source, start, length);
- errors = t.getErrors();
- ELModelImpl model = impl.parse(token);
- model.setSource(source);
- model.setErrors(errors);
- return model;
+ try {
+ LexicalToken token = t.parse(source, start, length);
+ errors = t.getErrors();
+ ELModelImpl model = impl.parse(token);
+ model.setSource(source);
+ model.setErrors(errors);
+ return model;
+ } finally {
+ t.dispose();
+ dispose();
+ }
}
- public List<SyntaxError> getSyntaxErrors() {
- return errors;
+ protected abstract Tokenizer createTokenizer();
+
+ public void dispose() {
+ errors = null;
}
- protected abstract Tokenizer createTokenizer();
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -32,8 +32,8 @@
private String sourceString;
private int index = 0;
- private LexicalToken start = new LexicalToken(0, 0, "", -1000);
- private LexicalToken last = start;
+ private LexicalToken start;
+ private LexicalToken last;
private int state;
private Properties context = new Properties();
@@ -42,7 +42,21 @@
public Tokenizer() {}
+ /**
+ * Prepares this tokenizer to be reused with the same token descriptions and rules.
+ *
+ */
+ public void dispose() {
+ sourceString = null;
+ index = 0;
+ start = null;
+ last = null;
+ context.clear();
+ errors.clear();
+ }
+
public void setTokenDescriptions(ITokenDescription[] ds) {
+ tokenDescriptions.clear();
for (int i = 0; i < ds.length; i++) {
int type = ds[i].getType();
if(tokenDescriptions.containsKey(type)) {
@@ -57,6 +71,7 @@
}
public void setRules(IRule[] rules) {
+ this.rules.clear();
for (int i = 0; i < rules.length; i++) {
int[] ss = rules[i].getStartStates();
for (int j = 0; j < ss.length; j++) {
@@ -122,8 +137,17 @@
return result;
}
+ private static List<SyntaxError> EMPTY = new ArrayList<SyntaxError>();
+
+ /**
+ * Copies errors in order to reuse this object.
+ * @return
+ */
public List<SyntaxError> getErrors() {
- return errors;
+ if(errors.size() == 0) return EMPTY;
+ List<SyntaxError> copy = new ArrayList<SyntaxError>();
+ copy.addAll(errors);
+ return copy;
}
public void addToken(int type, int start, int end) {
@@ -195,4 +219,5 @@
public int getCurrentIndex() {
return index;
}
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -44,61 +44,69 @@
*/
public class TokenizerFactory {
+ private static ITokenDescription[] DEFAULT_DESCRIPTION_SET = new ITokenDescription[] {
+ ArgEndTokenDescription.INSTANCE,
+ ArgStartTokenDescription.INSTANCE,
+ DotTokenDescription.INSTANCE,
+ EndELTokenDescription.INSTANCE,
+ JavaNameTokenDescription.INSTANCE,
+ OperationTokenDescription.INSTANCE,
+ UnaryTokenDescription.INSTANCE,
+ PrimitiveValueTokenDescription.INSTANCE,
+ StartELTokenDescription.INSTANCE,
+ StringTokenDescription.INSTANCE,
+ WhiteSpaceTokenDescription.INSTANCE,
+ };
+
+ private static IRule[] DEFAULT_RULE_SET = new IRule[] {
+ ExpressionRule.INSTANCE,
+ CallRule.INSTANCE,
+ OperationRule.INSTANCE,
+ ErrorRecoveryRule.INSTANCE,
+ };
+
public static Tokenizer createDefaultTokenizer() {
Tokenizer t = new Tokenizer();
- t.setTokenDescriptions(new ITokenDescription[]{
- ArgEndTokenDescription.INSTANCE,
- ArgStartTokenDescription.INSTANCE,
- DotTokenDescription.INSTANCE,
- EndELTokenDescription.INSTANCE,
- JavaNameTokenDescription.INSTANCE,
- OperationTokenDescription.INSTANCE,
- UnaryTokenDescription.INSTANCE,
- PrimitiveValueTokenDescription.INSTANCE,
- StartELTokenDescription.INSTANCE,
- StringTokenDescription.INSTANCE,
- WhiteSpaceTokenDescription.INSTANCE,
- });
- t.setRules(new IRule[]{
- ExpressionRule.INSTANCE,
- CallRule.INSTANCE,
- OperationRule.INSTANCE,
- ErrorRecoveryRule.INSTANCE,
- });
+ t.setTokenDescriptions(DEFAULT_DESCRIPTION_SET);
+ t.setRules(DEFAULT_RULE_SET);
return t;
}
+ private static ITokenDescription[] JBOSS_DESCRIPTION_SET = new ITokenDescription[]{
+ ArgEndTokenDescription.INSTANCE,
+ ArgStartTokenDescription.INSTANCE,
+ CommaTokenDescription.INSTANCE,
+ DotTokenDescription.INSTANCE,
+ EndELTokenDescription.INSTANCE,
+ JavaNameTokenDescription.INSTANCE,
+ OperationTokenDescription.INSTANCE,
+ ParamEndTokenDescription.INSTANCE,
+ ParamStartTokenDescription.INSTANCE,
+ ExprStartTokenDescription.INSTANCE,
+ ExprEndTokenDescription.INSTANCE,
+ UnaryTokenDescription.INSTANCE,
+ PrimitiveValueTokenDescription.INSTANCE,
+ StartELTokenDescription.INSTANCE,
+ StringTokenDescription.INSTANCE,
+ WhiteSpaceTokenDescription.INSTANCE,
+ };
+
+ private static IRule[] JBOSS_RULE_SET = new IRule[] {
+ ExpressionRule.INSTANCE,
+ CallRule.INSTANCE,
+ OperationRule.INSTANCE,
+ ErrorRecoveryRule.INSTANCE,
+ };
+
public static Tokenizer createJbossTokenizer() {
Tokenizer t = new Tokenizer();
- t.setTokenDescriptions(new ITokenDescription[]{
- ArgEndTokenDescription.INSTANCE,
- ArgStartTokenDescription.INSTANCE,
- CommaTokenDescription.INSTANCE,
- DotTokenDescription.INSTANCE,
- EndELTokenDescription.INSTANCE,
- JavaNameTokenDescription.INSTANCE,
- OperationTokenDescription.INSTANCE,
- ParamEndTokenDescription.INSTANCE,
- ParamStartTokenDescription.INSTANCE,
- ExprStartTokenDescription.INSTANCE,
- ExprEndTokenDescription.INSTANCE,
- UnaryTokenDescription.INSTANCE,
- PrimitiveValueTokenDescription.INSTANCE,
- StartELTokenDescription.INSTANCE,
- StringTokenDescription.INSTANCE,
- WhiteSpaceTokenDescription.INSTANCE,
- });
- t.setRules(new IRule[]{
- ExpressionRule.INSTANCE,
- CallRule.INSTANCE,
- OperationRule.INSTANCE,
- ErrorRecoveryRule.INSTANCE,
- });
+ t.setTokenDescriptions(JBOSS_DESCRIPTION_SET);
+ t.setRules(JBOSS_RULE_SET);
return t;
}
public static void main(String[] args) {
- String text = "ioioio#{1.2e1}ioioio#{0}";
+ String text = "ioioio#{a(1.2e1i) + b c + d}ioioio#{0}";
//"#{a[b()['l'].j]}";
//"#{g11.g12.y13} #{#{ #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
//"#{not a.b(x,y) + s.h((6 != -8) & (7 + -iy88.g[9].h(7 div 8).i.j)+(8) ? 4 : 7,'p', a.b.c.d[null])}";
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -51,7 +51,7 @@
if(el.length()>3 && el.startsWith("#{") && el.endsWith("}")) {
ELParser parser = factory.createParser();
ELModel model = parser.parse(el);
- if(model == null || parser.getSyntaxErrors().size() > 0) return null;
+ if(model == null || model.getSyntaxErrors().size() > 0) return null;
List<ELInstance> is = model.getInstances();
if(is.size() == 0) return null;
return is.get(0).getExpression();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -24,6 +24,7 @@
*
*/
public class ELModelImpl extends ELObjectImpl implements ELModel {
+ List<SyntaxError> errors = null;
String source;
List<ELInstance> instances = new ArrayList<ELInstance>();
int delta = 0;
@@ -72,6 +73,7 @@
}
public void setErrors(List<SyntaxError> errors) {
+ this.errors = errors;
for (SyntaxError e: errors) {
for (ELInstance i: instances) {
ELInstanceImpl im = (ELInstanceImpl)i;
@@ -84,10 +86,15 @@
}
+ public List<SyntaxError> getSyntaxErrors() {
+ return errors;
+ }
+
public void shift(int delta) {
this.delta = delta;
if(instances.size() > 0) {
instances.get(0).getFirstToken().shift(delta);
}
}
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-29 12:54:37 UTC (rev 11282)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2008-10-29 12:57:57 UTC (rev 11283)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser;
-import org.jboss.tools.common.el.core.model.ELObjectType;
import org.jboss.tools.common.el.core.parser.LexicalToken;
import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.model.ELArgumentImpl;
@@ -49,30 +48,35 @@
*
*/
public class ELParserImpl {
- ELModelImpl model;
-
LexicalToken current;
public ELModelImpl parse(LexicalToken start) {
- model = new ELModelImpl();
- model.setFirstToken(start);
- current = start;
- while(current != null) {
- if(current.getType() == StartELTokenDescription.START_EL) {
- ELInstanceImpl instance = readELInstance();
- if(instance != null) {
- model.addInstance(instance);
- }
- } else if(!hasNextToken()) {
- break;
- } else {
- if(lookUpNextToken(current) == null) {
+ if(current != null) {
+ throw new RuntimeException("Cannot reuse parser while it is running.");
+ }
+ try {
+ ELModelImpl model = new ELModelImpl();
+ model.setFirstToken(start);
+ current = start;
+ while (current != null) {
+ if (current.getType() == StartELTokenDescription.START_EL) {
+ ELInstanceImpl instance = readELInstance();
+ if (instance != null) {
+ model.addInstance(instance);
+ }
+ } else if (!hasNextToken()) {
break;
+ } else {
+ if (lookUpNextToken(current) == null) {
+ break;
+ }
+ setNextToken();
}
- setNextToken();
}
+ return model;
+ } finally {
+ current = null;
}
- return model;
}
protected ELInstanceImpl readELInstance() {
17 years, 2 months
JBoss Tools SVN: r11282 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 08:54:37 -0400 (Wed, 29 Oct 2008)
New Revision: 11282
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
fix: menu disable with StructuredSelection
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 12:54:18 UTC (rev 11281)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 12:54:37 UTC (rev 11282)
@@ -24,6 +24,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
@@ -73,13 +74,6 @@
}
return actor;
}
-
- protected org.eclipse.jdt.core.dom.CompilationUnit getCompilationUnit(ICompilationUnit source) {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
- parser.setSource(source);
- org.eclipse.jdt.core.dom.CompilationUnit result = (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(null);
- return result;
- }
public void clearSelectionCU() {
selectionCU.clear();
@@ -87,6 +81,15 @@
public void addCompilationUnit(ICompilationUnit cu) {
if (cu != null) {
+ IType[] types = null;
+ try {
+ types = cu.getTypes();
+ } catch (JavaModelException e) {
+ // just ignore it
+ }
+ if (types != null) {
+
+ }
selectionCU.add(cu);
}
}
@@ -96,6 +99,12 @@
updateSelectedItems(selection);
selection = null;
}
+ else {
+ if (selectionCU.size() == 0) {
+ updateOpen();
+ return;
+ }
+ }
if (selectionCU.size() == 0) {
processor.modify(null, new HashMap<String, EntityInfo>(), true);
return;
@@ -155,7 +164,8 @@
synchronized public int getSelectedSourceSize() {
int res = 0;
if (selection == null) {
- res = selectionCU.size();
+ //res = selectionCU.size();
+ res = 1;
}
else if (selection instanceof TextSelection) {
res = 1;
@@ -316,12 +326,14 @@
}
synchronized public void setSelection(ISelection selection) {
- if ((selection instanceof StructuredSelection) && selection.isEmpty()) {
- // just miss this selection
+ //System.out.println("Blah! " + selection); //$NON-NLS-1$
+ if (selection instanceof StructuredSelection) {
+ //System.out.println("This! " + this.selection); //$NON-NLS-1$
+ clearSelectionCU();
+ this.selection = null;
return;
}
this.selection = selection;
- //System.out.println("Blah! " + selection); //$NON-NLS-1$
}
}
17 years, 2 months
JBoss Tools SVN: r11281 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 08:54:18 -0400 (Wed, 29 Oct 2008)
New Revision: 11281
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
Log:
fix: menu disable with StructuredSelection
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 12:51:47 UTC (rev 11280)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/actions/JPAMapToolActor.java 2008-10-29 12:54:18 UTC (rev 11281)
@@ -24,6 +24,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.AST;
@@ -73,13 +74,6 @@
}
return actor;
}
-
- protected org.eclipse.jdt.core.dom.CompilationUnit getCompilationUnit(ICompilationUnit source) {
- ASTParser parser = ASTParser.newParser(AST.JLS3);
- parser.setSource(source);
- org.eclipse.jdt.core.dom.CompilationUnit result = (org.eclipse.jdt.core.dom.CompilationUnit) parser.createAST(null);
- return result;
- }
public void clearSelectionCU() {
selectionCU.clear();
@@ -87,6 +81,15 @@
public void addCompilationUnit(ICompilationUnit cu) {
if (cu != null) {
+ IType[] types = null;
+ try {
+ types = cu.getTypes();
+ } catch (JavaModelException e) {
+ // just ignore it
+ }
+ if (types != null) {
+
+ }
selectionCU.add(cu);
}
}
@@ -96,6 +99,12 @@
updateSelectedItems(selection);
selection = null;
}
+ else {
+ if (selectionCU.size() == 0) {
+ updateOpen();
+ return;
+ }
+ }
if (selectionCU.size() == 0) {
processor.modify(null, new HashMap<String, EntityInfo>(), true);
return;
@@ -155,7 +164,8 @@
synchronized public int getSelectedSourceSize() {
int res = 0;
if (selection == null) {
- res = selectionCU.size();
+ //res = selectionCU.size();
+ res = 1;
}
else if (selection instanceof TextSelection) {
res = 1;
@@ -316,12 +326,14 @@
}
synchronized public void setSelection(ISelection selection) {
- if ((selection instanceof StructuredSelection) && selection.isEmpty()) {
- // just miss this selection
+ //System.out.println("Blah! " + selection); //$NON-NLS-1$
+ if (selection instanceof StructuredSelection) {
+ //System.out.println("This! " + this.selection); //$NON-NLS-1$
+ clearSelectionCU();
+ this.selection = null;
return;
}
this.selection = selection;
- //System.out.println("Blah! " + selection); //$NON-NLS-1$
}
}
17 years, 2 months
JBoss Tools SVN: r11280 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 08:51:47 -0400 (Wed, 29 Oct 2008)
New Revision: 11280
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
Log:
fix: ignore EnumDeclaration & AnnotationTypeDeclaration
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 12:50:58 UTC (rev 11279)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 12:51:47 UTC (rev 11280)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.JPAConst;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefEntityInfo;
@@ -333,6 +334,16 @@
return;
}
org.eclipse.jdt.core.dom.CompilationUnit cu = Utils.getCompilationUnit(icu, true);
+ if (cu == null) {
+ return;
+ }
+ if (cu.types() != null && cu.types().size() > 0 ) {
+ Object tmp = cu.types().get(0);
+ if (!(tmp instanceof TypeDeclaration)) {
+ // ignore EnumDeclaration & AnnotationTypeDeclaration
+ return;
+ }
+ }
String fullyQualifiedName = cu.getTypeRoot().findPrimaryType().getFullyQualifiedName();
if (mapCUs_Info.containsKey(fullyQualifiedName)) {
return;
17 years, 2 months
JBoss Tools SVN: r11279 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 08:50:58 -0400 (Wed, 29 Oct 2008)
New Revision: 11279
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
Log:
fix: ignore EnumDeclaration & AnnotationTypeDeclaration
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 12:12:15 UTC (rev 11278)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/AllEntitiesInfoCollector.java 2008-10-29 12:50:58 UTC (rev 11279)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.dom.TypeDeclaration;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.EntityInfo;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.JPAConst;
import org.hibernate.eclipse.jdt.ui.internal.jpa.common.RefEntityInfo;
@@ -333,6 +334,16 @@
return;
}
org.eclipse.jdt.core.dom.CompilationUnit cu = Utils.getCompilationUnit(icu, true);
+ if (cu == null) {
+ return;
+ }
+ if (cu.types() != null && cu.types().size() > 0 ) {
+ Object tmp = cu.types().get(0);
+ if (!(tmp instanceof TypeDeclaration)) {
+ // ignore EnumDeclaration & AnnotationTypeDeclaration
+ return;
+ }
+ }
String fullyQualifiedName = cu.getTypeRoot().findPrimaryType().getFullyQualifiedName();
if (mapCUs_Info.containsKey(fullyQualifiedName)) {
return;
17 years, 2 months
JBoss Tools SVN: r11278 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test: src/org/jboss/tools/jsf/vpe/ajax4jsf/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-29 08:12:15 -0400 (Wed, 29 Oct 2008)
New Revision: 11278
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/poll.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/push.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/support.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2985, JUnit tests for a4j components were added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml 2008-10-29 12:12:15 UTC (rev 11278)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="page">
+
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/page.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/poll.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/poll.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml 2008-10-29 12:12:15 UTC (rev 11278)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="portlet">
+ <SPAN STYLE="-moz-user-modify: read-only;">
+ <SPAN> ....</SPAN>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/portlet.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/push.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/push.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml.xml 2008-10-29 12:12:15 UTC (rev 11278)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="region">
+
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/region.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml.xml 2008-10-29 12:12:15 UTC (rev 11278)
@@ -0,0 +1,5 @@
+<tests>
+ <test id="repeat">
+
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/repeat.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml 2008-10-29 12:12:15 UTC (rev 11278)
@@ -0,0 +1,23 @@
+<tests>
+ <test id="status1">
+ <SPAN CLASS=";" STYLE="-moz-user-modify: read-only; cursor: pointer;">
+ Complete
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;" />
+ </SPAN>
+ </test>
+ <test id="status2">
+ <SPAN CLASS=";" STYLE="-moz-user-modify: read-only; cursor: pointer;">
+ <DIV>
+ <IMG HEIGHT="16"
+ SRC="/.*ve/unresolved_image.gif/"
+ STYLE="-moz-user-modify: read-write;"/>
+ </DIV>
+ <DIV>
+ <IMG
+ SRC="/.*ve/unresolved_image.gif/"
+ STYLE="-moz-user-modify: read-write;"/>
+ </DIV>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/status.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/support.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/support.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2008-10-29 11:57:10 UTC (rev 11277)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2008-10-29 12:12:15 UTC (rev 11278)
@@ -68,39 +68,38 @@
}
public void testOutputPanel() throws Throwable {
- performContentTest("components/outputPanel.xhtml");//$NON-NLS-1$
}
- public void testPage() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ public void _testPage() throws Throwable {
+ performContentTest("components/page.xhtml");//$NON-NLS-1$
}
public void testPoll() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/poll.xhtml", "poll"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testPortlet() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/portlet.xhtml");//$NON-NLS-1$
}
public void testPush() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/push.xhtml", "push"); //$NON-NLS-1$ //$NON-NLS-2$
}
- public void testRegion() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ public void _testRegion() throws Throwable {
+ performContentTest("components/region.xhtml");//$NON-NLS-1$
}
public void testRepeat() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/repeat.xhtml", "repeat"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testStatus() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/status.xhtml");//$NON-NLS-1$
}
public void testSupport() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/support.xhtml", "support"); //$NON-NLS-1$ //$NON-NLS-2$
}
protected String getTestProjectName() {
17 years, 2 months
JBoss Tools SVN: r11277 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-29 07:57:10 -0400 (Wed, 29 Oct 2008)
New Revision: 11277
Modified:
workspace/snjeza/seam-examples/dvdstore.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/snjeza/seam-examples/dvdstore.zip
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Tools SVN: r11276 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-29 07:56:36 -0400 (Wed, 29 Oct 2008)
New Revision: 11276
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
JBIDE-3030 fix
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-10-29 11:49:48 UTC (rev 11275)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-10-29 11:56:36 UTC (rev 11276)
@@ -141,6 +141,10 @@
*/
public boolean isCloneableNode(VpePageContext pageContext,Node sourceNode) {
boolean rst = false;
+ // fix for JBIDE-3030
+ if(pageContext.getVisualBuilder().getCurrentIncludeInfo()==null) {
+ return rst;
+ }
final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
if (((this.isAvailable(file) && this.isAvailableForNode(sourceNode, file))) || isInResourcesBundle(pageContext, sourceNode)){
17 years, 2 months
JBoss Tools SVN: r11275 - trunk/as/docs/reference/en.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-10-29 07:49:48 -0400 (Wed, 29 Oct 2008)
New Revision: 11275
Modified:
trunk/as/docs/reference/en/master.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-463 - changing the URL for the DTD schema;
Modified: trunk/as/docs/reference/en/master.xml
===================================================================
--- trunk/as/docs/reference/en/master.xml 2008-10-29 11:24:07 UTC (rev 11274)
+++ trunk/as/docs/reference/en/master.xml 2008-10-29 11:49:48 UTC (rev 11275)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
-"http://www.docbook.org/xsd/4.3/docbook.xsd"
+"http://www.docbook.org/xml/4.3/docbookx.dtd"
[<!ENTITY quick_start SYSTEM "modules/quick_start.xml">
<!ENTITY runtimes_servers SYSTEM "modules/runtimes_servers.xml">
17 years, 2 months
JBoss Tools SVN: r11274 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: resources and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-10-29 07:24:07 -0400 (Wed, 29 Oct 2008)
New Revision: 11274
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3030Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
junit for JBIDE-3030
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-10-29 11:11:17 UTC (rev 11273)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/META-INF/MANIFEST.MF 2008-10-29 11:24:07 UTC (rev 11274)
@@ -20,6 +20,8 @@
org.eclipse.jface.text,
org.jboss.tools.jsf.vpe.jsf,
org.jboss.tools.jst.web,
+ org.eclipse.core.filesystem,
+ org.eclipse.ui.ide,
org.jboss.tools.vpe.resref;bundle-version="2.0.0",
org.jboss.tools.common.el.ui;bundle-version="1.0.0",
org.jboss.tools.common.el.core;bundle-version="2.0.0"
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.html 2008-10-29 11:24:07 UTC (rev 11274)
@@ -0,0 +1,124 @@
+<html>
+<head>
+<title>
+html table
+</title>
+</head>
+<body>
+<table cellpadding="3" cellspacing="3" border="1">
+
+ <tr id="2row 1">
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ </tr>
+ <tr id="2row 2">
+ <td bgcolor="red">
+
+ </td>
+ <td bgcolor="green" height="50" width="200">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ </tr>
+
+ <tr id="2row 3">
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ </tr>
+
+ <tr id="2row 4">
+ <td bgcolor="orange" height="50" width="63">
+
+ </td>
+ <td bgcolor="blue" height="10" width="224">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ </tr>
+
+ <tr id="2row 5">
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ </tr>
+
+ </table>
+
+
+
+<table cellpadding="3" cellspacing="3" border="1">
+
+ <tr id="row 1">
+ <td bgcolor="yellow">
+ </td>
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ </tr>
+ <tr id="row 2">
+ <td bgcolor="red">
+
+ </td>
+ <td bgcolor="green" height="50" width="200">
+
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ </tr>
+
+ <tr id="row 3">
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ </tr>
+
+ <tr id="row 4">
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td bgcolor="orange" height="50" width="63">
+
+ </td>
+ <td bgcolor="blue" height="10" width="224">
+
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ </tr>
+
+ <tr id="row 5">
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td colspan="2" bgcolor="aqua" height="20">
+
+ </td>
+ <td bgcolor="yellow" width="70">
+ </td>
+ <td bgcolor="pink" width="70">
+ </td>
+ </tr>
+
+ </table>
+</body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.jsp 2008-10-29 11:24:07 UTC (rev 11274)
@@ -0,0 +1,15 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ <f:loadBundle basename="demo.resources" var="msg" />
+ <f:view>
+ <H1> JSP Test Page </H1>
+ <h:outputText value="#{msg.header}" />
+ </f:view>
+ </body>
+</html>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/JBIDE-3030/test.xhtml 2008-10-29 11:24:07 UTC (rev 11274)
@@ -0,0 +1,18 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<f:loadBundle basename="demo.Messages" var="msg" />
+<head>
+<title><ui:insert name="pageTitle">Page Title</ui:insert></title>
+</head>
+
+<body>
+ <!-- Comment Node -->
+ <h1>Text XHtml Page</h1>
+
+</body>
+
+</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-29 11:11:17 UTC (rev 11273)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-10-29 11:24:07 UTC (rev 11274)
@@ -39,6 +39,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2624Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2774Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2828Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3030Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -103,6 +104,7 @@
suite.addTestSuite(JsfComponentContentTest.class);
suite.addTestSuite(JBIDE2774Test.class);
suite.addTestSuite(JBIDE2828Test.class);
+ suite.addTestSuite(JBIDE3030Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3030Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3030Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3030Test.java 2008-10-29 11:24:07 UTC (rev 11274)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+* Copyright (c) 2007-2008 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.jsf.vpe.jsf.test.jbide;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+import org.eclipse.core.filesystem.EFS;
+import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfTestPlugin;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * Test class for JBIDE-3030
+ *
+ * @author mareshkau
+ *
+ */
+public class JBIDE3030Test extends VpeTest {
+
+ private static Set<String> fileNames = new HashSet<String>();;
+
+ static {
+ String jbide3030Path= JsfTestPlugin.getPluginResourcePath()
+ +File.separator+"JBIDE-3030"+File.separator;//$NON-NLS-1$
+ fileNames.add(jbide3030Path+"test.jsp"); //$NON-NLS-1$
+ fileNames.add(jbide3030Path+"test.html"); //$NON-NLS-1$
+ fileNames.add(jbide3030Path+"test.xhtml"); //$NON-NLS-1$
+ }
+
+
+ public JBIDE3030Test(String name) {
+ super(name);
+ }
+
+ /**
+ *
+ * @throws Throwable
+ */
+ public void testJBIDE3030() throws Exception {
+
+ setException(null);
+
+ for (String fileName : fileNames) {
+
+ File file = new File(fileName);
+
+ assertTrue("File doesn't exists", file.isFile()); //$NON-NLS-1$
+
+ IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+
+ IFileStore fileStore = EFS.getLocalFileSystem().getStore(file.toURI());
+
+ IEditorPart editorPart = IDE.openEditorOnFileStore(page, fileStore );
+
+ assertNotNull(editorPart);
+
+ assertTrue("Editor Part should be instance of JSPMultipageEditor", //$NON-NLS-1$
+ editorPart instanceof JSPMultiPageEditor);
+
+ page.closeAllEditors(false);
+
+ if(getException()!=null) {
+
+ throw new Exception(getException());
+ }
+ }
+ }
+
+}
17 years, 2 months
JBoss Tools SVN: r11273 - workspace/snjeza/seam-examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-10-29 07:11:17 -0400 (Wed, 29 Oct 2008)
New Revision: 11273
Modified:
workspace/snjeza/seam-examples/booking.zip
Log:
JBIDE-3031 Project examples (Seam Booking) don't start on server.
Modified: workspace/snjeza/seam-examples/booking.zip
===================================================================
(Binary files differ)
17 years, 2 months
JBoss Tools SVN: r11272 - trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 07:07:40 -0400 (Wed, 29 Oct 2008)
New Revision: 11272
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
Log:
JBIDE-3033 - change to Many2One as default annotation
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-10-29 11:07:17 UTC (rev 11271)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-10-29 11:07:40 UTC (rev 11272)
@@ -13,7 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.OneToOne;
+import javax.persistence.ManyToOne;
@Entity
public class Foto {
@@ -23,7 +23,7 @@
@Id @GeneratedValue
protected Short id;
- @OneToOne(mappedBy="foto")
+ @ManyToOne
protected Person person;
protected Short width_IDtest;
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-10-29 11:07:17 UTC (rev 11271)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-10-29 11:07:40 UTC (rev 11272)
@@ -15,8 +15,8 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.OneToOne;
import javax.persistence.OneToMany;
+import javax.persistence.ManyToOne;
@Entity
public class Person {
@@ -27,7 +27,7 @@
@OneToMany(mappedBy="documentOwner")
protected Set<Document> documents;
- @OneToOne(mappedBy="person")
+ @ManyToOne
protected Foto foto;
protected Set someTestSet;
17 years, 2 months
JBoss Tools SVN: r11271 - branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 07:07:17 -0400 (Wed, 29 Oct 2008)
New Revision: 11271
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
Log:
JBIDE-3033 - change to Many2One as default annotation
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-10-29 11:04:53 UTC (rev 11270)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Foto.java 2008-10-29 11:07:17 UTC (rev 11271)
@@ -13,7 +13,7 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.OneToOne;
+import javax.persistence.ManyToOne;
@Entity
public class Foto {
@@ -23,7 +23,7 @@
@Id @GeneratedValue
protected Short id;
- @OneToOne(mappedBy="foto")
+ @ManyToOne
protected Person person;
protected Short width_IDtest;
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-10-29 11:04:53 UTC (rev 11270)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/res/specimen/test/annotated/Person.java 2008-10-29 11:07:17 UTC (rev 11271)
@@ -15,8 +15,8 @@
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
-import javax.persistence.OneToOne;
import javax.persistence.OneToMany;
+import javax.persistence.ManyToOne;
@Entity
public class Person {
@@ -27,7 +27,7 @@
@OneToMany(mappedBy="documentOwner")
protected Set<Document> documents;
- @OneToOne(mappedBy="person")
+ @ManyToOne
protected Foto foto;
protected Set someTestSet;
17 years, 2 months
JBoss Tools SVN: r11270 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 07:04:53 -0400 (Wed, 29 Oct 2008)
New Revision: 11270
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
Log:
JBIDE-3033 - change to Many2One as default annotation
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2008-10-29 11:03:57 UTC (rev 11269)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2008-10-29 11:04:53 UTC (rev 11270)
@@ -290,7 +290,7 @@
while (itVarNames.hasNext()) {
VariableDeclarationFragment var = (VariableDeclarationFragment)itVarNames.next();
String name = var.getName().getIdentifier();
- entityInfo.addReference(name, entityFullyQualifiedName, RefType.ONE2ONE);
+ entityInfo.addReference(name, entityFullyQualifiedName, RefType.MANY2ONE);
}
}
else if (tb.getJavaElement() instanceof BinaryType) {
17 years, 2 months
JBoss Tools SVN: r11269 - trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-10-29 07:03:57 -0400 (Wed, 29 Oct 2008)
New Revision: 11269
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
Log:
JBIDE-3033 - change to Many2One as default annotation
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2008-10-29 09:52:00 UTC (rev 11268)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/src/org/hibernate/eclipse/jdt/ui/internal/jpa/collect/CollectEntityInfo.java 2008-10-29 11:03:57 UTC (rev 11269)
@@ -290,7 +290,7 @@
while (itVarNames.hasNext()) {
VariableDeclarationFragment var = (VariableDeclarationFragment)itVarNames.next();
String name = var.getName().getIdentifier();
- entityInfo.addReference(name, entityFullyQualifiedName, RefType.ONE2ONE);
+ entityInfo.addReference(name, entityFullyQualifiedName, RefType.MANY2ONE);
}
}
else if (tb.getJavaElement() instanceof BinaryType) {
17 years, 2 months
JBoss Tools SVN: r11268 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2008-10-29 05:52:00 -0400 (Wed, 29 Oct 2008)
New Revision: 11268
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/jsFunction.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadBundle.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadScript.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadStyle.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml.xml
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2985, JUnit test for a4j components.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java 2008-10-29 08:26:03 UTC (rev 11267)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/src/org/jboss/tools/jsf/vpe/ajax4jsf/template/Ajax4JSFMediaOutput.java 2008-10-29 09:52:00 UTC (rev 11268)
@@ -45,7 +45,7 @@
nsIDOMElement img = visualDocument
.createElement(HTML_TAG_IMG);
- img.setAttribute(ATTR_SRC, "file:///" + getAbsoluteResourcePath(IMG_PATH));
+ img.setAttribute(ATTR_SRC, "file:///" + getAbsoluteResourcePath(IMG_PATH).replace('\\', '/'));
img.setAttribute(ATTR_ALT, ALT_MEDIA_OTPUT);
img.setAttribute(ATTR_WIDTH, "100");
img.setAttribute(ATTR_HEIGHT, "50");
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml 2008-10-29 09:52:00 UTC (rev 11268)
@@ -0,0 +1,7 @@
+<tests>
+ <test id="htmlCommandLink">
+ <A DIR="" STYLE="-moz-user-modify: read-write;">
+ <SPAN>value</SPAN>
+ </A>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/htmlCommandLink.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml.xml 2008-10-29 09:52:00 UTC (rev 11268)
@@ -0,0 +1,11 @@
+<tests>
+ <test id="include">
+ <DIV
+ STYLE="margin: 3px 0pt; padding: 0pt 5px; background-color: rgb(236, 243, 255); cursor: pointer; font-style: italic; color: rgb(0, 81, 221);"
+ VPE:INCLUDE-ELEMENT="yes">
+ /pages/include/first.xhtml
+ <BR VPE:PSEUDO-ELEMENT="yes"
+ STYLE="font-style: italic; color: green; -moz-user-modify: read-only;"/>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/include.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/jsFunction.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/jsFunction.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadBundle.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadBundle.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadScript.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadScript.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadStyle.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/loadStyle.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/log.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml.xml 2008-10-29 09:52:00 UTC (rev 11268)
@@ -0,0 +1,9 @@
+<tests>
+ <test id="mediaOutput">
+ <DIV>
+ <IMG WIDTH="100" HEIGHT="50"
+ SRC="/.*resources/mediaOutput/mediaOutput.jpg/"
+ ALT=" mediaOutput"/>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/mediaOutput.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml.xml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml.xml 2008-10-29 09:52:00 UTC (rev 11268)
@@ -0,0 +1,17 @@
+<tests>
+ <test id="outputPanel">
+ <DIV ID="outputPanel" STYLE="-moz-user-modify: read-write;">
+ <TABLE
+ STYLE="border: 1px dotted rgb(255, 102, 0); padding: 5px; width: 100%;">
+ <TR>
+ <TD>
+ <DIV>
+ <SPAN> Some text </SPAN>
+ <INPUT VALUE="#{rsBean.text1}" READONLY=""/>
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/outputPanel.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2008-10-29 08:26:03 UTC (rev 11267)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2008-10-29 09:52:00 UTC (rev 11268)
@@ -36,39 +36,39 @@
}
public void testHtmlCommandLink() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/htmlCommandLink.xhtml");//$NON-NLS-1$
}
public void testJsFunction() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/jsFunction.xhtml", "jsFunction"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testInclude() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/include.xhtml");//$NON-NLS-1$
}
public void testLoadBundle() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/loadBundle.xhtml", "loadBundle"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testLoadScript() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/loadScript.xhtml", "loadScript"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testLoadStyle() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/loadStyle.xhtml", "loadStyle"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testLog() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performInvisibleTagTest("components/log.xhtml", "log"); //$NON-NLS-1$ //$NON-NLS-2$
}
public void testMediaOutput() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/mediaOutput.xhtml");//$NON-NLS-1$
}
public void testOutputPanel() throws Throwable {
- assertTrue("it is necessary to add a body of the test ", false);//$NON-NLS-1$
+ performContentTest("components/outputPanel.xhtml");//$NON-NLS-1$
}
public void testPage() throws Throwable {
17 years, 2 months
JBoss Tools SVN: r11267 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: AnthonyHib
Date: 2008-10-29 04:26:03 -0400 (Wed, 29 Oct 2008)
New Revision: 11267
Modified:
trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
Log:
HBX-524 : Reverse of one-to-one relationships
Modified: trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-10-29 08:25:03 UTC (rev 11266)
+++ trunk/hibernatetools/docs/reference/en/modules/reverseengineering.xml 2008-10-29 08:26:03 UTC (rev 11267)
@@ -95,7 +95,12 @@
<foreign-key constraint-name="ORDER_CUST">
<many-to-one property="customer"/>
<set property="orders"/>
- </foreign-key>
+ </foreign-key>
+ <!-- can also control a pure (shared pk) one-to-one -->
+ <foreign-key constraint-name="ADDRESS_PERSON">
+ <one-to-one exclude="false"/>
+ <inverse-one-to-one exclude="true"/>
+ </foreign-key>
</table>
</hibernate-reverse-engineering>]]></programlisting>
@@ -695,7 +700,7 @@
<property><foreign-key></property>
</emphasis> has two purposes. One for allowing to define foreign-keys in databases that
does not support them or does not have them defined in their schema. Secondly, to allow
- defining the name of the resulting properties (many-to-one and one-to-many's).</para>
+ defining the name of the resulting properties (many-to-one, one-to-one and one-to-many's).</para>
<programlisting role="XML"><![CDATA[<foreign-key
constraint-name="foreignKeyName"
@@ -709,6 +714,13 @@
exclude="true|false"/>
<set
property="aCollectionName"
+ exclude="true|false"
+
+ <one-to-one
+ property="aPropertyName"
+ exclude="true|false"/>
+ <inverse-one-to-one
+ property="aPropertyName"
exclude="true|false"/>
</foreign-key>]]></programlisting>
<table frame="topbot">
@@ -738,7 +750,7 @@
<entry><para>constraint-name</para></entry>
<entry><para>Name of the foreign key constraint. Important when
- naming many-to-one and set. It is the constraint-name that is used to link the
+ naming many-to-one, one-to-one and set. It is the constraint-name that is used to link the
processed foreign-keys with the resulting property names.</para></entry>
<entry><para>Required</para></entry>
@@ -800,6 +812,26 @@
Exclude can be used to explicitly define that it should be created or not.</para></entry>
<entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>one-to-one</para></entry>
+
+ <entry><para>Defines that a one-to-one should be created and the
+ property attribute specifies the name of the resulting property. Exclude can be
+ used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
+ </row>
+
+ <row>
+ <entry><para>inverse-one-to-one</para></entry>
+
+ <entry><para>Defines that an inverse one-to-one should be created based on this foreign-key
+ and the property attribute specifies the name of the resulting property.
+ Exclude can be used to explicitly define that it should be created or not.</para></entry>
+
+ <entry><para>Optional</para></entry>
</row>
</tbody>
17 years, 2 months
JBoss Tools SVN: r11265 - branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.creation.ui.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-10-29 04:05:11 -0400 (Wed, 29 Oct 2008)
New Revision: 11265
Modified:
branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
Log:
JBIDE-3005:JBossWS Property Page isn't defined correctly
Modified: branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-10-29 07:19:52 UTC (rev 11264)
+++ branches/jbosstools-3.0.0.Beta1/ws/plugins/org.jboss.tools.ws.creation.ui/plugin.xml 2008-10-29 08:05:11 UTC (rev 11265)
@@ -68,6 +68,14 @@
class="org.jboss.tools.ws.creation.ui.project.facet.JBossWSPropertyPage"
id="org.jboss.tools.ws.creation.ui.page"
name="JBossWS Runtime">
+ <enabledWhen>
+<adapt
+type="org.eclipse.core.resources.IProject">
+<test
+property="org.eclipse.wst.common.project.facet.core.projectFacet"
+value="jbossws.core"/>
+</adapt>
+</enabledWhen>
</page>
</extension>
17 years, 2 months
JBoss Tools SVN: r11264 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: ui/editors and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-10-29 03:19:52 -0400 (Wed, 29 Oct 2008)
New Revision: 11264
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
Log:
JBIDE-2992
add new check actions for the xml2java analyzer.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java 2008-10-28 21:57:00 UTC (rev 11263)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java 2008-10-29 07:19:52 UTC (rev 11264)
@@ -27,8 +27,8 @@
super();
Assert.isNotNull(error);
this.error = error;
- while(error != null && error instanceof InvocationTargetException){
- error = ((InvocationTargetException)error).getTargetException();
+ while(this.error != null && this.error instanceof InvocationTargetException){
+ this.error = ((InvocationTargetException)this.error).getTargetException();
}
}
@@ -57,7 +57,9 @@
.get(SmooksGraphConstants.IMAGE_ERROR));
Label messageLabel = new Label(errorComposite, SWT.NONE);
- messageLabel.setText(error.getLocalizedMessage());
+ String errorMessage = error.getLocalizedMessage();
+ if(errorMessage == null ) errorMessage = "unknown error happen";
+ messageLabel.setText(errorMessage);
gd = new GridData(GridData.FILL_HORIZONTAL);
messageLabel.setLayoutData(gd);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-28 21:57:00 UTC (rev 11263)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-10-29 07:19:52 UTC (rev 11264)
@@ -1289,7 +1289,7 @@
SWT.NONE);
Menu menu = new Menu(getSite().getShell(), SWT.POP_UP);
List<ResolveCommand> list = result.getResolveProblem();
- for (Iterator iterator2 = list.iterator(); iterator2.hasNext();) {
+ for (Iterator<ResolveCommand> iterator2 = list.iterator(); iterator2.hasNext();) {
final ResolveCommand resolveCommand = (ResolveCommand) iterator2
.next();
MenuItem item = new MenuItem(menu, SWT.NONE);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-10-28 21:57:00 UTC (rev 11263)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/UIUtils.java 2008-10-29 07:19:52 UTC (rev 11264)
@@ -2,7 +2,6 @@
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -15,7 +14,6 @@
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.layout.FillLayout;
@@ -165,29 +163,70 @@
TargetModel targetModel = (TargetModel) iterator.next();
Object refObj = targetModel.getReferenceEntityModel();
if (refObj instanceof JavaBeanModel) {
- Class clazz = ((JavaBeanModel) refObj).getBeanClass();
- if (clazz != null && (clazz.isInterface())) {
- DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
- result
- .setErrorMessage("Java model \""
- + ((JavaBeanModel) refObj).getName()
- + "\" can't be instanced case its instance class is interface or abstractclass");
- if (List.class.isAssignableFrom(clazz)) {
+ if (!targetModel.getModelTargetConnections().isEmpty()) {
+ String instanceName = ((JavaBeanModel) refObj)
+ .getBeanClassString();
+ Class instanceClazz = null;
+ if(((JavaBeanModel) refObj).isPrimitive()) {
+ // TODO process primitive type
+ continue;
+ }
+ String errorMessage = "";
+ try {
+ ClassLoader loader = newProjectClassLoader(context
+ .getSmooksConfigFile());
+ instanceClazz = loader.loadClass(instanceName);
+ } catch (Exception e) {
+ errorMessage = e.toString();
+ }
+ if (instanceClazz == null) {
+ DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
+ result.setErrorMessage("The instance class of \""
+ + ((JavaBeanModel) refObj).getName()
+ + "\" can't be loaded. Instance name is \"" + instanceName + "\"");
JavaModelResolveCommand command = new JavaModelResolveCommand(
context);
command
- .setResolveDescription("Change the instance class to \"java.util.ArrayList\"");
- command.setInstanceName("java.util.ArrayList");
+ .setResolveDescription("Change the instance class to \""
+ + ((JavaBeanModel) refObj)
+ .getBeanClass()
+ .getCanonicalName() + "\"");
+ command.setInstanceName(((JavaBeanModel) refObj).getBeanClass().getCanonicalName());
command.setJavaBean((JavaBeanModel) refObj);
result.addResolveCommand(command);
+ resultList.add(result);
}
- resultList.add(result);
+ if (instanceClazz != null && instanceClazz.isInterface()) {
+ DesignTimeAnalyzeResult result = new DesignTimeAnalyzeResult();
+ result
+ .setErrorMessage("Java model \""
+ + ((JavaBeanModel) refObj).getName()
+ + "\" can't be instanced. Instance name is \"" + instanceName + "\"");
+ if (List.class.isAssignableFrom(instanceClazz)) {
+ JavaModelResolveCommand command = new JavaModelResolveCommand(
+ context);
+ command
+ .setResolveDescription("Change the instance class to \"java.util.ArrayList\"");
+ command.setInstanceName("java.util.ArrayList");
+ command.setJavaBean((JavaBeanModel) refObj);
+ result.addResolveCommand(command);
+ }
+ resultList.add(result);
+ }
}
}
}
return resultList;
}
+ public static ClassLoader newProjectClassLoader(IFile file)
+ throws Exception {
+ IProject p = file.getProject();
+ IJavaProject jp = JavaCore.create(p);
+ ProjectClassLoader loader = new ProjectClassLoader(jp);
+ return loader;
+ }
+
public static Status createErrorStatus(Throwable throwable, String message) {
while (throwable != null
&& throwable instanceof InvocationTargetException) {
17 years, 2 months
JBoss Tools SVN: r11263 - trunk/documentation/whatsnew/esb.
by jbosstools-commits@lists.jboss.org
Author: john.graham(a)jboss.org
Date: 2008-10-28 17:57:00 -0400 (Tue, 28 Oct 2008)
New Revision: 11263
Modified:
trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html
Log:
Additional explanation about BPMN -> jPDL wizard. Clarification of feature updates to jboss-esb.xml editor.
Modified: trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html
===================================================================
--- trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html 2008-10-28 21:52:20 UTC (rev 11262)
+++ trunk/documentation/whatsnew/esb/esb-news-1.1.0.Beta1.html 2008-10-28 21:57:00 UTC (rev 11263)
@@ -26,7 +26,8 @@
<tr>
<td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>BPMN to jPDL Export Wizard</b></td>
<td valign="top">
- <p>We added an export wizard for translating BPMN to jPDL.</p>
+ <p>We added an export wizard that converts BPMN diagrams defined using the Eclipse SOA Tools Platform (STP) BPMN editor and
+ produces jPDL that can be executed with the JBoss jBPM process engine.</p>
<p><img src="../images/bpmn2jpdl_exportwiz.png"/></p>
</td>
</tr>
@@ -48,7 +49,7 @@
<tr>
<td valign="top" align="right"><a name="itemname3" id="itemname3"></a><b>jboss-esb.xml editor</b></td>
<td valign="top">
- <p>We added an structured xml editor for the jboss-esb.xml file used in JBoss ESB archives.</p>
+ <p>We added additional wizard support for providers, listeners, and actions in the JBoss ESB configuration file editor.</p>
<p><img src="../images/esbxmleditor.png"/></p>
</td>
</tr>
17 years, 2 months
JBoss Tools SVN: r11262 - trunk/documentation/whatsnew.
by jbosstools-commits@lists.jboss.org
Author: john.graham(a)jboss.org
Date: 2008-10-28 17:52:20 -0400 (Tue, 28 Oct 2008)
New Revision: 11262
Modified:
trunk/documentation/whatsnew/index.html
Log:
Correct links to JBESB and Smooks files
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2008-10-28 21:04:28 UTC (rev 11261)
+++ trunk/documentation/whatsnew/index.html 2008-10-28 21:52:20 UTC (rev 11262)
@@ -27,8 +27,8 @@
<p><a href="hibernate/hibernate-news-3.2.4.Beta1.html">Hibernate Tools</a></p>
<p><a href="as/as-news-2.0.0.Beta1.html">JBoss AS Tools</a></p>
<p><a href="vpe/vpe-news-3.0.0.Beta1.html">Visual Page Editor</a></p>
- <p><a href="esb/esb-news-1.1.0.beta1.html">JBoss ESB Tools</a></p>
- <p><a href="smooks/smooks-news-1.0.0.beta1.html">Smooks Tools</a></p>
+ <p><a href="esb/esb-news-1.1.0.Beta1.html">JBoss ESB Tools</a></p>
+ <p><a href="smooks/smooks-news-1.0.0.Beta1.html">Smooks Tools</a></p>
</td>
</tr>
17 years, 2 months
JBoss Tools SVN: r11261 - branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2008-10-28 17:04:28 -0400 (Tue, 28 Oct 2008)
New Revision: 11261
Modified:
branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3034
main menu contribution commented to avoid double Source menu items in main menu
Modified: branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/plugin.xml 2008-10-28 20:55:47 UTC (rev 11260)
+++ branches/jbosstools-3.0.0.Beta1/hibernatetools/plugins/org.hibernate.eclipse.jdt.ui/plugin.xml 2008-10-28 21:04:28 UTC (rev 11261)
@@ -38,8 +38,7 @@
<super type="org.eclipse.core.resources.textmarker"/>
<persistent value="true"/>
</extension>
- <extension point="org.eclipse.ui.actionSets">
- <!-- main menu -->
+ <!--extension point="org.eclipse.ui.actionSets">
<actionSet label="Java Coding" description="Action set containing coding related Java actions"
visible="true" id="org.eclipse.jdt.ui.CodingActionSet3">
<menu label="&Source" path="edit" id="org.eclipse.jdt.ui.source.menu">
@@ -59,7 +58,7 @@
style="push">
</action>
</actionSet>
- </extension>
+ </extension-->
<extension point="org.eclipse.ui.popupMenus">
<!-- java editor context menu -->
<viewerContribution
17 years, 2 months