OpenOn let's you easily navigate through your project without using the Package Explorer view (project tree). With OpenOn, you can simply click on a reference to another file and that file will be opened.
OpenOn is available for the following files:
XML Files
JSP Pages
Press and hold down the Ctrl key. As you move the mouse cursor over different file references in the file, they display an underline. When you have the mouse cursor over the name of the file you want to open, click and the file will open in its own editor. In this example the managed bean NameBean will open.
This is the result of using OpenOn.
You can also try OpenOn with defined attributes.
You can also open any JSP pages.
OpenOn is also very useful in JSP pages. It will allow you to quickly jump to the reference instead of having to hunt around in the project structure.
You can easily open the imported property files.
Use OpenOn to open a CSS file used with a JSP page:
Open managed beans:
For JSP files in a JSF project, you can also easily open the navigation rules by applying OpenOn to the JSF tag for the navigation outcome:
Content assist is available when working with
JSF project files
Struts project files
JSP files
When working with JSF project in Red Hat Developer Studio, you can use various Content Assist features while developing:
Content Assist for XML, JSP and JSF configuration files
Content Assist based on project data
Content Assist with graphical JSF editor
At any point when working with any XML, JSP and JSF configuration files Content Assist is available to help you. Simply type Ctrl-Space to see what is available.
Content Assist for JSF configuration file:
Content Assist for JSF JSP file:
Content Assist for other JSF XML project files (web.xml shown):
Red Hat Developer Studio takes Content Assist to the next level. Red Hat Developer Studio will constantly scan your project and you will be able to insert code into the JSP page from your project that includes:
Values from Property files
Managed beans attributes
Navigation Rule Outcomes
The first screen shot shows how to insert message from a Properties files. You simply put the cursor inside the value attribute and press Ctrl-Space. Red Hat Developer Studio will scan your project and show a list of possible values to insert.
In the following screen shot we are inserting a Managed bean attribute value. Again, by simply clicking Ctrl-Space, Red Hat Developer Studio will show a list of all possible values that you can insert:
Once you select a Managed bean, it will show you a list of all available attributes for the selected Managed bean (userBean).
Code Assist based on project data will also prompt you for navigation rules that exist in your JSF configuration file.
Here is what you need to do to add project based code assist to a custom component added in Red Hat Developer Studio:
Create a new file in <RedHatDeveloperStudio>\eclipse\plugins\com.exadel.prompting.knowledgebase_7.1.0\schemas\tld. For example call it JeniaFaces.xml
Here is a sample code snipped that adds code assist to the component you mention above:
<?xml version="1.0" encoding="UTF-8"?>
<Schema location="" prefix="jdt" uri="http://www.jenia.org/jsf/dataTools">
<ElementType bodyContent="refused" content="mixed" endTag="required"
name="singleRowSelector" startTag="required">
<AttributeType name="selection" required="true">
<proposal type="jsfVariables"/>
<proposal type="beanProperty">
<param name="type" value="java.lang.String"/>
</proposal>
</AttributeType>
<attribute type="selection"/>
</ElementType>
</Schema>
Adds code assist for JSF pre-defined objects, such as value="#{param}":
<AttributeType ...>
<proposal type="jsfVariables"/>
</AttributeType>
Adds bundle resource (property file) code assist:
<AttributeType ...>
<proposal type="bundleProperty"/>
</AttributeType>
Adds managed bean property code assist:
<AttributeType ...>
<proposal type="beanProperty"/>
</AttributeType>
Adds managed bean property but with a specified type:
<AttributeType ...>
<proposal type="beanProperty">
<param name="type" value="java.lang.Boolean"/>
</proposal>
</AttributeType>
Adds managed bean method with a signature:
<AttributeType ...>
<proposal type="beanMethodBySignature">
<param name="paramType" value="javax.faces.context.FacesContext"/>
<param name="paramType" value="javax.faces.component.UIComponent"/>
<param name="paramType" value="java.lang.Object"/>
<param name="returnType" value="void"/>
</proposal>
</AttributeType>
Restart Eclipse. You should now have code assist for the component. The new XML file will be copied to the workspace.
Red Hat Developer Studio offers the flexibility to edit any files in either source or extra visual modes at the same time.
The project is yours and so is the source. Red Hat Developer Studio provides you many different graphical editors to speed your application development. At the same time, you always have full control over all project source files. Any changes you make in the source view, will immediately appear in the graphical view.
The JSF configuration file editor has three views: Diagram, Tree and Source. All views are synchronized, you can edit the file in any view.
The same applies to all other Red Hat Developer Studio editors.
Web XML editor is shown. Web XML editor has a graphical view (Tree) and source (Source).
Red Hat Developer Studio TLD file editor shown in Tree view. At any point you can edit the source by going switching to Source view.
The Struts configuration file editor has three views: Diagram, Tree and Source. All views are synchronized, you can edit the file in any view.
Source view. Any changes here will immediately appear in all other views.