SoftSlate Commerce
Home » Documentation » HTML Documentation

Useful Eclipse Plugins

One of the best things about Eclipse is the vast number of plug-ins being developed for it. Unfortunately, the wide variety of plug-ins also represents a challenge, because it can be hard to find the right one for the job sometimes.

Following are some of the plug-ins we've found to be the most useful (as of the time of this writing). If you invest a little time up front installing and experimenting with these and other tools like them, chances are you'll save a lot more time in the long run by leveraging them to become more productive.

As of this writing our development team using the Eclipse Web Tools Platform that is distributed along with their "Eclipse IDE for Java EE Developers" package. It is not so much a plug in as a platform that come bundled with the installation download. It includes JSP syntax highlighting and JSP validation, other forms of validation and many other features.

This is a powerful (and very large) set of over 200 Eclipse plug-ins that assist you with Java development of all kinds. A MyEclipse license is available as a yearly subscription (the rates are reasonable), from http://www.myeclipseide.com. Among the most useful tools for SoftSlate Commerce development are:

  • Support for editing JSP pages, including syntax highlighting, JSP tag content assist (by pressing CTRL-space), on-the-fly compilation (so you can see any errors before having to test them in a browser), and automatic formatting and indentation.
  • A Struts configuration file editor that provides a "Design View", allowing you to view the Struts action mappings in a flow chart format.
  • A database browser, which allows you to navigate the database and make manual updates to it through a visual GUI interface, all from within Eclipse.

As of this writing, it is a bit tricky to get MyEclipse set up with an existing application's code base, with all its capabilities enabled. (It is much easier to start a new project from scratch.) Following are our recommendations for getting your Eclipse project set up as a MyEclipse Struts project:

  1. Right-click on your project in Eclipse, and select MyEclipse -> Add Web project capabilities.
  2. In the subsequent wizard, uncheck the "Create web.xml" checkbox, and leave the "Add J2EE libs to build path" checkbox checked before continuing.
  3. After the Web project capabilities have been added, optionally delete the META-INF directory MyEclipse created.
  4. Next, add Struts capabilities to the project. But before doing so, make a back-up of the WEB-INF/web.xml. MyEclipse will overwrite that file when you add Struts capabilities and you'll need to restore it.
  5. Right-click on your project in Eclipse, and select MyEclipse -> Add Struts capabilities .
  6. In the subsequent wizard, select "Struts 1.2", enter /core/struts-config.xml for the Struts configuration file, and uncheck the install Struts JARs and TLDs options.
  7. After the Struts capabilities have been added, restore the original WEB-INF/web.xml file that you had backed up.
  8. Optionally delete the com.yourcompany.struts Java package created by the wizard.
  9. We suggest turning off HTML, JavaScript, and XML validation. Do so from the Window -> Preferences -> MyEclipse -> Validation screen.
  10. We have found that for MyEclipse to recognize the JSTL and Struts tags in JSP files, you must restart Eclipse after adding the Web project and Struts capabilities.

[Note]Note

To view any of the application's Struts configuration files visually using the MyEclipse Struts Editor, right-click on the configuration file, and select "MyEclipse Struts Editor" from the menu.

Hibernate provides several Eclipse plug-ins as part of their Hibernate Tools project ( http://www.hibernate.org/253.html). Among the most useful of these for SoftSlate Commerce development is the Hibernate Console. This is an Eclipse perspective that allows you to access your database through Hibernate. It is a great way to develop in the Hibernate Query Language (HQL), because it will translate your HQL to SQL, allowing you to test your queries against your database directly.

Struts Console is a popular program for validating and viewing an application's Struts configuration files. It provides a very basic (not a flow chart) visual representation of the file, which you can also use to edit it. A plug-in for Eclipse is available from http://www.jamesholmes.com/struts/console/.

If you're looking for a simple tool to provide syntax highlighting and content assist for JSP editing, this is a lightweight plug-in that might serve your needs just fine. It is available free of charge from http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=EclipseHTMLEditor . Note that this plug-in has a couple of dependencies that must be installed beforehand.

After installing the Amateras plug-in, you might try the following to activate content assist automatically from within JSP tags. In Eclipse, navigate to Window -> Preferences -> Amateras -> Code Assist , and add a space character to the "Auto activation trigger" field. This will pull up the content assist menu as soon as you hit a space character from within a JSP tag.

Copyright © 2009-2017 SoftSlate, LLC. All Rights Reserved.

Powered by SoftSlate Commerce

Foraker Design