JBoss Tools SVN: r5847 - in trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console: node and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2008-01-21 12:07:48 -0500 (Mon, 21 Jan 2008)
New Revision: 5847
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1422
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-01-21 17:06:32 UTC (rev 5846)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurations.java 2008-01-21 17:07:48 UTC (rev 5847)
@@ -64,6 +64,9 @@
*/
public class KnownConfigurations {
+ // flag broadcast updates to all listeners - true by default
+ // for prevent broadcasting set this flag into false
+ private boolean broadcastFlag = true;
// TODO: is the best way for the querypage model ?
private QueryPageModel queryPages = new QueryPageModel();
private List configurationListeners = new ArrayList();
@@ -138,7 +141,7 @@
* Add the repository to the receiver's list of known configurations. Doing this will enable
*
*/
- public ConsoleConfiguration addConfiguration(final ConsoleConfiguration configuration, boolean broadcast) {
+ public ConsoleConfiguration addConfiguration(final ConsoleConfiguration configuration) {
// Check the cache for an equivalent instance and if there is one, just update the cache
ConsoleConfiguration existingConfiguration = internalGetRepository(configuration.getName() );
if (existingConfiguration == null) {
@@ -150,7 +153,7 @@
existingConfiguration = configuration;
}
- if (broadcast) {
+ if (broadcastFlag) {
fireNotification(new Notification() {
public void notify(KnownConfigurationsListener listener) {
listener.configurationAdded(configuration);
@@ -164,22 +167,24 @@
ConsoleConfiguration[] cfgs = getConfigurations();
for (int i = 0; i < cfgs.length; i++) {
ConsoleConfiguration configuration = cfgs[i];
- removeConfiguration(configuration, false);
+ removeConfiguration(configuration);
}
}
// added forUpdate as a workaround for letting listeners know it is done to update the configuration so they don't cause removal issues.
- public void removeConfiguration(final ConsoleConfiguration configuration, final boolean forUpdate) {
+ public void removeConfiguration(final ConsoleConfiguration configuration) {
ConsoleConfiguration oldConfig = (ConsoleConfiguration) getRepositoriesMap().remove(configuration.getName() );
if (oldConfig != null) {
oldConfig.removeConsoleConfigurationListener(sfListener);
- fireNotification(new Notification() {
- public void notify(KnownConfigurationsListener listener) {
- listener.configurationRemoved(configuration, forUpdate);
- }
- });
+ if (broadcastFlag) {
+ fireNotification(new Notification() {
+ public void notify(KnownConfigurationsListener listener) {
+ listener.configurationRemoved(configuration);
+ }
+ });
+ }
oldConfig.reset();
removeLoggingStream( oldConfig );
@@ -347,5 +352,19 @@
return queryParameters;
}
+ public boolean getBroadcast() {
+ return this.broadcastFlag;
+ }
+ public void setBroadcast(boolean broadcastFlag) {
+ this.broadcastFlag = broadcastFlag;
+ if (broadcastFlag) {
+ fireNotification(new Notification() {
+ public void notify(KnownConfigurationsListener listener) {
+ listener.configurationRefreshAll();
+ }
+ });
+ }
+ }
+
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java 2008-01-21 17:06:32 UTC (rev 5846)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/KnownConfigurationsListener.java 2008-01-21 17:07:48 UTC (rev 5847)
@@ -31,5 +31,7 @@
public void sessionFactoryClosing(ConsoleConfiguration configuration, SessionFactory closingFactory);
- public void configurationRemoved(ConsoleConfiguration root, boolean forUpdate);
+ public void configurationRemoved(ConsoleConfiguration root);
+
+ public void configurationRefreshAll();
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java 2008-01-21 17:06:32 UTC (rev 5846)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/node/ConfigurationListNode.java 2008-01-21 17:07:48 UTC (rev 5847)
@@ -52,10 +52,14 @@
childrenCreated=false;
}
- public void configurationRemoved(ConsoleConfiguration root, boolean forUpdate) {
+ public void configurationRemoved(ConsoleConfiguration root) {
markChildrenForReload();
}
+ public void configurationRefreshAll() {
+ markChildrenForReload();
+ }
+
public void sessionFactoryClosing(ConsoleConfiguration configuration, SessionFactory closingFactory) {
}
18 years, 2 months
JBoss Tools SVN: r5846 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-01-21 12:06:32 -0500 (Mon, 21 Jan 2008)
New Revision: 5846
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
Log:
JBIDE-1553 JUnit Test for Seam EL Content Assist
SeamELContentAssistTest is added to the suite.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-01-21 17:05:58 UTC (rev 5845)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/SeamUiAllTests.java 2008-01-21 17:06:32 UTC (rev 5846)
@@ -15,6 +15,7 @@
import junit.framework.TestSuite;
import org.jboss.tools.seam.ui.test.preferences.SeamPreferencesPageTest;
+import org.jboss.tools.seam.ui.test.ca.SeamELContentAssistTest;
import org.jboss.tools.seam.ui.test.hyperlink.SeamViewHyperlinkPartitionerTest;
import org.jboss.tools.seam.ui.test.view.SeamComponentsViewAllTests;
import org.jboss.tools.seam.ui.test.view.SeamComponentsViewTest;
@@ -35,6 +36,7 @@
suite.addTestSuite(SeamFormNewWizardTest.class);
suite.addTestSuite(SeamPreferencesPageTest.class);
suite.addTestSuite(SeamViewHyperlinkPartitionerTest.class);
+ suite.addTestSuite(SeamELContentAssistTest.class);
return suite;
}
}
18 years, 2 months
JBoss Tools SVN: r5845 - trunk/jsf/docs/resources/styles/en.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-01-21 12:05:58 -0500 (Mon, 21 Jan 2008)
New Revision: 5845
Modified:
trunk/jsf/docs/resources/styles/en/html.css
Log:
http://jira.jboss.com/jira/browse/JBDS-162 Note box update
Modified: trunk/jsf/docs/resources/styles/en/html.css
===================================================================
--- trunk/jsf/docs/resources/styles/en/html.css 2008-01-21 17:03:14 UTC (rev 5844)
+++ trunk/jsf/docs/resources/styles/en/html.css 2008-01-21 17:05:58 UTC (rev 5845)
@@ -112,7 +112,7 @@
}
DIV.note{
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #cfe3ff;
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #FFFDD3;
background-image : url('images/ico_note.gif'); background-repeat : no-repeat; background-position :top left;
}
18 years, 2 months
JBoss Tools SVN: r5844 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-01-21 12:03:14 -0500 (Mon, 21 Jan 2008)
New Revision: 5844
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Log:
JBIDE-1553 JUnit Test for Seam EL Content Assist
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-01-21 17:01:38 UTC (rev 5843)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-01-21 17:03:14 UTC (rev 5844)
@@ -423,52 +423,6 @@
assertTrue("The file \"" + PAGE_NAME + "\" is not found", (jspFile.exists()));
FileEditorInput editorInput = new FileEditorInput(jspFile);
-
-// IDocumentProvider documentProvider = null;
-// Throwable exception = null;
-// try {
-// documentProvider = DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
-// } catch (Exception x) {
-// exception = x;
-// x.printStackTrace();
-//
-// }
-// assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
-//
-// assertTrue("The document provider for the file \"" + PAGE_NAME + "\" is not loaded", (documentProvider != null));
-
-// try {
-// documentProvider.connect(editorInput);
-// } catch (Exception x) {
-// exception = x;
-// x.printStackTrace();
-// assertTrue("The document provider is not able to be initialized with the editor input", false);
-// }
-// assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
-
-// IDocument document = documentProvider.getDocument(editorInput);
-// IDocumentExtension3 de3 = (document instanceof IDocumentExtension3) ?
-// (IDocumentExtension3)document : null;
-
-// assertTrue("The document for the file \"" + PAGE_NAME + "\" is not loaded", (document != null));
-
-// IStructuredModel model = null;
-// IStructuredDocument sd = null;
-// if (document instanceof IStructuredDocument) {
-// sd = (IStructuredDocument)document;
- // corresponding releaseFromEdit occurs in
- // dispose()
-// model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
-// EditorModelUtil.addFactoriesTo(model);
-// }
-
-// assertTrue("The document model for the file \"" + PAGE_NAME + "\" is not loaded", (model != null));
-// IDocumentPartitioner partitioner = null;
-// IDocumentPartitionerExtension2 pe2 = null;
-
-// String[] contentTypes = document.getLegalContentTypes();
-// String[] partitionings = de3.getPartitionings();
-
Throwable exception = null;
IEditorPart editorPart = null;
try {
18 years, 2 months
JBoss Tools SVN: r5843 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-21 12:01:38 -0500 (Mon, 21 Jan 2008)
New Revision: 5843
Modified:
trunk/as/docs/reference/en/modules/webtools.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-199 - renaming sections and rearranging some data
Modified: trunk/as/docs/reference/en/modules/webtools.xml
===================================================================
--- trunk/as/docs/reference/en/modules/webtools.xml 2008-01-21 17:00:58 UTC (rev 5842)
+++ trunk/as/docs/reference/en/modules/webtools.xml 2008-01-21 17:01:38 UTC (rev 5843)
@@ -1,81 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<chapter id="webtools">
- <title>WTP Projects</title>
- <para>This chapter covers how to select installed runtime/server in your web project</para>
+ <title>Projects</title>
+ <para>The most popular of the projects we deal with are the J2EE projects, such as
+ <property>Dynamic Web Project</property>, EJB Project, or EAR project. Web projects of
+ JBoss Tools are Stuts, JSF and Seam projects. 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>Description</title>
- <para>
- WTP provides what are called "faceted" projects.
- Their most popular of these projects are their J2EE projects,
- such as their <property>Dynamic Web Project</property>, their EJB Project,
- or their EAR project. Web projects of JBoss Tools are Stuts, JSF and Seam projects.</para>
- <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. Some examples of these facets
- are adding a webdoclet facet to a web project, or an
- ejbdoclet to an EJB Project. </para>
- <para>
- Most often, these "facets" either add to the project's classpath,
- enable a builder, or watch the project in some other fashion. </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>
- The benefit of this is that the structure of your projects is
- then known, and packaging it up *should* be trivial. However,
- 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 Archives plugin</para>
+ <section>
+ <title>Description</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. Some examples of
+ these facets are adding a webdoclet facet to a web project, or an ejbdoclet to an EJB
+ Project. </para>
+ <para> Most often, these "facets" either add to the project's classpath, enable a builder,
+ or watch the project in some other fashion. </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> The benefit of this is that the structure of your projects is then known, and
+ packaging it up *should* be trivial. However, 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 Archives plugin.</para>
- </section>
-
-
- <section><title>Faceted Project Wizards</title>
- <para>To create a new <property>Dynamic Web Project</property> select <emphasis><property>File > New > Other...</property></emphasis> then <emphasis><property>Web > Dynamic Web Project</property></emphasis></para>
- <figure>
- <title>New Dynamic Web Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/webtools/webtools_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Click <emphasis><property>Next</property></emphasis> and you will see Dynamic Web Project page</para>
- <figure>
- <title>Faceted Project Wizard: First Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/webtools/webtools_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <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>
- <title>Faceted Project Wizard: Second Page</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/webtools/webtools_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>
- The second page of the wizard allows you to enable or disable specific facets, as
- described above. Some facets may require others, and some may conflict with others,
- but on the whole this page allows you to add any number of facets that don't conflict
- with each other. </para>
- <para>
- Further pages are specific to either the project type, or the facets selected.</para>
- </section>
-</chapter>
+ </section>
+
+
+ <section>
+ <title>Adding Facets to a Project</title>
+
+ <para>There are two ways to add facets to a project. The first way is to include facets into
+ already existing project. For that you should bring up the context menu for selected
+ project and click <emphasis>
+ <property>Properties</property>
+ </emphasis>. At this point, choose <emphasis>
+ <property>Project Facets</property>
+ </emphasis> from the left. It will represent a list of the facets for your project and
+ give opportunity to modify it by clicking on <emphasis>
+ <property>Modify Project...</property>
+ </emphasis> button.</para>
+
+ <para>The other way is adding necessary facets while organizing a new project. To demonstrate
+ it let's create a new <property>Dynamic Web Project</property> selecting as usual <emphasis>
+ <property>File > New > Other...</property>
+ </emphasis> and then <emphasis>
+ <property>Web > Dynamic Web Project.</property>
+ </emphasis></para>
+ <figure>
+ <title>New Dynamic Web Project</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Click <emphasis>
+ <property>Next</property>
+ </emphasis> and you will see Dynamic Web Project page.</para>
+ <figure>
+ <title>Faceted Project Wizard: First Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <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>
+ <title>Faceted Project Wizard: Second Page</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/webtools/webtools_3.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> The second page of the wizard allows you to enable or disable specific facets, as
+ described above. Some facets may require others, and some may conflict with others, but
+ on the whole this page allows you to add any number of facets that don't conflict with
+ each other. </para>
+ <para> Further pages are specific to either the project type, or the facets selected.</para>
+ </section>
+</chapter>
18 years, 2 months
JBoss Tools SVN: r5842 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2008-01-21 12:00:58 -0500 (Mon, 21 Jan 2008)
New Revision: 5842
Modified:
trunk/as/docs/reference/en/modules/perspective.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-199 - rearrangment a bit data according to the task
Modified: trunk/as/docs/reference/en/modules/perspective.xml
===================================================================
--- trunk/as/docs/reference/en/modules/perspective.xml 2008-01-21 16:57:29 UTC (rev 5841)
+++ trunk/as/docs/reference/en/modules/perspective.xml 2008-01-21 17:00:58 UTC (rev 5842)
@@ -25,12 +25,11 @@
<?dbhtml filename="JBossServerView.html"?>
<title>The JBoss Servers View</title>
<para>This chapter will focus on the the JBoss Server's View. </para>
- <para>The JBoss Servers View is
- based on the WTP view, Servers View. The top half of the JBoss Servers View essentially
- embeds the original Servers View directly into it, making slight changes to the context
- menu. A second half was added to provide additional information about the server
- selected in the top half. In the image provided, categories in the second half include
- which modules are currently deployed.</para>
+ <para>The JBoss Servers View is based on the WTP view, Servers View. The top half of the
+ JBoss Servers View essentially embeds the original Servers View directly into it, making
+ slight changes to the context menu. A second half was added to provide additional
+ information about the server selected in the top half. In the image provided, categories
+ in the second half include which modules are currently deployed.</para>
<figure>
<title>The JBoss Servers View</title>
@@ -175,9 +174,10 @@
</mediaobject>
</figure>
- <para>Also you can see the server's publish status in the JBoss Servers view that allows you to
- see if changes are awaiting (Republish), are being updated (Publishing...) or are in-sync
- (Synchronized).</para>
+ <para>Now, let's return to the first part of the JBoss Servers view where all declared
+ servers are represented as well as their current states, that is, whether they are started
+ or stopped. It also shows the server's publish status that allows you to see if changes are
+ awaiting (Republish), are being updated (Publishing...) or are in-sync (Synchronized).</para>
<figure>
<title>Server's Publish Status</title>
<mediaobject>
@@ -186,22 +186,26 @@
</imageobject>
</mediaobject>
</figure>
- <para>The Server section of the view lists all declared servers and their current states, that
- is, whether they are started or stopped. By Double-clicking on each server, an editor window
- will appear allowing you to edit parts of that server. The editor will also link you to
- modify that server's launch configuration, set command line arguments, and other things that
- are relevant to launching the server.</para>
- <para>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>
+
+ <para>By double-clicking on any server in the Server section of the view, an editor window will
+ appear allowing you to edit parts of that server. The editor will also link you to modify
+ that server's launch configuration, set command line arguments, and other things that are
+ relevant to launching the server.</para>
+
<figure>
- <title/>
+ <title>Preferences Page for the Chosen Server</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/perspective/perspective_20.png"/>
</imageobject>
</mediaobject>
</figure>
+
+ <para>At the figure above 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>
+
<para>The view's toolbar shown below provides quick access to starting a server (in debug mode,
run mode, or profile mode), restarting the server, stopping the server, or publishing to the
server.</para>
@@ -213,15 +217,15 @@
</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>The publish icon, on the extreme right, will republish any modules where it has determined
+ <para>The publish icon 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>Because the JBoss servers have few properties to edit in the editor, a shortcut to the
- launch configuration has been provided in the context menu when right-clicking on a
- server.</para>
+ <para>As the JBoss servers have few properties to edit in the editor, a shortcut to the
+ launch configuration has been provided in the context menu when right-clicking on a server.</para>
<figure>
<title>Launch Configuration</title>
<mediaobject>
@@ -231,8 +235,7 @@
</mediaobject>
</figure>
- <para>The following table describes all those additional
- properties.</para>
+ <para>The following table describes all those additional properties.</para>
<table>
<title>Server Properties through the Context Menu</title>
<tgroup cols="2">
@@ -302,8 +305,8 @@
<para>Publish</para>
</entry>
<entry>
- <para>The action for synching the publish information
- between the server and workspace.</para>
+ <para>The action for synching the publish information between the server and
+ workspace.</para>
</entry>
</row>
@@ -321,7 +324,8 @@
<para>Twiddle Server</para>
</entry>
<entry>
- <para>The option provides a dialog for running Twiddle commands against the Twiddle Server.</para>
+ <para>The option provides a dialog for running Twiddle commands against the
+ Twiddle Server.</para>
</entry>
</row>
@@ -330,7 +334,8 @@
<para>Edit Launch Configuration</para>
</entry>
<entry>
- <para>The option that provides an editor for editing launch configuration properties of the proper server.</para>
+ <para>The option that provides an editor for editing launch configuration
+ properties of the proper server.</para>
</entry>
</row>
@@ -339,17 +344,18 @@
<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>
+ <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>
-
+ <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 id="Project_archivesView">
<title>Project archives View</title>
<para>Every application, whether plain old Java, J2EE, or some other language altogether,
@@ -371,7 +377,7 @@
<title>Creating an Archive</title>
<para>When creating a new archive, you have some different options at your disposal. If
the project has no <property>.packages</property> file, your options will be
- presented to you all at once for you to choose from (as above). Otherwise you will
+ presented to you all at once to choose from (as above). Otherwise you will
right-click inside the view and select <emphasis>
<property>New Archive</property>
</emphasis> to see your archive type options.</para>
@@ -403,7 +409,7 @@
</mediaobject>
</figure>
- <para>The page is pretty simple. All it asks is for the name of your new archive, a
+ <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
18 years, 2 months
JBoss Tools SVN: r5841 - in trunk/jsf/docs: userguide/en/images/jsf_support and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-01-21 11:57:29 -0500 (Mon, 21 Jan 2008)
New Revision: 5841
Added:
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_1.png
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_2.png
Removed:
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_13.png
Modified:
trunk/jsf/docs/resources/styles/en/html.css
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_11.png
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_12.png
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_17.png
trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_33.png
trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
trunk/jsf/docs/userguide/en/modules/jsf_support.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-162 guide update according Sveta remarks
Modified: trunk/jsf/docs/resources/styles/en/html.css
===================================================================
--- trunk/jsf/docs/resources/styles/en/html.css 2008-01-21 16:48:36 UTC (rev 5840)
+++ trunk/jsf/docs/resources/styles/en/html.css 2008-01-21 16:57:29 UTC (rev 5841)
@@ -112,8 +112,8 @@
}
DIV.note{
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #FFFDD3;
- background-image : url('../images/ico_note.gif'); background-repeat : no-repeat; background-position :top left;
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #cfe3ff;
+ background-image : url('images/ico_note.gif'); background-repeat : no-repeat; background-position :top left;
}
DIV.note *{
@@ -128,7 +128,7 @@
}
DIV.important {
BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #fee3d9;
- background-image : url('../images/ico_important.gif'); background-repeat : no-repeat; background-position :top left;
+ background-image : url('images/ico_important.gif'); background-repeat : no-repeat; background-position :top left;
}
DIV.important *{
@@ -141,7 +141,7 @@
}
DIV.tip {
- BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #CFE3FF; background-repeat : no-repeat; background-position :top left; background-image : url('../images/ico_tip.gif');
+ BORDER: #CECECE 1px solid; PADDING: 3px 10px 10px 50px; line-height : 14px; MARGIN: 10px 0px 10px 0px; FONT-SIZE: 11px; WIDTH: 500px; BACKGROUND-COLOR: #CFE3FF; background-repeat : no-repeat; background-position :top left; background-image : url('images/ico_tip.gif');
}
DIV.tip *{
@@ -164,7 +164,7 @@
.table TH {
WHITE-SPACE: nowrap; BACKGROUND-COLOR: #EEF5FF; TEXT-ALIGN: center; BORDER-BOTTOM: #CAE1FF 2px solid; PADDING: 2px 8px 2px 8px;
- background-image : url('../images/bg_table.gif'); background-repeat : repeat-x; background-position :top left;
+ background-image : url('images/bg_table.gif'); background-repeat : repeat-x; background-position :top left;
}
TD {
PADDING: 4px 8px 4px 8px; BORDER-BOTTOM: #cccccc 1px dotted; BORDER-right: #cccccc 1px dotted;
Modified: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_11.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_12.png
===================================================================
(Binary files differ)
Deleted: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_13.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_17.png
===================================================================
(Binary files differ)
Added: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_20_2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jsf/docs/userguide/en/images/jsf_support/jsf_support_33.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-01-21 16:48:36 UTC (rev 5840)
+++ trunk/jsf/docs/userguide/en/modules/Visual_Web_Tools.xml 2008-01-21 16:57:29 UTC (rev 5841)
@@ -106,7 +106,7 @@
</row>
<row>
- <entry>Support for JSF and JSF Configuration Files</entry>
+ <entry>Support for JSF and Struts Configuration Files</entry>
<entry>Working on files using three modes: diagram, tree and source. Synchronization between the modes and full control over the code. Easy moving around the diagram using the Diagram Navigator. Working with struts projects that have multiple modules. Possibility to use Struts configuration file debugger allowing to set break points on struts diagram and then launch the server in debug mode.</entry>
<entry><link linkend="GraphicalEditorAndViewingForJSFConfigurationFiles76331">graphical editor for jsf</link> <link linkend="GraphicalEditorForStrutsConfigurationFiles564">graphical editor for struts</link> </entry>
</row>
Modified: trunk/jsf/docs/userguide/en/modules/jsf_support.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2008-01-21 16:48:36 UTC (rev 5840)
+++ trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2008-01-21 16:57:29 UTC (rev 5841)
@@ -89,8 +89,8 @@
of presentation pages for JSF. JBoss Developer Studio provides support for Facelets in a variety of ways:</para>
<itemizedlist>
- <listitem><para>The New JSF Project wizard contains templates for creating Facelets projects based on version 1.2 of the JSF Reference Implementation. Just select the
- <property>JSF 1.2 with Facelets</property> in JSF Environment section.</para></listitem>
+ <listitem><para>The New JSF Project wizard contains templates for creating Facelets projects based on version 1.2 of the JSF Reference Implementation. Select the
+ <emphasis><property>JSF 1.2 with Facelets</property></emphasis> in JSF Environment section.</para></listitem>
</itemizedlist>
@@ -102,8 +102,9 @@
</imageobject>
</mediaobject>
</figure>
-
- <para>Once you select the environment, you can select the one of three available templates.</para>
+
+ <para>Once you select the environment, you can select the one of three available templates:</para>
+
<figure>
<title>Choosing Facelets Template</title>
<mediaobject>
@@ -113,8 +114,54 @@
</mediaobject>
</figure>
+ <table>
+ <title>Facelets Templates</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para><emphasis><property>FaceletsBlankWithoutLibs</property></emphasis></para></entry>
+
+ <entry><para>Some servers already provide jsf libs and you take risk of getting conflicting libraries while deploying your project. To avoid
+ such conflicts, use a template without libs if you have a server with its own jsf libraries</para></entry>
+ </row>
+
+ <row>
+ <entry><para><emphasis><property>FaceletsKickStartWithRILibs</property></emphasis></para></entry>
+
+ <entry><para>a sample application with Facelets that is ready to run</para></entry>
+ </row>
+
+ <row>
+ <entry><para><emphasis><property>FaceletsKickStartWithoutLibs</property></emphasis></para></entry>
+
+ <entry><para>a sample application without libraries</para></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
+
<itemizedlist>
- <listitem><para>The JBoss Tools Palette comes with the Facelets components ready to use. A
+ <listitem><para>The <link linkend="palette">JBoss Tools Palette</link> comes with the Facelets components ready to use. A
useful tip appears when you hover the mouse cursor over the tag, the tip includes a detailed description of the tag component, the syntax and available attributes.</para></listitem>
</itemizedlist>
@@ -221,7 +268,7 @@
<?dbhtml filename="CreatingANewJSFProject.html"?>
<title>Creating a New JSF Project</title>
- <para>JBoss Developer Studio provides the following when working with JSF:</para>
+ <para>JBoss Developer Studio provides the following functionality when working with JSF:</para>
<itemizedlist>
<listitem>
@@ -239,10 +286,8 @@
created outside Eclipse</para>
</listitem>
</itemizedlist>
- <para>JBoss Developer Studio allows you to create brand new <emphasis>
- <property>JSF projects</property>
- </emphasis>. A new JSF project will have all JSF libraries, tag
- libraries and a JSF configuration file.</para>
+ <para>JBoss Developer Studio allows you to create a brand new JSF projects. A new JSF project will have all JSF libraries, tag
+ libraries and JSF configuration file.</para>
<para>JBoss Developer Studio comes with a number of predefined project
templates. These templates are flexible and easily customizable.</para>
@@ -252,8 +297,8 @@
Tools Web > JSF > JSF
Project</property>
</emphasis> and click <emphasis>
- <property>Next</property>
- </emphasis>:</para>
+ <property>Next</property>.
+ </emphasis></para>
<figure>
<title>Choosing a JSF Project</title>
<mediaobject>
@@ -263,9 +308,9 @@
</mediaobject>
</figure>
- <para>On this form enter Project Name. You can also select where to create
+ <para>On the next form enter <property>Project Name</property>. You can also select where to create
the project.</para>
- <para>JSF Version allows you to select which JSF implementation to use:</para>
+ <para>JSF Version allows you to select which JSF implementation to use.</para>
<figure>
<title>Creating a New JSF Project</title>
<mediaobject>
@@ -277,14 +322,11 @@
</mediaobject>
</figure>
- <para>You can also pick a different template on which to base the project.
+ <para>You can also pick a different template on which the project should be based to.
Almost all templates come in two variations: with jsf libraries and
- without ones. Some servers already provide jsf libs and you take
- risk of getting conflicting libraries while deploying your project.
- So the idea here is to avoid such conflicts. Select a template
- without libs if you use a server with its own jsf libraries.</para>
+ without ones.</para>
<figure>
- <title>JSF Templates</title>
+ <title>Choosing JSF Templates</title>
<mediaobject>
<imageobject>
<imagedata
@@ -293,36 +335,64 @@
</imageobject>
</mediaobject>
</figure>
- <para>The JSFBlank template will create a standard Web project structure
- with all JSF capabilities.</para>
-
- <para>The JSFKickStart template will create the same standard structure but
- will also include a sample application that is ready to run.</para>
-
+
+ <table>
+ <title>JSF Project Templates</title>
+ <tgroup cols="2">
+ <colspec colnum="1" colwidth="1*"/>
+ <colspec colnum="2" colwidth="3*"/>
+
+
+ <thead>
+ <row>
+ <entry align="center">
+ <para>Template</para>
+ </entry>
+
+ <entry align="center">
+ <para>Description</para>
+ </entry>
+ </row>
+ </thead>
+
+ <tbody>
+
+ <row>
+ <entry><para><emphasis><property>JSFBlankWithLibs</property></emphasis></para></entry>
+
+ <entry><para>This template will create a standard Web project structure with all JSF capabilities</para></entry>
+ </row>
+
+ <row>
+ <entry><para><emphasis><property>JSFKickStartWithLibs</property></emphasis></para></entry>
+
+ <entry><para>This template will create a standard Web project structure but will also include a sample application that is ready to run</para></entry>
+ </row>
+
+ <row>
+ <entry><para><emphasis><property>JSFKickStartWithoutLibs</property></emphasis></para></entry>
+
+ <entry><para>Some servers already provide jsf libs and you take risk of getting conflicting libraries while deploying your project.
+ To avoid such conflicts, use a template without libs if you have a server with its own jsf libraries</para></entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+
+
<!-- <para>You can of course create your own custom templates. More information
on templates creation could be found in <link
linkend="CreatingCustomJSPTemplates">Chapter 5</link>.</para>
-->
- <figure>
- <title>Choosing JSF Template</title>
- <mediaobject>
- <imageobject>
- <imagedata
- fileref="images/jsf_support/jsf_support_13.png "
- />
- </imageobject>
- </mediaobject>
- </figure>
-
+
<para>On the next screen select what <emphasis>
<property>Servlet version</property>
</emphasis> to use and whether to register this application with
JBoss AS (or other server) for running and testing of your
application.</para>
- <para><emphasis>
- <property>Context Path</property>
- </emphasis> is the name under which the application will be
+ <para>The <emphasis><property>Context Path</property></emphasis> is the name under which the application will be
deployed.</para>
<para>The <emphasis>
@@ -334,20 +404,17 @@
<property>New...</property>
</emphasis> to add new Runtime.</para>
- <para><emphasis>
+ <para>The <emphasis>
<property>Target Server</property>
- </emphasis> allows you specify whether to deploy the application.
- The Target Server corresponds to the Runtime value selected above.</para>
-
- <para>If you don't want to deploy the application, uncheck this
- value:</para>
+ </emphasis> allows you specifying whether to deploy the application.
+ The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this
+ value.</para>
<figure>
<title>Registering the Project on Server</title>
<mediaobject>
<imageobject>
<imagedata
- fileref="images/jsf_support/jsf_support_14.png"
- />
+ fileref="images/jsf_support/jsf_support_14.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -392,9 +459,9 @@
using JBoss Developer Studio editors, such as JSF configuration
editor, JBoss Tools JSP editor and any others.</para>
<para>Right click the project and select <emphasis>
- <property>JBoss Tools > Add JSF Capabilities</property>
- </emphasis>. This will start the process of adding all necessary
- libraries, files to make this a Web JSF project:</para>
+ <property>JBoss Tools > Add JSF Capabilities</property>.
+ </emphasis> This will start the process of adding all necessary
+ libraries, files to make this a Web JSF project.</para>
<figure>
<title>Adding JSF Capabilities</title>
<mediaobject>
@@ -406,7 +473,7 @@
</mediaobject>
</figure>
<para>The wizard will first ask you to show the web.xml file location and the
- project name:</para>
+ project name.</para>
<figure>
<title>Project Location</title>
<mediaobject>
@@ -425,7 +492,7 @@
</emphasis> for JBoss Developer Studio to add all required JSF
related libraries to this project.</para>
- <para><emphasis>
+ <para>The <emphasis>
<property>Context Path</property>
</emphasis> is the name under which the application will be
deployed.</para>
@@ -439,20 +506,17 @@
<property>New...</property>
</emphasis> to add new Runtime.</para>
- <para><emphasis>
+ <para>The <emphasis>
<property>Target Server</property>
- </emphasis> allows you specify whether to deploy the application.
- The Target Server corresponds to the Runtime value selected above.</para>
-
- <para>If you don't want to deploy the application, uncheck this
- value:</para>
+ </emphasis> allows you to specify whether to deploy the application.
+ The Target Server corresponds to the Runtime value selected above. If you don't want to deploy the application, uncheck this
+ value.</para>
<figure>
<title>Project Folders</title>
<mediaobject>
<imageobject>
<imagedata
- fileref="images/jsf_support/jsf_support_18.png"
- />
+ fileref="images/jsf_support/jsf_support_18.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -505,8 +569,7 @@
<mediaobject>
<imageobject>
<imagedata
- fileref="images/jsf_support/jsf_support_20.png"
- />
+ fileref="images/jsf_support/jsf_support_20.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -517,6 +580,20 @@
what run-time implementation of the
project's technology will be used</para>
</listitem>
+
+ </itemizedlist>
+ <figure>
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_20_1.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+
+ <itemizedlist>
<listitem>
<para>Select <emphasis>
<property>Next</property>
@@ -526,22 +603,32 @@
in your project directory that should be part of the
template</para>
</listitem>
+ </itemizedlist>
+ <figure>
+ <title>Define Template Properties</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata
+ fileref="images/jsf_support/jsf_support_20_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <itemizedlist>
<listitem>
<para>At this point, unless you want to designate some extra
files as having Velocity template coding inside
- them, you should select Finish</para>
+ them, you should click <emphasis><property>Finish</property></emphasis>.</para>
</listitem>
</itemizedlist>
<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 <property>template</property>.</para>
+ project you turned into a template.</para>
</section>
</section>
<section id="GraphicalEditorAndViewingForJSFConfigurationFiles76331">
<?dbhtml filename="GraphicalEditorAndViewingForJSFConfigurationFiles.html"?>
<title>Graphical Editor and Viewing for JSF Configuration Files</title>
- <para>The JSF configuration file editor has three main <property>viewers</property>
- (modes):</para>
+ <para>JBDS provides a graphical editor for working with JSF configuration file (faces-config.xml). The editor has three main viewers (modes):</para>
<itemizedlist>
<listitem>
@@ -615,8 +702,8 @@
<para>It is also possible to create a new page with context menu by right-clicking anywhere on
the diagram and selecting <emphasis>
- <property> New View</property>
- </emphasis>.</para>
+ <property>New View</property>.
+ </emphasis></para>
<figure>
<title>Creating a New View</title>
<mediaobject>
@@ -649,7 +736,7 @@
<para>The Tree mode for the editor displays all JSF application artifacts
referenced in the configuration file in a tree format. By selecting any
- node you can see and edit its properties will appear in the right-hand area. For example, a Managed Bean:</para>
+ node you can see and edit its properties which will appear in the right-hand area. For example, a Managed Bean:</para>
<figure>
<title>Tree View</title>
<mediaobject>
@@ -708,7 +795,7 @@
<section id="ContentAssist976">
<?dbhtml filename="SendAnAJAXRequest.html"?>
<title>Code Assist</title>
- <para>Code Assist provides pop-up help to help you complete your code statements. Using Code Assist allows you to complete your code statements faster and with more accuracy.</para>
+ <para>Code Assist provides pop-up tip to help you complete your code statements. It allows you to write your code faster and with more accuracy.</para>
<para>Code assist is always available in the Source mode:</para>
<figure>
<title>Code Assist in Source View</title>
@@ -741,7 +828,7 @@
<para>Other errors are also reported.</para>
<figure>
- <title>Others Errors Reporting</title>
+ <title>Other Errors Reporting</title>
<mediaobject>
<imageobject>
<imagedata
@@ -784,17 +871,14 @@
</mediaobject>
</figure>
- <para>You can also edit the properties of the selected element in the <emphasis>
- <property>Tree</property>
- </emphasis> mode with the help of the Properties view as shown
+ <para>You can also edit the properties of the selected element in the <property>Tree</property> mode with the help of the Properties view as shown
below:</para>
<figure>
<title>Properties View </title>
<mediaobject>
<imageobject>
<imagedata
- fileref="images/jsf_support/jsf_support_33.png"
- />
+ fileref="images/jsf_support/jsf_support_33.png" scale="75" />
</imageobject>
</mediaobject>
</figure>
@@ -803,28 +887,30 @@
<section id="ManagedBeans96453">
<?dbhtml filename="ManagedBeans.html"?>
<title>Managed Beans</title>
+
+ <para>JBoss Developer Studio gives you 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>
+
<section id="CodeGenerationForManagedBeans421">
<?dbhtml filename="CodeGenerationForManagedBeans.html"?>
<title>Code Generation for Managed Beans</title>
- <para>JBoss Developer Studio gives you 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>To start, create a new managed bean in JSF configuration file editor,
+ <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>
@@ -838,15 +924,15 @@
</figure>
<note>
<title>Note:</title>
- <para>When you define a new managed bean, make sure that Generate Source Code is checked as shown in the figure below:</para>
+ <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"
- />
+ fileref="images/jsf_support/jsf_support_35.png" scale="75"/>
</imageobject>
</mediaobject>
</figure>
@@ -861,10 +947,13 @@
<listitem>
<para>Click on <emphasis>
<property>Managed-Bean-Class</property>
- </emphasis> link in the editor -or-</para>
+ </emphasis> link in the editor</para>
</listitem>
+ </itemizedlist>
+ <para>or</para>
+ <itemizedlist>
<listitem>
- <para>Right click the <emphasis>
+ <para>right click the <emphasis>
<property>managed bean</property>
</emphasis> and select <emphasis>
<property>Open Source</property>
@@ -895,12 +984,12 @@
</imageobject>
</mediaobject>
</figure>
- <para>You can also generate source code for properties - this also includes
+ <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 "Add Property" dialog:</para>
+ </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>
@@ -911,7 +1000,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>Make sure that all the check boxes are selected:</para>
+ <para>When the form is open make sure that all the check boxes are selected:</para>
<itemizedlist>
<listitem>Add Java property</listitem>
<listitem>Generate Getter</listitem>
@@ -951,8 +1040,8 @@
<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
- <emphasis>Browse...</emphasis> to add your existing Java
+ <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>
@@ -996,7 +1085,7 @@
<?dbhtml filename="CreateAndRegisterACustomConverter.html"?>
<title>Create and Register a Custom Converter</title>
- <orderedlist>
+ <itemizedlist>
<listitem>
<para>In the Project Explorer view open <emphasis>
<property>faces-config.xml</property>
@@ -1004,7 +1093,7 @@
<property>Tree</property>
</emphasis> tab.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Converters</title>
<mediaobject>
@@ -1013,7 +1102,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Select <emphasis>
<property>Converters</property>
@@ -1028,7 +1117,7 @@
</emphasis> button your custom converter is registered under
entered name.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Add Converter Form</title>
<mediaobject>
@@ -1037,7 +1126,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Now you can create <emphasis role="italic">
<property>"converter"</property>
@@ -1046,7 +1135,7 @@
<property>Converter-class</property>
</emphasis> to generate the source code.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Generation of Source Code for Converter Class</title>
<mediaobject>
@@ -1056,14 +1145,14 @@
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Java class will be created automatically. Leave everything
without changes and click <emphasis>
<property>Finish</property>
</emphasis>.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>New Java Class Form</title>
<mediaobject>
@@ -1072,13 +1161,13 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>To open converter class click again on Converter-class link in
the Converter section. Now you are able to add business
logic of converter.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Converter Class</title>
<mediaobject>
@@ -1094,7 +1183,7 @@
<title>Create and Register a Custom Validator</title>
<para>With the help of JBDS you can easy develop your own custom validators.</para>
- <orderedlist>
+ <itemizedlist>
<listitem>
<para>In the Project Explorer view open<emphasis>
<property> faces-config.xml</property>
@@ -1102,7 +1191,7 @@
<property>Tree </property>
</emphasis>tab.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Validator in Faces Config Editor</title>
<mediaobject>
@@ -1111,7 +1200,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Select <emphasis>
<property>Validators</property>
@@ -1126,7 +1215,7 @@
</emphasis> button your custom validator is registered under
entered name.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Adding Validator</title>
<mediaobject>
@@ -1138,7 +1227,7 @@
<para>Now you can create the "validatir" class.
</para>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Let's create <emphasis role="italic">
<property>"validator"</property>
@@ -1147,7 +1236,7 @@
<property>Validator-class</property>
</emphasis>.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Creating Validator Class</title>
<mediaobject>
@@ -1156,14 +1245,14 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Java class will be created automatically. Leave everything
without changes and click <emphasis>
<property>Finish</property>
</emphasis>.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>New Java Class Form</title>
<mediaobject>
@@ -1172,13 +1261,13 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>To open validator class click again on Validator-class in the
Validator section. Now you are able to write business logic
of validator.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Converter Class Editing</title>
<mediaobject>
@@ -1195,7 +1284,7 @@
<para>Creation of Referenced Beans is similar to creation of Custom Validator.</para>
- <orderedlist>
+ <itemizedlist>
<listitem>
<para>In the Project Explorer view open<emphasis>
<property> faces-config.xml</property>
@@ -1203,7 +1292,7 @@
<property>Tree </property>
</emphasis>tab.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Referenced Beans in Faces Config Editor</title>
<mediaobject>
@@ -1212,7 +1301,7 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Select <emphasis>
<property>Referenced Beans</property>
@@ -1224,7 +1313,7 @@
<para>Type in the name of your Referenced Bean and type in or select
Referenced-Bean-Class by using Browse button.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Add Referenced Bean</title>
<mediaobject>
@@ -1233,13 +1322,13 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>In the Referenced Bean section you should see your
Referenced-Bean-Name and Referenced-Bean-Class. Click on the
link to open the Java creation wizard.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Create Referenced Bean Class</title>
<mediaobject>
@@ -1248,14 +1337,14 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>Java class will be created automatically. Leave everything
without changes and click <emphasis>
<property>Finish</property>
</emphasis>.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>New Java Class Form</title>
<mediaobject>
@@ -1264,14 +1353,14 @@
</imageobject>
</mediaobject>
</figure>
- <orderedlist continuation="continues">
+ <itemizedlist>
<listitem>
<para>To open Referenced Bean class click again on <emphasis>
<property>Referenced-Bean-Class</property>
</emphasis> in the Referenced Bean section. Now you are able
to write business logic of Referenced Bean.</para>
</listitem>
- </orderedlist>
+ </itemizedlist>
<figure>
<title>Referenced Bean Class Editing</title>
<mediaobject>
18 years, 2 months
JBoss Tools SVN: r5839 - trunk/jst/plugins/org.jboss.tools.jst.web/resources/help.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2008-01-21 11:45:01 -0500 (Mon, 21 Jan 2008)
New Revision: 5839
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1663
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-01-21 16:41:09 UTC (rev 5838)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/resources/help/keys-web.properties 2008-01-21 16:45:01 UTC (rev 5839)
@@ -691,3 +691,5 @@
SharableGroupHTML.add_taglib=Automatic insertion of taglib to the page
+FileSystems_Add_0.WindowTitle=Add Module
+FileSystems_Add_0.Title=Module
\ No newline at end of file
18 years, 2 months
JBoss Tools SVN: r5838 - in trunk/seam/tests/org.jboss.tools.seam.ui.test: projects/TestSeamELContentAssist/WebContent and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2008-01-21 11:41:09 -0500 (Mon, 21 Jan 2008)
New Revision: 5838
Added:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/login.xhtml
Log:
JBIDE-1553 JUnit Test for Seam EL Content Assist
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2008-01-21 16:29:32 UTC (rev 5837)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2008-01-21 16:41:09 UTC (rev 5838)
@@ -33,7 +33,8 @@
org.eclipse.wst.common.frameworks,
org.jboss.tools.jst.firstrun,
org.eclipse.wst.server.core,
- org.eclipse.datatools.connectivity
+ org.eclipse.datatools.connectivity,
+ org.jboss.tools.jst.jsp
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.view,
org.jboss.tools.seam.ui.test.wizard
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/login.xhtml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/login.xhtml 2008-01-21 16:29:32 UTC (rev 5837)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestSeamELContentAssist/WebContent/login.xhtml 2008-01-21 16:41:09 UTC (rev 5838)
@@ -17,8 +17,8 @@
<rich:panel>
<f:facet name="header">Login</f:facet>
- <p>Please login using any username and password</p>
-
+ <p>Please login using any username and password</p>
+
<div class="dialog">
<h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
<h:outputLabel for="username">Username</h:outputLabel>
@@ -31,8 +31,10 @@
<h:selectBooleanCheckbox id="rememberMe"
value="#{identity.rememberMe}"/>
</h:panelGrid>
- </div>
-
+ </div>
+
+ <p>Previously the values was: #{identity.username}, #{identity.password} and #{identity.rememberMe}.</p>
+
</rich:panel>
<div class="actionButtons">
Added: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java 2008-01-21 16:41:09 UTC (rev 5838)
@@ -0,0 +1,713 @@
+package org.jboss.tools.seam.ui.test.ca;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.TreeSet;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.TextUtilities;
+import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jface.text.contentassist.IContentAssistProcessor;
+import org.eclipse.jface.text.contentassist.IContentAssistant;
+import org.eclipse.jface.text.contentassist.IContentAssistantExtension;
+import org.eclipse.jface.text.source.SourceViewerConfiguration;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
+import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
+import org.eclipse.wst.sse.ui.internal.StructuredTextViewer;
+import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
+import org.eclipse.wst.sse.ui.internal.editor.EditorModelUtil;
+import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.common.model.XJob;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor;
+import org.jboss.tools.seam.ui.text.java.SeamELProposalProcessor;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+public class SeamELContentAssistTest extends TestCase {
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "TestSeamELContentAssist";
+ private static final String PAGE_NAME = "/WebContent/login.xhtml";
+
+ public static Test suite() {
+ return new TestSuite(SeamELContentAssistTest.class);
+ }
+
+ public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.seam.ui.test", null, PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ Throwable exception = null;
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+ }
+
+ protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
+ }
+
+ private static final String[] VALID_SEAM_EL_PROPOSALS = new String[] {
+ "TestSeamELContentAssistEntityManagerFactory",
+ "actor",
+ "applicationContext",
+ "authenticator",
+ "businessProcessContext",
+ "businessProcess",
+ "captcha",
+ "conversationContext",
+ "conversationList",
+ "conversationStack",
+ "conversation",
+ "currentDatetime",
+ "currentDate",
+ "currentTime",
+ "entityManager",
+ "eventContext",
+ "events",
+ "expressions",
+ "facesContext",
+ "facesMessages",
+ "httpError",
+ "identity",
+ "identity:addRole",
+ "identity:addRole(arg0)",
+ "identity:authenticate",
+ "identity:authenticate()",
+ "identity:authenticate(loginContext)",
+ "identity:authenticateMethod",
+ "identity:checkEntityPermission",
+ "identity:checkEntityPermission(arg0, arg1)",
+ "identity:checkPermission",
+ "identity:checkPermission(name, action, arg)",
+ "identity:checkRestriction",
+ "identity:checkRestriction(expr)",
+ "identity:checkRole",
+ "identity:checkRole(role)",
+ "identity:clearDirty",
+ "identity:clearDirty()",
+ "identity:cookieEnabled",
+ "identity:cookieMaxAge",
+ "identity:create",
+ "identity:create()",
+ "identity:hasPermission",
+ "identity:hasPermission(name, action, arg)",
+ "identity:hasRole",
+ "identity:hasRole(arg0)",
+ "identity:jaasConfigName",
+ "identity:loggedIn",
+ "identity:login",
+ "identity:login()",
+ "identity:logout",
+ "identity:logout()",
+ "identity:password",
+ "identity:principal",
+ "identity:rememberMe",
+ "identity:removeRole",
+ "identity:removeRole(arg0)",
+ "identity:subject",
+ "identity:username",
+ "image",
+ "interpolator",
+ "isUserInRole",
+ "jbpmContext",
+ "localeSelector",
+ "locale",
+ "mailSession",
+ "messages",
+ "methodContext",
+ "mockSecureEntity",
+ "org.jboss.seam.captcha.captchaImage",
+ "org.jboss.seam.captcha.captcha",
+ "org.jboss.seam.core.actor",
+ "org.jboss.seam.core.applicationContext",
+ "org.jboss.seam.core.businessProcessContext",
+ "org.jboss.seam.core.businessProcess",
+ "org.jboss.seam.core.conversationContext",
+ "org.jboss.seam.core.conversationEntries",
+ "org.jboss.seam.core.conversationList",
+ "org.jboss.seam.core.conversationStack",
+ "org.jboss.seam.core.conversation",
+ "org.jboss.seam.core.dispatcher",
+ "org.jboss.seam.core.ejb",
+ "org.jboss.seam.core.eventContext",
+ "org.jboss.seam.core.events",
+ "org.jboss.seam.core.exceptions",
+ "org.jboss.seam.core.expressions",
+ "org.jboss.seam.core.facesContext",
+ "org.jboss.seam.core.facesMessages",
+ "org.jboss.seam.core.facesPage",
+ "org.jboss.seam.core.httpError",
+ "org.jboss.seam.core.image",
+ "org.jboss.seam.core.init",
+ "org.jboss.seam.core.interpolator",
+ "org.jboss.seam.core.isUserInRole",
+ "org.jboss.seam.core.jbpmContext",
+ "org.jboss.seam.core.jbpm",
+ "org.jboss.seam.core.localeSelector",
+ "org.jboss.seam.core.locale",
+ "org.jboss.seam.core.manager",
+ "org.jboss.seam.core.messages",
+ "org.jboss.seam.core.methodContext",
+ "org.jboss.seam.core.microcontainer",
+ "org.jboss.seam.core.pageContext",
+ "org.jboss.seam.core.pageflow",
+ "org.jboss.seam.core.pages",
+ "org.jboss.seam.core.persistenceContexts",
+ "org.jboss.seam.core.pojoCache",
+ "org.jboss.seam.core.pooledTaskInstanceList",
+ "org.jboss.seam.core.pooledTask",
+ "org.jboss.seam.core.processInstanceFinder",
+ "org.jboss.seam.core.processInstanceList",
+ "org.jboss.seam.core.processInstance",
+ "org.jboss.seam.core.redirect",
+ "org.jboss.seam.core.renderer",
+ "org.jboss.seam.core.resourceBundle",
+ "org.jboss.seam.core.safeActions",
+ "org.jboss.seam.core.sessionContext",
+ "org.jboss.seam.core.switcher",
+ "org.jboss.seam.core.taskInstanceListForType",
+ "org.jboss.seam.core.taskInstanceList",
+ "org.jboss.seam.core.taskInstance",
+ "org.jboss.seam.core.timeZoneSelector",
+ "org.jboss.seam.core.timeZone",
+ "org.jboss.seam.core.transactionListener",
+ "org.jboss.seam.core.transition",
+ "org.jboss.seam.core.uiComponent",
+ "org.jboss.seam.core.userPrincipal",
+ "org.jboss.seam.core.validation",
+ "org.jboss.seam.core.validators",
+ "org.jboss.seam.debug.contexts",
+ "org.jboss.seam.debug.hotDeployFilter",
+ "org.jboss.seam.debug.introspector",
+ "org.jboss.seam.framework.currentDatetime",
+ "org.jboss.seam.framework.currentDate",
+ "org.jboss.seam.framework.currentTime",
+ "org.jboss.seam.ioc.spring.contextLoader",
+ "org.jboss.seam.ioc.spring.springELResolver",
+ "org.jboss.seam.jms.queueConnection",
+ "org.jboss.seam.jms.queueSession",
+ "org.jboss.seam.jms.topicConnection",
+ "org.jboss.seam.jms.topicSession",
+ "org.jboss.seam.mail.mailSession",
+ "org.jboss.seam.pdf.documentStore",
+ "org.jboss.seam.persistence.persistenceProvider",
+ "org.jboss.seam.remoting.messaging.subscriptionRegistry",
+ "org.jboss.seam.remoting.remoting",
+ "org.jboss.seam.security.configuration",
+ "org.jboss.seam.security.identity",
+ "org.jboss.seam.servlet.characterEncodingFilter",
+ "org.jboss.seam.servlet.contextFilter",
+ "org.jboss.seam.servlet.exceptionFilter",
+ "org.jboss.seam.servlet.multipartFilter",
+ "org.jboss.seam.servlet.redirectFilter",
+ "org.jboss.seam.theme.themeSelector",
+ "org.jboss.seam.theme.theme",
+ "org.jboss.seam.ui.entityConverterStore",
+ "org.jboss.seam.ui.entityConverter",
+ "org.jboss.seam.ui.graphicImage.dynamicImageResource",
+ "org.jboss.seam.ui.graphicImage.dynamicImageStore",
+ "org.jboss.seam.ui.resource.webResource",
+ "pageContext",
+ "pageflow",
+ "pdfKeyStore",
+ "pojoCache",
+ "pooledTaskInstanceList",
+ "pooledTask",
+ "processInstanceFinder",
+ "processInstanceList",
+ "processInstance",
+ "queueSession",
+ "redirect",
+ "renderer",
+ "resourceBundle",
+ "securityRules",
+ "sessionContext",
+ "switcher",
+ "taskInstanceListForType",
+ "taskInstanceList",
+ "taskInstance",
+ "themeSelector",
+ "theme",
+ "timeZoneSelector",
+ "timeZone",
+ "topicSession",
+ "transition",
+ "uiComponent",
+ "userPrincipal",
+ "validation"
+ };
+
+
+
+
+ /**
+ * Do not use this set as is because of colon used instead of dot to separate items of level 2 and more
+ * @return
+ */
+ protected Set<String> getPageValidProposals() {
+ TreeSet<String> pSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ for (int i = 0; i < VALID_SEAM_EL_PROPOSALS.length; i++) {
+ pSet.add(VALID_SEAM_EL_PROPOSALS[i]);
+ }
+
+ return pSet;
+ }
+
+ private int getDotIndex (String expr) {
+ if (expr == null)
+ return 0;
+
+ int count = 0;
+ int index = 0;
+ while ((index = expr.indexOf('.', index+1)) != -1) {
+ count++;
+ }
+
+ return count;
+ }
+
+ private int getValidDotIndex (String expr) {
+ if (expr == null)
+ return 0;
+
+ int count = 0;
+ int index = 0;
+ while ((index = expr.indexOf(':', index+1)) != -1) {
+ count++;
+ }
+
+ return count;
+ }
+
+ protected Set<String> getFilteredProposals(Set<String> proposals, String filter) {
+ TreeSet<String> fSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ int dotIndex = getDotIndex(filter);
+ for (String proposal : proposals) {
+ if (getValidDotIndex(proposal) <= dotIndex) {
+ proposal = proposal.replace(':', '.');
+ if (proposal.startsWith(filter) ) {
+ fSet.add(proposal);
+ }
+ }
+ }
+
+ return fSet;
+ }
+
+ protected Set<String> renewWithPrefixAndPostfix(Set<String> proposals, String prefix, String suffix) {
+ TreeSet<String> rSet = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ for (String proposal : proposals) {
+ rSet.add(prefix + proposal + suffix);
+ }
+
+ return rSet;
+
+ }
+
+ private int indexOfElBOB (String content, int startFrom) {
+ int index1 = content.indexOf("${", startFrom);
+ int index2 = content.indexOf("#{", startFrom);
+
+ if (index1 == -1)
+ return index2;
+
+ if (index2 == -1)
+ return index1;
+
+ return (index1 < index2 ? index1 : index2);
+ }
+
+ protected List<IRegion> getAttributeValueRegions(ITextViewer viewer) {
+ List<IRegion> regions = new ArrayList<IRegion>();
+ IDocument document = viewer.getDocument();
+ int startOffset = 0;
+ int endOffset = document.getLength();
+
+ IStructuredDocumentRegion sdRegion = null;
+
+ while (startOffset < endOffset && (sdRegion = ContentAssistUtils.getStructuredDocumentRegion(viewer, startOffset)) != null) {
+ ITextRegionList list = sdRegion.getRegions();
+
+ for (int i = 0; list != null && i < list.size(); i++) {
+ ITextRegion region = list.get(i);
+ if (region.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_VALUE) {
+
+ final int regionOffset = sdRegion.getStartOffset() + region.getStart();
+ final int regionLength = region.getTextLength();
+
+ regions.add(new IRegion () {
+ public int getLength() {
+ return regionLength;
+ }
+
+ public int getOffset() {
+ return regionOffset;
+ }
+ });
+
+ }
+ }
+ startOffset += sdRegion.getLength();
+ }
+
+ return regions;
+ }
+
+ protected List<IRegion> getELRegionsToTest(IDocument document) {
+ List<IRegion> regions = new ArrayList<IRegion>();
+ String documentContent = document.get();
+ if (documentContent == null)
+ return regions;
+
+ int fromIndex = indexOfElBOB(documentContent, 0);
+
+ while (fromIndex != -1) {
+ int endIndex = documentContent.indexOf("}", fromIndex);
+ final int regionOffset = fromIndex;
+ final int regionLength = (endIndex != -1 ? endIndex - fromIndex :
+ documentContent.length() - fromIndex) + 1;
+
+ regions.add(new IRegion () {
+ public int getLength() {
+ return regionLength;
+ }
+
+ public int getOffset() {
+ return regionOffset;
+ }
+ });
+
+ fromIndex = (endIndex != -1 ? indexOfElBOB(documentContent, endIndex) : -1);
+ }
+
+ return regions;
+ }
+
+ public void testSeamELContentAssist() {
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ }
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+
+ IFile jspFile = project.getFile(PAGE_NAME);
+
+ assertTrue("The file \"" + PAGE_NAME + "\" is not found", (jspFile != null));
+ assertTrue("The file \"" + PAGE_NAME + "\" is not found", (jspFile.exists()));
+
+ FileEditorInput editorInput = new FileEditorInput(jspFile);
+
+// IDocumentProvider documentProvider = null;
+// Throwable exception = null;
+// try {
+// documentProvider = DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
+// } catch (Exception x) {
+// exception = x;
+// x.printStackTrace();
+//
+// }
+// assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+//
+// assertTrue("The document provider for the file \"" + PAGE_NAME + "\" is not loaded", (documentProvider != null));
+
+// try {
+// documentProvider.connect(editorInput);
+// } catch (Exception x) {
+// exception = x;
+// x.printStackTrace();
+// assertTrue("The document provider is not able to be initialized with the editor input", false);
+// }
+// assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+
+// IDocument document = documentProvider.getDocument(editorInput);
+// IDocumentExtension3 de3 = (document instanceof IDocumentExtension3) ?
+// (IDocumentExtension3)document : null;
+
+// assertTrue("The document for the file \"" + PAGE_NAME + "\" is not loaded", (document != null));
+
+// IStructuredModel model = null;
+// IStructuredDocument sd = null;
+// if (document instanceof IStructuredDocument) {
+// sd = (IStructuredDocument)document;
+ // corresponding releaseFromEdit occurs in
+ // dispose()
+// model = StructuredModelManager.getModelManager().getModelForEdit((IStructuredDocument) document);
+// EditorModelUtil.addFactoriesTo(model);
+// }
+
+// assertTrue("The document model for the file \"" + PAGE_NAME + "\" is not loaded", (model != null));
+// IDocumentPartitioner partitioner = null;
+// IDocumentPartitionerExtension2 pe2 = null;
+
+// String[] contentTypes = document.getLegalContentTypes();
+// String[] partitionings = de3.getPartitionings();
+
+ Throwable exception = null;
+ IEditorPart editorPart = null;
+ try {
+ editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(editorInput, "org.jboss.tools.jst.jsp.jspeditor.JSPTextEditor");
+ } catch (PartInitException ex) {
+ exception = ex;
+ ex.printStackTrace();
+ assertTrue("The JSP Visual Editor couln'd be initialized.", false);
+ }
+
+ JSPMultiPageEditor jspEditor = null;
+
+ if (editorPart instanceof JSPMultiPageEditor)
+ jspEditor = (JSPMultiPageEditor)editorPart;
+
+ // Delay for 3 seconds so that
+ // the Favorites view can be seen.
+ try {
+ XJob.waitForJob();
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ assertTrue("Waiting for the jobs to complete has failed.", false);
+ }
+ delay(3000);
+
+ JSPTextEditor jspTextEditor = jspEditor.getJspEditor();
+ StructuredTextViewer viewer = jspTextEditor.getTextViewer();
+ IDocument document = viewer.getDocument();
+ IContentAssistant contentAssistant = jspTextEditor.getSVConfiguration().getContentAssistant(viewer);
+
+ List<IRegion> regionsToTest = getELRegionsToTest(document);
+ if (regionsToTest != null) {
+ for (IRegion region : regionsToTest) {
+ try {
+// System.out.println("Seam EL Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
+// document.get(region.getOffset(), region.getLength()) + "]");
+
+ int startOffset = region.getOffset() + 2;
+ for (int i = 2; i < region.getLength(); i++) {
+ int offset = region.getOffset() + i;
+
+ String filter = document.get(startOffset, offset - startOffset);
+ Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), filter);
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ IContentAssistProcessor p= getProcessor(viewer, offset, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offset);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+
+// if (errorMessage != null && errorMessage.trim().length() > 0) {
+// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
+// }
+
+ // compare SeamELCompletionProposals in the result to the filtered valid proposals
+ Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ if (result != null && result.length > 0) {
+ for (int j = 0; j < result.length; j++) {
+// System.out.println("Result#" + i + "-" + j + " ==> " + result[j].getClass().getName());
+ // Look only for SeamELProposalProcessor proposals
+ if (result[j] instanceof SeamELProposalProcessor.Proposal) {
+ SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
+ String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
+ }
+ }
+ }
+ assertTrue("Some Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
+ assertTrue("Some Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
+ }
+
+
+ } catch (BadLocationException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
+ }
+ }
+ }
+ regionsToTest = getAttributeValueRegions(viewer);
+ if (regionsToTest != null) {
+ for (IRegion region : regionsToTest) {
+ try {
+// System.out.println("Attribute Region To Test: [" + region.getOffset() + "/" + region.getLength() + "] ==> [" +
+// document.get(region.getOffset(), region.getLength()) + "]");
+
+ String attributeText = document.get(region.getOffset(), region.getLength());
+ int openQuoteIndex = attributeText.indexOf('"');
+ if (openQuoteIndex == -1)
+ openQuoteIndex = attributeText.indexOf('\'');
+ else {
+ int openQuoteIndex2 = attributeText.indexOf('\'');
+ if (openQuoteIndex2 != -1) {
+ openQuoteIndex = (openQuoteIndex < openQuoteIndex2 ? openQuoteIndex : openQuoteIndex2);
+ }
+ }
+
+ int closeQuoteIndex = (openQuoteIndex == -1 ? -1 : attributeText.lastIndexOf(attributeText.charAt(openQuoteIndex)));
+
+ int startOffset = region.getOffset();
+ for (int i = 0; i < region.getLength(); i++) {
+ int offset = startOffset + i;
+ if ((openQuoteIndex != -1 && i <= openQuoteIndex) ||
+ (closeQuoteIndex != -1 && i >= closeQuoteIndex)) {
+ // - Before and at opening quotation mark (single or double quote)
+ // - or at and after closing quotation mark (single or double quote)
+ // There is no prompting acceptable
+ } else {
+ String filter = document.get(startOffset + openQuoteIndex + 1, offset - startOffset - openQuoteIndex - 1);
+
+ String clearedFilter = filter;
+ if (filter.startsWith("#{")) {
+ clearedFilter = filter.substring(2);
+ } else if (filter.startsWith("#")) {
+ clearedFilter = filter.substring(1);
+ } else {
+ clearedFilter = "";
+ }
+
+ Set<String> filteredValidProposals = getFilteredProposals(getPageValidProposals(), clearedFilter);
+
+ if (filter.indexOf("#") == -1) {
+ filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals, "#{", "}");
+ } else if (filter.indexOf("#{") == -1) {
+ filteredValidProposals = renewWithPrefixAndPostfix(filteredValidProposals, "{", "}");
+ }
+
+
+ ICompletionProposal[] result= null;
+ String errorMessage = null;
+
+ IContentAssistProcessor p= getProcessor(viewer, offset, contentAssistant);
+ if (p != null) {
+ try {
+ result= p.computeCompletionProposals(viewer, offset);
+ } catch (Throwable x) {
+ x.printStackTrace();
+ }
+ errorMessage= p.getErrorMessage();
+ }
+
+// if (errorMessage != null && errorMessage.trim().length() > 0) {
+// System.out.println("#" + offset + ": ERROR MESSAGE: " + errorMessage);
+// }
+
+ // compare SeamELCompletionProposals in the result to the filtered valid proposals
+ Set<String> existingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+ Set<String> nonExistingProposals = new TreeSet<String>(String.CASE_INSENSITIVE_ORDER);
+
+ if (result != null && result.length > 0) {
+ for (int j = 0; j < result.length; j++) {
+// System.out.println("Result#" + i + "/" + j + " ==> " + result[j].getClass().getName());
+ // Look only for SeamELProposalProcessor proposals
+ if (result[j] instanceof SeamELProposalProcessor.Proposal) {
+ SeamELProposalProcessor.Proposal proposal = (SeamELProposalProcessor.Proposal)result[j];
+ String proposalString = proposal.getPrefixCompletionText(document, offset).toString();
+
+ if (filteredValidProposals.contains(proposalString)) {
+ existingProposals.add(proposalString);
+ filteredValidProposals.remove(proposalString);
+ } else {
+ nonExistingProposals.add(proposalString);
+ }
+ }
+ }
+ }
+ assertTrue("Some in-attribute Seam EL proposals werent\'t shown in the Content Assistant", filteredValidProposals.isEmpty());
+ assertTrue("Some in-attribute Seam EL proposals were shown in the Content Assistant but they shouldn\'t", nonExistingProposals.isEmpty());
+ }
+ }
+ } catch (BadLocationException e) {
+ e.printStackTrace();
+ assertNull("An exception caught: " + (e != null? e.getMessage() : ""), e);
+ }
+ }
+ }
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+ .closeEditor(editorPart, false);
+
+ }
+
+ private IContentAssistProcessor getProcessor(ITextViewer viewer, int offset, IContentAssistant ca) {
+ try {
+
+ IDocument document= viewer.getDocument();
+ String type= TextUtilities.getContentType(document, ((IContentAssistantExtension)ca).getDocumentPartitioning(), offset, true);
+
+ return ca.getContentAssistProcessor(type);
+
+ } catch (BadLocationException x) {
+ }
+
+ return null;
+ }
+
+ public SourceViewerConfiguration svConfiguration = null;
+
+ /**
+ * Process UI input but do not return for the specified time interval.
+ *
+ * @param waitTimeMillis
+ * the number of milliseconds
+ */
+ protected void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+
+ // If this is the UI thread,
+ // then process input.
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while (System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch())
+ display.sleep();
+ }
+ display.update();
+ }
+ // Otherwise, perform a simple sleep.
+ else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored.
+ }
+ }
+ }
+
+}
Property changes on: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
18 years, 2 months