Package org.eclipse.graphiti.tb

# Class ContextEntryHelper

java.lang.Object
org.eclipse.graphiti.tb.ContextEntryHelper

public class ContextEntryHelper extends Object
The Class ContextEntryHelper comprises methods for creating and modifying context button entries.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`

## Constructor Summary

Constructors
Constructor
Description
`ContextEntryHelper()`

## Method Summary

Modifier and Type
Method
Description
`static IContextButtonEntry`
`createCollapseContextButton(boolean collapse, IFeature customFeature, IContext customContext)`
Creates collapse button entry or expand button entry as indicated by parameter collapse.
`static IContextButtonEntry`
`createDefaultDeleteContextButton(IFeatureProvider featureProvider, PictogramElement pe)`
Creates an default delete context button entry.
`static IContextButtonEntry`
`createDefaultRemoveContextButton(IFeatureProvider featureProvider, PictogramElement pe)`
Creates an default remove context button entry.
`static IContextButtonEntry`
`createDefaultUpdateContextButton(IFeatureProvider featureProvider, PictogramElement pe)`
Creates an default update context button entry.
`static void`
`markAsCollapseContextEntry(IContextEntry entry, boolean collapse)`
Marks the given context entry with collapse or expand figure.
`static void`
`markAsDeleteContextEntry(IContextEntry entry)`
Marks the given context entry with delete from model.
`static void`
`markAsRemoveContextEntry(IContextEntry entry)`
Marks the given context entry with remove figure from diagram.
`static void`
`markAsUpdateContextEntry(IContextEntry entry)`
Marks the given context entry with update figure.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### NAME

public static final String NAME

## Constructor Details

### ContextEntryHelper

public ContextEntryHelper()

## Method Details

### createDefaultUpdateContextButton

public static IContextButtonEntry createDefaultUpdateContextButton(IFeatureProvider featureProvider, PictogramElement pe)
Creates an default update context button entry.

Parameters:
  `featureProvider` - the feature provider
  `pe` - the pictogram element
Returns:
  the created default update context button entry

### createDefaultRemoveContextButton

public static IContextButtonEntry createDefaultRemoveContextButton(IFeatureProvider featureProvider, PictogramElement pe)
Creates an default remove context button entry.

Parameters:
  `featureProvider` - the feature provider
  `pe` - the pictogram element
Returns:
  the created default remove context button entry

### createDefaultDeleteContextButton

public static IContextButtonEntry createDefaultDeleteContextButton(IFeatureProvider featureProvider, PictogramElement pe)
Creates an default delete context button entry.

Parameters:
  `featureProvider` - the feature provider
  `pe` - the pictogram element
Returns:
  the created default delete context button entry

### createCollapseContextButton

public static IContextButtonEntry createCollapseContextButton(boolean collapse, IFeature customFeature, IContext customContext)
Creates collapse button entry or expand button entry as indicated by parameter collapse.

Parameters:
  `collapse` - creates a collapse button entry when true, otherwise a expand button entry
  `customFeature` - the custom feature
  `customContext` - the custom context
Returns:
  the created collapse button

### markAsUpdateContextEntry

public static void markAsUpdateContextEntry(IContextEntry entry)
Marks the given context entry with update figure.

Parameters:
  `entry` - the context entry

### markAsRemoveContextEntry

public static void markAsRemoveContextEntry(IContextEntry entry)
Marks the given context entry with remove figure from diagram.

Parameters:
  `entry` - the context entry

### markAsDeleteContextEntry

public static void markAsDeleteContextEntry(IContextEntry entry)
Marks the given context entry with delete from model.

Parameters:
  `entry` - the context entry

### markAsCollapseContextEntry

public static void markAsCollapseContextEntry(IContextEntry entry, boolean collapse)
Marks the given context entry with collapse or expand figure.

Parameters:
  `entry` - the context entry
  `collapse` - mark with collapse when true, otherwise with expand