org.eclipse.mofscript.editor
Class MofScriptPreferences

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.preference.PreferencePage
          extended by org.eclipse.jface.preference.FieldEditorPreferencePage
              extended by org.eclipse.mofscript.editor.MofScriptPreferences
All Implemented Interfaces:
java.util.EventListener, org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.preference.IPreferencePage, org.eclipse.jface.util.IPropertyChangeListener, org.eclipse.ui.IWorkbenchPreferencePage

public class MofScriptPreferences
extends org.eclipse.jface.preference.FieldEditorPreferencePage
implements org.eclipse.ui.IWorkbenchPreferencePage

This class represents a preference page that is contributed to the Preferences dialog. By subclassing FieldEditorPreferencePage, we can use the field support built into JFace that allows us to create a page that is small and knows how to save, restore and apply itself.

This page is used to modify preferences only. They are stored in the preference store that belongs to the main plug-in class. That way, preferences can be accessed directly via the preference store.

Author:
jol

Field Summary
static java.lang.String BLOCK_COMMENT_TAG
           
static java.lang.String EDITOR_MATCHING_BRACKETS
           
static java.lang.String EDITOR_MATCHING_BRACKETS_COLOR
           
static java.lang.String GEN_PROJECT_PREFIX
           
static java.lang.String GEN_TO_PROJECT
           
static java.lang.String IMPORT_DIRECTORY
           
static java.lang.String P_BOOLEAN
           
static java.lang.String P_CHOICE
           
static java.lang.String P_PATH
           
static java.lang.String P_STRING
           
static java.lang.String REPOSITORY_METAMODELS_PATH
           
static java.lang.String REPOSITORY_MODELS_PATH
           
static java.lang.String REPOSITORY_PATH
           
static java.lang.String REPOSITORY_TRANSFORMATIONS_PATH
           
static java.lang.String ROOT_DIRECTORY
           
static java.lang.String TRACE_DIRECTORY
           
static java.lang.String USE_HL_TRAMDE
           
static java.lang.String USE_TRACEABILITY
           
static java.lang.String USE_TRAMDE
           
 
Fields inherited from class org.eclipse.jface.preference.FieldEditorPreferencePage
FLAT, GRID, MARGIN_HEIGHT, MARGIN_WIDTH, VERTICAL_SPACING
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
MofScriptPreferences()
          Constructor
 
Method Summary
 void createFieldEditors()
          Creates the field editors.
 void init(org.eclipse.ui.IWorkbench workbench)
           
 boolean performOk()
           
 
Methods inherited from class org.eclipse.jface.preference.FieldEditorPreferencePage
addField, adjustGridLayout, applyFont, checkState, createContents, dispose, getFieldEditorParent, initialize, performDefaults, propertyChange, setVisible
 
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, okToLeave, performApply, performCancel, performHelp, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.preference.IPreferencePage
computeSize, isValid, okToLeave, performCancel, setContainer, setSize
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
 

Field Detail

P_PATH

public static final java.lang.String P_PATH
See Also:
Constant Field Values

P_BOOLEAN

public static final java.lang.String P_BOOLEAN
See Also:
Constant Field Values

P_CHOICE

public static final java.lang.String P_CHOICE
See Also:
Constant Field Values

P_STRING

public static final java.lang.String P_STRING
See Also:
Constant Field Values

REPOSITORY_PATH

public static final java.lang.String REPOSITORY_PATH
See Also:
Constant Field Values

REPOSITORY_METAMODELS_PATH

public static final java.lang.String REPOSITORY_METAMODELS_PATH
See Also:
Constant Field Values

REPOSITORY_MODELS_PATH

public static final java.lang.String REPOSITORY_MODELS_PATH
See Also:
Constant Field Values

REPOSITORY_TRANSFORMATIONS_PATH

public static final java.lang.String REPOSITORY_TRANSFORMATIONS_PATH
See Also:
Constant Field Values

ROOT_DIRECTORY

public static java.lang.String ROOT_DIRECTORY

GEN_TO_PROJECT

public static final java.lang.String GEN_TO_PROJECT
See Also:
Constant Field Values

GEN_PROJECT_PREFIX

public static final java.lang.String GEN_PROJECT_PREFIX
See Also:
Constant Field Values

IMPORT_DIRECTORY

public static final java.lang.String IMPORT_DIRECTORY
See Also:
Constant Field Values

USE_TRACEABILITY

public static final java.lang.String USE_TRACEABILITY
See Also:
Constant Field Values

TRACE_DIRECTORY

public static java.lang.String TRACE_DIRECTORY

BLOCK_COMMENT_TAG

public static final java.lang.String BLOCK_COMMENT_TAG
See Also:
Constant Field Values

USE_TRAMDE

public static final java.lang.String USE_TRAMDE
See Also:
Constant Field Values

USE_HL_TRAMDE

public static final java.lang.String USE_HL_TRAMDE
See Also:
Constant Field Values

EDITOR_MATCHING_BRACKETS

public static final java.lang.String EDITOR_MATCHING_BRACKETS
See Also:
Constant Field Values

EDITOR_MATCHING_BRACKETS_COLOR

public static final java.lang.String EDITOR_MATCHING_BRACKETS_COLOR
See Also:
Constant Field Values
Constructor Detail

MofScriptPreferences

public MofScriptPreferences()
Constructor

Method Detail

createFieldEditors

public void createFieldEditors()
Creates the field editors. Field editors are abstractions of the common GUI blocks needed to manipulate various types of preferences. Each field editor knows how to save and restore itself.

Specified by:
createFieldEditors in class org.eclipse.jface.preference.FieldEditorPreferencePage

performOk

public boolean performOk()
Specified by:
performOk in interface org.eclipse.jface.preference.IPreferencePage
Overrides:
performOk in class org.eclipse.jface.preference.FieldEditorPreferencePage

init

public void init(org.eclipse.ui.IWorkbench workbench)
Specified by:
init in interface org.eclipse.ui.IWorkbenchPreferencePage