Package org.eclipse.mat.ui.util

# Class QueryContextMenu

java.lang.Object
org.eclipse.mat.ui.util.QueryContextMenu

public class QueryContextMenu extends Object

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`QueryContextMenu.QueryAction`

## Constructor Summary

Constructors
Constructor
Description
`QueryContextMenu(AbstractEditorPane pane, ContextProvider provider)`
`QueryContextMenu(AbstractEditorPane pane, QueryResult result)`
`QueryContextMenu(MultiPaneEditor editor, ContextProvider provider)`
`QueryContextMenu(MultiPaneEditor editor, QueryResult result)`

## Method Summary

Modifier and Type
Method
Description
`final void`
`addContextActions(PopupMenu manager, IStructuredSelection selection, Control control)`
`boolean`
`anyInstances(ISnapshot snapshot, String cn)`
`boolean`
`anySubInstances(IClass cls)`
`boolean`
`instanceOf(ISnapshot snapshot, int o, String className)`
Instanceof test which works for simple objects and arrays
`boolean`
`instanceOf(ISnapshot snapshot, IClass cls, String className)`
Instanceof test which works for simple object and array types
`boolean`
`unsuitableSubjects(QueryDescriptor query, List<IContextObject> menuContext)`
See if the menuContext cannot possibly satisfy the requirements of the query.

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

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

## Constructor Details

### QueryContextMenu

public QueryContextMenu(AbstractEditorPane pane, QueryResult result)

### QueryContextMenu

public QueryContextMenu(MultiPaneEditor editor, QueryResult result)

### QueryContextMenu

public QueryContextMenu(MultiPaneEditor editor, ContextProvider provider)

### QueryContextMenu

public QueryContextMenu(AbstractEditorPane pane, ContextProvider provider)

## Method Details

### addContextActions

public final void addContextActions(PopupMenu manager, IStructuredSelection selection, Control control)

### instanceOf

public boolean instanceOf(ISnapshot snapshot, int o, String className) throws SnapshotException
Instanceof test which works for simple objects and arrays

Parameters:
  `snapshot` -
  `o` - the object to be tested
  `className` - is an instance of this class?
Returns:
  true if an instance
Throws:
  `SnapshotException`

### instanceOf

public boolean instanceOf(ISnapshot snapshot, IClass cls, String className) throws SnapshotException
Instanceof test which works for simple object and array types

Parameters:
  `snapshot` -
  `cls` -
  `className` -
Returns:
  true if an instance
Throws:
  `SnapshotException`

### anyInstances

public boolean anyInstances(ISnapshot snapshot, String cn) throws SnapshotException

Throws:
  `SnapshotException`

### anySubInstances

public boolean anySubInstances(IClass cls)

### unsuitableSubjects

public boolean unsuitableSubjects(QueryDescriptor query, List<IContextObject> menuContext)
See if the menuContext cannot possibly satisfy the requirements of the query. Needs to be reasonably efficient, so if the calculation would take too long then it is okay to return false.

Parameters:
  `query` -
  `menuContext` -
Returns:
  true if the menuContext is unsuitable.