1+ package org .knime .ext .jruby .preferences
2+
3+ import org .eclipse .jface .preference ._
4+ import org .eclipse .ui .IWorkbenchPreferencePage
5+ import org .eclipse .ui .IWorkbench
6+ import org .knime .ext .jruby .RubyScriptNodePlugin
7+
8+ class RubyScriptPreferencePage extends FieldEditorPreferencePage with IWorkbenchPreferencePage {
9+
10+ setPreferenceStore(RubyScriptNodePlugin .getDefault.getPreferenceStore)
11+
12+ setDescription(" Ruby Scripting preferences" )
13+
14+ def createFieldEditors () {
15+ addField(new BooleanFieldEditor (PreferenceConstants .JRUBY_USE_EXTERNAL_GEMS , " &Use external jRuby gems" , getFieldEditorParent))
16+ addField(new DirectoryFieldEditor (PreferenceConstants .JRUBY_PATH , " &Root path of external jRuby installation:" , getFieldEditorParent))
17+ }
18+
19+ def init (workbench : IWorkbench ) {
20+ }
21+
22+ /*
23+ Original Java:
124package org.knime.ext.jruby.preferences;
225
326import org.eclipse.jface.preference.*;
427import org.eclipse.ui.IWorkbenchPreferencePage;
528import org.eclipse.ui.IWorkbench;
629import org.knime.ext.jruby.RubyScriptNodePlugin;
730
8- / **
31+ | **
932 * This class represents a preference page that is contributed to the
1033 * Preferences dialog. By subclassing <samp>FieldEditorPreferencePage</samp>, we
1134 * can use the field support built into JFace that allows us to create a page
1437 * This page is used to modify preferences only. They are stored in the
1538 * preference store that belongs to the main plug-in class. That way,
1639 * preferences can be accessed directly via the preference store.
17- */
40+ *|
1841
1942public class RubyScriptPreferencePage extends FieldEditorPreferencePage
2043 implements IWorkbenchPreferencePage {
@@ -27,11 +50,11 @@ public RubyScriptPreferencePage() {
2750
2851 }
2952
30- / **
53+ | **
3154 * Creates the field editors. Field editors are abstractions of the common
3255 * GUI blocks needed to manipulate various types of preferences. Each field
3356 * editor knows how to save and restore itself.
34- */
57+ *|
3558 public final void createFieldEditors() {
3659 addField(new BooleanFieldEditor(
3760 PreferenceConstants.JRUBY_USE_EXTERNAL_GEMS,
@@ -43,13 +66,16 @@ public final void createFieldEditors() {
4366
4467 }
4568
46- / *
69+ | *
4770 * (non-Javadoc)
4871 *
4972 * @see
5073 * org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
51- */
74+ *|
5275 public void init(final IWorkbench workbench) {
5376 }
5477
5578}
79+
80+ */
81+ }
0 commit comments