Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.functions.core
Class SourceViewerParameterPage

java.lang.Object
  extended by org.eclipse.jface.dialogs.DialogPage
      extended by org.eclipse.jface.wizard.WizardPage
          extended by eu.esdihumboldt.hale.ui.HaleWizardPage<AbstractGenericFunctionWizard<?,?>>
              extended by eu.esdihumboldt.hale.ui.functions.core.SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
                  extended by eu.esdihumboldt.hale.ui.functions.core.SourceViewerParameterPage
All Implemented Interfaces:
ParameterPage, org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage
Direct Known Subclasses:
GroovyParameterPage

public abstract class SourceViewerParameterPage
extends SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>

Parameter page using a source viewer.

Author:
Simon Templer

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
SourceViewerParameterPage(String pageName)
           
SourceViewerParameterPage(String pageName, String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
           
 
Method Summary
protected  void configure(org.eclipse.jface.text.source.SourceViewer viewer)
          Configure the source viewer.
protected  org.eclipse.jface.text.source.SourceViewer createAndLayoutTextField(org.eclipse.swt.widgets.Composite parent)
          Create and text field and layout it.
protected  void createAndSetDocument(org.eclipse.jface.text.source.SourceViewer viewer)
          Create the initial document and set it for the viewer.
protected  org.eclipse.jface.text.source.SourceViewerConfiguration createConfiguration()
          Create the source viewer configuration.
protected  org.eclipse.jface.text.source.IVerticalRuler createRuler()
          Create the vertical ruler for the source viewer.
protected  org.eclipse.jface.text.IDocument getDocument()
          Get the source viewer document.
protected  String getText(org.eclipse.jface.text.source.SourceViewer viewer)
          Get the current text of the text field.
protected  void insertTextAtCurrentPos(org.eclipse.jface.text.source.SourceViewer viewer, String insert)
          Insert a given text at the current position of the given text field.
protected  void setText(org.eclipse.jface.text.source.SourceViewer viewer, String value)
          Set the text of the text field to the given value.
protected  void updateState(org.eclipse.jface.text.IDocument document)
          Update the page state.
protected  boolean validate(org.eclipse.jface.text.IDocument document)
          Validate the given document.
 
Methods inherited from class eu.esdihumboldt.hale.ui.functions.core.SourceListParameterPage
createContent, getConfiguration, getParameterName, getSourcePropertyName, getTextField, getVariableName, onShowPage, setParameter, sourcePropertiesChanged
 
Methods inherited from class eu.esdihumboldt.hale.ui.HaleWizardPage
createControl, dispose, getWizard
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage, setVisible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizardPage
canFlipToNextPage, getName, getNextPage, getPreviousPage, getWizard, isPageComplete, setPreviousPage, setWizard
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
createControl, dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle, setVisible
 

Constructor Detail

SourceViewerParameterPage

public SourceViewerParameterPage(String pageName,
                                 String title,
                                 org.eclipse.jface.resource.ImageDescriptor titleImage)
See Also:
SourceListParameterPage.SourceListParameterPage(String, String, ImageDescriptor)

SourceViewerParameterPage

public SourceViewerParameterPage(String pageName)
See Also:
SourceListParameterPage.SourceListParameterPage(String)
Method Detail

setText

protected void setText(org.eclipse.jface.text.source.SourceViewer viewer,
                       String value)
Description copied from class: SourceListParameterPage
Set the text of the text field to the given value.

Specified by:
setText in class SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
Parameters:
viewer - the text field
value - the value to set as text
See Also:
SourceListParameterPage.setText(Object, String)

getText

protected String getText(org.eclipse.jface.text.source.SourceViewer viewer)
Description copied from class: SourceListParameterPage
Get the current text of the text field.

Specified by:
getText in class SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
Parameters:
viewer - the text field
Returns:
the current text of the text field
See Also:
SourceListParameterPage.getText(Object)

insertTextAtCurrentPos

protected void insertTextAtCurrentPos(org.eclipse.jface.text.source.SourceViewer viewer,
                                      String insert)
Description copied from class: SourceListParameterPage
Insert a given text at the current position of the given text field.

Specified by:
insertTextAtCurrentPos in class SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
Parameters:
viewer - the text field
insert - the text to insert
See Also:
SourceListParameterPage.insertTextAtCurrentPos(Object, String)

createAndLayoutTextField

protected org.eclipse.jface.text.source.SourceViewer createAndLayoutTextField(org.eclipse.swt.widgets.Composite parent)
Description copied from class: SourceListParameterPage
Create and text field and layout it.

Specified by:
createAndLayoutTextField in class SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
Parameters:
parent - the parent composite, it has a one-column grid layout
Returns:
the created text field
See Also:
SourceListParameterPage.createAndLayoutTextField(Composite)

createRuler

protected org.eclipse.jface.text.source.IVerticalRuler createRuler()
Create the vertical ruler for the source viewer.

Returns:
the vertical ruler

configure

protected void configure(org.eclipse.jface.text.source.SourceViewer viewer)
Configure the source viewer. Here the configuration and the document are set.

Overrides:
configure in class SourceListParameterPage<org.eclipse.jface.text.source.SourceViewer>
Parameters:
viewer - the text field to configure

getDocument

protected org.eclipse.jface.text.IDocument getDocument()
Get the source viewer document.

Returns:
the document

updateState

protected void updateState(org.eclipse.jface.text.IDocument document)
Update the page state.

Parameters:
document - the current document

validate

protected boolean validate(org.eclipse.jface.text.IDocument document)
Validate the given document. The default implementation always returns true.

Parameters:
document - the document to validate
Returns:
if the document is valid

createAndSetDocument

protected void createAndSetDocument(org.eclipse.jface.text.source.SourceViewer viewer)
Create the initial document and set it for the viewer.

Parameters:
viewer - the source viewer

createConfiguration

protected org.eclipse.jface.text.source.SourceViewerConfiguration createConfiguration()
Create the source viewer configuration.

Returns:
the source viewer configuration

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d