33import org .eclipse .jface .preference .BooleanFieldEditor ;
44import org .eclipse .jface .preference .FieldEditorPreferencePage ;
55import org .eclipse .jface .preference .FileFieldEditor ;
6+ import org .eclipse .jface .preference .StringFieldEditor ;
67import org .eclipse .ui .IWorkbench ;
78import org .eclipse .ui .IWorkbenchPreferencePage ;
8- import org .nodeclipse .ui .Activator ;
9- import org .nodeclipse .ui .preferences .PreferenceConstants ;
9+ import org .nodeclipse .java .avatarjs .Activator ;
1010
1111/**
1212 * @author Paul Verest
1313 * @since 0.11 moved from NodePreferencePage
1414 */
1515public class AvatarjsPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
1616
17- private FileFieldEditor jjsPath ;
18- private BooleanFieldEditor jjsJustJJS ;
17+ private FileFieldEditor javaPath ;
18+ private BooleanFieldEditor javaJustJava ;
19+ private StringFieldEditor javaOptions ;
20+ private StringFieldEditor javaOptionsToRunWithAvatarjs ;
1921
2022 public AvatarjsPreferencePage (){
2123 super (GRID );
22- // ! uses .ui
2324 setPreferenceStore (Activator .getDefault ().getPreferenceStore ());
24- setDescription ("Java 8 Nashorn jjs settings" );
25+ setDescription ("Java 8 Avatar.js settings" );
2526 }
2627
2728 @ Override
@@ -30,13 +31,19 @@ public void init(IWorkbench workbench) {
3031
3132 @ Override
3233 protected void createFieldEditors () {
33- jjsPath = new FileFieldEditor (PreferenceConstants .JJS_PATH , "`jjs` path:" , getFieldEditorParent ());
34- addField (jjsPath );
35-
36- jjsJustJJS = new BooleanFieldEditor (PreferenceConstants .JJS_JUST_JJS ,
37- "just `jjs` (find `jjs` on PATH. Useful when there are 2 or more JDK 8 instances)" , getFieldEditorParent ());
38- addField (jjsJustJJS );
39-
34+ javaPath = new FileFieldEditor (AvatarjsConstants .JAVA_PATH , "Java path:" , getFieldEditorParent ());
35+ addField (javaPath );
36+
37+ javaJustJava = new BooleanFieldEditor (AvatarjsConstants .JAVA_JUST_JAVA ,
38+ "just `java` (find `java` on PATH. Useful when there are 2 or more JDK 8 instances)" , getFieldEditorParent ());
39+ addField (javaJustJava );
40+
41+ javaOptions = new StringFieldEditor (AvatarjsConstants .JAVA_OPTIONS , "`Java options:" , getFieldEditorParent ());
42+ addField (javaOptions );
43+
44+ javaOptionsToRunWithAvatarjs = new StringFieldEditor (AvatarjsConstants .JAVA_OPTIONS_TO_RUN_WITH_AVATARJS ,
45+ "`Java options to run with Avatar.js:" , getFieldEditorParent ());
46+ addField (javaOptionsToRunWithAvatarjs );
4047 }
4148
4249}
0 commit comments