Skip to content

Commit acec3a5

Browse files
committed
jjs options
1 parent 7903405 commit acec3a5

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

org.nodeclipse.jjs/src/org/nodeclipse/jjs/launch/LaunchConfigurationDelegate.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ public void launch(ILaunchConfiguration configuration, String mode,
6060
}
6161
cmdLine.add(jjsPath);
6262

63+
String jjsOptions= preferenceStore.getString(PreferenceConstants.JJS_OPTIONS);
64+
if(!jjsOptions.equals("")) {
65+
String[] sa = jjsOptions.split(" ");
66+
for(String s : sa) {
67+
cmdLine.add(s);
68+
}
69+
}
70+
6371
if (isDebugMode) {
6472
//TODO research how to debug
6573
}

org.nodeclipse.jjs/src/org/nodeclipse/jjs/preferences/JJSPreferencePage.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.eclipse.jface.preference.BooleanFieldEditor;
44
import org.eclipse.jface.preference.FieldEditorPreferencePage;
55
import org.eclipse.jface.preference.FileFieldEditor;
6+
import org.eclipse.jface.preference.StringFieldEditor;
67
import org.eclipse.ui.IWorkbench;
78
import org.eclipse.ui.IWorkbenchPreferencePage;
89
import org.nodeclipse.ui.preferences.PreferenceConstants;
@@ -15,6 +16,7 @@ public class JJSPreferencePage extends FieldEditorPreferencePage implements IWor
1516

1617
private FileFieldEditor jjsPath;
1718
private BooleanFieldEditor jjsJustJJS;
19+
private StringFieldEditor jjsOptions;
1820

1921
public JJSPreferencePage(){
2022
super(GRID);
@@ -29,12 +31,15 @@ public void init(IWorkbench workbench) {
2931

3032
@Override
3133
protected void createFieldEditors() {
32-
jjsPath = new FileFieldEditor(PreferenceConstants.JJS_PATH, "`jjs` path:", getFieldEditorParent());
33-
addField(jjsPath);
34+
jjsJustJJS = new BooleanFieldEditor(PreferenceConstants.JJS_JUST_JJS,
35+
"just `jjs` (find `jjs` on PATH. Useful when there are 2 or more JDK 8 instances)", getFieldEditorParent());
36+
addField(jjsJustJJS);
3437

35-
jjsJustJJS = new BooleanFieldEditor(PreferenceConstants.JJS_JUST_JJS,
36-
"just `jjs` (find `jjs` on PATH. Useful when there are 2 or more JDK 8 instances)", getFieldEditorParent());
37-
addField(jjsJustJJS);
38+
jjsPath = new FileFieldEditor(PreferenceConstants.JJS_PATH, "`jjs` path:", getFieldEditorParent());
39+
addField(jjsPath);
40+
41+
jjsOptions = new StringFieldEditor(PreferenceConstants.JJS_OPTIONS, "jjs options (jjs -h):", getFieldEditorParent());
42+
addField(jjsOptions);
3843

3944
}
4045

org.nodeclipse.ui/src/org/nodeclipse/ui/preferences/PreferenceConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public class PreferenceConstants {
3939
public static final String PHANTOMJS_DEBUG_AUTORUN = "phantomjs_debug_autorun";
4040
public static final String JJS_PATH = "jjs_path";
4141
public static final String JJS_JUST_JJS = "jjs_just_jjs";
42+
public static final String JJS_OPTIONS = "jjs_options";
4243
public static final String MONGODB_SHELL_PATH = "mongodb_shell_path";
4344
public static final String MONGODB_SHELL_OPTIONS = "mongodb_shell_options";
4445

0 commit comments

Comments
 (0)