## org.eclipse.contribution.visualiser.simpleImpl
Class SimpleContentProvider

    java.lang.Object
      org.eclipse.contribution.visualiser.simpleImpl.SimpleContentProvider

All Implemented Interfaces:
  IContentProvider

Direct Known Subclasses:
  FileContentProvider, ResourceContentProvider

public class SimpleContentProvider
extends java.lang.Object
implements IContentProvider

Simple implementation of a content provider

Constructor Summary
`SimpleContentProvider()`

Method Summary
`void` `activate()` Called when this provider is selected.
`void` `addGroup(IGroup grp)` Register a group
`void` `deactivate()` Called when this provider is currently active and another provider is selected.
`java.util.List` `getAllGroups()` Returns all registered groups
`java.util.List` `getAllMembers()` Returns the List of all IMembers in all registered groups
`java.util.List` `getAllMembers(IGroup group)` Returns all IMembers contained in the given IGroup
`org.eclipse.jface.resource.ImageDescriptor` `getGroupViewIcon()` Called when switching to this content provider to get the icon used in the Visualiser view for Group view.
`org.eclipse.jface.resource.ImageDescriptor` `getMemberViewIcon()` Called when switching to this content provider to get the icon used in the Visualiser view for Member view.
`void` `initialise()` Initialise the content provider.
`int` `numberOfGroupsDefined()` Get the total number of groups registered
`boolean` `processMouseclick(IMember member, boolean markupWasClicked, int buttonClicked)` Process a mouse click on a member belonging to this provider.
`protected void` `resetModel()` Empties the data structure that contains the added groups

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleContentProvider

    public SimpleContentProvider()

Method Detail

### getAllGroups

    public java.util.List getAllGroups()

  Returns all registered groups

  Specified by:
    `getAllGroups` in interface `IContentProvider`
  Returns:
    List of IGroups
  See Also:
    `IContentProvider.getAllGroups()`

### getAllMembers

    public java.util.List getAllMembers(IGroup group)

  Returns all IMembers contained in the given IGroup

  Specified by:
    `getAllMembers` in interface `IContentProvider`
  Returns:
    List of IMembers
  See Also:
    `IContentProvider.getAllMembers(IGroup)`

### getAllMembers

    public java.util.List getAllMembers()

  Returns the List of all IMembers in all registered groups

  Specified by:
    `getAllMembers` in interface `IContentProvider`

### initialise

    public void initialise()

  Initialise the content provider. This is a default imploementation and so does nothing.

  Specified by:
    `initialise` in interface `IContentProvider`
  See Also:
    `IContentProvider.initialise()`

### addGroup

    public void addGroup(IGroup grp)

  Register a group

  Parameters:
    `grp` -

### numberOfGroupsDefined

    public int numberOfGroupsDefined()

  Get the total number of groups registered

  Returns:
    the number of groups

### processMouseclick

    public boolean processMouseclick(IMember member,
                                     boolean markupWasClicked,
                                     int buttonClicked)

  Process a mouse click on a member belonging to this provider. This is a default implementation and so does nothing and returns true to allow the visualiser to perform it's default mouse click operation.

  Specified by:
    `processMouseclick` in interface `IContentProvider`
  See Also:
    `IContentProvider.processMouseclick(IMember, boolean, int)`

### getMemberViewIcon

    public org.eclipse.jface.resource.ImageDescriptor getMemberViewIcon()

  Description copied from interface: `IContentProvider`
  Called when switching to this content provider to get the icon used in the Visualiser view for Member view. If null is returned default icons are used.

  Specified by:
    `getMemberViewIcon` in interface `IContentProvider`
  Returns:
    image to be used as member view icon
  See Also:
    `IContentProvider.getMemberViewIcon()`

### getGroupViewIcon

    public org.eclipse.jface.resource.ImageDescriptor getGroupViewIcon()

  Description copied from interface: `IContentProvider`
  Called when switching to this content provider to get the icon used in the Visualiser view for Group view. If null is returned default icons are used.

  Specified by:
    `getGroupViewIcon` in interface `IContentProvider`
  Returns:
    image to be used as group view icon, or null if default is required
  See Also:
    `IContentProvider.getGroupViewIcon()`

### resetModel

    protected void resetModel()

  Empties the data structure that contains the added groups

### activate

    public void activate()

  Description copied from interface: `IContentProvider`
  Called when this provider is selected.

  Specified by:
    `activate` in interface `IContentProvider`
  See Also:
    `IContentProvider.activate()`

### deactivate

    public void deactivate()

  Description copied from interface: `IContentProvider`
  Called when this provider is currently active and another provider is selected.

  Specified by:
    `deactivate` in interface `IContentProvider`
  See Also:
    `IContentProvider.deactivate()`