JBoss Tools SVN: r5333 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-17 09:48:57 -0500 (Mon, 17 Dec 2007)
New Revision: 5333
Removed:
trunk/jsf/docs/userguide/en/modules/struts.xml
Log:
struts.xml was deleted because it was not used
Deleted: trunk/jsf/docs/userguide/en/modules/struts.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/struts.xml 2007-12-17 14:29:02 UTC (rev 5332)
+++ trunk/jsf/docs/userguide/en/modules/struts.xml 2007-12-17 14:48:57 UTC (rev 5333)
@@ -1,899 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="struts1" xreflabel="struts">
- <?dbhtml filename="struts.html"?>
- <title>Struts support</title>
- <para>If you prefer develop web applications using <property>Struts</property> technology
- JBoss Developer Studio also meets your needs.</para>
- <para>JBDS supports the Struts 1.1, 1.2.x versions.</para>
-
- <section id="SupportForStruts1.2.x1.1">
- <?dbhtml filename="SupportForStruts1.1.1.2.x.html"?>
- <title>Support for Struts 1.1, 1.2.x</title>
-
-
- <para>When you create a brand new or import an existing project you can set which
- Struts version to use:</para>
- <figure>
- <title>Choosing Struts Environment</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="WorkingWithStrutsProjects866">
- <?dbhtml filename="WorkingWithStrutsProjects.html"?>
- <title>Working with Projects</title>
- <section id="CreatingANewStrutsProjec745t">
- <?dbhtml filename="CreatingANewStrutsProject.html"?>
- <title>Creating a New Struts Project</title>
-
- <para>JBoss Developer Studio provides the following when working with Struts.</para>
-
- <itemizedlist>
- <listitem>
- <para>Create new <property>Struts projects</property></para>
- </listitem>
- <listitem>
- <para>Import (open) existing Struts projects</para>
- <para>You can import any project structure</para>
- </listitem>
- <listitem>
- <para>Add <property>Struts capabilities</property> to any
- existing Eclipse project</para>
- </listitem>
- <listitem>
- <para>Import and add Struts capabilities to any existing project
- created outside Eclipse</para>
- </listitem>
- </itemizedlist>
- <para>JBoss Developer Studio includes a New Struts Project Wizard that
- radically simplifies the process for getting started with a new Struts
- project. You just need to follow these 4 steps:</para>
- <orderedlist>
- <listitem>
- <para>Select<emphasis>
- <property> File > New > Project...</property>
- </emphasis> from the menu bar. Then, select <emphasis>
- <property>JBoss Tools Web > Struts > Struts
- Project</property>
- </emphasis> in this dialog box. Click <emphasis>
- <property>Next</property>
- </emphasis>:</para>
- </listitem>
- </orderedlist>
- <figure>
- <title>Selecting Struts Wizard</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_2.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <orderedlist continuation="continues">
- <listitem>
- <para>On this screen, provide the project name. You can leave all
- other values as they are:</para>
- </listitem>
- </orderedlist>
-
- <figure>
- <title>Creating Struts Project</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_3.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>Don't put spaces in project names.</para>
- </tip>
- <note>
- <title>Note:</title>
- <para>If you select the KickStart template, then the project created
- will include a simple Hello World type application that is
- ready-to-run.</para>
- </note>
- <orderedlist continuation="continues">
- <listitem>
- <para>Next, you can register this application with the current
- servlet container defined for your workspace (JBoss AS, by
- default) in order to allow you to test your application
- more easily while still developing it. A new entry will be
- added in the servlet container configuration file to
- enable running the application in-place (called null
- deployment or link deployment). Uncheck the <emphasis
- role="italic">
- <property>"Target
- Server"</property>
- </emphasis> check box if for some reason you
- don't want to register your application at this
- point.</para>
- </listitem>
- </orderedlist>
- <figure>
- <title>Registering The Project at Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_4.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <orderedlist continuation="continues">
- <listitem>
- <para>On the next screen, you can select the TLD files to include
- in this project:</para>
- </listitem>
- </orderedlist>
- <figure>
- <title>Selecting Tag Libraries</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_5.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>After the project is created, you should have the following project
- structure (if you used the KickStart template):</para>
-
- <figure>
- <title>Project Structure</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>If you want to hide the jar files from Web App Libraries in view,
- select the down-pointing arrow in the upper right corner, select
- <emphasis>Filters...</emphasis>, check the box next to
- Name filter patterns (matching names will be hidden), and type
- *.jar into the field. Then, click OK. </para>
- </tip>
- </section>
- <section id="ImportingAnExistingStrutsProjectWithAnyStructure9653">
- <?dbhtml filename="ImportingAnExistingStrutsProjectWithAnyStructure.html"?>
- <title>Importing an Existing Struts Project with Any Structure</title>
-
- <para>For detailed information on migration projects to JBoss Developer Studio
- see <ulink
- url="../../../../../../documentation/guides/build/Exadel-migration/en/html_single/index.html"
- >Migration Guide</ulink>.</para>
-
- </section>
- <section id="AddingStrutsCapabilityToAnExistingWebApplication532">
- <?dbhtml filename="AddingStrutsCapabilityToAnExistingWebApplication.html"?>
- <title>Adding Struts Capability to an Existing Web Application</title>
-
- <para>With JBoss Developer Studio you can add <property>Struts
- capabilities</property> (including Struts libraries, tag libraries and a
- Struts configuration file) to any existing Web application project in
- your Eclipse workspace. By adding a Struts Nature to your project, you
- can now edit files using JBoss Developer Studio editors, such as the
- Struts configuration editor and the JBoss Tools JSP editor.</para>
- <para>To add Struts Nature t oyour existing Project right-click the project and
- select <emphasis>
- <property>JBoss Tools > Add Struts Capabilities</property>
- </emphasis> from the context menu. This will start the process of adding
- all necessary libraries and files to make this a Web Struts project.</para>
-
- <figure>
- <title>Adding Struts Capabilities</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>In the wizard you should point to location of your deployment descriptor
- file web.xml and name of Web application.</para>
-
- <figure>
- <title>Choosing Project Location</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_8.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>After hitting <emphasis>
- <property>Next</property>
- </emphasis>, you will see the following screen. This screen simply means
- that you need to add at least one Struts module to your project to make
- this project a Struts project. Adding a Struts module means that a new
- struts-config.xml will be added to your project and registered in the
- web.xml file. In addition, all required Struts libraries will be added.
- To add a Struts module, select the <emphasis>
- <property>Add Struts Support</property>
- </emphasis> button.</para>
- <figure>
- <title>Project Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_9.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Here you can select what Struts version, Servlet class, URL pattern and
- TLDs to add to this project.</para>
-
- <figure>
- <title>Selecting Struts Support Options</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When done, you will see the default Struts module configuration
- information. See how to Edit <link
- linkend="SupportForMultipleStrutsModules75">Struts
- modules</link>.</para>
-
- <figure>
- <title>Project Configuration Information</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_11.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On the last screen you can set the different folders for your project as
- well as register this application with a servlet container.</para>
-
- <figure>
- <title>Registering the Project at Server</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_12.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>When done, you can open nd edit the struts-config.xml file using usefull
- Struts configuration file editor provided by JBDS. (The Struts
- configuration is shown below in the Tree viewer).</para>
-
- <figure>
- <title>Struts-config.xml File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_13.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section id="GraphicalEditorForStrutsConfigurationFiles564">
- <?dbhtml filename="GraphicalEditorForStrutsConfigurationFiles.html"?>
- <title>Graphical Editor for Struts Configuration Files</title>
-
- <para><property>The Struts configuration file editor</property> has three modes with
- different reprisentation of <emphasis>
- <property>struts-config.xml</property>
- </emphasis>: Diagram, Tree and Source. The modes can be selected via the tabs
- at the bottom of the editor. Any changes made in one mode are immediately
- visible when you switch to any other mode.</para>
-
- <para>When working in Source view, you always have all the following features
- available:</para>
- <itemizedlist>
- <listitem>
- <para>Content Assist</para>
- </listitem>
- <listitem>
- <para>Open On Selection</para>
- </listitem>
- <listitem>
- <para>File Folding</para>
- </listitem>
- </itemizedlist>
- <section id="StrutsDiagramMode453">
- <?dbhtml filename="DiagramMode.html"?>
- <title>Diagram Mode</title>
-
- <para>The Diagram mode graphically displays the Web flow of the application
- defined in the Struts configuration file.</para>
-
- <figure>
- <title>Diagram Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_14.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Just by right-clicking anywhere on the diagram, you can use a context
- menu to create the building blocks of a Struts application:</para>
- <itemizedlist>
- <listitem>
- <para>Actions</para>
- </listitem>
- <listitem>
- <para>Global forwards</para>
- </listitem>
- <listitem>
- <para>Global exceptions</para>
- </listitem>
- <listitem>
- <para>JSP Pages</para>
- </listitem>
- </itemizedlist>
-
- <figure>
- <title>Diagram Context Menu</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_15.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Along the upper-left side of the editor is a stack of seven icons for
- changing the behavior of the cursor in the diagram. The first icon
- switches to the default regular selection cursor, the second to the
- marquee selection cursor and the third to the new connection cursor. The
- last four icons switch the cursor to an insert cursor for each type of
- Struts build block listed above (and in the order listed).</para>
-
- <para>For instance, clicking on the first of these four icons (the one with the
- gears) will switch the cursor to insert actions. Clicking anywhere in
- the diagram with this cursor has the same effect as right-click and
- selecting <emphasis>
- <property>Add > Action...</property>
- </emphasis> from the context menu with the regular cursor active.
- It's just more efficient to use this cursor if you're
- adding more than one action at once.</para>
-
- <figure>
- <title>Insert Actions Cursor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_16.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsTreeMode42">
- <?dbhtml filename="TreeMode.html"?>
- <title>Tree Mode</title>
-
- <para>The Tree mode represents the different elements of the Struts application
- that are organized into functional categories on the left-hand side and
- a form for editing the properties of currently selected items on the
- right-hand side.</para>
-
- <figure>
- <title>Tree Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_17.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also right-click on any node in the category tree and perform
- appropriate operations through a context menu. For instance, by
- right-clicking on the action-mappings category node, you can add new
- actions to the application.</para>
-
- <figure>
- <title>Tree Context Menu</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_18.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsSourceMode9655">
- <?dbhtml filename="SourceMode.html"?>
- <title>Source Mode</title>
-
- <para>In the Source mode, you have complete editing control of the underlying
- XML coding:</para>
-
- <figure>
- <title>Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_19.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can take advantage of code assist:</para>
-
- <figure>
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_20.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The editor will also immediately flag any errors:</para>
-
- <figure>
- <title>Errors in Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_21.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>Finally, you can use the Outline view with the editor to easily navigate
- through the file:</para>
-
- <figure>
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_22.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
-
- <section id="GraphicalEditorForTilesFiles132">
- <?dbhtml filename="GraphicalEditorForTilesFiles.html"?>
- <title>Graphical Editor for Tiles Files</title>
-
- <para><property>The Tiles configuration file editor</property> has three main modes:
- Tree (shown), Diagram and Source. The modes can be selected via the tabs at the
- bottom of the editor. Any changes made in one mode are immediately visible when
- you switch to any other mode.</para>
-
- <para>When working in Source view, you always have all following features available:</para>
- <itemizedlist>
- <listitem>
- <para>Content Assist</para>
- </listitem>
- <listitem>
- <para>Open On Selection</para>
- </listitem>
- </itemizedlist>
- <section id="CreateNewTilesFile1422">
- <?dbhtml filename="CreateNewTilesFile.html"?>
- <title>Create New Tiles File</title>
-
- <para>To create a new Tiles files, right click any folder and select <emphasis>
- <property>New > Tiles File</property>
- </emphasis>.</para>
- <figure>
- <title>Creating a New Tiles File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_23.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsTreeView896">
- <?dbhtml filename="TreeView.html"?>
- <title>Tree Mode</title>
-
- <para>The Tree mode represents the different elements of the Tiles file that
- are organized into functional categories on the left-hand side and a
- form for editing the properties of currently selected items on the
- right-hand side.</para>
- <figure>
- <title>Tree Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_24.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To edit the file, simply right click any node and select among the
- available actions:</para>
- <figure>
- <title>Editing in Tiles Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_25.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsDiagramView4643">
- <?dbhtml filename="DigramView.html"?>
- <title>Diagram Mode</title>
-
- <para>The Diagram mode is shown below:</para>
- <figure>
- <title>Diagram Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_26.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>To create new definitions, simply right click anywhere in the diagram:</para>
- <figure>
- <title>Creating New Definition</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_27.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Diagram toolbar to make editing easier.</para>
- <figure>
- <title>Diagram Toolbar</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_28.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para> It contains four icons for changing the cursor state. The first one is
- the default cursor state for selecting existing nodes. The second icon
- is marquee selector. The third is used for creating new connections and
- the last one is for adding definition template.</para>
- </section>
- <section id="StrutsSource75">
- <?dbhtml filename="Source.html"?>
- <title>Source</title>
-
- <para>The other mode of the <property>Tiles editor</property> is the Source mode that
- gives you full control over the source. Any changes here will
- immediately appear in other modes when you switch to them.</para>
- <figure>
- <title>Source Mode</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_29.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Code assist is available in the Source mode:</para>
- <figure>
- <title>Code Assist</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_30.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Any errors are immediately reported as shown below:</para>
- <figure>
- <title>Errors Reporting</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_31.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also use the Outline view together with the editor's
- Source mode. It provides the navigation through the file.</para>
- <figure>
- <title>Outline View</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_32.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section id="GraphicalEditorForStrutsValidationFiles86">
- <?dbhtml filename="GraphicalEditorForStrutsValidationFiles.html"?>
- <title>Graphical Editor for Struts Validation Files</title>
-
- <para>JBoss Developer Studio comes with a <property>visual validation
- editor</property>. To create a new validation file, right click any folder and
- select <emphasis>
- <property>File > Validation File</property>
- </emphasis> from the context menu.</para>
- <figure>
- <title>Creating New Validation File</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_33.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The validation editor works through a number of viewers.</para>
- <para>The Formsets viewer shows forms and their elements for which to define
- validation rules.</para>
- <figure>
- <title>Formsets Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_34.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The Constants viewer lets you set constant values for your validation rules.</para>
- <figure>
- <title>Constansts Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_35.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The validation file also can be viewed in a Tree viewer.</para>
- <figure>
- <title>Tree Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_36.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>At any point you have full control over the source by switching to the Source
- viewer. Any editing in this viewer will immediately be available in other
- viewers of this editor.</para>
- <figure>
- <title>Source Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_37.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You can also open your own custom or Struts-standard validation-rules.xml file.</para>
- <para>The Validators viewer shows the validation rules for a selected validator. You
- can of course add your own rules.</para>
- <figure>
- <title>Validators Viewer</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_38.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>Here are the validation rules shown in the Source viewer.</para>
- <figure>
- <title>Validation Rules</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_39.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="SupportForMultipleStrutsModules75">
- <?dbhtml filename="SupportForMultipleStrutsModules.html"?>
- <title>Support for Multiple Struts Modules</title>
- <section id="StrutsModulesghf07">
- <?dbhtml filename="StrutsModules.html"?>
- <title>Struts Modules</title>
- <para>JBoss Developer Studio supports working with Struts projects that have
- multiple <property>modules</property>. You can easily do the following:</para>
- <itemizedlist>
- <listitem>
- <para>Add new modules</para>
- </listitem>
- <listitem>
- <para>Edit modules for an existing project or during Struts
- project import</para>
- </listitem>
- </itemizedlist>
- </section>
- <section id="WhenImportingAStrutsProject432">
- <?dbhtml filename="WhenImportingAStrutsProject.html"?>
- <title>When Importing a Struts Project</title>
-
- <para>During Struts project import, if the project has multiple modules, you
- will see a screen with all existing modules. You can select each module
- and edit its details.</para>
-
- <figure>
- <title>Configuring Project Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_40.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="EditingModulesInAnExistingProject1">
- <?dbhtml filename="EditingModulesInAnExistingProject.html"?>
- <title>Editing Modules in an Existing Project</title>
- <para>To edit modules in an existing project, right click the project and
- select <emphasis>
- <property>JBoss Tools > Modules Configuration</property>
- </emphasis>.</para>
- <figure>
- <title>Choosing Modules Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_41.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You will see the same screen as above where you will be able to select a
- module and edit its details:</para>
- <figure>
- <title>Modules Configuration</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_42.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="AddingNewModules1">
- <?dbhtml filename="AddingMewModules.html"?>
- <title>Adding New Modules</title>
-
- <para>Adding a new module is very simple. First switch to Web Project view.
- Expand your project to the Configuration folder. Under that folder you
- should see the current modules. Right click on Configuration and select <emphasis>
- <property>New > Struts Config</property>
- </emphasis>.</para>
- <figure>
- <title>Adding New Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_43.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <para>You will see the screen below. You can specify a new module name and also
- add the new Struts configuration file to web.xml file.</para>
- <figure>
- <title>Adding New Modules</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_44.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- </section>
- <section id="CodeGenerationForActionFormBeanForwardAndExceptionClasses1">
- <?dbhtml filename="CodeGenerationForActionFormBeanForwardAndExceptionClasses.html"?>
- <title>Code Generation for Action, FormBean, Forward and Exception Classes</title>
-
- <para>JBoss Developer Studio comes with a <property>code generation</property>
- feature. You can generate stub code for Struts Actions, FormBeans, Forwards and
- Exceptions.</para>
-
- <para>The code generation in JBoss Developer Studio is based on Velocity templates
- which can be modified for your use. The templates are located at <emphasis>
- <property> {RedHatDeveloperStudioHome} > templates >
- codegeneration</property>
- </emphasis>.</para>
-
- <para>There are a number of ways to invoke code generation. One is simply
- right-clicking the Struts diagram and selecting <emphasis>
- <property>Generate Java Code....</property>
- </emphasis></para>
-
- <figure>
- <title>Selecting Generate Java Code</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_45.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>On this screen you can select for which elements to generate code. If you select
- Next you will be able to specify more options for each of the categories you
- selected.</para>
-
- <figure>
- <title>Generate - Step 1</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_46.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <tip>
- <title>Tip:</title>
- <para>please be careful not to override your existing files.</para>
- </tip>
-
- <para>When generation is complete, a result window will appear letting you know how
- many classes were generated:</para>
-
- <figure>
- <title>Generation Finished</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_47.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>You don't always have to generate code for all elements at once. You
- can invoke generation for just an individual Struts artifact as well.
- Right-click an element on the diagram of the Struts configuration file and
- select <emphasis>
- <property>Generate Java Code...</property>
- </emphasis> from the context menu.</para>
-
- <figure>
- <title>Generation For Individual Struts Artifact</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_48.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>The same can be done from within the Tree viewer for the editor of the Struts
- configuration file.</para>
-
- <figure>
- <title>Generation in Struts Config Editor</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_49.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="StrutsConfigurationFileDebugger097">
- <?dbhtml filename="StrutsConfigurationFileDebugger.html"?>
- <title>Struts Configuration File Debugger</title>
-
- <para>JBoss Developer Studio comes with <property>Struts configuration file
- debugger</property>. It allows you to set break points on Struts diagram and
- then simply launch the server in debug mode.</para>
-
- <para>Simply right click an Action or a page and select Add <emphasis>
- <property>Breakpoint</property>
- </emphasis>. </para>
- <figure>
- <title>Adding Breakpoint</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_50.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
- <section id="CustomizablePageLinksRecognizer1">
- <?dbhtml filename="CustomizablePageLinksRecognizer.html"?>
- <title>Customizable Page Links Recognizer</title>
-
- <para><property>Custom page links</property> allow you to define custom Struts page
- links that will be recognizable in the Struts application diagram. You can
- define these links by selecting <emphasis>
- <property>Window > Preferences</property>
- </emphasis> from the menu bar and then selecting <emphasis>
- <property>JBoss Tools > Web > Struts > Customization</property>
- </emphasis> from the Preferences dialog box.</para>
- <figure>
- <title>Customization Panel</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts/struts_51.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- </section>
-</chapter>
17 years
JBoss Tools SVN: r5332 - trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-12-17 09:29:02 -0500 (Mon, 17 Dec 2007)
New Revision: 5332
Modified:
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
Log:
JBIDE-1498
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2007-12-17 14:28:38 UTC (rev 5331)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2007-12-17 14:29:02 UTC (rev 5332)
@@ -59,7 +59,9 @@
private void processEntity(XModelObject e, XModelObject q) {
boolean impl = (e.getAttributeValue("implementation").length() > 0);
- if(impl) validateProperty(q, e.getAttributeValue("name"), defpath);
+ if(impl) {
+// validateProperty(q, e.getAttributeValue("name"), defpath);
+ }
processActions(e, q, impl);
}
@@ -71,7 +73,9 @@
XModelObject[] as = collectActions(e);
String pref = e.getAttributeValue("name") + "_";
for (int i = 0; i < as.length; i++) processAction(pref, as[i], q);
- if(impl) validateProperty(q, pref + "Properties", defpath);
+ if(impl) {
+// validateProperty(q, pref + "Properties", defpath);
+ }
}
private XModelObject[] collectActions(XModelObject e) {
@@ -91,9 +95,29 @@
String n = a.getAttributeValue("name");
String dn = a.getAttributeValue("display name");
if(dn.endsWith("...")) dn = dn.substring(0, dn.length() - 3);
- if(a.getAttributeValue("wizard").length() > 0) {
+ if(n.startsWith("Add")) {
String key = pref + n;
- validateProperty(q, key, defpath);
+ String wt = dn;
+ if(!wt.startsWith("Add") && !wt.startsWith("New")) {
+ wt = "Add " + wt;
+ }
+ validateProperty(q, key + ".WindowTitle", wt);
+ String on = getObjectName(a);
+ if(on == null) on = dn;
+ validateProperty(q, key + ".Title", on);
+ } else if(n.equals("Properties")) {
+ String key = pref + n;
+ validateProperty(q, key + ".WindowTitle", "Properties");
+ XModelObject b = a;
+ while(b != null && b.getModelEntity().getName().toLowerCase().indexOf("entity") < 0) {
+ b = b.getParent();
+ }
+ String on = (b == null) ? dn : getObjectName2(b);
+ if(on == null) on = dn;
+ validateProperty(q, key + ".Title", on);
+ } else if(a.getAttributeValue("wizard").length() > 0) {
+ String key = pref + n;
+// validateProperty(q, key, defpath);
validateProperty(q, key + ".WindowTitle", dn);
validateProperty(q, key + ".Title", "");
validateProperty(q, key + ".Message", "");
@@ -101,14 +125,14 @@
int m = a.getChildren().length;
for (int i = 0; i < m; i++) {
String key = pref + n + "_" + i;
- validateProperty(q, key, defpath);
+// validateProperty(q, key, defpath);
validateProperty(q, key + ".WindowTitle", dn);
validateProperty(q, key + ".Title", "");
validateProperty(q, key + ".Message", "");
}
} else if(n.indexOf("Edit") >= 0) {
String key = pref + n;
- validateProperty(q, key, defpath);
+// validateProperty(q, key, defpath);
validateProperty(q, key + ".WindowTitle", dn);
validateProperty(q, key + ".Title", "");
validateProperty(q, key + ".Message", "");
@@ -119,5 +143,30 @@
return s.equals("org.jboss.tools.common.meta.action.impl.handlers.DefaultSpecialHandler")
|| s.equals("%SpecialWizard%");
}
+
+ private String getObjectName(XModelObject a) {
+ XModelObject[] cs = a.getChildren();
+ if(cs == null || cs.length == 0) return null;
+ String n = cs[0].getAttributeValue("entity name");
+ return getObjectName(n);
+ }
+ private String getObjectName2(XModelObject a) {
+ return getObjectName(a.getAttributeValue("name"));
+ }
+
+ private String getObjectName(String n) {
+ StringBuffer result = new StringBuffer();
+ for (int i = 0; i < n.length(); i++) {
+ char ch = n.charAt(i);
+ if(i > 0 && Character.isUpperCase(ch) && !Character.isUpperCase(n.charAt(i - 1))) {
+ result.append(' ');
+ }
+ if(!Character.isDigit(ch) && ch != '.') {
+ result.append(ch);
+ }
+ }
+ return result.toString();
+ }
+
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2007-12-17 14:28:38 UTC (rev 5331)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2007-12-17 14:29:02 UTC (rev 5332)
@@ -85,9 +85,10 @@
o.addChild(c);
}
}
-
+
private static String calculateEntity(Element element, XModelEntity[] es) {
- if(XMLUtil.hasAttribute(element, "ENTITY")) return element.getAttribute("ENTITY");
+ String entity = getModelEntityAttribute(element);
+ if(entity != null) return entity;
String xml = element.getNodeName();
for (int i = 0; i < es.length; i++) {
if(xml.equals(es[i].getXMLSubPath()))
@@ -97,7 +98,8 @@
}
private static String calculateEntity(Element element, String def) {
- if(XMLUtil.hasAttribute(element, "ENTITY")) return element.getAttribute("ENTITY");
+ String entity = getModelEntityAttribute(element);
+ if(entity != null) return entity;
if(def.equals("MetaActionList")) {
String k = element.getAttribute("kind");
if("action".equals(k)) return "MetaAction";
17 years
JBoss Tools SVN: r5331 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: impl and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-12-17 09:28:38 -0500 (Mon, 17 Dec 2007)
New Revision: 5331
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelConstants.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/DefaultEntityRecognizer.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableContainerLoader.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableLoaderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java
Log:
JBIDE-1498
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelConstants.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelConstants.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -22,6 +22,9 @@
public static String WORKSPACE_OLD_REF = "%" + WORKSPACE_OLD + "%";
public static String MODEL_VERSION = "version";
+
+ public static String XMODEL_ENTITY_ATTR = "model-entity";
+ public static String XMODEL_ENTITY_ATTR_OLD = "ENTITY";
private XModelConstants() {}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/XModelObjectImpl.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -27,7 +27,7 @@
public class XModelObjectImpl implements XModelObject, Serializable, Cloneable {
private static final long serialVersionUID = 3860648580262144825L;
- protected static final String ENTITY = "ENTITY";
+// protected static final String ENTITY = XModelConstants.XMODEL_ENTITY_ATTR;
private XModel model = null;
private XModelEntity entity = null;
private XModelObjectImpl parent = null;
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/DefaultEntityRecognizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/DefaultEntityRecognizer.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/loaders/impl/DefaultEntityRecognizer.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -12,6 +12,7 @@
import java.io.*;
import org.w3c.dom.*;
+import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.loaders.*;
import org.jboss.tools.common.model.util.XMLUtil;
@@ -22,8 +23,14 @@
public String getEntityName(String ext, String body) {
if(body == null) return null;
Element e = XMLUtil.getElement(new StringReader(body));
- if(e == null || !XMLUtil.hasAttribute(e, "ENTITY")) return null;
- return e.getAttribute("ENTITY");
+ if(e == null) return null;
+ if(XMLUtil.hasAttribute(e, XModelConstants.XMODEL_ENTITY_ATTR)) {
+ return e.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR);
+ }
+ if(XMLUtil.hasAttribute(e, XModelConstants.XMODEL_ENTITY_ATTR_OLD)) {
+ return e.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR_OLD);
+ }
+ return null;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableContainerLoader.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableContainerLoader.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableContainerLoader.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -12,6 +12,7 @@
import org.w3c.dom.*;
import org.jboss.tools.common.model.options.*;
+import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
//import com.elt.model.viewedit.impl.flow.*;
import org.jboss.tools.common.model.*;
@@ -22,7 +23,7 @@
public void loadChild(Element element, SharableElement sharable, String scopename) {
SharableContainerImpl container = (SharableContainerImpl)sharable;
XModelObject o = container.getChildForScope(scopename);
- String en = element.getAttribute("ENTITY");
+ String en = XModelObjectLoaderUtil.getModelEntityAttribute(element);
if(!o.getModelEntity().getName().equals(en)) return;
//// if(o instanceof FlowClassTemplateImpl) {
//// new ClassLoader_Impl().loadClass(element, (Class_)o);
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableLoaderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableLoaderImpl.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/options/impl/SharableLoaderImpl.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -13,6 +13,7 @@
import java.util.*;
import org.w3c.dom.*;
import org.jboss.tools.common.meta.*;
+import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.options.*;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
@@ -54,7 +55,8 @@
}
public void loadChild(Element element, SharableElement sharable, String scopename) {
- String en = element.getAttribute("ENTITY");
+ String en = XModelObjectLoaderUtil.getModelEntityAttribute(element);
+ if(en == null) return;
XModelEntity ent = sharable.getModel().getMetaData().getEntity(en);
if(ent == null) return;
boolean hasName = (ent.getAttribute("name") != null);
@@ -96,7 +98,7 @@
public void saveAttributes(Element element, SharableElement sharable, String scopename) {
XModelEntity entity = sharable.getModelEntity();
- element.setAttribute("ENTITY", entity.getName());
+ element.setAttribute(XModelConstants.XMODEL_ENTITY_ATTR, entity.getName());
XAttribute[] as = sharable.getModelEntity().getAttributes();
element.setAttribute(SCOPE, reduceScopeName(scopename, sharable.getScope()));
for (int i = 0; i < as.length; i++) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java 2007-12-17 14:24:02 UTC (rev 5330)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/XModelObjectLoaderUtil.java 2007-12-17 14:28:38 UTC (rev 5331)
@@ -39,6 +39,7 @@
import org.jboss.tools.common.meta.XModelEntity;
import org.jboss.tools.common.model.ServiceDialog;
import org.jboss.tools.common.model.XModel;
+import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.engines.impl.EnginesLoader;
import org.jboss.tools.common.model.filesystems.XFileObject;
@@ -150,7 +151,10 @@
protected Set<String> getAllowedAttributes(XModelEntity entity) {
if(entity.getChild("AnyElement") != null) return null;
Set<String> attributes = new HashSet<String>();
- if(saveentity) attributes.add("ENTITY");
+ if(saveentity) {
+ attributes.add(XModelConstants.XMODEL_ENTITY_ATTR);
+ attributes.add(XModelConstants.XMODEL_ENTITY_ATTR_OLD);
+ }
XAttribute[] as = entity.getAttributes();
for (int i = 0; i < as.length; i++) {
String xml = as[i].getXMLName();
@@ -322,9 +326,19 @@
}
}
+ public static String getModelEntityAttribute(Element element) {
+ if(XMLUtil.hasAttribute(element, XModelConstants.XMODEL_ENTITY_ATTR)) {
+ return element.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR);
+ }
+ if(XMLUtil.hasAttribute(element, XModelConstants.XMODEL_ENTITY_ATTR_OLD)) {
+ return element.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR_OLD);
+ }
+ return null;
+ }
+
protected String getChildEntity(XModelEntity entity, Element e) {
- String en = e.getAttribute("ENTITY");
- if(en.length() == 0) {
+ String en = getModelEntityAttribute(e);
+ if(en == null || en.length() == 0) {
String n = e.getNodeName();
if(namespaceMapping != null) {
n = namespaceMapping.convertToDefault(n);
@@ -338,7 +352,9 @@
}
protected boolean acceptElement(Element e, String entity) {
- return !saveentity || entity.equals(e.getAttribute("ENTITY"));
+ return !saveentity ||
+ (entity.equals(e.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR))
+ || entity.equals(e.getAttribute(XModelConstants.XMODEL_ENTITY_ATTR_OLD)));
}
public static XModelObject createValidObject(XModel model, String entityname) {
@@ -404,8 +420,9 @@
public void saveAttributes(Element element, XModelObject o) {
XModelEntity entity = o.getModelEntity();
XAttribute[] as = entity.getAttributes();
- if (saveentity)
- element.setAttribute("ENTITY", entity.getName());
+ if (saveentity) {
+ element.setAttribute(XModelConstants.XMODEL_ENTITY_ATTR, entity.getName());
+ }
for (int i = 0; i < as.length; i++) {
if (as[i].isFake()) continue;
String xmlname = as[i].getXMLName();
@@ -479,7 +496,7 @@
public XModelObject parse(XModel model, Reader reader) {
Element element = XMLUtil.getElement(reader);
if(element == null) return null;
- String entity = element.getAttribute("ENTITY");
+ String entity = getModelEntityAttribute(element);
XModelObject o = model.createModelObject(entity, null);
load(element, o);
return o;
17 years
JBoss Tools SVN: r5330 - trunk/documentation/guides/userguide/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-17 09:24:02 -0500 (Mon, 17 Dec 2007)
New Revision: 5330
Modified:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-140 gsg. linka are related
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2007-12-17 13:08:38 UTC (rev 5329)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2007-12-17 14:24:02 UTC (rev 5330)
@@ -179,7 +179,7 @@
<itemizedlist>
<listitem>
<para>Download the appropriate installation file for your platform from <ulink
- url="http://www.redhat.com/developers/rhds/">Red Hat website</ulink>.</para>
+ url="http://www.jboss.com/products/devstudio">Red Hat website</ulink>.</para>
</listitem>
<listitem>
<para>Run in console:</para>
@@ -532,8 +532,7 @@
<para>
<emphasis role="bold">How can I add my own tag library to the JBoss Tools Palette?</emphasis>
</para>
- <para>See <ulink url="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag Libraries</ulink> in
- JBossJSFTools Guide.</para>
+ <para>See <ulink url="../../../jsf/en/html/palette.html">Adding Tag Libraries</ulink> in Visual Web Tools Guide.</para>
<para>
<emphasis role="bold">I see the Oracle ADF Faces component library tags in the JBoss Tools
Palette, but I can't seem to find the libraries for ADF. How do I use this component
@@ -553,6 +552,6 @@
<para>Forum: <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=258">JBoss
Forum</ulink></para>
- <para>Download: <ulink url="http://www.redhat.com/developers/rhds/">JBDS Download</ulink></para>
+ <para>Download: <ulink url="http://www.jboss.com/products/devstudio">JBDS Download</ulink></para>
</section>
</chapter>
17 years
JBoss Tools SVN: r5329 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam: src/org/jboss/seam/test/unit and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2007-12-17 08:08:38 -0500 (Mon, 17 Dec 2007)
New Revision: 5329
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextLexer.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParser.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.txt
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/lib/ant-antlr.jar
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/lib/antlr-runtime.jar
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextLexer.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParser.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.txt
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/test/unit/SeamTextTest.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1449
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/lib/ant-antlr.jar
===================================================================
(Binary files differ)
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/lib/antlr-runtime.jar
===================================================================
(Binary files differ)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/test/unit/SeamTextTest.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/test/unit/SeamTextTest.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/test/unit/SeamTextTest.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -13,8 +13,8 @@
import java.io.InputStreamReader;
import java.io.Reader;
-import org.jboss.seam.text.SeamTextLexer;
-import org.jboss.seam.text.SeamTextParser;
+import org.jboss.seam.text.xpl.SeamTextLexer;
+import org.jboss.seam.text.xpl.SeamTextParser;
/**
* @author Vitali (vyemialyanchyk(a)exadel.com)
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextLexer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextLexer.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextLexer.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -1,711 +0,0 @@
-// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
-
-package org.jboss.seam.text;
-
-import java.io.InputStream;
-import antlr.TokenStreamException;
-import antlr.TokenStreamIOException;
-import antlr.TokenStreamRecognitionException;
-import antlr.CharStreamException;
-import antlr.CharStreamIOException;
-import antlr.ANTLRException;
-import java.io.Reader;
-import java.util.Hashtable;
-import antlr.CharScanner;
-import antlr.InputBuffer;
-import antlr.ByteBuffer;
-import antlr.CharBuffer;
-import antlr.Token;
-import antlr.CommonToken;
-import antlr.RecognitionException;
-import antlr.NoViableAltForCharException;
-import antlr.MismatchedCharException;
-import antlr.TokenStream;
-import antlr.ANTLRHashString;
-import antlr.LexerSharedInputState;
-import antlr.collections.impl.BitSet;
-import antlr.SemanticException;
-
-public class SeamTextLexer extends antlr.CharScanner implements SeamTextParserTokenTypes, TokenStream
- {
-public SeamTextLexer(InputStream in) {
- this(new ByteBuffer(in));
-}
-public SeamTextLexer(Reader in) {
- this(new CharBuffer(in));
-}
-public SeamTextLexer(InputBuffer ib) {
- this(new LexerSharedInputState(ib));
-}
-public SeamTextLexer(LexerSharedInputState state) {
- super(state);
- caseSensitiveLiterals = true;
- setCaseSensitive(true);
- literals = new Hashtable();
-}
-
-public Token nextToken() throws TokenStreamException {
- Token theRetToken=null;
-tryAgain:
- for (;;) {
- Token _token = null;
- int _ttype = Token.INVALID_TYPE;
- resetText();
- try { // for char stream error handling
- try { // for lexical error handling
- switch ( LA(1)) {
- case '!': case '$': case '%': case '\'':
- case '(': case ')': case ',': case '-':
- case '.': case ':': case ';': case '?':
- case '@': case '{': case '}':
- {
- mPUNCTUATION(true);
- theRetToken=_returnToken;
- break;
- }
- case '=':
- {
- mEQ(true);
- theRetToken=_returnToken;
- break;
- }
- case '+':
- {
- mPLUS(true);
- theRetToken=_returnToken;
- break;
- }
- case '_':
- {
- mUNDERSCORE(true);
- theRetToken=_returnToken;
- break;
- }
- case '*':
- {
- mSTAR(true);
- theRetToken=_returnToken;
- break;
- }
- case '/':
- {
- mSLASH(true);
- theRetToken=_returnToken;
- break;
- }
- case '\\':
- {
- mESCAPE(true);
- theRetToken=_returnToken;
- break;
- }
- case '|':
- {
- mBAR(true);
- theRetToken=_returnToken;
- break;
- }
- case '`':
- {
- mBACKTICK(true);
- theRetToken=_returnToken;
- break;
- }
- case '~':
- {
- mTWIDDLE(true);
- theRetToken=_returnToken;
- break;
- }
- case '"':
- {
- mDOUBLEQUOTE(true);
- theRetToken=_returnToken;
- break;
- }
- case '[':
- {
- mOPEN(true);
- theRetToken=_returnToken;
- break;
- }
- case ']':
- {
- mCLOSE(true);
- theRetToken=_returnToken;
- break;
- }
- case '#':
- {
- mHASH(true);
- theRetToken=_returnToken;
- break;
- }
- case '^':
- {
- mHAT(true);
- theRetToken=_returnToken;
- break;
- }
- case '>':
- {
- mGT(true);
- theRetToken=_returnToken;
- break;
- }
- case '<':
- {
- mLT(true);
- theRetToken=_returnToken;
- break;
- }
- case '&':
- {
- mAMPERSAND(true);
- theRetToken=_returnToken;
- break;
- }
- case '\t': case ' ':
- {
- mSPACE(true);
- theRetToken=_returnToken;
- break;
- }
- case '\n': case '\r':
- {
- mNEWLINE(true);
- theRetToken=_returnToken;
- break;
- }
- case '\uffff':
- {
- mEOF(true);
- theRetToken=_returnToken;
- break;
- }
- default:
- if ((_tokenSet_0.member(LA(1)))) {
- mWORD(true);
- theRetToken=_returnToken;
- }
- else {
- if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
- else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- if ( _returnToken==null ) continue tryAgain; // found SKIP token
- _ttype = _returnToken.getType();
- _ttype = testLiteralsTable(_ttype);
- _returnToken.setType(_ttype);
- return _returnToken;
- }
- catch (RecognitionException e) {
- throw new TokenStreamRecognitionException(e);
- }
- }
- catch (CharStreamException cse) {
- if ( cse instanceof CharStreamIOException ) {
- throw new TokenStreamIOException(((CharStreamIOException)cse).io);
- }
- else {
- throw new TokenStreamException(cse.getMessage());
- }
- }
- }
-}
-
- public final void mWORD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = WORD;
- int _saveIndex;
-
- {
- int _cnt107=0;
- _loop107:
- do {
- switch ( LA(1)) {
- case 'a': case 'b': case 'c': case 'd':
- case 'e': case 'f': case 'g': case 'h':
- case 'i': case 'j': case 'k': case 'l':
- case 'm': case 'n': case 'o': case 'p':
- case 'q': case 'r': case 's': case 't':
- case 'u': case 'v': case 'w': case 'x':
- case 'y': case 'z':
- {
- matchRange('a','z');
- break;
- }
- case 'A': case 'B': case 'C': case 'D':
- case 'E': case 'F': case 'G': case 'H':
- case 'I': case 'J': case 'K': case 'L':
- case 'M': case 'N': case 'O': case 'P':
- case 'Q': case 'R': case 'S': case 'T':
- case 'U': case 'V': case 'W': case 'X':
- case 'Y': case 'Z':
- {
- matchRange('A','Z');
- break;
- }
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- case '8': case '9':
- {
- matchRange('0','9');
- break;
- }
- case '\u00a0': case '\u00a1': case '\u00a2': case '\u00a3':
- case '\u00a4': case '\u00a5': case '\u00a6': case '\u00a7':
- case '\u00a8': case '\u00a9': case '\u00aa': case '\u00ab':
- case '\u00ac': case '\u00ad': case '\u00ae': case '\u00af':
- case '\u00b0': case '\u00b1': case '\u00b2': case '\u00b3':
- case '\u00b4': case '\u00b5': case '\u00b6': case '\u00b7':
- case '\u00b8': case '\u00b9': case '\u00ba': case '\u00bb':
- case '\u00bc': case '\u00bd': case '\u00be': case '\u00bf':
- case '\u00c0': case '\u00c1': case '\u00c2': case '\u00c3':
- case '\u00c4': case '\u00c5': case '\u00c6': case '\u00c7':
- case '\u00c8': case '\u00c9': case '\u00ca': case '\u00cb':
- case '\u00cc': case '\u00cd': case '\u00ce': case '\u00cf':
- case '\u00d0': case '\u00d1': case '\u00d2': case '\u00d3':
- case '\u00d4': case '\u00d5': case '\u00d6': case '\u00d7':
- case '\u00d8': case '\u00d9': case '\u00da': case '\u00db':
- case '\u00dc': case '\u00dd': case '\u00de': case '\u00df':
- case '\u00e0': case '\u00e1': case '\u00e2': case '\u00e3':
- case '\u00e4': case '\u00e5': case '\u00e6': case '\u00e7':
- case '\u00e8': case '\u00e9': case '\u00ea': case '\u00eb':
- case '\u00ec': case '\u00ed': case '\u00ee': case '\u00ef':
- case '\u00f0': case '\u00f1': case '\u00f2': case '\u00f3':
- case '\u00f4': case '\u00f5': case '\u00f6': case '\u00f7':
- case '\u00f8': case '\u00f9': case '\u00fa': case '\u00fb':
- case '\u00fc': case '\u00fd': case '\u00fe': case '\u00ff':
- {
- matchRange('\u00a0','\u00ff');
- break;
- }
- default:
- if (((LA(1) >= '\u0100' && LA(1) <= '\u017f'))) {
- matchRange('\u0100','\u017f');
- }
- else if (((LA(1) >= '\u0180' && LA(1) <= '\u024f'))) {
- matchRange('\u0180','\u024f');
- }
- else if (((LA(1) >= '\u0250' && LA(1) <= '\ufaff'))) {
- matchRange('\u0250','\ufaff');
- }
- else if (((LA(1) >= '\uff00' && LA(1) <= '\uffef'))) {
- matchRange('\uff00','\uffef');
- }
- else {
- if ( _cnt107>=1 ) { break _loop107; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- _cnt107++;
- } while (true);
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mPUNCTUATION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = PUNCTUATION;
- int _saveIndex;
-
- switch ( LA(1)) {
- case '-':
- {
- match('-');
- break;
- }
- case ';':
- {
- match(';');
- break;
- }
- case ':':
- {
- match(':');
- break;
- }
- case '(':
- {
- match('(');
- break;
- }
- case ')':
- {
- match(')');
- break;
- }
- case '{':
- {
- match('{');
- break;
- }
- case '}':
- {
- match('}');
- break;
- }
- case '?':
- {
- match('?');
- break;
- }
- case '!':
- {
- match('!');
- break;
- }
- case '@':
- {
- match('@');
- break;
- }
- case '%':
- {
- match('%');
- break;
- }
- case '.':
- {
- match('.');
- break;
- }
- case ',':
- {
- match(',');
- break;
- }
- case '\'':
- {
- match('\'');
- break;
- }
- case '$':
- {
- match('$');
- break;
- }
- default:
- {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = EQ;
- int _saveIndex;
-
- match('=');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = PLUS;
- int _saveIndex;
-
- match('+');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mUNDERSCORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = UNDERSCORE;
- int _saveIndex;
-
- match('_');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = STAR;
- int _saveIndex;
-
- match('*');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SLASH;
- int _saveIndex;
-
- match('/');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mESCAPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = ESCAPE;
- int _saveIndex;
-
- match('\\');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mBAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = BAR;
- int _saveIndex;
-
- match('|');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mBACKTICK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = BACKTICK;
- int _saveIndex;
-
- match('`');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mTWIDDLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = TWIDDLE;
- int _saveIndex;
-
- match('~');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mDOUBLEQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = DOUBLEQUOTE;
- int _saveIndex;
-
- match('"');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mOPEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = OPEN;
- int _saveIndex;
-
- match('[');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mCLOSE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = CLOSE;
- int _saveIndex;
-
- match(']');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mHASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = HASH;
- int _saveIndex;
-
- match('#');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mHAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = HAT;
- int _saveIndex;
-
- match('^');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = GT;
- int _saveIndex;
-
- match('>');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = LT;
- int _saveIndex;
-
- match('<');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mAMPERSAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = AMPERSAND;
- int _saveIndex;
-
- match('&');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mSPACE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = SPACE;
- int _saveIndex;
-
- {
- int _cnt128=0;
- _loop128:
- do {
- switch ( LA(1)) {
- case ' ':
- {
- match(' ');
- break;
- }
- case '\t':
- {
- match('\t');
- break;
- }
- default:
- {
- if ( _cnt128>=1 ) { break _loop128; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
- }
- }
- _cnt128++;
- } while (true);
- }
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mNEWLINE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = NEWLINE;
- int _saveIndex;
-
- if ((LA(1)=='\r') && (LA(2)=='\n')) {
- match("\r\n");
- }
- else if ((LA(1)=='\r') && (true)) {
- match('\r');
- }
- else if ((LA(1)=='\n')) {
- match('\n');
- }
- else {
- throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
- }
-
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
- public final void mEOF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
- int _ttype; Token _token=null; int _begin=text.length();
- _ttype = Token.EOF_TYPE;
- int _saveIndex;
-
- match('\uFFFF');
- if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
- _token = makeToken(_ttype);
- _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
- }
- _returnToken = _token;
- }
-
-
- private static final long[] mk_tokenSet_0() {
- long[] data = new long[4084];
- data[0]=287948901175001088L;
- data[1]=576460743847706622L;
- data[2]=-4294967296L;
- for (int i = 3; i<=1003; i++) { data[i]=-1L; }
- for (int i = 1020; i<=1022; i++) { data[i]=-1L; }
- data[1023]=281474976710655L;
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
-
- }
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParser.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParser.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParser.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -1,1828 +0,0 @@
-// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextParser.java"$
-
-package org.jboss.seam.text;
-
-import antlr.TokenBuffer;
-import antlr.TokenStreamException;
-import antlr.TokenStreamIOException;
-import antlr.ANTLRException;
-import antlr.LLkParser;
-import antlr.Token;
-import antlr.TokenStream;
-import antlr.RecognitionException;
-import antlr.NoViableAltException;
-import antlr.MismatchedTokenException;
-import antlr.SemanticException;
-import antlr.ParserSharedInputState;
-import antlr.collections.impl.BitSet;
-
-public class SeamTextParser extends antlr.LLkParser implements SeamTextParserTokenTypes
- {
-
- private java.util.Set htmlElements = new java.util.HashSet( java.util.Arrays.asList( new String[] { "a", "p", "q", "code", "pre", "table", "tr", "td", "th", "ul", "ol", "li", "b", "i", "u", "tt", "del", "em", "hr", "br", "div", "span", "h1", "h2", "h3", "h4", "img" , "object", "param", "embed"} ) );
- private java.util.Set htmlAttributes = new java.util.HashSet( java.util.Arrays.asList( new String[] { "src", "href", "lang", "class", "id", "style", "width", "height", "name", "value", "type", "wmode" } ) );
-
- private StringBuilder mainBuilder = new StringBuilder();
- private StringBuilder builder = mainBuilder;
-
- public String toString() {
- return builder.toString();
- }
-
- private void append(String... strings) {
- for (String string: strings) builder.append(string);
- }
-
- private static boolean hasMultiple(String string, char c) {
- return string.indexOf(c)!=string.lastIndexOf(c);
- }
-
- private void validateElement(Token t) throws NoViableAltException {
- if ( !htmlElements.contains( t.getText().toLowerCase() ) ) {
- throw new NoViableAltException(t, null);
- }
- }
-
- private void validateAttribute(Token t) throws NoViableAltException {
- if ( !htmlAttributes.contains( t.getText().toLowerCase() ) ) {
- throw new NoViableAltException(t, null);
- }
- }
-
- private void beginCapture() {
- builder = new StringBuilder();
- }
-
- private String endCapture() {
- String result = builder.toString();
- builder = mainBuilder;
- return result;
- }
-
- protected String linkTag(String description, String url) {
- return "<a href=\"" + url + "\" styleClass=\"seamTextLink\">" + description + "</a>";
- }
-
- protected String macroInclude(String macroName) {
- return "";
- }
-
-protected SeamTextParser(TokenBuffer tokenBuf, int k) {
- super(tokenBuf,k);
- tokenNames = _tokenNames;
-}
-
-public SeamTextParser(TokenBuffer tokenBuf) {
- this(tokenBuf,4);
-}
-
-protected SeamTextParser(TokenStream lexer, int k) {
- super(lexer,k);
- tokenNames = _tokenNames;
-}
-
-public SeamTextParser(TokenStream lexer) {
- this(lexer,4);
-}
-
-public SeamTextParser(ParserSharedInputState state) {
- super(state,4);
- tokenNames = _tokenNames;
-}
-
- public final void startRule() throws RecognitionException, TokenStreamException {
-
-
- {
- _loop3:
- do {
- if ((LA(1)==NEWLINE)) {
- newline();
- }
- else {
- break _loop3;
- }
-
- } while (true);
- }
- {
- switch ( LA(1)) {
- case DOUBLEQUOTE:
- case BACKTICK:
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case PLUS:
- case EQ:
- case HASH:
- case TWIDDLE:
- case UNDERSCORE:
- case OPEN:
- case LT:
- case SPACE:
- {
- {
- switch ( LA(1)) {
- case PLUS:
- {
- heading();
- {
- _loop7:
- do {
- if ((LA(1)==NEWLINE)) {
- newline();
- }
- else {
- break _loop7;
- }
-
- } while (true);
- }
- break;
- }
- case DOUBLEQUOTE:
- case BACKTICK:
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case EQ:
- case HASH:
- case TWIDDLE:
- case UNDERSCORE:
- case OPEN:
- case LT:
- case SPACE:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- text();
- {
- _loop11:
- do {
- if ((LA(1)==PLUS)) {
- heading();
- {
- _loop10:
- do {
- if ((LA(1)==NEWLINE)) {
- newline();
- }
- else {
- break _loop10;
- }
-
- } while (true);
- }
- text();
- }
- else {
- break _loop11;
- }
-
- } while (true);
- }
- break;
- }
- case EOF:
- {
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
-
- public final void newline() throws RecognitionException, TokenStreamException {
-
- Token n = null;
-
- n = LT(1);
- match(NEWLINE);
- append( n.getText() );
- }
-
- public final void heading() throws RecognitionException, TokenStreamException {
-
-
- {
- if ((LA(1)==PLUS) && (_tokenSet_0.member(LA(2)))) {
- h1();
- }
- else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (_tokenSet_0.member(LA(3)))) {
- h2();
- }
- else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (LA(3)==PLUS) && (_tokenSet_0.member(LA(4)))) {
- h3();
- }
- else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (LA(3)==PLUS) && (LA(4)==PLUS)) {
- h4();
- }
- else {
- throw new NoViableAltException(LT(1), getFilename());
- }
-
- }
- newlineOrEof();
- }
-
- public final void text() throws RecognitionException, TokenStreamException {
-
-
- {
- int _cnt17=0;
- _loop17:
- do {
- if ((_tokenSet_1.member(LA(1)))) {
- {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case TWIDDLE:
- case UNDERSCORE:
- case OPEN:
- case SPACE:
- {
- paragraph();
- break;
- }
- case BACKTICK:
- {
- preformatted();
- break;
- }
- case DOUBLEQUOTE:
- {
- blockquote();
- break;
- }
- case EQ:
- case HASH:
- {
- list();
- break;
- }
- case LT:
- {
- html();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- {
- _loop16:
- do {
- if ((LA(1)==NEWLINE)) {
- newline();
- }
- else {
- break _loop16;
- }
-
- } while (true);
- }
- }
- else {
- if ( _cnt17>=1 ) { break _loop17; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
-
- _cnt17++;
- } while (true);
- }
- }
-
- public final void paragraph() throws RecognitionException, TokenStreamException {
-
-
- append("<p>\n");
- {
- int _cnt20=0;
- _loop20:
- do {
- if ((_tokenSet_0.member(LA(1)))) {
- line();
- newlineOrEof();
- }
- else {
- if ( _cnt20>=1 ) { break _loop20; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
-
- _cnt20++;
- } while (true);
- }
- append("</p>\n");
- newlineOrEof();
- }
-
- public final void preformatted() throws RecognitionException, TokenStreamException {
-
-
- match(BACKTICK);
- append("<pre>");
- {
- _loop30:
- do {
- switch ( LA(1)) {
- case WORD:
- {
- word();
- break;
- }
- case PUNCTUATION:
- {
- punctuation();
- break;
- }
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case PLUS:
- case EQ:
- case HASH:
- case TWIDDLE:
- case UNDERSCORE:
- {
- specialChars();
- break;
- }
- case OPEN:
- case CLOSE:
- {
- moreSpecialChars();
- break;
- }
- case DOUBLEQUOTE:
- case GT:
- case LT:
- case AMPERSAND:
- {
- htmlSpecialChars();
- break;
- }
- case SPACE:
- {
- space();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- break _loop30;
- }
- }
- } while (true);
- }
- match(BACKTICK);
- append("</pre>");
- }
-
- public final void blockquote() throws RecognitionException, TokenStreamException {
-
-
- match(DOUBLEQUOTE);
- append("<blockquote>\n");
- {
- _loop27:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case TWIDDLE:
- case UNDERSCORE:
- {
- formatted();
- break;
- }
- case BACKTICK:
- {
- preformatted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- case LT:
- {
- html();
- break;
- }
- case EQ:
- case HASH:
- {
- list();
- break;
- }
- default:
- {
- break _loop27;
- }
- }
- } while (true);
- }
- match(DOUBLEQUOTE);
- newlineOrEof();
- append("</blockquote>\n");
- }
-
- public final void list() throws RecognitionException, TokenStreamException {
-
-
- {
- switch ( LA(1)) {
- case HASH:
- {
- olist();
- break;
- }
- case EQ:
- {
- ulist();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- newlineOrEof();
- }
-
- public final void html() throws RecognitionException, TokenStreamException {
-
-
- openTag();
- {
- _loop87:
- do {
- if ((LA(1)==SPACE) && (LA(2)==SLASH||LA(2)==GT||LA(2)==SPACE)) {
- space();
- }
- else if ((LA(1)==SPACE) && (LA(2)==WORD)) {
- space();
- attribute();
- }
- else {
- break _loop87;
- }
-
- } while (true);
- }
- {
- switch ( LA(1)) {
- case GT:
- {
- {
- beforeBody();
- body();
- closeTagWithBody();
- }
- break;
- }
- case SLASH:
- {
- closeTagWithNoBody();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
-
- public final void line() throws RecognitionException, TokenStreamException {
-
-
- {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case TWIDDLE:
- case UNDERSCORE:
- {
- formatted();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- {
- _loop24:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case TWIDDLE:
- case UNDERSCORE:
- {
- formatted();
- break;
- }
- case BACKTICK:
- {
- preformatted();
- break;
- }
- case DOUBLEQUOTE:
- {
- quoted();
- break;
- }
- case LT:
- {
- html();
- break;
- }
- default:
- {
- break _loop24;
- }
- }
- } while (true);
- }
- }
-
- public final void newlineOrEof() throws RecognitionException, TokenStreamException {
-
-
- switch ( LA(1)) {
- case NEWLINE:
- {
- newline();
- break;
- }
- case EOF:
- {
- match(Token.EOF_TYPE);
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void plain() throws RecognitionException, TokenStreamException {
-
-
- switch ( LA(1)) {
- case WORD:
- {
- word();
- break;
- }
- case PUNCTUATION:
- {
- punctuation();
- break;
- }
- case ESCAPE:
- {
- escape();
- break;
- }
- case SPACE:
- {
- space();
- break;
- }
- default:
- if ((LA(1)==OPEN) && (_tokenSet_2.member(LA(2)))) {
- link();
- }
- else if ((LA(1)==OPEN) && (LA(2)==LT)) {
- macro();
- }
- else {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void formatted() throws RecognitionException, TokenStreamException {
-
-
- switch ( LA(1)) {
- case STAR:
- {
- bold();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void quoted() throws RecognitionException, TokenStreamException {
-
-
- match(DOUBLEQUOTE);
- append("<q>");
- {
- int _cnt65=0;
- _loop65:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- {
- bold();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt65>=1 ) { break _loop65; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt65++;
- } while (true);
- }
- match(DOUBLEQUOTE);
- append("</q>");
- }
-
- public final void word() throws RecognitionException, TokenStreamException {
-
- Token w = null;
-
- w = LT(1);
- match(WORD);
- append( w.getText() );
- }
-
- public final void punctuation() throws RecognitionException, TokenStreamException {
-
- Token p = null;
-
- p = LT(1);
- match(PUNCTUATION);
- append( p.getText() );
- }
-
- public final void specialChars() throws RecognitionException, TokenStreamException {
-
- Token st = null;
- Token sl = null;
- Token b = null;
- Token h = null;
- Token p = null;
- Token eq = null;
- Token hh = null;
- Token e = null;
- Token t = null;
- Token u = null;
-
- switch ( LA(1)) {
- case STAR:
- {
- st = LT(1);
- match(STAR);
- append( st.getText() );
- break;
- }
- case SLASH:
- {
- sl = LT(1);
- match(SLASH);
- append( sl.getText() );
- break;
- }
- case BAR:
- {
- b = LT(1);
- match(BAR);
- append( b.getText() );
- break;
- }
- case HAT:
- {
- h = LT(1);
- match(HAT);
- append( h.getText() );
- break;
- }
- case PLUS:
- {
- p = LT(1);
- match(PLUS);
- append( p.getText() );
- break;
- }
- case EQ:
- {
- eq = LT(1);
- match(EQ);
- append( eq.getText() );
- break;
- }
- case HASH:
- {
- hh = LT(1);
- match(HASH);
- append( hh.getText() );
- break;
- }
- case ESCAPE:
- {
- e = LT(1);
- match(ESCAPE);
- append( e.getText() );
- break;
- }
- case TWIDDLE:
- {
- t = LT(1);
- match(TWIDDLE);
- append( t.getText() );
- break;
- }
- case UNDERSCORE:
- {
- u = LT(1);
- match(UNDERSCORE);
- append( u.getText() );
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void moreSpecialChars() throws RecognitionException, TokenStreamException {
-
- Token o = null;
- Token c = null;
-
- switch ( LA(1)) {
- case OPEN:
- {
- o = LT(1);
- match(OPEN);
- append( o.getText() );
- break;
- }
- case CLOSE:
- {
- c = LT(1);
- match(CLOSE);
- append( c.getText() );
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void htmlSpecialChars() throws RecognitionException, TokenStreamException {
-
-
- switch ( LA(1)) {
- case GT:
- {
- match(GT);
- append(">");
- break;
- }
- case LT:
- {
- match(LT);
- append("<");
- break;
- }
- case DOUBLEQUOTE:
- {
- match(DOUBLEQUOTE);
- append(""");
- break;
- }
- case AMPERSAND:
- {
- match(AMPERSAND);
- append("&");
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
-
- public final void space() throws RecognitionException, TokenStreamException {
-
- Token s = null;
-
- s = LT(1);
- match(SPACE);
- append( s.getText() );
- }
-
- public final void escape() throws RecognitionException, TokenStreamException {
-
-
- match(ESCAPE);
- {
- switch ( LA(1)) {
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case PLUS:
- case EQ:
- case HASH:
- case TWIDDLE:
- case UNDERSCORE:
- {
- specialChars();
- break;
- }
- case OPEN:
- case CLOSE:
- {
- moreSpecialChars();
- break;
- }
- case QUOTE:
- {
- evenMoreSpecialChars();
- break;
- }
- case DOUBLEQUOTE:
- case GT:
- case LT:
- case AMPERSAND:
- {
- htmlSpecialChars();
- break;
- }
- default:
- {
- throw new NoViableAltException(LT(1), getFilename());
- }
- }
- }
- }
-
- public final void link() throws RecognitionException, TokenStreamException {
-
-
- match(OPEN);
- beginCapture();
- {
- _loop43:
- do {
- if ((_tokenSet_3.member(LA(1)))) {
- plain();
- }
- else {
- break _loop43;
- }
-
- } while (true);
- }
- String text=endCapture();
- match(EQ);
- match(GT);
- beginCapture();
- attributeValue();
- String link = endCapture(); append(linkTag(text, link));
- match(CLOSE);
- }
-
- public final void macro() throws RecognitionException, TokenStreamException {
-
-
- match(OPEN);
- match(LT);
- match(EQ);
- beginCapture();
- attributeValue();
- String macroName = endCapture(); append(macroInclude(macroName));
- match(CLOSE);
- }
-
- public final void bold() throws RecognitionException, TokenStreamException {
-
-
- match(STAR);
- append("<b>");
- {
- int _cnt47=0;
- _loop47:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt47>=1 ) { break _loop47; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt47++;
- } while (true);
- }
- match(STAR);
- append("</b>");
- }
-
- public final void underline() throws RecognitionException, TokenStreamException {
-
-
- match(UNDERSCORE);
- append("<u>");
- {
- int _cnt50=0;
- _loop50:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- {
- bold();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt50>=1 ) { break _loop50; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt50++;
- } while (true);
- }
- match(UNDERSCORE);
- append("</u>");
- }
-
- public final void italic() throws RecognitionException, TokenStreamException {
-
-
- match(SLASH);
- append("<i>");
- {
- int _cnt53=0;
- _loop53:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- {
- bold();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt53>=1 ) { break _loop53; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt53++;
- } while (true);
- }
- match(SLASH);
- append("</i>");
- }
-
- public final void monospace() throws RecognitionException, TokenStreamException {
-
- Token st = null;
- Token sl = null;
- Token h = null;
- Token p = null;
- Token eq = null;
- Token hh = null;
- Token e = null;
- Token t = null;
- Token u = null;
-
- match(BAR);
- append("<tt>");
- {
- int _cnt56=0;
- _loop56:
- do {
- switch ( LA(1)) {
- case WORD:
- {
- word();
- break;
- }
- case PUNCTUATION:
- {
- punctuation();
- break;
- }
- case SPACE:
- {
- space();
- break;
- }
- case STAR:
- {
- st = LT(1);
- match(STAR);
- append( st.getText() );
- break;
- }
- case SLASH:
- {
- sl = LT(1);
- match(SLASH);
- append( sl.getText() );
- break;
- }
- case HAT:
- {
- h = LT(1);
- match(HAT);
- append( h.getText() );
- break;
- }
- case PLUS:
- {
- p = LT(1);
- match(PLUS);
- append( p.getText() );
- break;
- }
- case EQ:
- {
- eq = LT(1);
- match(EQ);
- append( eq.getText() );
- break;
- }
- case HASH:
- {
- hh = LT(1);
- match(HASH);
- append( hh.getText() );
- break;
- }
- case ESCAPE:
- {
- e = LT(1);
- match(ESCAPE);
- append( e.getText() );
- break;
- }
- case TWIDDLE:
- {
- t = LT(1);
- match(TWIDDLE);
- append( t.getText() );
- break;
- }
- case UNDERSCORE:
- {
- u = LT(1);
- match(UNDERSCORE);
- append( u.getText() );
- break;
- }
- case OPEN:
- case CLOSE:
- {
- moreSpecialChars();
- break;
- }
- case DOUBLEQUOTE:
- case GT:
- case LT:
- case AMPERSAND:
- {
- htmlSpecialChars();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt56>=1 ) { break _loop56; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt56++;
- } while (true);
- }
- match(BAR);
- append("</tt>");
- }
-
- public final void superscript() throws RecognitionException, TokenStreamException {
-
-
- match(HAT);
- append("<sup>");
- {
- int _cnt59=0;
- _loop59:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- {
- bold();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case TWIDDLE:
- {
- deleted();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt59>=1 ) { break _loop59; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt59++;
- } while (true);
- }
- match(HAT);
- append("</sup>");
- }
-
- public final void deleted() throws RecognitionException, TokenStreamException {
-
-
- match(TWIDDLE);
- append("<del>");
- {
- int _cnt62=0;
- _loop62:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- {
- bold();
- break;
- }
- case UNDERSCORE:
- {
- underline();
- break;
- }
- case SLASH:
- {
- italic();
- break;
- }
- case BAR:
- {
- monospace();
- break;
- }
- case HAT:
- {
- superscript();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- {
- if ( _cnt62>=1 ) { break _loop62; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
- }
- _cnt62++;
- } while (true);
- }
- match(TWIDDLE);
- append("</del>");
- }
-
- public final void evenMoreSpecialChars() throws RecognitionException, TokenStreamException {
-
- Token q = null;
-
- q = LT(1);
- match(QUOTE);
- append( q.getText() );
- }
-
- public final void attributeValue() throws RecognitionException, TokenStreamException {
-
-
- {
- _loop104:
- do {
- switch ( LA(1)) {
- case AMPERSAND:
- {
- match(AMPERSAND);
- append("&");
- break;
- }
- case WORD:
- {
- word();
- break;
- }
- case PUNCTUATION:
- {
- punctuation();
- break;
- }
- case SPACE:
- {
- space();
- break;
- }
- case ESCAPE:
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case PLUS:
- case EQ:
- case HASH:
- case TWIDDLE:
- case UNDERSCORE:
- {
- specialChars();
- break;
- }
- default:
- {
- break _loop104;
- }
- }
- } while (true);
- }
- }
-
- public final void h1() throws RecognitionException, TokenStreamException {
-
-
- match(PLUS);
- append("<h1>");
- line();
- append("</h1>");
- }
-
- public final void h2() throws RecognitionException, TokenStreamException {
-
-
- match(PLUS);
- match(PLUS);
- append("<h2>");
- line();
- append("</h2>");
- }
-
- public final void h3() throws RecognitionException, TokenStreamException {
-
-
- match(PLUS);
- match(PLUS);
- match(PLUS);
- append("<h3>");
- line();
- append("</h3>");
- }
-
- public final void h4() throws RecognitionException, TokenStreamException {
-
-
- match(PLUS);
- match(PLUS);
- match(PLUS);
- match(PLUS);
- append("<h4>");
- line();
- append("</h4>");
- }
-
- public final void olist() throws RecognitionException, TokenStreamException {
-
-
- append("<ol>\n");
- {
- int _cnt76=0;
- _loop76:
- do {
- if ((LA(1)==HASH)) {
- olistLine();
- newlineOrEof();
- }
- else {
- if ( _cnt76>=1 ) { break _loop76; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
-
- _cnt76++;
- } while (true);
- }
- append("</ol>\n");
- }
-
- public final void ulist() throws RecognitionException, TokenStreamException {
-
-
- append("<ul>\n");
- {
- int _cnt80=0;
- _loop80:
- do {
- if ((LA(1)==EQ)) {
- ulistLine();
- newlineOrEof();
- }
- else {
- if ( _cnt80>=1 ) { break _loop80; } else {throw new NoViableAltException(LT(1), getFilename());}
- }
-
- _cnt80++;
- } while (true);
- }
- append("</ul>\n");
- }
-
- public final void olistLine() throws RecognitionException, TokenStreamException {
-
-
- match(HASH);
- append("<li>");
- line();
- append("</li>");
- }
-
- public final void ulistLine() throws RecognitionException, TokenStreamException {
-
-
- match(EQ);
- append("<li>");
- line();
- append("</li>");
- }
-
- public final void openTag() throws RecognitionException, TokenStreamException {
-
- Token name = null;
-
- match(LT);
- name = LT(1);
- match(WORD);
- validateElement(name); append("<"); append(name.getText());
- }
-
- public final void attribute() throws RecognitionException, TokenStreamException {
-
- Token att = null;
-
- att = LT(1);
- match(WORD);
- {
- _loop99:
- do {
- if ((LA(1)==SPACE)) {
- space();
- }
- else {
- break _loop99;
- }
-
- } while (true);
- }
- match(EQ);
- {
- _loop101:
- do {
- if ((LA(1)==SPACE)) {
- space();
- }
- else {
- break _loop101;
- }
-
- } while (true);
- }
- match(DOUBLEQUOTE);
- validateAttribute(att); append(att.getText()); append("=\"");
- attributeValue();
- match(DOUBLEQUOTE);
- append("\"");
- }
-
- public final void beforeBody() throws RecognitionException, TokenStreamException {
-
-
- match(GT);
- append(">");
- }
-
- public final void body() throws RecognitionException, TokenStreamException {
-
-
- {
- _loop92:
- do {
- switch ( LA(1)) {
- case WORD:
- case PUNCTUATION:
- case ESCAPE:
- case OPEN:
- case SPACE:
- {
- plain();
- break;
- }
- case STAR:
- case SLASH:
- case BAR:
- case HAT:
- case TWIDDLE:
- case UNDERSCORE:
- {
- formatted();
- break;
- }
- case BACKTICK:
- {
- preformatted();
- break;
- }
- case DOUBLEQUOTE:
- {
- quoted();
- break;
- }
- case EQ:
- case HASH:
- {
- list();
- break;
- }
- case NEWLINE:
- {
- newline();
- break;
- }
- default:
- if ((LA(1)==LT) && (LA(2)==WORD)) {
- html();
- }
- else {
- break _loop92;
- }
- }
- } while (true);
- }
- }
-
- public final void closeTagWithBody() throws RecognitionException, TokenStreamException {
-
- Token name = null;
-
- match(LT);
- match(SLASH);
- name = LT(1);
- match(WORD);
- match(GT);
- append("</"); append(name.getText()); append(">");
- }
-
- public final void closeTagWithNoBody() throws RecognitionException, TokenStreamException {
-
-
- match(SLASH);
- match(GT);
- append("/>");
- }
-
-
- public static final String[] _tokenNames = {
- "<0>",
- "EOF",
- "<2>",
- "NULL_TREE_LOOKAHEAD",
- "DOUBLEQUOTE",
- "BACKTICK",
- "WORD",
- "PUNCTUATION",
- "ESCAPE",
- "STAR",
- "SLASH",
- "BAR",
- "HAT",
- "PLUS",
- "EQ",
- "HASH",
- "TWIDDLE",
- "UNDERSCORE",
- "OPEN",
- "CLOSE",
- "QUOTE",
- "GT",
- "LT",
- "AMPERSAND",
- "SPACE",
- "NEWLINE"
- };
-
- private static final long[] mk_tokenSet_0() {
- long[] data = { 17244096L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
- private static final long[] mk_tokenSet_1() {
- long[] data = { 21487600L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
- private static final long[] mk_tokenSet_2() {
- long[] data = { 17056192L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
- private static final long[] mk_tokenSet_3() {
- long[] data = { 17039808L, 0L};
- return data;
- }
- public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
-
- }
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -1,30 +0,0 @@
-// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
-
-package org.jboss.seam.text;
-
-public interface SeamTextParserTokenTypes {
- int EOF = 1;
- int NULL_TREE_LOOKAHEAD = 3;
- int DOUBLEQUOTE = 4;
- int BACKTICK = 5;
- int WORD = 6;
- int PUNCTUATION = 7;
- int ESCAPE = 8;
- int STAR = 9;
- int SLASH = 10;
- int BAR = 11;
- int HAT = 12;
- int PLUS = 13;
- int EQ = 14;
- int HASH = 15;
- int TWIDDLE = 16;
- int UNDERSCORE = 17;
- int OPEN = 18;
- int CLOSE = 19;
- int QUOTE = 20;
- int GT = 21;
- int LT = 22;
- int AMPERSAND = 23;
- int SPACE = 24;
- int NEWLINE = 25;
-}
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.txt
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.txt 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.txt 2007-12-17 13:08:38 UTC (rev 5329)
@@ -1,24 +0,0 @@
-// $ANTLR 2.7.6 (2005-12-22): seam-text.g -> SeamTextParserTokenTypes.txt$
-SeamTextParser // output token vocab name
-DOUBLEQUOTE=4
-BACKTICK=5
-WORD=6
-PUNCTUATION=7
-ESCAPE=8
-STAR=9
-SLASH=10
-BAR=11
-HAT=12
-PLUS=13
-EQ=14
-HASH=15
-TWIDDLE=16
-UNDERSCORE=17
-OPEN=18
-CLOSE=19
-QUOTE=20
-GT=21
-LT=22
-AMPERSAND=23
-SPACE=24
-NEWLINE=25
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextLexer.java (from rev 5325, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextLexer.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextLexer.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextLexer.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -0,0 +1,711 @@
+// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
+
+package org.jboss.seam.text.xpl;
+
+import java.io.InputStream;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.TokenStreamRecognitionException;
+import antlr.CharStreamException;
+import antlr.CharStreamIOException;
+import antlr.ANTLRException;
+import java.io.Reader;
+import java.util.Hashtable;
+import antlr.CharScanner;
+import antlr.InputBuffer;
+import antlr.ByteBuffer;
+import antlr.CharBuffer;
+import antlr.Token;
+import antlr.CommonToken;
+import antlr.RecognitionException;
+import antlr.NoViableAltForCharException;
+import antlr.MismatchedCharException;
+import antlr.TokenStream;
+import antlr.ANTLRHashString;
+import antlr.LexerSharedInputState;
+import antlr.collections.impl.BitSet;
+import antlr.SemanticException;
+
+public class SeamTextLexer extends antlr.CharScanner implements SeamTextParserTokenTypes, TokenStream
+ {
+public SeamTextLexer(InputStream in) {
+ this(new ByteBuffer(in));
+}
+public SeamTextLexer(Reader in) {
+ this(new CharBuffer(in));
+}
+public SeamTextLexer(InputBuffer ib) {
+ this(new LexerSharedInputState(ib));
+}
+public SeamTextLexer(LexerSharedInputState state) {
+ super(state);
+ caseSensitiveLiterals = true;
+ setCaseSensitive(true);
+ literals = new Hashtable();
+}
+
+public Token nextToken() throws TokenStreamException {
+ Token theRetToken=null;
+tryAgain:
+ for (;;) {
+ Token _token = null;
+ int _ttype = Token.INVALID_TYPE;
+ resetText();
+ try { // for char stream error handling
+ try { // for lexical error handling
+ switch ( LA(1)) {
+ case '!': case '$': case '%': case '\'':
+ case '(': case ')': case ',': case '-':
+ case '.': case ':': case ';': case '?':
+ case '@': case '{': case '}':
+ {
+ mPUNCTUATION(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '=':
+ {
+ mEQ(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '+':
+ {
+ mPLUS(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '_':
+ {
+ mUNDERSCORE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '*':
+ {
+ mSTAR(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '/':
+ {
+ mSLASH(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\\':
+ {
+ mESCAPE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '|':
+ {
+ mBAR(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '`':
+ {
+ mBACKTICK(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '~':
+ {
+ mTWIDDLE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '"':
+ {
+ mDOUBLEQUOTE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '[':
+ {
+ mOPEN(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case ']':
+ {
+ mCLOSE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '#':
+ {
+ mHASH(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '^':
+ {
+ mHAT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '>':
+ {
+ mGT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '<':
+ {
+ mLT(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '&':
+ {
+ mAMPERSAND(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\t': case ' ':
+ {
+ mSPACE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\n': case '\r':
+ {
+ mNEWLINE(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ case '\uffff':
+ {
+ mEOF(true);
+ theRetToken=_returnToken;
+ break;
+ }
+ default:
+ if ((_tokenSet_0.member(LA(1)))) {
+ mWORD(true);
+ theRetToken=_returnToken;
+ }
+ else {
+ if (LA(1)==EOF_CHAR) {uponEOF(); _returnToken = makeToken(Token.EOF_TYPE);}
+ else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ if ( _returnToken==null ) continue tryAgain; // found SKIP token
+ _ttype = _returnToken.getType();
+ _ttype = testLiteralsTable(_ttype);
+ _returnToken.setType(_ttype);
+ return _returnToken;
+ }
+ catch (RecognitionException e) {
+ throw new TokenStreamRecognitionException(e);
+ }
+ }
+ catch (CharStreamException cse) {
+ if ( cse instanceof CharStreamIOException ) {
+ throw new TokenStreamIOException(((CharStreamIOException)cse).io);
+ }
+ else {
+ throw new TokenStreamException(cse.getMessage());
+ }
+ }
+ }
+}
+
+ public final void mWORD(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = WORD;
+ int _saveIndex;
+
+ {
+ int _cnt107=0;
+ _loop107:
+ do {
+ switch ( LA(1)) {
+ case 'a': case 'b': case 'c': case 'd':
+ case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p':
+ case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ {
+ matchRange('a','z');
+ break;
+ }
+ case 'A': case 'B': case 'C': case 'D':
+ case 'E': case 'F': case 'G': case 'H':
+ case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P':
+ case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ {
+ matchRange('A','Z');
+ break;
+ }
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ case '8': case '9':
+ {
+ matchRange('0','9');
+ break;
+ }
+ case '\u00a0': case '\u00a1': case '\u00a2': case '\u00a3':
+ case '\u00a4': case '\u00a5': case '\u00a6': case '\u00a7':
+ case '\u00a8': case '\u00a9': case '\u00aa': case '\u00ab':
+ case '\u00ac': case '\u00ad': case '\u00ae': case '\u00af':
+ case '\u00b0': case '\u00b1': case '\u00b2': case '\u00b3':
+ case '\u00b4': case '\u00b5': case '\u00b6': case '\u00b7':
+ case '\u00b8': case '\u00b9': case '\u00ba': case '\u00bb':
+ case '\u00bc': case '\u00bd': case '\u00be': case '\u00bf':
+ case '\u00c0': case '\u00c1': case '\u00c2': case '\u00c3':
+ case '\u00c4': case '\u00c5': case '\u00c6': case '\u00c7':
+ case '\u00c8': case '\u00c9': case '\u00ca': case '\u00cb':
+ case '\u00cc': case '\u00cd': case '\u00ce': case '\u00cf':
+ case '\u00d0': case '\u00d1': case '\u00d2': case '\u00d3':
+ case '\u00d4': case '\u00d5': case '\u00d6': case '\u00d7':
+ case '\u00d8': case '\u00d9': case '\u00da': case '\u00db':
+ case '\u00dc': case '\u00dd': case '\u00de': case '\u00df':
+ case '\u00e0': case '\u00e1': case '\u00e2': case '\u00e3':
+ case '\u00e4': case '\u00e5': case '\u00e6': case '\u00e7':
+ case '\u00e8': case '\u00e9': case '\u00ea': case '\u00eb':
+ case '\u00ec': case '\u00ed': case '\u00ee': case '\u00ef':
+ case '\u00f0': case '\u00f1': case '\u00f2': case '\u00f3':
+ case '\u00f4': case '\u00f5': case '\u00f6': case '\u00f7':
+ case '\u00f8': case '\u00f9': case '\u00fa': case '\u00fb':
+ case '\u00fc': case '\u00fd': case '\u00fe': case '\u00ff':
+ {
+ matchRange('\u00a0','\u00ff');
+ break;
+ }
+ default:
+ if (((LA(1) >= '\u0100' && LA(1) <= '\u017f'))) {
+ matchRange('\u0100','\u017f');
+ }
+ else if (((LA(1) >= '\u0180' && LA(1) <= '\u024f'))) {
+ matchRange('\u0180','\u024f');
+ }
+ else if (((LA(1) >= '\u0250' && LA(1) <= '\ufaff'))) {
+ matchRange('\u0250','\ufaff');
+ }
+ else if (((LA(1) >= '\uff00' && LA(1) <= '\uffef'))) {
+ matchRange('\uff00','\uffef');
+ }
+ else {
+ if ( _cnt107>=1 ) { break _loop107; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ _cnt107++;
+ } while (true);
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPUNCTUATION(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PUNCTUATION;
+ int _saveIndex;
+
+ switch ( LA(1)) {
+ case '-':
+ {
+ match('-');
+ break;
+ }
+ case ';':
+ {
+ match(';');
+ break;
+ }
+ case ':':
+ {
+ match(':');
+ break;
+ }
+ case '(':
+ {
+ match('(');
+ break;
+ }
+ case ')':
+ {
+ match(')');
+ break;
+ }
+ case '{':
+ {
+ match('{');
+ break;
+ }
+ case '}':
+ {
+ match('}');
+ break;
+ }
+ case '?':
+ {
+ match('?');
+ break;
+ }
+ case '!':
+ {
+ match('!');
+ break;
+ }
+ case '@':
+ {
+ match('@');
+ break;
+ }
+ case '%':
+ {
+ match('%');
+ break;
+ }
+ case '.':
+ {
+ match('.');
+ break;
+ }
+ case ',':
+ {
+ match(',');
+ break;
+ }
+ case '\'':
+ {
+ match('\'');
+ break;
+ }
+ case '$':
+ {
+ match('$');
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mEQ(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = EQ;
+ int _saveIndex;
+
+ match('=');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mPLUS(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = PLUS;
+ int _saveIndex;
+
+ match('+');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mUNDERSCORE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = UNDERSCORE;
+ int _saveIndex;
+
+ match('_');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSTAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = STAR;
+ int _saveIndex;
+
+ match('*');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSLASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SLASH;
+ int _saveIndex;
+
+ match('/');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mESCAPE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = ESCAPE;
+ int _saveIndex;
+
+ match('\\');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBAR(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BAR;
+ int _saveIndex;
+
+ match('|');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mBACKTICK(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = BACKTICK;
+ int _saveIndex;
+
+ match('`');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mTWIDDLE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = TWIDDLE;
+ int _saveIndex;
+
+ match('~');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mDOUBLEQUOTE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = DOUBLEQUOTE;
+ int _saveIndex;
+
+ match('"');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mOPEN(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = OPEN;
+ int _saveIndex;
+
+ match('[');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mCLOSE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = CLOSE;
+ int _saveIndex;
+
+ match(']');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mHASH(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = HASH;
+ int _saveIndex;
+
+ match('#');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mHAT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = HAT;
+ int _saveIndex;
+
+ match('^');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mGT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = GT;
+ int _saveIndex;
+
+ match('>');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mLT(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = LT;
+ int _saveIndex;
+
+ match('<');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mAMPERSAND(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = AMPERSAND;
+ int _saveIndex;
+
+ match('&');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mSPACE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = SPACE;
+ int _saveIndex;
+
+ {
+ int _cnt128=0;
+ _loop128:
+ do {
+ switch ( LA(1)) {
+ case ' ':
+ {
+ match(' ');
+ break;
+ }
+ case '\t':
+ {
+ match('\t');
+ break;
+ }
+ default:
+ {
+ if ( _cnt128>=1 ) { break _loop128; } else {throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());}
+ }
+ }
+ _cnt128++;
+ } while (true);
+ }
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mNEWLINE(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = NEWLINE;
+ int _saveIndex;
+
+ if ((LA(1)=='\r') && (LA(2)=='\n')) {
+ match("\r\n");
+ }
+ else if ((LA(1)=='\r') && (true)) {
+ match('\r');
+ }
+ else if ((LA(1)=='\n')) {
+ match('\n');
+ }
+ else {
+ throw new NoViableAltForCharException((char)LA(1), getFilename(), getLine(), getColumn());
+ }
+
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+ public final void mEOF(boolean _createToken) throws RecognitionException, CharStreamException, TokenStreamException {
+ int _ttype; Token _token=null; int _begin=text.length();
+ _ttype = Token.EOF_TYPE;
+ int _saveIndex;
+
+ match('\uFFFF');
+ if ( _createToken && _token==null && _ttype!=Token.SKIP ) {
+ _token = makeToken(_ttype);
+ _token.setText(new String(text.getBuffer(), _begin, text.length()-_begin));
+ }
+ _returnToken = _token;
+ }
+
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = new long[4084];
+ data[0]=287948901175001088L;
+ data[1]=576460743847706622L;
+ data[2]=-4294967296L;
+ for (int i = 3; i<=1003; i++) { data[i]=-1L; }
+ for (int i = 1020; i<=1022; i++) { data[i]=-1L; }
+ data[1023]=281474976710655L;
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+
+ }
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParser.java (from rev 5325, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParser.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParser.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParser.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -0,0 +1,1828 @@
+// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextParser.java"$
+
+package org.jboss.seam.text.xpl;
+
+import antlr.TokenBuffer;
+import antlr.TokenStreamException;
+import antlr.TokenStreamIOException;
+import antlr.ANTLRException;
+import antlr.LLkParser;
+import antlr.Token;
+import antlr.TokenStream;
+import antlr.RecognitionException;
+import antlr.NoViableAltException;
+import antlr.MismatchedTokenException;
+import antlr.SemanticException;
+import antlr.ParserSharedInputState;
+import antlr.collections.impl.BitSet;
+
+public class SeamTextParser extends antlr.LLkParser implements SeamTextParserTokenTypes
+ {
+
+ private java.util.Set htmlElements = new java.util.HashSet( java.util.Arrays.asList( new String[] { "a", "p", "q", "code", "pre", "table", "tr", "td", "th", "ul", "ol", "li", "b", "i", "u", "tt", "del", "em", "hr", "br", "div", "span", "h1", "h2", "h3", "h4", "img" , "object", "param", "embed"} ) );
+ private java.util.Set htmlAttributes = new java.util.HashSet( java.util.Arrays.asList( new String[] { "src", "href", "lang", "class", "id", "style", "width", "height", "name", "value", "type", "wmode" } ) );
+
+ private StringBuilder mainBuilder = new StringBuilder();
+ private StringBuilder builder = mainBuilder;
+
+ public String toString() {
+ return builder.toString();
+ }
+
+ private void append(String... strings) {
+ for (String string: strings) builder.append(string);
+ }
+
+ private static boolean hasMultiple(String string, char c) {
+ return string.indexOf(c)!=string.lastIndexOf(c);
+ }
+
+ private void validateElement(Token t) throws NoViableAltException {
+ if ( !htmlElements.contains( t.getText().toLowerCase() ) ) {
+ throw new NoViableAltException(t, null);
+ }
+ }
+
+ private void validateAttribute(Token t) throws NoViableAltException {
+ if ( !htmlAttributes.contains( t.getText().toLowerCase() ) ) {
+ throw new NoViableAltException(t, null);
+ }
+ }
+
+ private void beginCapture() {
+ builder = new StringBuilder();
+ }
+
+ private String endCapture() {
+ String result = builder.toString();
+ builder = mainBuilder;
+ return result;
+ }
+
+ protected String linkTag(String description, String url) {
+ return "<a href=\"" + url + "\" styleClass=\"seamTextLink\">" + description + "</a>";
+ }
+
+ protected String macroInclude(String macroName) {
+ return "";
+ }
+
+protected SeamTextParser(TokenBuffer tokenBuf, int k) {
+ super(tokenBuf,k);
+ tokenNames = _tokenNames;
+}
+
+public SeamTextParser(TokenBuffer tokenBuf) {
+ this(tokenBuf,4);
+}
+
+protected SeamTextParser(TokenStream lexer, int k) {
+ super(lexer,k);
+ tokenNames = _tokenNames;
+}
+
+public SeamTextParser(TokenStream lexer) {
+ this(lexer,4);
+}
+
+public SeamTextParser(ParserSharedInputState state) {
+ super(state,4);
+ tokenNames = _tokenNames;
+}
+
+ public final void startRule() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop3:
+ do {
+ if ((LA(1)==NEWLINE)) {
+ newline();
+ }
+ else {
+ break _loop3;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case DOUBLEQUOTE:
+ case BACKTICK:
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case PLUS:
+ case EQ:
+ case HASH:
+ case TWIDDLE:
+ case UNDERSCORE:
+ case OPEN:
+ case LT:
+ case SPACE:
+ {
+ {
+ switch ( LA(1)) {
+ case PLUS:
+ {
+ heading();
+ {
+ _loop7:
+ do {
+ if ((LA(1)==NEWLINE)) {
+ newline();
+ }
+ else {
+ break _loop7;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case DOUBLEQUOTE:
+ case BACKTICK:
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case EQ:
+ case HASH:
+ case TWIDDLE:
+ case UNDERSCORE:
+ case OPEN:
+ case LT:
+ case SPACE:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ text();
+ {
+ _loop11:
+ do {
+ if ((LA(1)==PLUS)) {
+ heading();
+ {
+ _loop10:
+ do {
+ if ((LA(1)==NEWLINE)) {
+ newline();
+ }
+ else {
+ break _loop10;
+ }
+
+ } while (true);
+ }
+ text();
+ }
+ else {
+ break _loop11;
+ }
+
+ } while (true);
+ }
+ break;
+ }
+ case EOF:
+ {
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void newline() throws RecognitionException, TokenStreamException {
+
+ Token n = null;
+
+ n = LT(1);
+ match(NEWLINE);
+ append( n.getText() );
+ }
+
+ public final void heading() throws RecognitionException, TokenStreamException {
+
+
+ {
+ if ((LA(1)==PLUS) && (_tokenSet_0.member(LA(2)))) {
+ h1();
+ }
+ else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (_tokenSet_0.member(LA(3)))) {
+ h2();
+ }
+ else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (LA(3)==PLUS) && (_tokenSet_0.member(LA(4)))) {
+ h3();
+ }
+ else if ((LA(1)==PLUS) && (LA(2)==PLUS) && (LA(3)==PLUS) && (LA(4)==PLUS)) {
+ h4();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+
+ }
+ newlineOrEof();
+ }
+
+ public final void text() throws RecognitionException, TokenStreamException {
+
+
+ {
+ int _cnt17=0;
+ _loop17:
+ do {
+ if ((_tokenSet_1.member(LA(1)))) {
+ {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case TWIDDLE:
+ case UNDERSCORE:
+ case OPEN:
+ case SPACE:
+ {
+ paragraph();
+ break;
+ }
+ case BACKTICK:
+ {
+ preformatted();
+ break;
+ }
+ case DOUBLEQUOTE:
+ {
+ blockquote();
+ break;
+ }
+ case EQ:
+ case HASH:
+ {
+ list();
+ break;
+ }
+ case LT:
+ {
+ html();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ _loop16:
+ do {
+ if ((LA(1)==NEWLINE)) {
+ newline();
+ }
+ else {
+ break _loop16;
+ }
+
+ } while (true);
+ }
+ }
+ else {
+ if ( _cnt17>=1 ) { break _loop17; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt17++;
+ } while (true);
+ }
+ }
+
+ public final void paragraph() throws RecognitionException, TokenStreamException {
+
+
+ append("<p>\n");
+ {
+ int _cnt20=0;
+ _loop20:
+ do {
+ if ((_tokenSet_0.member(LA(1)))) {
+ line();
+ newlineOrEof();
+ }
+ else {
+ if ( _cnt20>=1 ) { break _loop20; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt20++;
+ } while (true);
+ }
+ append("</p>\n");
+ newlineOrEof();
+ }
+
+ public final void preformatted() throws RecognitionException, TokenStreamException {
+
+
+ match(BACKTICK);
+ append("<pre>");
+ {
+ _loop30:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ {
+ word();
+ break;
+ }
+ case PUNCTUATION:
+ {
+ punctuation();
+ break;
+ }
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case PLUS:
+ case EQ:
+ case HASH:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ specialChars();
+ break;
+ }
+ case OPEN:
+ case CLOSE:
+ {
+ moreSpecialChars();
+ break;
+ }
+ case DOUBLEQUOTE:
+ case GT:
+ case LT:
+ case AMPERSAND:
+ {
+ htmlSpecialChars();
+ break;
+ }
+ case SPACE:
+ {
+ space();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ break _loop30;
+ }
+ }
+ } while (true);
+ }
+ match(BACKTICK);
+ append("</pre>");
+ }
+
+ public final void blockquote() throws RecognitionException, TokenStreamException {
+
+
+ match(DOUBLEQUOTE);
+ append("<blockquote>\n");
+ {
+ _loop27:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ formatted();
+ break;
+ }
+ case BACKTICK:
+ {
+ preformatted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ case LT:
+ {
+ html();
+ break;
+ }
+ case EQ:
+ case HASH:
+ {
+ list();
+ break;
+ }
+ default:
+ {
+ break _loop27;
+ }
+ }
+ } while (true);
+ }
+ match(DOUBLEQUOTE);
+ newlineOrEof();
+ append("</blockquote>\n");
+ }
+
+ public final void list() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case HASH:
+ {
+ olist();
+ break;
+ }
+ case EQ:
+ {
+ ulist();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ newlineOrEof();
+ }
+
+ public final void html() throws RecognitionException, TokenStreamException {
+
+
+ openTag();
+ {
+ _loop87:
+ do {
+ if ((LA(1)==SPACE) && (LA(2)==SLASH||LA(2)==GT||LA(2)==SPACE)) {
+ space();
+ }
+ else if ((LA(1)==SPACE) && (LA(2)==WORD)) {
+ space();
+ attribute();
+ }
+ else {
+ break _loop87;
+ }
+
+ } while (true);
+ }
+ {
+ switch ( LA(1)) {
+ case GT:
+ {
+ {
+ beforeBody();
+ body();
+ closeTagWithBody();
+ }
+ break;
+ }
+ case SLASH:
+ {
+ closeTagWithNoBody();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void line() throws RecognitionException, TokenStreamException {
+
+
+ {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ formatted();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ {
+ _loop24:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ formatted();
+ break;
+ }
+ case BACKTICK:
+ {
+ preformatted();
+ break;
+ }
+ case DOUBLEQUOTE:
+ {
+ quoted();
+ break;
+ }
+ case LT:
+ {
+ html();
+ break;
+ }
+ default:
+ {
+ break _loop24;
+ }
+ }
+ } while (true);
+ }
+ }
+
+ public final void newlineOrEof() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ case EOF:
+ {
+ match(Token.EOF_TYPE);
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void plain() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case WORD:
+ {
+ word();
+ break;
+ }
+ case PUNCTUATION:
+ {
+ punctuation();
+ break;
+ }
+ case ESCAPE:
+ {
+ escape();
+ break;
+ }
+ case SPACE:
+ {
+ space();
+ break;
+ }
+ default:
+ if ((LA(1)==OPEN) && (_tokenSet_2.member(LA(2)))) {
+ link();
+ }
+ else if ((LA(1)==OPEN) && (LA(2)==LT)) {
+ macro();
+ }
+ else {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void formatted() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void quoted() throws RecognitionException, TokenStreamException {
+
+
+ match(DOUBLEQUOTE);
+ append("<q>");
+ {
+ int _cnt65=0;
+ _loop65:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt65>=1 ) { break _loop65; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt65++;
+ } while (true);
+ }
+ match(DOUBLEQUOTE);
+ append("</q>");
+ }
+
+ public final void word() throws RecognitionException, TokenStreamException {
+
+ Token w = null;
+
+ w = LT(1);
+ match(WORD);
+ append( w.getText() );
+ }
+
+ public final void punctuation() throws RecognitionException, TokenStreamException {
+
+ Token p = null;
+
+ p = LT(1);
+ match(PUNCTUATION);
+ append( p.getText() );
+ }
+
+ public final void specialChars() throws RecognitionException, TokenStreamException {
+
+ Token st = null;
+ Token sl = null;
+ Token b = null;
+ Token h = null;
+ Token p = null;
+ Token eq = null;
+ Token hh = null;
+ Token e = null;
+ Token t = null;
+ Token u = null;
+
+ switch ( LA(1)) {
+ case STAR:
+ {
+ st = LT(1);
+ match(STAR);
+ append( st.getText() );
+ break;
+ }
+ case SLASH:
+ {
+ sl = LT(1);
+ match(SLASH);
+ append( sl.getText() );
+ break;
+ }
+ case BAR:
+ {
+ b = LT(1);
+ match(BAR);
+ append( b.getText() );
+ break;
+ }
+ case HAT:
+ {
+ h = LT(1);
+ match(HAT);
+ append( h.getText() );
+ break;
+ }
+ case PLUS:
+ {
+ p = LT(1);
+ match(PLUS);
+ append( p.getText() );
+ break;
+ }
+ case EQ:
+ {
+ eq = LT(1);
+ match(EQ);
+ append( eq.getText() );
+ break;
+ }
+ case HASH:
+ {
+ hh = LT(1);
+ match(HASH);
+ append( hh.getText() );
+ break;
+ }
+ case ESCAPE:
+ {
+ e = LT(1);
+ match(ESCAPE);
+ append( e.getText() );
+ break;
+ }
+ case TWIDDLE:
+ {
+ t = LT(1);
+ match(TWIDDLE);
+ append( t.getText() );
+ break;
+ }
+ case UNDERSCORE:
+ {
+ u = LT(1);
+ match(UNDERSCORE);
+ append( u.getText() );
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void moreSpecialChars() throws RecognitionException, TokenStreamException {
+
+ Token o = null;
+ Token c = null;
+
+ switch ( LA(1)) {
+ case OPEN:
+ {
+ o = LT(1);
+ match(OPEN);
+ append( o.getText() );
+ break;
+ }
+ case CLOSE:
+ {
+ c = LT(1);
+ match(CLOSE);
+ append( c.getText() );
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void htmlSpecialChars() throws RecognitionException, TokenStreamException {
+
+
+ switch ( LA(1)) {
+ case GT:
+ {
+ match(GT);
+ append(">");
+ break;
+ }
+ case LT:
+ {
+ match(LT);
+ append("<");
+ break;
+ }
+ case DOUBLEQUOTE:
+ {
+ match(DOUBLEQUOTE);
+ append(""");
+ break;
+ }
+ case AMPERSAND:
+ {
+ match(AMPERSAND);
+ append("&");
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+
+ public final void space() throws RecognitionException, TokenStreamException {
+
+ Token s = null;
+
+ s = LT(1);
+ match(SPACE);
+ append( s.getText() );
+ }
+
+ public final void escape() throws RecognitionException, TokenStreamException {
+
+
+ match(ESCAPE);
+ {
+ switch ( LA(1)) {
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case PLUS:
+ case EQ:
+ case HASH:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ specialChars();
+ break;
+ }
+ case OPEN:
+ case CLOSE:
+ {
+ moreSpecialChars();
+ break;
+ }
+ case QUOTE:
+ {
+ evenMoreSpecialChars();
+ break;
+ }
+ case DOUBLEQUOTE:
+ case GT:
+ case LT:
+ case AMPERSAND:
+ {
+ htmlSpecialChars();
+ break;
+ }
+ default:
+ {
+ throw new NoViableAltException(LT(1), getFilename());
+ }
+ }
+ }
+ }
+
+ public final void link() throws RecognitionException, TokenStreamException {
+
+
+ match(OPEN);
+ beginCapture();
+ {
+ _loop43:
+ do {
+ if ((_tokenSet_3.member(LA(1)))) {
+ plain();
+ }
+ else {
+ break _loop43;
+ }
+
+ } while (true);
+ }
+ String text=endCapture();
+ match(EQ);
+ match(GT);
+ beginCapture();
+ attributeValue();
+ String link = endCapture(); append(linkTag(text, link));
+ match(CLOSE);
+ }
+
+ public final void macro() throws RecognitionException, TokenStreamException {
+
+
+ match(OPEN);
+ match(LT);
+ match(EQ);
+ beginCapture();
+ attributeValue();
+ String macroName = endCapture(); append(macroInclude(macroName));
+ match(CLOSE);
+ }
+
+ public final void bold() throws RecognitionException, TokenStreamException {
+
+
+ match(STAR);
+ append("<b>");
+ {
+ int _cnt47=0;
+ _loop47:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt47>=1 ) { break _loop47; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt47++;
+ } while (true);
+ }
+ match(STAR);
+ append("</b>");
+ }
+
+ public final void underline() throws RecognitionException, TokenStreamException {
+
+
+ match(UNDERSCORE);
+ append("<u>");
+ {
+ int _cnt50=0;
+ _loop50:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt50>=1 ) { break _loop50; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt50++;
+ } while (true);
+ }
+ match(UNDERSCORE);
+ append("</u>");
+ }
+
+ public final void italic() throws RecognitionException, TokenStreamException {
+
+
+ match(SLASH);
+ append("<i>");
+ {
+ int _cnt53=0;
+ _loop53:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt53>=1 ) { break _loop53; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt53++;
+ } while (true);
+ }
+ match(SLASH);
+ append("</i>");
+ }
+
+ public final void monospace() throws RecognitionException, TokenStreamException {
+
+ Token st = null;
+ Token sl = null;
+ Token h = null;
+ Token p = null;
+ Token eq = null;
+ Token hh = null;
+ Token e = null;
+ Token t = null;
+ Token u = null;
+
+ match(BAR);
+ append("<tt>");
+ {
+ int _cnt56=0;
+ _loop56:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ {
+ word();
+ break;
+ }
+ case PUNCTUATION:
+ {
+ punctuation();
+ break;
+ }
+ case SPACE:
+ {
+ space();
+ break;
+ }
+ case STAR:
+ {
+ st = LT(1);
+ match(STAR);
+ append( st.getText() );
+ break;
+ }
+ case SLASH:
+ {
+ sl = LT(1);
+ match(SLASH);
+ append( sl.getText() );
+ break;
+ }
+ case HAT:
+ {
+ h = LT(1);
+ match(HAT);
+ append( h.getText() );
+ break;
+ }
+ case PLUS:
+ {
+ p = LT(1);
+ match(PLUS);
+ append( p.getText() );
+ break;
+ }
+ case EQ:
+ {
+ eq = LT(1);
+ match(EQ);
+ append( eq.getText() );
+ break;
+ }
+ case HASH:
+ {
+ hh = LT(1);
+ match(HASH);
+ append( hh.getText() );
+ break;
+ }
+ case ESCAPE:
+ {
+ e = LT(1);
+ match(ESCAPE);
+ append( e.getText() );
+ break;
+ }
+ case TWIDDLE:
+ {
+ t = LT(1);
+ match(TWIDDLE);
+ append( t.getText() );
+ break;
+ }
+ case UNDERSCORE:
+ {
+ u = LT(1);
+ match(UNDERSCORE);
+ append( u.getText() );
+ break;
+ }
+ case OPEN:
+ case CLOSE:
+ {
+ moreSpecialChars();
+ break;
+ }
+ case DOUBLEQUOTE:
+ case GT:
+ case LT:
+ case AMPERSAND:
+ {
+ htmlSpecialChars();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt56>=1 ) { break _loop56; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt56++;
+ } while (true);
+ }
+ match(BAR);
+ append("</tt>");
+ }
+
+ public final void superscript() throws RecognitionException, TokenStreamException {
+
+
+ match(HAT);
+ append("<sup>");
+ {
+ int _cnt59=0;
+ _loop59:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case TWIDDLE:
+ {
+ deleted();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt59>=1 ) { break _loop59; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt59++;
+ } while (true);
+ }
+ match(HAT);
+ append("</sup>");
+ }
+
+ public final void deleted() throws RecognitionException, TokenStreamException {
+
+
+ match(TWIDDLE);
+ append("<del>");
+ {
+ int _cnt62=0;
+ _loop62:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ {
+ bold();
+ break;
+ }
+ case UNDERSCORE:
+ {
+ underline();
+ break;
+ }
+ case SLASH:
+ {
+ italic();
+ break;
+ }
+ case BAR:
+ {
+ monospace();
+ break;
+ }
+ case HAT:
+ {
+ superscript();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ {
+ if ( _cnt62>=1 ) { break _loop62; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+ }
+ _cnt62++;
+ } while (true);
+ }
+ match(TWIDDLE);
+ append("</del>");
+ }
+
+ public final void evenMoreSpecialChars() throws RecognitionException, TokenStreamException {
+
+ Token q = null;
+
+ q = LT(1);
+ match(QUOTE);
+ append( q.getText() );
+ }
+
+ public final void attributeValue() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop104:
+ do {
+ switch ( LA(1)) {
+ case AMPERSAND:
+ {
+ match(AMPERSAND);
+ append("&");
+ break;
+ }
+ case WORD:
+ {
+ word();
+ break;
+ }
+ case PUNCTUATION:
+ {
+ punctuation();
+ break;
+ }
+ case SPACE:
+ {
+ space();
+ break;
+ }
+ case ESCAPE:
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case PLUS:
+ case EQ:
+ case HASH:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ specialChars();
+ break;
+ }
+ default:
+ {
+ break _loop104;
+ }
+ }
+ } while (true);
+ }
+ }
+
+ public final void h1() throws RecognitionException, TokenStreamException {
+
+
+ match(PLUS);
+ append("<h1>");
+ line();
+ append("</h1>");
+ }
+
+ public final void h2() throws RecognitionException, TokenStreamException {
+
+
+ match(PLUS);
+ match(PLUS);
+ append("<h2>");
+ line();
+ append("</h2>");
+ }
+
+ public final void h3() throws RecognitionException, TokenStreamException {
+
+
+ match(PLUS);
+ match(PLUS);
+ match(PLUS);
+ append("<h3>");
+ line();
+ append("</h3>");
+ }
+
+ public final void h4() throws RecognitionException, TokenStreamException {
+
+
+ match(PLUS);
+ match(PLUS);
+ match(PLUS);
+ match(PLUS);
+ append("<h4>");
+ line();
+ append("</h4>");
+ }
+
+ public final void olist() throws RecognitionException, TokenStreamException {
+
+
+ append("<ol>\n");
+ {
+ int _cnt76=0;
+ _loop76:
+ do {
+ if ((LA(1)==HASH)) {
+ olistLine();
+ newlineOrEof();
+ }
+ else {
+ if ( _cnt76>=1 ) { break _loop76; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt76++;
+ } while (true);
+ }
+ append("</ol>\n");
+ }
+
+ public final void ulist() throws RecognitionException, TokenStreamException {
+
+
+ append("<ul>\n");
+ {
+ int _cnt80=0;
+ _loop80:
+ do {
+ if ((LA(1)==EQ)) {
+ ulistLine();
+ newlineOrEof();
+ }
+ else {
+ if ( _cnt80>=1 ) { break _loop80; } else {throw new NoViableAltException(LT(1), getFilename());}
+ }
+
+ _cnt80++;
+ } while (true);
+ }
+ append("</ul>\n");
+ }
+
+ public final void olistLine() throws RecognitionException, TokenStreamException {
+
+
+ match(HASH);
+ append("<li>");
+ line();
+ append("</li>");
+ }
+
+ public final void ulistLine() throws RecognitionException, TokenStreamException {
+
+
+ match(EQ);
+ append("<li>");
+ line();
+ append("</li>");
+ }
+
+ public final void openTag() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+
+ match(LT);
+ name = LT(1);
+ match(WORD);
+ validateElement(name); append("<"); append(name.getText());
+ }
+
+ public final void attribute() throws RecognitionException, TokenStreamException {
+
+ Token att = null;
+
+ att = LT(1);
+ match(WORD);
+ {
+ _loop99:
+ do {
+ if ((LA(1)==SPACE)) {
+ space();
+ }
+ else {
+ break _loop99;
+ }
+
+ } while (true);
+ }
+ match(EQ);
+ {
+ _loop101:
+ do {
+ if ((LA(1)==SPACE)) {
+ space();
+ }
+ else {
+ break _loop101;
+ }
+
+ } while (true);
+ }
+ match(DOUBLEQUOTE);
+ validateAttribute(att); append(att.getText()); append("=\"");
+ attributeValue();
+ match(DOUBLEQUOTE);
+ append("\"");
+ }
+
+ public final void beforeBody() throws RecognitionException, TokenStreamException {
+
+
+ match(GT);
+ append(">");
+ }
+
+ public final void body() throws RecognitionException, TokenStreamException {
+
+
+ {
+ _loop92:
+ do {
+ switch ( LA(1)) {
+ case WORD:
+ case PUNCTUATION:
+ case ESCAPE:
+ case OPEN:
+ case SPACE:
+ {
+ plain();
+ break;
+ }
+ case STAR:
+ case SLASH:
+ case BAR:
+ case HAT:
+ case TWIDDLE:
+ case UNDERSCORE:
+ {
+ formatted();
+ break;
+ }
+ case BACKTICK:
+ {
+ preformatted();
+ break;
+ }
+ case DOUBLEQUOTE:
+ {
+ quoted();
+ break;
+ }
+ case EQ:
+ case HASH:
+ {
+ list();
+ break;
+ }
+ case NEWLINE:
+ {
+ newline();
+ break;
+ }
+ default:
+ if ((LA(1)==LT) && (LA(2)==WORD)) {
+ html();
+ }
+ else {
+ break _loop92;
+ }
+ }
+ } while (true);
+ }
+ }
+
+ public final void closeTagWithBody() throws RecognitionException, TokenStreamException {
+
+ Token name = null;
+
+ match(LT);
+ match(SLASH);
+ name = LT(1);
+ match(WORD);
+ match(GT);
+ append("</"); append(name.getText()); append(">");
+ }
+
+ public final void closeTagWithNoBody() throws RecognitionException, TokenStreamException {
+
+
+ match(SLASH);
+ match(GT);
+ append("/>");
+ }
+
+
+ public static final String[] _tokenNames = {
+ "<0>",
+ "EOF",
+ "<2>",
+ "NULL_TREE_LOOKAHEAD",
+ "DOUBLEQUOTE",
+ "BACKTICK",
+ "WORD",
+ "PUNCTUATION",
+ "ESCAPE",
+ "STAR",
+ "SLASH",
+ "BAR",
+ "HAT",
+ "PLUS",
+ "EQ",
+ "HASH",
+ "TWIDDLE",
+ "UNDERSCORE",
+ "OPEN",
+ "CLOSE",
+ "QUOTE",
+ "GT",
+ "LT",
+ "AMPERSAND",
+ "SPACE",
+ "NEWLINE"
+ };
+
+ private static final long[] mk_tokenSet_0() {
+ long[] data = { 17244096L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_0 = new BitSet(mk_tokenSet_0());
+ private static final long[] mk_tokenSet_1() {
+ long[] data = { 21487600L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_1 = new BitSet(mk_tokenSet_1());
+ private static final long[] mk_tokenSet_2() {
+ long[] data = { 17056192L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_2 = new BitSet(mk_tokenSet_2());
+ private static final long[] mk_tokenSet_3() {
+ long[] data = { 17039808L, 0L};
+ return data;
+ }
+ public static final BitSet _tokenSet_3 = new BitSet(mk_tokenSet_3());
+
+ }
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.java (from rev 5325, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.java)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -0,0 +1,30 @@
+// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
+
+package org.jboss.seam.text.xpl;
+
+public interface SeamTextParserTokenTypes {
+ int EOF = 1;
+ int NULL_TREE_LOOKAHEAD = 3;
+ int DOUBLEQUOTE = 4;
+ int BACKTICK = 5;
+ int WORD = 6;
+ int PUNCTUATION = 7;
+ int ESCAPE = 8;
+ int STAR = 9;
+ int SLASH = 10;
+ int BAR = 11;
+ int HAT = 12;
+ int PLUS = 13;
+ int EQ = 14;
+ int HASH = 15;
+ int TWIDDLE = 16;
+ int UNDERSCORE = 17;
+ int OPEN = 18;
+ int CLOSE = 19;
+ int QUOTE = 20;
+ int GT = 21;
+ int LT = 22;
+ int AMPERSAND = 23;
+ int SPACE = 24;
+ int NEWLINE = 25;
+}
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.txt (from rev 5325, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/SeamTextParserTokenTypes.txt)
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.txt (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.txt 2007-12-17 13:08:38 UTC (rev 5329)
@@ -0,0 +1,24 @@
+// $ANTLR 2.7.6 (2005-12-22): seam-text.g -> SeamTextParserTokenTypes.txt$
+SeamTextParser // output token vocab name
+DOUBLEQUOTE=4
+BACKTICK=5
+WORD=6
+PUNCTUATION=7
+ESCAPE=8
+STAR=9
+SLASH=10
+BAR=11
+HAT=12
+PLUS=13
+EQ=14
+HASH=15
+TWIDDLE=16
+UNDERSCORE=17
+OPEN=18
+CLOSE=19
+QUOTE=20
+GT=21
+LT=22
+AMPERSAND=23
+SPACE=24
+NEWLINE=25
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/SeamTemplatesActivator.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -10,13 +10,8 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.jboss.tools.common.log.IPluginLog;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@@ -64,19 +59,6 @@
public static SeamTemplatesActivator getDefault() {
return plugin;
}
-
- /** /
- public static String getPluginResourcePath() {
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- URL url = null;
- try {
- url = bundle == null ? null : FileLocator.resolve(bundle.getEntry("/resources"));
- } catch (Exception e) {
- url = bundle.getEntry("/resources");
- }
- return (url == null) ? null : url.getPath();
- }
- /**/
public static IPluginLog getPluginLog() {
return getDefault();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java 2007-12-17 12:57:31 UTC (rev 5328)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java 2007-12-17 13:08:38 UTC (rev 5329)
@@ -10,34 +10,22 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.seam.template;
-import java.io.InputStreamReader;
-import java.io.Reader;
import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-import org.jboss.seam.test.unit.SeamTextTest;
-import org.jboss.seam.text.SeamTextLexer;
-import org.jboss.seam.text.SeamTextParser;
-import org.jboss.tools.jsf.vpe.seam.ComponentUtil;
+import org.jboss.seam.text.xpl.SeamTextLexer;
+import org.jboss.seam.text.xpl.SeamTextParser;
import org.jboss.tools.jsf.vpe.seam.SeamTemplatesActivator;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.mozilla.interfaces.nsIComponentManager;
import org.mozilla.interfaces.nsIDOMDocument;
-import org.mozilla.interfaces.nsIDOMDocumentRange;
-import org.mozilla.interfaces.nsIDOMElement;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMNodeList;
import org.mozilla.interfaces.nsIDOMParser;
-import org.mozilla.interfaces.nsIDOMText;
-import org.mozilla.interfaces.nsISupportsArray;
import org.mozilla.xpcom.Mozilla;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
import antlr.RecognitionException;
import antlr.TokenStreamException;
17 years
JBoss Tools SVN: r5328 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2007-12-17 07:57:31 -0500 (Mon, 17 Dec 2007)
New Revision: 5328
Modified:
trunk/jsf/docs/userguide/en/modules/features_list.xml
trunk/jsf/docs/userguide/en/modules/jsf_support.xml
trunk/jsf/docs/userguide/en/modules/struts_support.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-140 jsf.links are relative
Modified: trunk/jsf/docs/userguide/en/modules/features_list.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/features_list.xml 2007-12-17 12:49:36 UTC (rev 5327)
+++ trunk/jsf/docs/userguide/en/modules/features_list.xml 2007-12-17 12:57:31 UTC (rev 5328)
@@ -74,7 +74,7 @@
<row>
<entry>Struts Support</entry>
<entry>Step-by-step wizards for creating a new struts project with a number of predefined templates, importing existing ones and adding struts capabilities to non-struts web projects.</entry>
- <entry><link linkend="struts">struts support</link></entry>
+ <entry><link linkend="struts1">struts support</link></entry>
</row>
<row>
Modified: trunk/jsf/docs/userguide/en/modules/jsf_support.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2007-12-17 12:49:36 UTC (rev 5327)
+++ trunk/jsf/docs/userguide/en/modules/jsf_support.xml 2007-12-17 12:57:31 UTC (rev 5328)
@@ -383,7 +383,7 @@
<para>For detailed information on migration projects to JBoss Developer
Studio see
- <ulink url="../../../../../../documentation/guides/build/Exadel-migration/en/html_single/index.html">Migration Guide</ulink>.
+ <ulink url="../../../Exadel-migration/en/html_single/index.html">Migration Guide</ulink>.
</para>
</section>
Modified: trunk/jsf/docs/userguide/en/modules/struts_support.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/struts_support.xml 2007-12-17 12:49:36 UTC (rev 5327)
+++ trunk/jsf/docs/userguide/en/modules/struts_support.xml 2007-12-17 12:57:31 UTC (rev 5328)
@@ -166,7 +166,7 @@
<para>For detailed information on migration projects to JBoss Developer Studio
see <ulink
- url="../../../../../../documentation/guides/build/Exadel-migration/en/html_single/index.html"
+ url="../../../Exadel-migration/en/html_single/index.html"
>Migration Guide</ulink>.</para>
</section>
17 years
JBoss Tools SVN: r5327 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe: editor/mozilla and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2007-12-17 07:49:36 -0500 (Mon, 17 Dec 2007)
New Revision: 5327
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaBaseEventListener.java
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/VpeEditorPart.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
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/MozillaEditor.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/VpeBreackerHelper.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1457
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 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -689,7 +689,7 @@
return;
}
if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
- System.out.println("<<< mouseUp"); //$NON-NLS-1$
+ System.out.println("<<< mouseUp " + (mouseDownSelectionFlag ? "true" : "false")); //$NON-NLS-1$
}
if (mouseDownSelectionFlag) {
mouseEvent.preventDefault();
@@ -2312,6 +2312,13 @@
public VpeSelectionBuilder getSelectionBuilder() {
return selectionBuilder;
}
+
+ /**
+ * @return the sourceBuilder
+ */
+ public VpeSourceDomBuilder getSourceBuilder() {
+ return sourceBuilder;
+ }
/**
* @param selectionBuilder the selectionBuilder to set
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -66,15 +66,11 @@
public class VpeEditorPart extends EditorPart implements ITextEditor,
ITextEditorExtension, IReusableEditor, IVisualEditor {
private SashForm container;
- private StructuredTextEditor sourceEditor = null;
- private MozillaEditor visualEditor;
private IEditorPart activeEditor;
private XModelTreeListener listener;
XModelObject optionsObject;
private SelectionBar selectionBar = new SelectionBar();
private ActivationListener activationListener = new ActivationListener();
- private int visualMode = 0;
- private EditorPart multiPageEditor;
private static final QualifiedName SPLITTER_POSITION_KEY1 = new QualifiedName(
"", "splitter_position1");
private static final QualifiedName SPLITTER_POSITION_KEY2 = new QualifiedName(
@@ -84,16 +80,27 @@
private int controlCount = 0;
+ // parent editor
+ private EditorPart multiPageEditor;
+
+ // 4 tabs - VISUALSOURCE_MODE, VISUAL_MODE, SOURCE_MODE, PREVIEW_MODE
+ private int visualMode = 0;
/** default web-browser */
+ // visible in Preview tab
private MozillaPreview previewWebBrowser = null;
+ // visible in Visual/Source and in Visual tabs
+ private MozillaEditor visualEditor = null;
+ // visible in Visual/Source and in Source tabs - created in anycase active tab
+ private StructuredTextEditor sourceEditor = null;
/** preview content */
+ // preview
private Composite previewContent = null;
+ // visual
+ private Composite visualContent = null;
+ // source
+ private Composite sourceContent = null;
- public StructuredTextEditor getSourceEditor() {
- return sourceEditor;
- }
-
// returns JSPMultipageEditor for closing by ctrl+F4 and ctrl+shift+F4 keys
public EditorPart getParentEditor() {
return multiPageEditor;
@@ -223,7 +230,7 @@
}
public IAction getAction(String actionID) {
- return sourceEditor.getAction(actionID);
+ return getSourceEditor().getAction(actionID);
}
public VpeEditorPart() {
@@ -250,7 +257,7 @@
public void setInput(IEditorInput input) {
super.setInput(input);
- if (visualEditor != null && visualEditor.getEditorInput() != null
+ if (null != visualEditor && visualEditor.getEditorInput() != null
&& visualEditor.getEditorInput() != getEditorInput()) {
visualEditor.setInput(input);
}
@@ -322,80 +329,64 @@
}
}
- Composite sourceContent = null;
- Composite visualContent = null;
+ protected void setVisualMode(String showSelBar,
+ boolean flagSC, boolean flagVC, boolean flagPC) {
+ if (null != selectionBar) {
+ if (flagPC) {
+ getSourceEditor();
+ }
+ selectionBar.showBar(showSelBar);
+ }
+ if (null != sourceContent) {
+ sourceContent.setVisible(flagSC);
+ //Added by Max Areshkau
+ //was fixed bug(border which drawed by iflasher doesn't hide on MACOS when we swith
+ // to souce view)
+ //if(Platform.getOS().equals(Platform.OS_MACOSX)&&controller!=null) {
+ // getVE().getController().visualRefresh();
+ //}
+ }
+ if (null != visualContent) {
+ if (flagVC) {
+ getVE();
+ }
+ visualContent.setVisible(flagVC);
+ }
+ if (null != previewContent) {
+ if (flagPC) {
+ getWB();
+ }
+ previewContent.setVisible(flagPC);
+ }
+ }
+
public void setVisualMode(int type) {
- String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR
- .getValue();
+ String showSelectionBar = VpePreference.SHOW_SELECTION_TAG_BAR.getValue();
switch (type) {
case VISUALSOURCE_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
- sourceContent.setVisible(true);
- if (visualContent != null)
- visualContent.setVisible(true);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
+ setVisualMode(showSelectionBar, true, true, false);
break;
case VISUAL_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null)
- sourceContent.setVisible(false);
- if (visualContent != null)
- visualContent.setVisible(true);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
+ setVisualMode(showSelectionBar, false, true, false);
break;
case SOURCE_MODE:
- selectionBar.showBar(showSelectionBar);
- if (sourceContent != null) {
- sourceContent.setVisible(true);
-
- //Added by Max Areshkau
- //was fixed bug(border which drawed by iflasher doesn't hide on MACOS when we swith
- // to souce view)
-// if(Platform.getOS().equals(Platform.OS_MACOSX)&&controller!=null) {
-//
-// visualEditor.getController().visualRefresh();
-// }
- }
- if (visualContent != null)
- visualContent.setVisible(false);
- if (previewContent != null) {
- previewContent.setVisible(false);
- }
+ setVisualMode(showSelectionBar, true, false, false);
break;
case PREVIEW_MODE:
- if (selectionBar != null) {
- selectionBar.showBar("no");
- }
- if (sourceContent != null) {
- sourceContent.setVisible(false);
- }
-
- if (visualContent != null) {
- visualContent.setVisible(false);
- }
-
- if (previewContent != null) {
- previewWebBrowser.rebuildDom();
- previewContent.setVisible(true);
- }
+ setVisualMode("no", false, false, true);
break;
}
container.layout();
if (visualMode == SOURCE_MODE && type != SOURCE_MODE) {
visualMode = type;
- if (visualEditor.getController() != null) {
- visualEditor.getController().visualRefresh();
- if(type!=PREVIEW_MODE) {
- visualEditor.getController().sourceSelectionChanged();
+ if (getVE().getController() != null) {
+ getVE().getController().visualRefresh();
+ if (type != PREVIEW_MODE) {
+ getVE().getController().sourceSelectionChanged();
}
}
}
@@ -408,10 +399,10 @@
public void createPartControl(Composite parent) {
controlCount++;
- if (controlCount > 1)
+ if (controlCount > 1) {
return;
+ }
// //////////////////////////////////////////////////////////////
-
Composite cmpEdTl = new Composite(parent, SWT.NONE);
GridLayout layoutEdTl = new GridLayout(1, false);
layoutEdTl.verticalSpacing = 0;
@@ -433,30 +424,21 @@
cmpEd.setLayout(layoutEd);
cmpEd.setLayoutData(new GridData(GridData.FILL_BOTH));
// /////////////////////////////////////////////////////////////////
+
container = new SashForm(cmpEd, SWT.VERTICAL);
container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
- sourceContent = new Composite(container, SWT.NONE);
- sourceContent.setLayout(new FillLayout());
- visualContent = new Composite(container, SWT.NONE);
- visualContent.setLayout(new FillLayout());
-
- // Create a preview content
- previewContent = new Composite(container, SWT.NONE);
- previewContent.setLayout(new FillLayout());
-
+
// ////////////////////////////////////////////////////
-
selectionBar.createToolBarComposite(cmpEdTl, true);
// ///////////////////////////////////////////////////
- if (sourceEditor == null)
- sourceEditor = new StructuredTextEditor() {
- public void safelySanityCheckState(IEditorInput input) {
- super.safelySanityCheckState(input);
- }
- };
+
+ getSC();
+ getVC();
+ getPC();
int[] weights = loadSplitterPosition();
- if (weights != null)
+ if (weights != null) {
container.setWeights(weights);
+ }
container.addWeightsChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
saveSplitterPosition(container.getWeights());
@@ -471,106 +453,11 @@
container.layout();
}
});
- visualEditor = new MozillaEditor();
+ activeEditor = setupSourceEditor();
try {
- visualEditor.init(getEditorSite(), getEditorInput());
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
-
- previewWebBrowser = new MozillaPreview(this, sourceEditor);
- try {
- previewWebBrowser.init(getEditorSite(), getEditorInput());
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
-
- try {
- sourceEditor.addPropertyListener(new IPropertyListener() {
- public void propertyChanged(Object source, int propId) {
- if (propId == IWorkbenchPartConstants.PROP_TITLE) {
- VpeEditorPart.this.setPartName(sourceEditor.getTitle());
- }
- VpeEditorPart.this.firePropertyChange(propId);
- }
- });
- sourceEditor.init(getEditorSite(), getEditorInput());
-
- if (sourceContent != null) {
- sourceEditor.createPartControl(sourceContent);
- }
- if (visualEditor != null) {
- visualEditor
- .setEditorLoadWindowListener(new EditorLoadWindowListener() {
- public void load() {
- visualEditor.setEditorLoadWindowListener(null);
- visualEditor.setController(new VpeController(
- VpeEditorPart.this));
- selectionBar.setVpeController(visualEditor.getController());
- visualEditor.getController().setSelectionBarController(selectionBar);
- try {
- visualEditor.getController().init(sourceEditor, visualEditor);
- } catch (Exception e) {
- VpePlugin.reportProblem(e);
- }
- }
- });
- visualEditor.createPartControl(visualContent);
- }
-
- if (previewWebBrowser != null) {
- previewWebBrowser
- .setEditorLoadWindowListener(new EditorLoadWindowListener() {
- public void load() {
- previewWebBrowser
- .setEditorLoadWindowListener(null);
- previewWebBrowser.buildDom();
- }
- });
- previewWebBrowser.createPartControl(previewContent);
- }
-
- activeEditor = sourceEditor;
-
- sourceContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (activeEditor != sourceEditor) {
- activeEditor = sourceEditor;
- setFocus();
- }
- }
- }
- });
-
- visualContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (visualEditor != null
- && activeEditor != visualEditor) {
- activeEditor = visualEditor;
- setFocus();
- }
- }
- }
- });
-
- previewContent.addListener(SWT.Activate, new Listener() {
- public void handleEvent(Event event) {
- if (event.type == SWT.Activate) {
- if (previewWebBrowser != null
- && activeEditor != previewWebBrowser) {
- activeEditor = previewWebBrowser;
- setFocus();
- }
- }
- }
- });
-
IWorkbenchWindow window = getSite().getWorkbenchWindow();
window.getPartService().addPartListener(activationListener);
window.getShell().addShellListener(activationListener);
-
} catch (Exception e) {
VpePlugin.reportProblem(e);
}
@@ -684,9 +571,6 @@
fIsHandlingActivation = true;
try {
if (sourceEditor != null) {
- if (visualEditor.getController() != null) {
- visualEditor.getController().refreshTemplates();
- }
sourceEditor.safelySanityCheckState(getEditorInput());
}
} finally {
@@ -697,7 +581,146 @@
}
public VpeController getController() {
- return visualEditor.getController();
+ return getVE().getController();
}
+ public StructuredTextEditor getSourceEditor() {
+ return sourceEditor;
+ }
+
+ public Composite getSC() {
+ if (null != sourceContent) {
+ return sourceContent;
+ }
+ sourceContent = new Composite(container, SWT.NONE);
+ sourceContent.setLayout(new FillLayout());
+ return sourceContent;
+ }
+
+ public StructuredTextEditor setupSourceEditor() {
+ if (null == sourceEditor) {
+ sourceEditor = new StructuredTextEditor() {
+ public void safelySanityCheckState(IEditorInput input) {
+ super.safelySanityCheckState(input);
+ }
+ };
+ }
+ sourceEditor.addPropertyListener(new IPropertyListener() {
+ public void propertyChanged(Object source, int propId) {
+ if (propId == IWorkbenchPartConstants.PROP_TITLE) {
+ VpeEditorPart.this.setPartName(sourceEditor.getTitle());
+ }
+ VpeEditorPart.this.firePropertyChange(propId);
+ }
+ });
+ try {
+ sourceEditor.init(getEditorSite(), getEditorInput());
+ } catch (PartInitException e) {
+ VpePlugin.reportProblem(e);
+ }
+ sourceEditor.createPartControl(getSC());
+ getSC().addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (activeEditor != sourceEditor) {
+ activeEditor = sourceEditor;
+ setFocus();
+ }
+ }
+ }
+ });
+ return sourceEditor;
+ }
+
+ public Composite getVC() {
+ if (null != visualContent) {
+ return visualContent;
+ }
+ visualContent = new Composite(container, SWT.NONE);
+ visualContent.setLayout(new FillLayout());
+ return visualContent;
+ }
+
+ public MozillaEditor getVE() {
+ if (null != visualEditor) {
+ return visualEditor;
+ }
+ visualEditor = new MozillaEditor();
+ try {
+ visualEditor.init(getEditorSite(), getEditorInput());
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
+ if (null == visualEditor) {
+ return visualEditor;
+ }
+ visualEditor.setEditorLoadWindowListener(new EditorLoadWindowListener() {
+ public void load() {
+ visualEditor.setEditorLoadWindowListener(null);
+ visualEditor.setController(new VpeController(VpeEditorPart.this));
+ selectionBar.setVpeController(visualEditor.getController());
+ visualEditor.getController().setSelectionBarController(selectionBar);
+ try {
+ visualEditor.getController().init(sourceEditor, visualEditor);
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
+ }
+ });
+ visualEditor.createPartControl(getVC());
+ getVC().addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (null != visualEditor && activeEditor != visualEditor) {
+ activeEditor = visualEditor;
+ setFocus();
+ }
+ }
+ }
+ });
+ return visualEditor;
+ }
+
+ public Composite getPC() {
+ if (null != previewContent) {
+ return previewContent;
+ }
+ previewContent = new Composite(container, SWT.NONE);
+ previewContent.setLayout(new FillLayout());
+ return previewContent;
+ }
+
+ public MozillaPreview getWB() {
+ if (null != previewWebBrowser) {
+ return previewWebBrowser;
+ }
+ previewWebBrowser = new MozillaPreview(this, sourceEditor);
+ try {
+ previewWebBrowser.init(getEditorSite(), getEditorInput());
+ } catch (Exception e) {
+ VpePlugin.reportProblem(e);
+ }
+ if (null == previewWebBrowser) {
+ return previewWebBrowser;
+ }
+ previewWebBrowser.setEditorLoadWindowListener(new EditorLoadWindowListener() {
+ public void load() {
+ previewWebBrowser.setEditorLoadWindowListener(null);
+ previewWebBrowser.buildDom();
+ }
+ });
+ previewWebBrowser.createPartControl(getPC());
+ getPC().addListener(SWT.Activate, new Listener() {
+ public void handleEvent(Event event) {
+ if (event.type == SWT.Activate) {
+ if (null != previewWebBrowser && activeEditor != previewWebBrowser) {
+ activeEditor = previewWebBrowser;
+ setFocus();
+ }
+ }
+ }
+ });
+ return previewWebBrowser;
+ }
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -69,6 +69,9 @@
}
public void setSelection(nsISelection selection) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
+ System.out.println("VpeSelectionBuilder.setSelection: selection.getIsCollapsed() " + selection.getIsCollapsed());
+ }
if (selection.getIsCollapsed()) {
VisualSelectionInfo info = getVisualFocusSelectedInfo(selection);
if (info != null) {
@@ -367,12 +370,22 @@
private Node getSelectedTextOnly(nsIDOMNode element) {
Node selectedText = null;
nsISelection selection = visualSelectionController.getSelection(nsISelectionController.SELECTION_NORMAL);
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
+ System.out.println("VpeSelectionBuilder.getSelectedTextOnly: selection " +
+ (selection) +
+ " selection.getIsCollapsed() " +
+ (selection.getIsCollapsed()));
+ }
if (!selection.getIsCollapsed()) {
nsIDOMNode anchorNode = selection.getAnchorNode();
nsIDOMNode focusNode = selection.getFocusNode();
if (anchorNode != null && anchorNode.getNodeType() == Node.TEXT_NODE && anchorNode.equals(focusNode)) {
nsIDOMNode anchorParent = anchorNode.getParentNode();
if (anchorParent != null) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
+ System.out.println("VpeSelectionBuilder.getSelectedTextOnly: anchorParent.equals(element) " +
+ (anchorParent.equals(element)));
+ }
if (anchorParent.equals(element)) {
selectedText = domMapping.getSourceNode(anchorNode);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSourceDomBuilder.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -28,6 +28,7 @@
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
@@ -162,6 +163,10 @@
}
void setSelection(Node sourceNode, int offset, int length, boolean innerFlag) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
+ System.out.println("VpeSourceDomBuilder.setSelection: offset " + offset +
+ " length " + length + " innerFlag " + innerFlag);
+ }
if (sourceNode != null) {
int start = ((IndexedRegion)sourceNode).getStartOffset() + offset;
if (innerFlag && offset == 0 && sourceNode instanceof ElementImpl) {
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaBaseEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaBaseEventListener.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaBaseEventListener.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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.tools.vpe.editor.mozilla;
-
-
-import org.mozilla.interfaces.nsIClipboardDragDropHooks;
-import org.mozilla.interfaces.nsIDOMEvent;
-import org.mozilla.interfaces.nsIDragSession;
-import org.mozilla.interfaces.nsISupports;
-import org.mozilla.interfaces.nsITransferable;
-import org.mozilla.xpcom.Mozilla;
-
-public class MozillaBaseEventListener implements nsIClipboardDragDropHooks {
- // TODO Max Areshkau add DnD support
-// private XPCOMObject dropListener;
-// private VpeDnD dnd;
-// private int refCount = 0;
-
-
- public MozillaBaseEventListener() {
- // TODO Max Areshkau delete this reference afrer DnD had been added
-// createCOMInterfaces();
- }
-
- void createCOMInterfaces() {
- // TODO Max Areshkau delete this reference afrer DnD had been added
-// // VpeDnD
-// dropListener = new XPCOMObject(new int[]{2,0,0,4,4,3,6,5}) {
-// public int method0(int[] args) {return QueryInterface(args[0], args[1]);}
-// public int method1(int[] args) {return AddRef();}
-// public int method2(int[] args) {return Release();}
-// public int method3(int[] args) {return CanDrag(args[0], args[1], args[2], args[3]);}
-// public int method4(int[] args) {return CanDrop(args[0], args[1], args[2], args[3]);}
-// public int method5(int[] args) {return Drop(args[0], args[1], args[2]);}
-// public int method6(int[] args) {return CanDropExternal(args[0], args[1], args[2], args[3], args[4], args[5]);}
-// public int method7(int[] args) {return DropExternal(args[0], args[1], args[2], args[3], args[4]);}
-// };
-
- // TODO Max Areshkau delete this reference afrer DnD had been added
-// dnd = getDnD();
- }
-
- /* (non-Javadoc)
- * @see org.mozilla.interfaces.nsIClipboardDragDropHooks#allowDrop(org.mozilla.interfaces.nsIDOMEvent, org.mozilla.interfaces.nsIDragSession)
- */
- public boolean allowDrop(nsIDOMEvent event, nsIDragSession dragSession) {
- event.preventDefault();
- event.stopPropagation();
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.mozilla.interfaces.nsIClipboardDragDropHooks#allowStartDrag(org.mozilla.interfaces.nsIDOMEvent)
- */
- public boolean allowStartDrag(nsIDOMEvent event) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.mozilla.interfaces.nsIClipboardDragDropHooks#onCopyOrDrag(org.mozilla.interfaces.nsIDOMEvent, org.mozilla.interfaces.nsITransferable)
- */
- public boolean onCopyOrDrag(nsIDOMEvent event, nsITransferable transferable) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.mozilla.interfaces.nsIClipboardDragDropHooks#onPasteOrDrop(org.mozilla.interfaces.nsIDOMEvent, org.mozilla.interfaces.nsITransferable)
- */
- public boolean onPasteOrDrop(nsIDOMEvent event, nsITransferable transferable) {
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.mozilla.interfaces.nsISupports#queryInterface(java.lang.String)
- */
- public nsISupports queryInterface(String arg0) {
- return Mozilla.queryInterface(this, arg0);
- }
-}
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 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.mozilla;
+import org.jboss.tools.vpe.VpeDebug;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.VpeController;
import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
@@ -196,6 +197,11 @@
* @see org.mozilla.interfaces.nsISelectionListener#notifySelectionChanged(org.mozilla.interfaces.nsIDOMDocument, org.mozilla.interfaces.nsISelection, short)
*/
public void notifySelectionChanged(nsIDOMDocument domDocument, nsISelection selection, short reason) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
+ System.out.println("MozillaDomEventListener.notifySelectionChanged: editorDomEventListener " +
+ (editorDomEventListener) + " reason " +
+ (reason));
+ }
if (editorDomEventListener != null) {
editorDomEventListener.notifySelectionChanged(domDocument, selection, reason);
}
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 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -71,14 +71,11 @@
static String SELECT_BAR = "SELECT_LBAR"; //$NON-NLS-1$
private XulRunnerEditor xulRunnerEditor;
- private nsIDOMDocument domDocument;
private nsIDOMEventTarget documentEventTarget;
private nsIDOMElement contentArea;
private nsIDOMNode headNode;
private nsIDOMEventTarget contentAreaEventTarget;
private MozillaDomEventListener contentAreaEventListener = new MozillaDomEventListener();
- //TODO Max Areshkau may be we need delete this
- private MozillaBaseEventListener baseEventListener = null;
private EditorLoadWindowListener editorLoadWindowListener;
//
private EditorDomEventListener editorDomEventListener;
@@ -326,19 +323,11 @@
}
public nsIDOMDocument getDomDocument() {
- if (domDocument == null) {
- domDocument = xulRunnerEditor.getDOMDocument();
+ if (null != xulRunnerEditor) {
+ return xulRunnerEditor.getDOMDocument();
}
- return domDocument;
+ return null;
}
-
- /**
- * @param domDocument the domDocument to set
- */
- protected void setDomDocument(nsIDOMDocument domDocument) {
-
- this.domDocument = domDocument;
- }
public nsIDOMElement getContentArea() {
return contentArea;
@@ -482,8 +471,6 @@
contentAreaEventTarget.addEventListener(MozillaDomEventListener.DBLCLICK, contentAreaEventListener, false);//$NON-NLS-1$
documentEventTarget = (nsIDOMEventTarget) getDomDocument().queryInterface(nsIDOMEventTarget.NS_IDOMEVENTTARGET_IID);
documentEventTarget.addEventListener(MozillaDomEventListener.KEYPRESS, contentAreaEventListener, false); //$NON-NLS-1$
- } else {
- baseEventListener = new MozillaBaseEventListener();
}
}
}
@@ -503,7 +490,7 @@
contentAreaEventTarget.removeEventListener(MozillaDomEventListener.DBLCLICK, contentAreaEventListener, false);//$NON-NLS-1$
}
- if (domDocument != null && documentEventTarget != null) {
+ if (documentEventTarget != null) {
documentEventTarget.removeEventListener(MozillaDomEventListener.KEYPRESS, contentAreaEventListener, false); //$NON-NLS-1$
}
}
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 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeAbstractTemplate.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -340,7 +340,7 @@
case BREAKER_TYPE_IGNORE:
return true;
case BREAKER_TYPE_SELECTITEM:
- return VpeBreackerHelper.selectItem(pageContext, sourceDocument, sourceNode, visualNode, data, charCode, selection);
+ return VpeBreackerHelper.selectItem(pageContext.getSourceBuilder(), sourceDocument, sourceNode, visualNode, data, charCode, selection);
default:
return nonctrlKeyPressHandlerImpl(pageContext, sourceDocument, sourceNode, visualNode, data, charCode, selection, formatter);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeBreackerHelper.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeBreackerHelper.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/VpeBreackerHelper.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -16,14 +16,14 @@
import org.w3c.dom.Document;
import org.w3c.dom.Node;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
import org.jboss.tools.vpe.editor.selection.VpeSourceSelection;
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMNode;
public class VpeBreackerHelper {
- public static boolean selectItem(VpePageContext pageContext, Document sourceDocument, Node sourceNode, nsIDOMNode visualNode, Object data, long charCode, VpeSourceSelection selection) {
+ public static boolean selectItem(VpeSourceDomBuilder sourceBuilder, Document sourceDocument, Node sourceNode, nsIDOMNode visualNode, Object data, long charCode, VpeSourceSelection selection) {
Attr attr = selection.getFocusAttribute();
if (attr != null) {
Point range = selection.getFocusAttributeRange();
@@ -43,7 +43,7 @@
if (newAttr != null) {
newAttr.setNodeValue(newAttr.getNodeValue().substring(0, range.x));
}
- pageContext.getSourceBuilder().setAttributeSelection((Attr)attr, 0, 0);
+ sourceBuilder.setAttributeSelection((Attr)attr, 0, 0);
return true;
}
}
@@ -51,7 +51,7 @@
return false;
}
- public static boolean breakInline(VpePageContext pageContext, Document sourceDocument, Node sourceNode, Node visualNode, Object data, int charCode, VpeSourceSelection selection) {
+ public static boolean breakInline(VpeSourceDomBuilder sourceBuilder, Document sourceDocument, Node sourceNode, Node visualNode, Object data, int charCode, VpeSourceSelection selection) {
Attr attr = selection.getFocusAttribute();
if (attr != null) {
Point range = selection.getFocusAttributeRange();
@@ -72,7 +72,7 @@
if (newAttr != null) {
newAttr.setNodeValue(newAttr.getNodeValue().substring(0, range.x));
}
- pageContext.getSourceBuilder().setAttributeSelection((Attr)attr, 0, 0);
+ sourceBuilder.setAttributeSelection((Attr)attr, 0, 0);
}
Node parent = selectItemNode.getParentNode();
if (parent != null) {
@@ -85,7 +85,7 @@
selectItemNode = parent.removeChild(newSelectItemNode);
p2.appendChild(newSelectItemNode);
- pageContext.getSourceBuilder().getStructuredTextViewer()
+ sourceBuilder.getStructuredTextViewer()
.setSelectedRange(((IndexedRegion)p1).getStartOffset(), ((IndexedRegion)p2).getEndOffset() - ((IndexedRegion)p1).getStartOffset());
return true;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/resize/VpeResizer.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.vpe.editor.template.resize;
+import org.jboss.tools.jst.jsp.preferences.VpePreference;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeTagDescription;
@@ -80,6 +81,13 @@
}
}
+ public boolean isAbsolutePosition(){
+ if ("yes".equals(VpePreference.USE_ABSOLUTE_POSITION.getValue())) {
+ return true;
+ }
+ return false;
+ }
+
/**
*
* @param pageContext
@@ -95,7 +103,7 @@
*/
public void resize(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMElement visualElement, Object data, int resizeConstrant, int top, int left, int width, int height) {
pageContext.getEditPart().getSourceEditor().getTextViewer().getUndoManager().beginCompoundChange();
- if (pageContext.isAbsolutePosition() && (
+ if (isAbsolutePosition() && (
resizeConstrant == VpeTagDescription.RESIZE_CONSTRAINS_BOTTOMLEFT||
resizeConstrant == VpeTagDescription.RESIZE_CONSTRAINS_LEFT||
resizeConstrant == VpeTagDescription.RESIZE_CONSTRAINS_TOPLEFT||
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-12-17 12:41:00 UTC (rev 5326)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/selbar/SelectionBar.java 2007-12-17 12:49:36 UTC (rev 5327)
@@ -286,9 +286,9 @@
}
private void setSourceFocus(int offset) {
- vpeController.getPageContext().getSourceBuilder()
+ vpeController.getSourceBuilder()
.getStructuredTextViewer().setSelectedRange(offset, 0);
- vpeController.getPageContext().getSourceBuilder()
+ vpeController.getSourceBuilder()
.getStructuredTextViewer().revealRange(offset, 0);
}
17 years
JBoss Tools SVN: r5326 - trunk/documentation/guides/userguide/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2007-12-17 07:41:00 -0500 (Mon, 17 Dec 2007)
New Revision: 5326
Modified:
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-143 - adding transition sentences
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2007-12-17 12:15:04 UTC (rev 5325)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/getting_started.xml 2007-12-17 12:41:00 UTC (rev 5326)
@@ -1,70 +1,107 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
+ <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>JBoss Developer Studio 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 JBoss Developer Studio 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>JBoss Developer Studio 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 JBoss Developer Studio 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>
</section>
<section id="ConfigJavaEnvironment">
<?dbhtml filename="ConfigJavaEnvironment.html"?>
- <title>Configuring Your Java Environment</title>
- <para>You must have a working installation of JDK 1.5 before you install JBoss Developer Studio. 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. 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>
+ <title>Configuring Your Java Environment</title>
+ <para>You must have a working installation of JDK 1.5 before you install JBoss Developer Studio.
+ 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. 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 "RPM 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.
+ <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 "RPM 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>
+ </listitem>
</itemizedlist>
<note>
<title>Note:</title>
- <para>When you add $JAVA_HOME/bin to $PATH, you should add it <emphasis role="bold">before</emphasis> the old $PATH not after it. 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>
+ <para>When you add $JAVA_HOME/bin to $PATH, you should add it <emphasis role="bold"
+ >before</emphasis> the old $PATH not after it. 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>
-
- <para>Set this variable for your account doing the installation and also for the user account that will run the server.</para>
+
+ <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>
+ <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>
+ <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
+ <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>
+ <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>
+ <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
+ <programlisting><![CDATA[[root@vsr ~]$ /usr/sbin/alternatives --config javac
There is 1 program that provides 'javac'.
Selection Command
-----------------------------------------------
@@ -77,109 +114,157 @@
-----------------------------------------------
*+ 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>
+ <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>
+ <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>
+ <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">
+ </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:
-<para><emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis></para></para></listitem>
+ <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: <para>
+ <emphasis>C:\Program Files\Java\jdk1.5.0_11\</emphasis>
+ </para></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 Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet (System), select the Advanced Tab, and click on the Environment Variables button.</para>
- </section>
+
+ <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 Control Panel from the Start Menu, switch to Classic View if
+ necessary, open the System Control Panel applet (System), select the Advanced Tab, and click on
+ the Environment Variables 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">
+ <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 JBoss Developer Studio and all the JBoss Tools modules.</para>
<section id="Instfromdownver">
<title>Installing from the downloaded version</title>
- <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse, Webtools, JBossEAP, Seam, and SpringIDE.</para>
-
+ <para>Let's start with the JBDS installation.</para>
+ <para>JBDS comes with a simple installer, bundled with tested/pre-configured versions of Eclipse,
+ Webtools, JBossEAP, Seam, and SpringIDE. Thus, to start perform the next steps:</para>
+
<itemizedlist>
- <listitem>
- <para>Download the appropriate installation file for your platform from <ulink url="http://www.redhat.com/developers/rhds/">Red Hat website</ulink>.</para>
- </listitem>
<listitem>
+ <para>Download the appropriate installation file for your platform from <ulink
+ url="http://www.redhat.com/developers/rhds/">Red Hat website</ulink>.</para>
+ </listitem>
+ <listitem>
<para>Run in console:</para>
<programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.0.0.GA.jar
-]]></programlisting></listitem>
- <listitem><para>Follow the instructions presented by the installation wizard</para></listitem>
- </itemizedlist>
-
+]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>Follow the instructions presented by the installation wizard</para>
+ </listitem>
+ </itemizedlist>
+
<figure>
<title>JBoss Developer Studio Installation Wizard</title>
- <mediaobject>
+ <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>
+ <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>
-
- <para>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>
- <para>Selecting <emphasis><property>Specific Java VM</property></emphasis> you can provide the path to non-default Java VM.</para>
-
+
+ <figure>
+ <title>Select Java VM</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>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>
+ <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 doesn't work with gij Java.</para>
</note>
-
+
<itemizedlist>
- <listitem><para>Installation process includes JBoss Enterprise Application Platform. Select <emphasis><property>Yes</property></emphasis> to use it in JBoss Developer Studio.</para></listitem>
- </itemizedlist>
-
-<para></para>
-
- <figure>
+ <listitem>
+ <para>Installation process includes JBoss Enterprise Application Platform. 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>
- <imageobject>
- <imagedata fileref="images/getting_started/getting_started_3.png"/>
- </imageobject>
- </figure>
- <para></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 will be installed. Click <emphasis><property>Next</property></emphasis> to start installation.</para></listitem>
- </itemizedlist>
-
- <para></para>
-
+ <imageobject>
+ <imagedata fileref="images/getting_started/getting_started_3.png"/>
+ </imageobject>
+ </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 will be installed. Click <emphasis>
+ <property>Next</property>
+ </emphasis> to start installation.</para>
+ </listitem>
+ </itemizedlist>
+
+ <para/>
+
<figure>
<title>Summary Information</title>
<imageobject>
@@ -188,40 +273,64 @@
</figure>
</section>
- <section id="JBossToolsInstall">
- <title>JBoss Tools Installation</title>
- <para>JBoss Tools is an umbrella project for the JBoss developed plugins that will make it into JBoss Developer Studio. 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 3.3.1 and Web Tools 2.0.1</para></listitem>
- </itemizedlist>
- <para>The quickest way to get a WTP version is to download "Eclipse IDE for Java EE Developers" via <ulink url="http://www.eclipse.org">www.eclipse.org</ulink>.</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 JBoss Tools build</para></listitem>
- <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>
- </section>
- </section>
-
+ <section id="JBossToolsInstall">
+ <title>JBoss Tools Installation</title>
+ <para>JBoss Tools is an umbrella project for the JBoss developed plugins that will make it into
+ JBoss Developer Studio. 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 3.3.1 and Web Tools 2.0.1</para>
+ </listitem>
+ </itemizedlist>
+ <para>The quickest way to get a WTP version is to download "Eclipse IDE for Java EE Developers"
+ via <ulink url="http://www.eclipse.org">www.eclipse.org</ulink>.</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 JBoss Tools build</para>
+ </listitem>
+ <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>
+ </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 JBoss Developer Studio.</para>
<para>The welcome page is the first page you see when you first launch JBoss Developer Studio. </para>
-
+
<figure>
<title>Welcome to JBoss Developer Studio</title>
<imageobject>
@@ -230,85 +339,105 @@
</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>
-
+ <itemizedlist>
+ <listitem>
+ <para>to get quick access to Getting Started Documentation (guides, tutorials and
+ viewlets)</para>
+ </listitem>
+ </itemizedlist>
+
<figure>
<title>Getting Started Documentation</title>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_6.png"/>
</imageobject>
</figure>
-
+
<itemizedlist>
- <listitem><para>to create new Seam, jBPM Process, JSF or Struts projects using JBDS wizards</para></listitem>
+ <listitem>
+ <para>to create new Seam, jBPM Process, JSF or Struts projects using JBDS wizards</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Create New...</title>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_7.png"/>
</imageobject>
</figure>
-
+
<itemizedlist>
- <listitem><para>to get short description of perspectives that JBDS offers for more productive development</para></listitem>
+ <listitem>
+ <para>to get short description of perspectives that JBDS offers for more productive
+ development</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Perspectives</title>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_8.png"/>
</imageobject>
</figure>
-
- <itemizedlist>
- <listitem><para>to visit JBoss Developer Studio web resources.</para></listitem>
+
+ <itemizedlist>
+ <listitem>
+ <para>to visit JBoss Developer Studio web resources.</para>
+ </listitem>
</itemizedlist>
-
+
<figure>
<title>Web Resources</title>
<imageobject>
<imagedata fileref="images/getting_started/getting_started_9.png" scale="75"/>
</imageobject>
</figure>
-
- <para>Start work with JBoss Developer Studio by clicking on <emphasis><property>Workbench</property></emphasis> button or simply close the welcome page.</para>
-
+
+ <para>Start work with JBoss Developer Studio 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="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>
+ <title>Uninstalling</title>
<itemizedlist>
- <listitem>Make sure JBoss Developer Studio is not running</listitem>
- <listitem>Uninstall your current version of JBoss Developer Studio by running uninstaller</listitem>
-</itemizedlist>
+ <listitem>Make sure JBoss Developer Studio is not running</listitem>
+ <listitem>Uninstall your current version of JBoss Developer Studio by running
+ uninstaller</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>
- </section>
-<section id="FAQ">
- <?dbhtml filename="FAQ.html"?>
- <title>FAQ</title>
- <para>For easy reference to JBoss Developer Studio related questions, our FAQ provides answers to our most "popular" questions.
- The sections of questions are organized by type. </para>
-<!-- <section id="Before_Installing">
+ <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>
+ </section>
+ <section id="FAQ">
+ <?dbhtml filename="FAQ.html"?>
+ <title>FAQ</title>
+ <para>For easy reference to JBoss Developer Studio related questions, our FAQ provides answers to
+ our most "popular" questions. The sections of questions are organized by type. </para>
+ <!-- <section id="Before_Installing">
<title>Before Installing, Tutorials, Examples, Readme Files</title>
<para><emphasis role="bold">I'm looking for examples, do you have any?</emphasis></para>
<para>Yes, simply go to our <ulink url="http://exadel.com/web/portal/products/Tutorials">tutorials page</ulink></para>
@@ -319,74 +448,111 @@
<para><emphasis role="bold">What version of Eclipse does JBoss Developer Studio support?</emphasis></para>
<para>JBoss Developer Studio works with Eclipse 3.3</para>
</section> -->
- <!--<section id="Downloading">
+ <!--<section id="Downloading">
<title>Downloading</title>
<para><emphasis role="bold">Where can I download a copy of JBoss Developer Studio?</emphasis></para>
<para>Go to <ulink url="http://www.redhat.com/developers/jbds/index.html">Download Page</ulink></para>
</section>-->
- <section id="Installation_Issues">
- <title>Installation Issues</title>
- <para><emphasis role="bold">Visual Editor does not start under Linux</emphasis></para>
- <para>Linux users may need to do the following to get the visual editor to work correctly
-on their machines.</para>
+ <section id="Installation_Issues">
+ <title>Installation Issues</title>
+ <para>
+ <emphasis role="bold">Visual Editor does not start under Linux</emphasis>
+ </para>
+ <para>Linux users may need to do the following to get the visual editor to work correctly on
+ their machines.</para>
-<orderedlist>
-<listitem>On Red Hat based Linux distributions install the xpLib.i386 package</listitem>
-<listitem>Type
-<programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
+ <orderedlist>
+ <listitem>On Red Hat based Linux distributions install the xpLib.i386 package</listitem>
+ <listitem>Type <programlisting role="JAVA"><![CDATA[ln -s libstdc++.so.5.0.7 libstdc++.so.5
]]></programlisting>
-</listitem>
-<listitem>and/or use
-<programlisting role="JAVA"><![CDATA[yum install libXp
+ </listitem>
+ <listitem>and/or use <programlisting role="JAVA"><![CDATA[yum install libXp
]]></programlisting>
- </listitem>
-<listitem>Open the JBDS perspective. If you see the Help view open, close it and restart JBDS</listitem>
-<listitem>If none of these work, do the following:
-<itemizedlist>
-<listitem>Clear the Eclipse log file, <emphasis><workspace>\.metadata\.log</emphasis></listitem>
-<listitem>Start Eclipse with the -debug option:
-<programlisting role="JAVA"><![CDATA[eclipse -debug
+ </listitem>
+ <listitem>Open the JBDS perspective. If you see the Help view open, close it and restart JBDS</listitem>
+ <listitem>If none of these work, do the following: <itemizedlist>
+ <listitem>Clear the Eclipse log file,
+ <emphasis><workspace>\.metadata\.log</emphasis></listitem>
+ <listitem>Start Eclipse with the -debug option: <programlisting role="JAVA"><![CDATA[eclipse -debug
]]></programlisting>
-</listitem>
-<listitem>Post the Eclipse log file (<emphasis><workspace>\.metadata\.log</emphasis>) on the forums.</listitem>
-</itemizedlist>
-</listitem>
-</orderedlist>
+ </listitem>
+ <listitem>Post the Eclipse log file
+ (<emphasis><workspace>\.metadata\.log</emphasis>) on the forums.</listitem>
+ </itemizedlist>
+ </listitem>
+ </orderedlist>
- <para><emphasis role="bold">Do I need to have JBoss server installed to run JBoss Developer Studio?</emphasis></para>
- <para>No. JBoss Developer Studio 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.</para>
- <para>If you want to use a different JBoss server installation, after JBoss Developer Studio is installed open Servers View (select <emphasis><property>Window > Show View > Others > Server > Servers</property></emphasis>), then right click on this <emphasis><property>view > New > Server</property></emphasis> and follow the wizards steps to point to another Jboss server installation.</para>
- <para>JBoss Developer Studio works with any servlet container, not just JBoss. For more information on deployment, please see the Deploying Your Application section.</para>
- </section>
- <section id="Importing_Projects">
- <title>Importing Projects</title>
- <para><emphasis role="bold">I have an existing Struts or JSF project. Can I open the project in JBDS?</emphasis></para>
- <para>Yes. From main menu select <emphasis><property>File > Import > Other > JSF Project (or Struts Project)</property></emphasis> and follow wizards steps.</para>
- <para><emphasis role="bold">Can I import a .war file?</emphasis></para>
- <para>Yes. Select <emphasis><property>File > Import > Web > WAR file</property></emphasis>, then follow importing steps.</para>
- </section>
- <section id="Troubleshooting">
- <title>Troubleshooting, Problems, Configuration, Error Messages</title>
- <para><emphasis role="bold">Is it possible to increase the performance of Eclipse after installing your product? My Eclipse now crawls.</emphasis></para>
- <para>JBoss Developer Studio 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:</para>
- <programlisting role="JAVA"><![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
+ <para>
+ <emphasis role="bold">Do I need to have JBoss server installed to run JBoss Developer
+ Studio?</emphasis>
+ </para>
+ <para>No. JBoss Developer Studio 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.</para>
+ <para>If you want to use a different JBoss server installation, after JBoss Developer Studio is
+ installed open Servers View (select <emphasis>
+ <property>Window > Show View > Others > Server > Servers</property>
+ </emphasis>), then right click on this <emphasis>
+ <property>view > New > Server</property>
+ </emphasis> and follow the wizards steps to point to another Jboss server installation.</para>
+ <para>JBoss Developer Studio works with any servlet container, not just JBoss. For more
+ information on deployment, please see the Deploying Your Application section.</para>
+ </section>
+ <section id="Importing_Projects">
+ <title>Importing Projects</title>
+ <para>
+ <emphasis role="bold">I have an existing Struts or JSF project. Can I open the project in
+ JBDS?</emphasis>
+ </para>
+ <para>Yes. From main menu select <emphasis>
+ <property>File > Import > Other > JSF Project (or Struts
+ Project)</property>
+ </emphasis> and follow wizards steps.</para>
+ <para>
+ <emphasis role="bold">Can I import a .war file?</emphasis>
+ </para>
+ <para>Yes. Select <emphasis>
+ <property>File > Import > Web > WAR file</property>
+ </emphasis>, then follow importing steps.</para>
+ </section>
+ <section id="Troubleshooting">
+ <title>Troubleshooting, Problems, Configuration, Error Messages</title>
+ <para>
+ <emphasis role="bold">Is it possible to increase the performance of Eclipse after installing
+ your product? My Eclipse now crawls.</emphasis>
+ </para>
+ <para>JBoss Developer Studio 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:</para>
+ <programlisting role="JAVA"><![CDATA[-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
]]></programlisting>
-
- <para><emphasis role="bold">How can I add my own tag library to the JBoss Tools Palette?</emphasis></para>
- <para>See <ulink url="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag Libraries</ulink> in JBossJSFTools Guide.</para>
- <para><emphasis role="bold">I see the Oracle ADF Faces component library tags in the JBoss Tools Palette, but I can't seem to find the libraries for ADF. How do I use this component library with JBDS?</emphasis></para>
- <para>See <ulink url="http://www.redhat.com/developers/jbds/JSFTools/JavaServerFacesSupport.htm...">Adding Support for the Oracle ADF Components Library</ulink> in the JBDS User Guide.</para>
+
+ <para>
+ <emphasis role="bold">How can I add my own tag library to the JBoss Tools Palette?</emphasis>
+ </para>
+ <para>See <ulink url="AddingCustomJSFTagsToTheRedHatPalette7433">Adding Tag Libraries</ulink> in
+ JBossJSFTools Guide.</para>
+ <para>
+ <emphasis role="bold">I see the Oracle ADF Faces component library tags in the JBoss Tools
+ Palette, but I can't seem to find the libraries for ADF. How do I use this component
+ library with JBDS?</emphasis>
+ </para>
+ <para>See <ulink
+ url="http://www.redhat.com/developers/jbds/JSFTools/JavaServerFacesSupport.htm..."
+ >Adding Support for the Oracle ADF Components Library</ulink> in the JBDS User Guide.</para>
+ </section>
</section>
-</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>Download: <ulink url="http://www.redhat.com/developers/rhds/">JBDS Download</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>Download: <ulink url="http://www.redhat.com/developers/rhds/">JBDS Download</ulink></para>
+ </section>
</chapter>
-
Modified: trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml
===================================================================
--- trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml 2007-12-17 12:15:04 UTC (rev 5325)
+++ trunk/documentation/guides/userguide/GettingStartedGuide/en/modules/manage.xml 2007-12-17 12:41:00 UTC (rev 5326)
@@ -11,11 +11,12 @@
</keywordset>
</chapterinfo>
<title>Manage JBoss AS from JBoss Developer Studio</title>
+ <para>In this chapter we'll focus more on how to operate the JBoss AS from JBoss Developer Studio.</para>
<para>JBoss Developer Studio ships with <property>JBoss EAP v.4.2</property> bundled. When you followed the default installation of JBoss Developer Studio, 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.</para>
<section id="JBossbundled">
<?dbhtml filename="JBossbundled.html"?>
<title>How to Manage the JBoss AS Bundled in JBDS</title>
- <para></para>
+ <para>This section covers the basics of working with the JBoss server directly supported by JBDS via bundled plug-in.</para>
<section id="StartingServer">
<?dbhtml filename="StartingServer.html"?>
<title>Starting JBoss server</title>
@@ -248,4 +249,5 @@
</section>
</section>
+ <para>Now, we are ready to create the first web application.</para>
</chapter>
17 years
JBoss Tools SVN: r5325 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2007-12-17 07:15:04 -0500 (Mon, 17 Dec 2007)
New Revision: 5325
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/.classpath
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties
Log:
http://jira.jboss.com/jira/browse/JBIDE-1449
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/.classpath
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/.classpath 2007-12-17 11:51:12 UTC (rev 5324)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/.classpath 2007-12-17 12:15:04 UTC (rev 5325)
@@ -3,8 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="lib" path="lib/ant-antlr.jar"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
- <classpathentry kind="lib" path="lib/antlr-runtime.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2007-12-17 11:51:12 UTC (rev 5324)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/META-INF/MANIFEST.MF 2007-12-17 12:15:04 UTC (rev 5325)
@@ -16,7 +16,5 @@
org.mozilla.xpcom
Bundle-Vendor: Red Hat, Inc.
Eclipse-LazyStart: true
-Bundle-ClassPath: lib/ant-antlr.jar,
- lib/antlr.jar,
- lib/antlr-runtime.jar,
+Bundle-ClassPath: lib/antlr.jar,
.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties 2007-12-17 11:51:12 UTC (rev 5324)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/build.properties 2007-12-17 12:15:04 UTC (rev 5325)
@@ -4,9 +4,7 @@
.,\
plugin.xml,\
lib/,\
- lib/ant-antlr.jar,\
lib/antlr.jar,\
- lib/antlr-runtime.jar,\
templates/
src.includes = templates/,\
src/
17 years