Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.contribution.visualiser.jdtimpl
Class JDTContentProvider

    java.lang.Object
      org.eclipse.contribution.visualiser.jdtimpl.JDTContentProvider

All Implemented Interfaces:
  IContentProvider, org.eclipse.ui.ISelectionListener

Direct Known Subclasses:
  JDTSearchResultsContentProvider

public class JDTContentProvider
extends java.lang.Object
implements IContentProvider, org.eclipse.ui.ISelectionListener

Constructor Summary
`JDTContentProvider()`

Method Summary
`java.util.List` | `getAllGroups()` Get all groups
`java.util.List` | `getAllJDTGroups(org.eclipse.jdt.core.IJavaProject JP)` Get all package fragments for the given Java project
`java.util.List` | `getAllJDTMembers(org.eclipse.jdt.core.IPackageFragment PF)` Get all JDT members for the given IPackageFragment (Java package)
`java.util.List` | `getAllMembers()` Get all members
`java.util.List` | `getAllMembers(IGroup group)` Get all members for the given group
`org.eclipse.jdt.core.IJavaProject` | `getCurrentProject()` Get the current project
`java.lang.String` | `getEmptyMessage()` Return message to display when visualiser is empty
`JDTGroup` | `getGroupForFragment(org.eclipse.jdt.core.IPackageFragment ipf)` Get a JDTGroup to represent the give IPackageFragment (Java package)
`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
`void` | `lookForData()` Attempts to find some data to display by looking for selections in each of the packages view, projects view, and package explorer (in turn).
`boolean` | `processMouseclick(IMember member, boolean markupWasClicked, int buttonClicked)` Process a mouse click on a member
`void` | `selectionChanged(org.eclipse.ui.IWorkbenchPart iwp, org.eclipse.jface.viewers.ISelection is)` Keeps the currentResource and currentProject information up to date in this class, as this method is called whenever a user changes their selection in the workspace.
`void` | `trace(java.lang.String string)` Simple trace routine - we can turn trace on and off by commenting out the body.

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

Constructor Detail

### JDTContentProvider

    public JDTContentProvider()

Method Detail

### trace

    public void trace(java.lang.String string)

  Simple trace routine - we can turn trace on and off by commenting out the body.

### selectionChanged

    public void selectionChanged(org.eclipse.ui.IWorkbenchPart iwp,
                                 org.eclipse.jface.viewers.ISelection is)

  Keeps the currentResource and currentProject information up to date in this class, as this method is called whenever a user changes their selection in the workspace.

  Specified by:
    `selectionChanged` in interface `org.eclipse.ui.ISelectionListener`

### getAllMembers

    public java.util.List getAllMembers(IGroup group)

  Get all members for the given group

  Specified by:
    `getAllMembers` in interface `IContentProvider`
  See Also:
    `IContentProvider.getAllMembers(org.eclipse.contribution.visualiser.interfaces.IGroup)`

### getAllMembers

    public java.util.List getAllMembers()

  Get all members

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

### initialise

    public void initialise()

  Initialise

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

### lookForData

    public void lookForData()

  Attempts to find some data to display by looking for selections in each of the packages view, projects view, and package explorer (in turn). The first selection found is used to refresh the visualiser. It is called by the visualiser if it receives a paint request, but hasn't been given any data. Selections are generally preserved by Eclipse across sessions, so this should result in the visualisation from a previous session being restored. This method should not be used when the provider is initialised, because that may occur before the other views have been created.

### processMouseclick

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

  Process a mouse click on a member

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

### getAllGroups

    public java.util.List getAllGroups()

  Get all groups

  Specified by:
    `getAllGroups` in interface `IContentProvider`

### getGroupForFragment

    public JDTGroup getGroupForFragment(org.eclipse.jdt.core.IPackageFragment ipf)

  Get a JDTGroup to represent the give IPackageFragment (Java package)

  Parameters:
    `ipf` -
  Returns:

### getAllJDTGroups

    public java.util.List getAllJDTGroups(org.eclipse.jdt.core.IJavaProject JP)

  Get all package fragments for the given Java project

  Parameters:
    `JP` -
  Returns:
    List of JDTGroups

### getAllJDTMembers

    public java.util.List getAllJDTMembers(org.eclipse.jdt.core.IPackageFragment PF)

  Get all JDT members for the given IPackageFragment (Java package)

  Parameters:
    `PF` -
  Returns:
    List of JDTMembers

### getEmptyMessage

    public java.lang.String getEmptyMessage()

  Return message to display when visualiser is empty

  Specified by:
    `getEmptyMessage` in interface `IContentProvider`
  Returns:
    the message to display to the user when the Visualiser is empty
  See Also:
    `IContentProvider.getEmptyMessage()`

### 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
  See Also:
    `IContentProvider.getGroupViewIcon()`

### getCurrentProject

    public org.eclipse.jdt.core.IJavaProject getCurrentProject()

  Get the current project

  Returns:
    current IJavaProject

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD