Commit 85c79070 authored by Adam Knapp's avatar Adam Knapp
Browse files

Minor corrections



Change-Id: I6d381cb9fb4e7b119ec062e7322c55a640017602
Signed-off-by: default avatarAdam Knapp <adam.knapp@sigmatechnology.se>
parent ec6b755f
......@@ -104,7 +104,7 @@ public final class MakefileCreationData {
{ "Library", DefaultTarget.LIBRARY.toString() } };
}
}
public enum DefaultJavaTarget {
CLASS, EXECUTABLE, JAR;
......@@ -375,7 +375,7 @@ public final class MakefileCreationData {
}
return name.toString();
}
public static String getDefaultJavaTargetName(final IProject project, final boolean isAbsolute) {
String name = getDefaultTargetExecutableName(project, isAbsolute);
return "java_bin" + File.separator + name.replace("bin" + File.separator, "").replace(".exe", "") + ".jar";
......
......@@ -36,7 +36,7 @@ import org.eclipse.ui.dialogs.PropertyPage;
public class JavaCreationTab {
private static final String JAVA_CREATION_TAB_TITLE = "Java target creation attributes";
private final IProject project;
private final PropertyPage page;
private Composite automaticBuildPropertiesComposite;
......@@ -48,24 +48,24 @@ public class JavaCreationTab {
public static final String TEMPORAL_JAVA_TARGET = ProductConstants.PRODUCT_ID_DESIGNER + ".temporalJavaTarget";
private Button generateStartShScript;
private Button generateStartBatScript;
public JavaCreationTab(final IProject project, final PropertyPage page) {
this.project = project;
this.page = page;
}
public JavaCreationTab(final IProject project) {
this.project = project;
this.page = null;
}
/**
* Disposes the SWT resources allocated by this tab page.
*/
public void dispose() {
}
/**
* Creates and returns the SWT control for the customized body of this
* TabItem under the given parent TabFolder.
......@@ -79,7 +79,7 @@ public class JavaCreationTab {
creationAttributesTabItem = new TabItem(tabFolder, SWT.BORDER);
creationAttributesTabItem.setText(JAVA_CREATION_TAB_TITLE);
creationAttributesTabItem.setToolTipText("Settings controlling the generation of Java binaries.");
automaticBuildPropertiesComposite = new Composite(tabFolder, SWT.MULTI);
automaticBuildPropertiesComposite.setEnabled(true);
automaticBuildPropertiesComposite.setLayout(new GridLayout());
......@@ -87,7 +87,7 @@ public class JavaCreationTab {
defaultJavaTargetComposite = new Composite(automaticBuildPropertiesComposite, SWT.NONE);
defaultJavaTarget = new ComboFieldEditor(MakefileCreationData.DEFAULT_TARGET_PROPERTY, "Default target:",
MakefileCreationData.DefaultJavaTarget.getDisplayNamesAndValues(), defaultJavaTargetComposite);
defaultJavaTarget.setPropertyChangeListener (new IPropertyChangeListener() {
@Override
public void propertyChange(final PropertyChangeEvent event) {
......@@ -128,7 +128,7 @@ public class JavaCreationTab {
creationAttributesTabItem.setControl(automaticBuildPropertiesComposite);
return creationAttributesTabItem;
}
/**
* Checks the properties of this page for errors.
*
......@@ -148,7 +148,7 @@ public class JavaCreationTab {
}
return true;
}
/**
* Loads the properties from the property storage, into the user
* interface elements.
......@@ -190,7 +190,7 @@ public class JavaCreationTab {
performDefaults(project);
}
}
/**
* Saves the properties to the property storage, from the user interface
* elements.
......@@ -220,7 +220,7 @@ public class JavaCreationTab {
}
return true;
}
public void performDefaults(final IProject project) {
defaultJavaTarget.setSelectedValue(MakefileCreationData.DefaultJavaTarget.getDefault().toString());
temporalJavaTargetFileFieldEditor.setStringValue(MakefileCreationData.getDefaultJavaTargetName(project, false));
......@@ -228,7 +228,7 @@ public class JavaCreationTab {
generateStartBatScript.setSelection(MakefileCreationData.GENERATE_START_BAT_SCRIPT_DEFAULT);
updateDefaultJavaTarget();
}
/**
* Sets the provided value, on the provided project, for the provided
* property.
......@@ -259,7 +259,7 @@ public class JavaCreationTab {
project.setPersistentProperty(qualifiedName, value);
}
}
/**
* Enables or disables the textbox of Java target and the checkboxes according to the selected value.
* If Class is selected, the textbox is disabled.
......@@ -278,11 +278,11 @@ public class JavaCreationTab {
generateStartBatScript.setEnabled(true);
}
}
private boolean isClassSelected() {
return defaultJavaTarget.getActualValue().equals(MakefileCreationData.DefaultJavaTarget.CLASS.toString());
}
private boolean isExecutableSelected() {
return defaultJavaTarget.getActualValue().equals(MakefileCreationData.DefaultJavaTarget.EXECUTABLE.toString());
}
......
......@@ -20,8 +20,10 @@ from Eclipse as Java projects and executing exported jar files.
=== Executing TITAN Java Projects from Eclipse
To execute TITAN Java projects inside Eclipse requires the creation of a Launch configuration. For TITAN Java Projects the TITAN Native Java launch configuration mode is necessary that supports both the single and parallel execution mode. Launch configurations can be created, modified and deleted in the *Create, manage, and run configuration* dialog window. It can be opened in the numerous ways as detailed in <<creating-launch-configuration,Creating Launch Configuration>>:
To execute TITAN Java projects inside Eclipse requires the creation of a Launch configuration. For TITAN Java Projects the TITAN Native Java launch configuration mode is necessary that supports both the single and parallel execution modes. Launch configurations can be created, modified and deleted in the *Create, manage, and run configuration* dialog window. It can be opened in numerous ways as detailed in <<creating-launch-configuration,Creating Launch Configuration>>:
* using the *Run as* option in pop-up menu of the *Project explorer* (<<Figure-4-F7,Figure 7>>),
* using the *Launch Commands* on the toolbar (<<Figure-4-F8,Figure 8>>).
Furthermore, a default launch configuration can be created using launch shortcuts. It works the same way as described in <<creating-launch-configuration,Creating Launch Configuration>>, however the TITAN Native Java launching mode requires less option, i.e.:
......@@ -45,7 +47,7 @@ On this page it is possible to set:
* The name of the project.
+
Filling this field is mandatory. The entered name is checked for validity. The project's root folder is used during the automatically filling of the other fields. The path variables are relative to the project's root supporting the portability of the project as whole. If you enter the name of a valid project with TITAN nature (or select one by browsing, as can be seen <<Figure-13,below>>), the configuration file will be filled in automatically.
Filling this field is mandatory. The entered name is checked for validity. The project's root folder is used during the automatically filling of the other fields. The path variables are relative to the project's root supporting the portability of the project as whole. If you enter the name of a valid project with TITAN nature (or select one by browsing, as can be seen on <<Figure-13,Figure 13>>), the configuration file will be filled in automatically.
NOTE: It is encouraged to use the *Browse Workspace* button to select a valid project from the workspace that simplifies the filling of the other fields, as well as reduces the possible mistakes.
......@@ -72,7 +74,7 @@ During the filling Eclipse might ask for saving the modification.
Sometimes Eclipse automatically switches to one of the additionally created launch configuration after saving the TITAN Native Java launch configuration.
====
The functionality of other tab pages of the of the TITAN Native Java launch configuration matches the ones for JNI launch mode, see <<creating-launch-configuration,Creating Launch Configuration>>.
The functionality of other tab pages of the TITAN Native Java launch configuration matches the ones for JNI launch mode, see <<creating-launch-configuration,Creating Launch Configuration>>.
=== Executing TITAN Java project via exported jar files.
......@@ -86,12 +88,12 @@ To export a .jar file from a TITAN Java project:
2. In the right click menu, select *Export...*.
3. In the window appearing select *Java / Runnable JAR file* and than *Next* (see <<Figure-7-F46,Figure 49>>).
3. In the window appearing select *Java / Runnable JAR file* and than *Next* (see <<Figure-7-F46,below>>).
+
[[Figure-7-F46]]
image::images/7_F46.png[title="Export wizard"]
4. Configure the export (see <<Figure-7-F47,Figure 50>>).
4. Configure the export (see <<Figure-7-F47,below>>).
+
[[Figure-7-F47]]
image::images/7_F47.png[title="Export wizard for JAR file"]
......
......@@ -44,7 +44,7 @@ public final class Runtime_Parallel_main {
try {
final int MC_port = Integer.parseInt(argv[1]);
TTCN_Snapshot.initialize();
TTCN_Logger.initialize_logger();
TTCN_Logger.set_start_time();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment