Package org.eclipse.mat.ui.util

## Class QueryContextMenu

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

    public class QueryContextMenu
    extends java.lang.Object

### Nested Class Summary

Nested Classes
`static class` `QueryContextMenu.QueryAction`

### Constructor Summary

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

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addContextActions​(PopupMenu manager, IStructuredSelection selection, Control control)`
`boolean` `anyInstances​(ISnapshot snapshot, java.lang.String cn)`
`boolean` `anySubInstances​(IClass cls)`
`boolean` `instanceOf​(ISnapshot snapshot, int o, java.lang.String className)` Instanceof test which works for simple objects and arrays
`boolean` `instanceOf​(ISnapshot snapshot, IClass cls, java.lang.String className)` Instanceof test which works for simple object and array types
`boolean` `unsuitableSubjects​(QueryDescriptor query, java.util.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 Detail

#### 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 Detail

#### addContextActions

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

#### instanceOf

    public boolean instanceOf​(ISnapshot snapshot,
                              int o,
                              java.lang.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,
                              java.lang.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,
                                java.lang.String cn)
                         throws SnapshotException

Throws:
  `SnapshotException`

#### anySubInstances

    public boolean anySubInstances​(IClass cls)

#### unsuitableSubjects

    public boolean unsuitableSubjects​(QueryDescriptor query,
                                      java.util.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.