Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.function.contribution
Class AbstractFunctionWizardContribution

java.lang.Object
  extended by org.eclipse.jface.action.ContributionItem
      extended by eu.esdihumboldt.hale.ui.function.contribution.AbstractFunctionWizardContribution
All Implemented Interfaces:
org.eclipse.jface.action.IContributionItem
Direct Known Subclasses:
CellFunctionContribution, SchemaSelectionFunctionContribution

public abstract class AbstractFunctionWizardContribution
extends org.eclipse.jface.action.ContributionItem

Contribution that provides access to function wizards

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

Constructor Summary
AbstractFunctionWizardContribution()
          Create a function wizard contribution that doesn't hide augmentations.
AbstractFunctionWizardContribution(boolean showAugmentations)
          Constructor
 
Method Summary
protected abstract  AbstractWizardAction<?> createWizardAction(FunctionWizardDescriptor<?> descriptor, AlignmentService alignmentService)
          Create a wizard action for the given function wizard descriptor
 void fill(org.eclipse.swt.widgets.Menu menu, int index)
           
 void fill(org.eclipse.swt.widgets.ToolBar parent, int index)
           
protected  Collection<FunctionWizardDescriptor<?>> getFunctionWizardDescriptors()
          Get the currently applicable function wizard descriptors
 boolean hasActiveFunctions()
          Determines if there are any active function wizards for the current selection
abstract  boolean isActive(FunctionWizardDescriptor<?> descriptor)
          Determine if a function wizard is active for the current selection
 boolean isDynamic()
           
 
Methods inherited from class org.eclipse.jface.action.ContributionItem
dispose, fill, fill, getId, getParent, isDirty, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setParent, setVisible, toString, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractFunctionWizardContribution

public AbstractFunctionWizardContribution(boolean showAugmentations)
Constructor

Parameters:
showAugmentations - if augmentations shall be shown

AbstractFunctionWizardContribution

public AbstractFunctionWizardContribution()
Create a function wizard contribution that doesn't hide augmentations.

Method Detail

fill

public void fill(org.eclipse.swt.widgets.ToolBar parent,
                 int index)
Specified by:
fill in interface org.eclipse.jface.action.IContributionItem
Overrides:
fill in class org.eclipse.jface.action.ContributionItem
See Also:
ContributionItem.fill(ToolBar, int)

getFunctionWizardDescriptors

protected Collection<FunctionWizardDescriptor<?>> getFunctionWizardDescriptors()
Get the currently applicable function wizard descriptors

Returns:
the function wizard descriptors

createWizardAction

protected abstract AbstractWizardAction<?> createWizardAction(FunctionWizardDescriptor<?> descriptor,
                                                              AlignmentService alignmentService)
Create a wizard action for the given function wizard descriptor

Parameters:
descriptor - the function wizard descriptor
alignmentService - the alignment service
Returns:
the action that launches the wizard

fill

public void fill(org.eclipse.swt.widgets.Menu menu,
                 int index)
Specified by:
fill in interface org.eclipse.jface.action.IContributionItem
Overrides:
fill in class org.eclipse.jface.action.ContributionItem
See Also:
ContributionItem.fill(Menu, int)

isDynamic

public boolean isDynamic()
Specified by:
isDynamic in interface org.eclipse.jface.action.IContributionItem
Overrides:
isDynamic in class org.eclipse.jface.action.ContributionItem
See Also:
ContributionItem.isDynamic()

isActive

public abstract boolean isActive(FunctionWizardDescriptor<?> descriptor)
Determine if a function wizard is active for the current selection

Parameters:
descriptor - the function wizard descriptor
Returns:
if the function wizard is active for the current selection

hasActiveFunctions

public boolean hasActiveFunctions()
Determines if there are any active function wizards for the current selection

Returns:
if there are any active function wizards for the current selection

Humboldt Alignment Editor 2.5.0

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