|
Java IDE: Frequently Asked Questions (FAQ) |
Questions answered in this FAQ cover such topics as:
Click on a title to show/hide the links for that area.
Click here to show/hide all links for all areas.
If you have questions you believe should go in here, let us know and we'll try to get them answered. Please submit it to Java IDE Core group.
|
Table of Contents |
What is the goal of the new Java development on basis of the Open Source Eclipse?
Q: What is Eclipse?
Eclipse is an Open Source product of IBM. Eclipse includes first a Java development environment and second a tool integration framework.
Q: I need further information about Eclipse. What can I do?
Have a look at the Eclipse homepage
http://www.eclipse.org.What is the goal of the new Java development on basis of the Open Source Eclipse?
Our customers do expect a Java development environment with high-quality features comparable to those of the ABAP Workbench. With Borland's JBuilder Enterprise Version and SAP tool add-ons, SAP was able to do the first steps towards Java development support for SAP application developers and for all customers. The decision towards Java as second development platform at SAP made a quick decision for a certain Java develoment environment necessary. JBuilder with its rich set of functionality, an open tool API and a high acceptance on the market was the most suitable solution to rapidly build SAP specific tools on it.
The next step for SAP towards a Java environment with a development infrastructure that our customers are used to from the R/3 world and that they also do expect from SAP in the Java world, is Eclipse, IBM's Open Source. Eclipse will be the foundation for all further development activities in the Java framework area. In the near future, we will be able - among other things - to build, to deploy, to make versions, and to transport Java development objects in a comfortable way.
I have heard that there is a partnership between SAP and TogetherSoft. Is that true?
Yes, TogetherSoft will support us at enhancing the framework and extending the development environment. TogetherSoft is a well-known provider of graphical modelling tools as well as of graphically oriented development tools in the Java environment.
If you would like to get some information about TogetherSoft and its products, read
Q: I have ordered JBuilder some months ago. What do I have to consider for my current Java project ?
You should use JBuilder Enterprise if you either need the enhanced J2EE support that comes with JBuilder Enterprise, or if you have the need to use the SAP tools that are available for usage from within JBuilder: Web Dynpro version 0.5, JSP Insight, Internationalization support, Perforce integration. In any other cases, please start with the new IDE Eclipse.
Because we do know that first several projects also can use Eclipse instead of JBuilder, and second we need some JBuilder licenses back to hand them over to Java projects that urgently need JBuilder, we have started to take your licences back: You can create a CSN message with component SR-ORDER-SOFTWARE. Please add the following information to the long text: name, user, user-id, company, cost center, cost center manager, date of deletion date for your JBuilder licence. You then will get a deinstallation description. You will completely get back your JBuilder costs.
Q: How do I store project data outside the workspace?
If you use the default settings when you create a project, Eclipse creates a project folder inside the workspace folder. However, it is often better to separate the project data physically from the workspace, which acts purely as a metadata repository. To do this you can enter a different path to be used when saving the project, when you create it.
Procedure
When you create your project, uncheck the Use default field, and enter the path you want to use for your project data in the Directory field.

Q: How do I limit the resources displayed using filters?
You can use working sets to limit the number of projects, packages, or other resources to a predefined selection. Working sets are additive filters that you can apply to the Packages view.
Prerequisites
You are currently displaying the Packages view.
Procedure
Result
If you select the created working set again, the current Packages view displays only the resources assigned to the working set.
Over time, the number of projects you have created in Eclipse may grow considerably – possibly including projects you no longer need. You may wish to close these projects just as you can in other IDEs, such as JBuilder.
Prerequisites
Procedure
Result
If you now switch to the Packages view, it no longer displays this project. If any of the classes or interfaces in this project are used by other open projects, the Eclipse IDE displays an error when you switch to the Packages view.
![]()
To restore a closed project, choose that project folder in the Navigator, then choose Open Project.
Q: How can I use existing resources in Eclipse?
You may already projects, Java files, or other resources created in another Java IDE that you want to reuse in Eclipse.
The best way to do this is to create a Java project and copy the files you want into it, in one of two ways:
Q: What Editor settings should we agree on collectively in our team of developers?
It is advisable for a team to agree on some of the Editor settings, so that everyone uses the same source code formatting.
This process is important. Otherwise, if you are working with Perforce, changes to the formatting may be interpreted as changes to the source in some circumstances.
To do this, either use the default settings for the Code Formatter or agree on the settings you all use for tab length, spaces, maximum line length, and so on. (The Code Formatter is the Eclipse equivalent to the Pretty Printer in the ABAP Editor.)
To change the Code Formatter settings, choose Window
® Preferences ® Java ® Code Formatter.
Q: How do I navigate to where an element is defined?
You want to navigate from where an element (such as a method) is used to where it is defined – possibly in a different class (that is, backwards navigation).
To do this, highlight the relevant element and choose F3.
Q: How do I navigate to the previous editor using a keyboard shortcut?
Use the key combination Ctrl+F6. The Eclipse IDE displays a list of Java Editors open during the current session. The most recently used editor is highlighted. When you release the key combination, Eclipse opens this editor.
import statements?
Until now, you have been editing a Java file without considering the external classes or interfaces you need to import into the Java file. If you use the Import Organizer, Eclipse performs this task for you.
To call the Organizer, position the cursor anywhere in the Java Editor and choose Source ® Organize Imports from the context menu.
The Eclipse IDE generates the relevant imports, which are then included in the source code in the editor.
Q: How do I use code templates (intelli sens)?
Code templates in the Eclipse IDE provide considerable support when you are editing Java code or Javadoc comments. When you enter patterns in the Java Editor, valid variable names, or in some cases values, are predefined. Using the tab key, you can navigate to the predefined variable name or value you want and adapt it to your own needs.
Prerequisites
To use a template, you need its name. For a list of all available templates, choose Window
® Preferences ® Java ® Templates.Procedure
In the editor, enter the name of the template or the first few letters of the template name (for example,
for) and choose Ctrl+<space>.Result
In our example, a template for the for loop is generated, along with its predefined values.
You can now navigate using the tab key to the predefined variable name or value you want, and then change it. Q: How do I create my own templates? You can extend the set of templates delivered with the Eclipse IDE and create your own templates for Java code or Javadoc comments. Procedure The system displays a list of all the templates assigned to the current workspace.
® Preferences ® Java ® Templates.
Example

Result
If you insert our example,
ifinstanceof in the Editor, the following code is generated:
![]()
The new template is managed in Eclipse as a separate XML file. You can now offer your new pattern to your colleagues quite simply. Use the Import function from the template list to insert the relevant XML file.
Q: How do I display Java language references (Javadoc)?
Prerequisites
The Javadoc files are stored as unpacked HTML files in the directory to which you want to refer.
![]()
When you unpack the documentation for the Java 2 SDK
docs (the directory used to store the documentation) is created automaticallyProcedure
Example:
file:/C:/j2sdk1.3/docs/api/
Result
If you now select an element (such as a Java class or method stored in
rt.jar) in the Java Editor, and then choose SHIFT+F2, the Java reference is displayed in a new browser window.
Q: How can I save the contents of the Editor without compiling?
If you use the Eclipse Workbench default settings, the Java resources are compiled automatically whenever you save (Autobuild Compiler).
In some cases this is a disadvantage, since the resources involved can be assumed to be essentially error-free. Specifically, in projects that use a large number of resources created in another IDE, for example, or that originated in another project, it is advisable simply to save these resources without compiling them.
Procedure
