Thursday, May 28, 2009

[New in Eclipse 3.5] VM Arguments can be now imported to Target Definition

The Target Definitions have environment settings which are used as template to create launch configurations. One such setting is the VM Arguments (discussed in more detail here). The VM Arguments are used to tune the JVM and one of the most commonly used arguments are -Xms and -Xmx (minimum and maximum heap size). Thus, if a heap size is specified, it will then be used to initialize the launch configurations. That is, the same VM arguments are copied.

Import Arguments wizard
In 3,5, the VM Arguments section comes with an Import Arguments wizard. It collects and displays VM arguments from all the bundle containers that form that particular target definition. A general assumption used to be that the VM arguments will be reflected in the target and launch configurations automatically. Because there could be conflicting values, Eclipse can not be sure which one to pick. That is why the arguments were left at developer's discretion. Since the expectation was to get the same values for arguments, we now have the import wizard that simplifies this copy-paste.

The Import Argument wizard is available both on Environment page of Target Editor as well as Arguments tab of  Edit Target Definition wizard.

Arguments section on Environment page of Target Editor
The Edit Target Definition wizard gets invoked when "Edit..." button is clicked on Target Preference page.

Import Arguments wizard

Clicking OK on Import Arguments wizard inserts the selected arguments in the arguments text box. It does not checks if they were already present.

No comments:

Post a Comment