TPTP 4.2.0 Platform Project
Public API Specification

org.eclipse.tptp.context.sample.clanguage
Class CompileUnitFormatter

java.lang.Object
  extended byorg.eclipse.tptp.context.sample.clanguage.CompileUnitFormatter
All Implemented Interfaces:
IContextLabelFormatProvider

public class CompileUnitFormatter
extends java.lang.Object
implements IContextLabelFormatProvider


Field Summary
 
Fields inherited from interface org.eclipse.hyades.ui.provisional.context.IContextLabelFormatProvider
MODE_COLUMN_CONTENT, MODE_COLUMN_HEADER, MODE_VIEW_ACTION, MODE_VIEW_FILTER
 
Constructor Summary
CompileUnitFormatter()
           
 
Method Summary
 java.lang.String convertDisplayStringToModelValue(java.lang.String text)
          Converts the given display text to be displayed/entered in the filter dialog to the model value in the context associated with this IContextLabelFormatProvider.
 java.lang.String convertModelValueToDisplayString(java.lang.String text)
          Converts the given model value text to the displayed text in the filter dialog in the context associated with this IContextLabelFormatProvider.
 java.lang.String getDisplayDescription()
          Returns the display description if a display description is shown for the attribute.
 org.eclipse.swt.graphics.Image getDisplayImageByElement(java.lang.Object value, java.lang.Object element, int mode)
          This returns the display image given the value to be displayed, the element this String is associated with, and the mode to determine which image to show.
 java.lang.String getDisplayStringFromElement(java.lang.Object value, java.lang.Object element, int mode)
          This returns the display string given the value to be displayed, the element this String is associated with, and the mode to determine which String to show.
 java.lang.String getDisplayToolTip()
          Returns the display tool tip if a tool tip is shown for the attribute.
 int[] getSupportModes()
          Returns the supported modes of this IContextLabelFormatProvider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompileUnitFormatter

public CompileUnitFormatter()
Method Detail

getDisplayStringFromElement

public java.lang.String getDisplayStringFromElement(java.lang.Object value,
                                                    java.lang.Object element,
                                                    int mode)
Description copied from interface: IContextLabelFormatProvider
This returns the display string given the value to be displayed, the element this String is associated with, and the mode to determine which String to show.

Specified by:
getDisplayStringFromElement in interface IContextLabelFormatProvider
Parameters:
value - the value to be displayed
element - the element associated with this String
mode - the mode to determine which String to display
Returns:
String the display String

getDisplayImageByElement

public org.eclipse.swt.graphics.Image getDisplayImageByElement(java.lang.Object value,
                                                               java.lang.Object element,
                                                               int mode)
Description copied from interface: IContextLabelFormatProvider
This returns the display image given the value to be displayed, the element this String is associated with, and the mode to determine which image to show.

Specified by:
getDisplayImageByElement in interface IContextLabelFormatProvider
Parameters:
value - the value to be displayed
element - the element associated with this String
mode - the mode to determine which String to display
Returns:
Image the Image associated with this element

getDisplayDescription

public java.lang.String getDisplayDescription()
Description copied from interface: IContextLabelFormatProvider
Returns the display description if a display description is shown for the attribute.

Specified by:
getDisplayDescription in interface IContextLabelFormatProvider

getDisplayToolTip

public java.lang.String getDisplayToolTip()
Description copied from interface: IContextLabelFormatProvider
Returns the display tool tip if a tool tip is shown for the attribute.

Specified by:
getDisplayToolTip in interface IContextLabelFormatProvider

convertModelValueToDisplayString

public java.lang.String convertModelValueToDisplayString(java.lang.String text)
Description copied from interface: IContextLabelFormatProvider
Converts the given model value text to the displayed text in the filter dialog in the context associated with this IContextLabelFormatProvider. This does not apply to the Object Collected filter attribute.

Specified by:
convertModelValueToDisplayString in interface IContextLabelFormatProvider
Parameters:
text - String the text to be converted
Returns:
the converted text

convertDisplayStringToModelValue

public java.lang.String convertDisplayStringToModelValue(java.lang.String text)
Description copied from interface: IContextLabelFormatProvider
Converts the given display text to be displayed/entered in the filter dialog to the model value in the context associated with this IContextLabelFormatProvider. This does not apply to the Object Collected filter attribute.

Specified by:
convertDisplayStringToModelValue in interface IContextLabelFormatProvider
Parameters:
text - String the text to be converted
Returns:
the converted text

getSupportModes

public int[] getSupportModes()
Description copied from interface: IContextLabelFormatProvider
Returns the supported modes of this IContextLabelFormatProvider. If a mode is requested that is not supported the base provider will be used.

Specified by:
getSupportModes in interface IContextLabelFormatProvider
Returns:
int[] an array of integers, the modes applicable.

TPTP 4.2.0 Platform Project
Public API Specification