org.eclipse.contribution.visualiser.jdtimpl
Class JDTMarkupProvider

java.lang.Object
  extended byorg.eclipse.contribution.visualiser.jdtimpl.JDTMarkupProvider
All Implemented Interfaces:
IMarkupProvider

public class JDTMarkupProvider
extends java.lang.Object
implements IMarkupProvider

The JDT Markup Provider


Constructor Summary
JDTMarkupProvider()
           
 
Method Summary
 boolean changeMode()
          Markup providers can choose to have multiple stripe modes.
 java.util.SortedSet getAllMarkupKinds()
          Return a list of all possible 'kinds' covered by all the stripes in the visualisation.
 Color getColorFor(java.lang.String kind)
          Ask for a color for a given kind - if one is not currently allocated, it will be selected from those available.
 java.util.List getGroupMarkups(IGroup group)
          Return a list of all stripes in effect on all members of the group.
 java.util.List getMemberMarkups(IMember member)
          Return a list of all stripes in effect on this member.
 boolean hasMultipleModes()
          If markup provider has multiple modes the visualiser enables its switch mode icon, otherwise it disables it.
 void initialise()
          Called when the visualiser initializes and discovers a markup provider implementation.
 boolean processMouseclick(IMember member, Stripe stripe, java.lang.String exactKind, int buttonClicked)
          Called when the user clicks on a stripe on a member in the visualiser - the information passed is - The full name of the member, e.g.
 void resourceChanged(IResourceChangeEvent event)
           
 void setColorFor(java.lang.String kind, Color color)
          When the color picker is used in the visualiser menu to change the color for a particular kind, this call ensures the logic responsible for color management is told.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDTMarkupProvider

public JDTMarkupProvider()
Method Detail

initialise

public void initialise()
Description copied from interface: IMarkupProvider
Called when the visualiser initializes and discovers a markup provider implementation. Typically initialise will get the markups 'ready'.

Specified by:
initialise in interface IMarkupProvider

getMemberMarkups

public java.util.List getMemberMarkups(IMember member)
Description copied from interface: IMarkupProvider
Return a list of all stripes in effect on this member.

Specified by:
getMemberMarkups in interface IMarkupProvider

getGroupMarkups

public java.util.List getGroupMarkups(IGroup group)
Description copied from interface: IMarkupProvider
Return a list of all stripes in effect on all members of the group.

Specified by:
getGroupMarkups in interface IMarkupProvider

getAllMarkupKinds

public java.util.SortedSet getAllMarkupKinds()
Description copied from interface: IMarkupProvider
Return a list of all possible 'kinds' covered by all the stripes in the visualisation. This is used by the visualiser menu. The return value is a set of Strings.

Specified by:
getAllMarkupKinds in interface IMarkupProvider

changeMode

public boolean changeMode()
Description copied from interface: IMarkupProvider
Markup providers can choose to have multiple stripe modes. Return true if the provider requires the visualiser to update, false if it doesn't.

Specified by:
changeMode in interface IMarkupProvider
Returns:
true iff the provider requires the visualiser to update,

setColorFor

public void setColorFor(java.lang.String kind,
                        Color color)
Description copied from interface: IMarkupProvider
When the color picker is used in the visualiser menu to change the color for a particular kind, this call ensures the logic responsible for color management is told.

Specified by:
setColorFor in interface IMarkupProvider

getColorFor

public Color getColorFor(java.lang.String kind)
Description copied from interface: IMarkupProvider
Ask for a color for a given kind - if one is not currently allocated, it will be selected from those available.

Specified by:
getColorFor in interface IMarkupProvider

processMouseclick

public boolean processMouseclick(IMember member,
                                 Stripe stripe,
                                 java.lang.String exactKind,
                                 int buttonClicked)
Description copied from interface: IMarkupProvider
Called when the user clicks on a stripe on a member in the visualiser - the information passed is - The full name of the member, e.g. "ABC.B" - The stripe that was clicked (which might contain multiple 'kinds') - Exactly which 'kind' within the stripe was clicked - The buttons pressed (1 is LH button, 3 is RH button) The return value is whether the visualiser should take its normal action on this click. The normal action is that on a left hand mouse click, the visualiser subselects the clicked member (if in the group view, it swaps to a member view of the members in that group). If the right hand mouse button is clicked, it returns to the previous visualisation. Remember: The content provider is always called with a similar method 'processMouseClick()'. The call to the markup provider will occur regardless of whether true or false is returned here.

Specified by:
processMouseclick in interface IMarkupProvider

resourceChanged

public void resourceChanged(IResourceChangeEvent event)

hasMultipleModes

public boolean hasMultipleModes()
Description copied from interface: IMarkupProvider
If markup provider has multiple modes the visualiser enables its switch mode icon, otherwise it disables it.

Specified by:
hasMultipleModes in interface IMarkupProvider
Returns:
true if this markup provider has multiple modes