Class PathPropertyPage
- java.lang.Object
-
- org.eclipse.jface.dialogs.DialogPage
-
- org.eclipse.jface.preference.PreferencePage
-
- org.eclipse.ui.dialogs.PropertyPage
-
- net.ssehub.easy.producer.ui.configuration.PathPropertyPage
-
- All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage,org.eclipse.jface.dialogs.IMessageProvider,org.eclipse.jface.preference.IPreferencePage,org.eclipse.swt.widgets.Listener,org.eclipse.ui.IWorkbenchPreferencePage,org.eclipse.ui.IWorkbenchPropertyPage
public class PathPropertyPage extends org.eclipse.ui.dialogs.PropertyPage implements org.eclipse.ui.IWorkbenchPreferencePage, org.eclipse.swt.widgets.ListenerImplements the global preference page. The user can change the global ivml-, vil and/or vtl-Path. First of all the input fields hold the current values as messages. The user can restore the default values which are stored in the default Configuration. These paths would be "EASy". Moreover the user can change these paths by typing in new ones. After pressing the apply-Button the new values are stored in the Eclipse Preference-Store. When the user runs a new Eclipse-instance these values are loaded as default and put in the textfield. If the user decides to change them to the default-values he can do that ba using "Restore Defaults"...- Author:
- Niko Nowatzki, Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classPathPropertyPage.ButtonListenerImplements a listener for the path selection button.
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.core.resources.IProjectcurrentProjectprivate org.eclipse.swt.widgets.TextivmlInputprivate org.eclipse.swt.widgets.Labelmaterializedprivate ConfigurationprojectConfigurationprivate org.eclipse.swt.widgets.TextvilInputprivate org.eclipse.swt.widgets.TextvtlInput
-
Constructor Summary
Constructors Constructor Description PathPropertyPage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcreateConfigurationDialogs(org.eclipse.swt.widgets.Composite pageComponent)Create the dialogs.protected org.eclipse.swt.widgets.ControlcreateContents(org.eclipse.swt.widgets.Composite parent)private org.eclipse.swt.widgets.ButtoncreatePathSelectionButton(org.eclipse.swt.widgets.Composite pageComponent, Configuration.PathKind kind)Creates a path selection button.voidhandleEvent(org.eclipse.swt.widgets.Event event)private voidinit()Lazy init.voidinit(org.eclipse.ui.IWorkbench workbench)protected voidperformApply()protected voidperformDefaults()private voidsetInputs(Configuration configuration)Sets the texts from the givenconfiguration.private voidsetPath(org.eclipse.swt.widgets.Text source, Configuration.PathKind kind)Sets the path fromsourcetokind.private voidupdateMaterialized()Updates the materialized label.-
Methods inherited from class org.eclipse.jface.preference.PreferencePage
applyData, applyDialogFont, computeSize, contributeButtons, createControl, createDescriptionLabel, createNoteComposite, doComputeSize, doGetPreferenceStore, getApplyButton, getContainer, getDefaultsButton, getPreferenceStore, isValid, noDefaultAndApplyButton, noDefaultButton, okToLeave, performCancel, performHelp, performOk, setContainer, setErrorMessage, setMessage, setPreferenceStore, setSize, setTitle, setValid, toString, updateApplyButton
-
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getImage, getMessage, getMessageType, getShell, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setDescription, setImageDescriptor, setMessage, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
projectConfiguration
private Configuration projectConfiguration
-
currentProject
private org.eclipse.core.resources.IProject currentProject
-
ivmlInput
private org.eclipse.swt.widgets.Text ivmlInput
-
vilInput
private org.eclipse.swt.widgets.Text vilInput
-
vtlInput
private org.eclipse.swt.widgets.Text vtlInput
-
materialized
private org.eclipse.swt.widgets.Label materialized
-
-
Method Detail
-
init
public void init(org.eclipse.ui.IWorkbench workbench)
- Specified by:
initin interfaceorg.eclipse.ui.IWorkbenchPreferencePage
-
init
private void init()
Lazy init.
-
createContents
protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createContentsin classorg.eclipse.jface.preference.PreferencePage
-
updateMaterialized
private void updateMaterialized()
Updates the materialized label.
-
createConfigurationDialogs
private void createConfigurationDialogs(org.eclipse.swt.widgets.Composite pageComponent)
Create the dialogs. 3 labels for users info. 3 TextFields for user input. 1 Button for applying the input. The values will be stored in the preference store. 1 Button for restoring the default values.- Parameters:
pageComponent- The PageComponent.
-
createPathSelectionButton
private org.eclipse.swt.widgets.Button createPathSelectionButton(org.eclipse.swt.widgets.Composite pageComponent, Configuration.PathKind kind)Creates a path selection button.- Parameters:
pageComponent- the page component to create the button forkind- the path kind- Returns:
- the button created
-
setInputs
private void setInputs(Configuration configuration)
Sets the texts from the givenconfiguration.- Parameters:
configuration- the configuration to take the paths from
-
performDefaults
protected void performDefaults()
- Overrides:
performDefaultsin classorg.eclipse.jface.preference.PreferencePage
-
setPath
private void setPath(org.eclipse.swt.widgets.Text source, Configuration.PathKind kind)Sets the path fromsourcetokind.- Parameters:
source- the source UI elementkind- the target path kind
-
performApply
protected void performApply()
- Overrides:
performApplyin classorg.eclipse.jface.preference.PreferencePage
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event)
- Specified by:
handleEventin interfaceorg.eclipse.swt.widgets.Listener
-
-