Class CallHierarchyViewPart
- java.lang.Object
-
- org.eclipse.core.commands.common.EventManager
-
- org.eclipse.ui.part.WorkbenchPart
-
- org.eclipse.ui.part.ViewPart
-
- com._1c.g5.v8.dt.bsl.ui.editor.callhierarchy.CallHierarchyViewPart
-
- All Implemented Interfaces:
ICallHierarchyQueryListener
,org.eclipse.core.runtime.IAdaptable
,org.eclipse.core.runtime.IExecutableExtension
,ISelectionChangedListener
,org.eclipse.ui.IPersistable
,org.eclipse.ui.IViewPart
,org.eclipse.ui.IWorkbenchPart
,org.eclipse.ui.IWorkbenchPart2
,org.eclipse.ui.IWorkbenchPart3
,org.eclipse.ui.part.IWorkbenchPartOrientation
public class CallHierarchyViewPart extends org.eclipse.ui.part.ViewPart implements ISelectionChangedListener, ICallHierarchyQueryListener
Special view for Call hierarchy for Built-In language
-
-
Field Summary
Fields Modifier and Type Field Description static int
CALL_MODE_CALLEES
static int
CALL_MODE_CALLERS
static Object
DEFERRED_CONTENT_FAMILY
static String
ID_CALL_HIERARCHY
-
Constructor Summary
Constructors Constructor Description CallHierarchyViewPart()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelJobs()
Cancels building of call hierarchyvoid
computeOrientation()
Computes orientation forLocationViewer
void
createPartControl(org.eclipse.swt.widgets.Composite parent)
int
getCallMode()
Gets current Call hierarchy call modeICallHierarchyResult
getCurrentCallHierarchyResult()
Gets currentICallHierarchyResult
ICallHierarchyResult[]
getHistoryEntries()
Gets all elements if Call hierarchy historyICallHierarchyResult
getInputElements()
Gets current input elementsISelection
getSelection()
Gets actual call hierarchy view selectionTreeViewer
getTreeViewer()
Gets call hieerarchy tree viewervoid
gotoHistoryEntry(ICallHierarchyResult entry)
Shows call hierarchy from the element in historyvoid
handleFindReferences(ISelection selection)
Find references for element from selectionvoid
handleFocusOn(ISelection selection)
Focuses on selection element from call hierarchy viewvoid
handleOpen(ISelection selection)
Open text editor by selection in call hierarchy viewboolean
isPinned()
Gets actual state of action pinvoid
queryAdded(ICallHierarchyQuery query)
Called when an query has been added to the system.void
queryFinished(ICallHierarchyQuery query)
Called after anISearchQuery
has finished.void
queryRemoved(ICallHierarchyQuery query)
Called when a query has been removed.void
queryStarting(ICallHierarchyQuery query)
Called before anISearchQuery
is starting.void
refresh()
Refreshes viewvoid
saveState(org.eclipse.ui.IMemento memento)
void
selectionChanged(SelectionChangedEvent event)
void
setCallMode(int mode)
Sets actual call hierarchy modevoid
setCancelEnabled(boolean enabled)
Changes enabled ofCallHierarchyViewPageActions.CancelSearchAction
void
setFocus()
void
setHistoryEntries(ICallHierarchyResult[] entries)
Sets the history entriesvoid
setInputElements(ICallHierarchyResult member)
Sets new input for showing call hierarchyvoid
setOrientation(boolean isHierarchyOnly)
Sets actual orientation forLocationViewer
void
setPinned(boolean pinned)
Change state of properties 'pin' of view-
Methods inherited from class org.eclipse.ui.part.ViewPart
checkSite, getViewSite, init, init, setContentDescription, setInitializationData, setPartName
-
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPartPropertyListener, addPropertyListener, dispose, firePartPropertyChanged, firePropertyChange, getAdapter, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, getTitleToolTip, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
-
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
-
-
-
Field Detail
-
ID_CALL_HIERARCHY
public static final String ID_CALL_HIERARCHY
- See Also:
- Constant Field Values
-
DEFERRED_CONTENT_FAMILY
public static final Object DEFERRED_CONTENT_FAMILY
-
CALL_MODE_CALLERS
public static final int CALL_MODE_CALLERS
- See Also:
- Constant Field Values
-
CALL_MODE_CALLEES
public static final int CALL_MODE_CALLEES
- See Also:
- Constant Field Values
-
-
Method Detail
-
setFocus
public void setFocus()
- Specified by:
setFocus
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
setFocus
in classorg.eclipse.ui.part.WorkbenchPart
-
getTreeViewer
public TreeViewer getTreeViewer()
Gets call hieerarchy tree viewer- Returns:
- call hieerarchy tree viewer, can't be
null
-
getCallMode
public int getCallMode()
Gets current Call hierarchy call mode- Returns:
- current Call hierarchy call mode
-
setHistoryEntries
public void setHistoryEntries(ICallHierarchyResult[] entries)
Sets the history entries- Parameters:
entries
- the new history entries, can't benull
-
isPinned
public boolean isPinned()
Gets actual state of action pin- Returns:
true
if is pinned,false
otherwise
-
getCurrentCallHierarchyResult
public ICallHierarchyResult getCurrentCallHierarchyResult()
Gets currentICallHierarchyResult
- Returns:
- current
ICallHierarchyResult
, can't benull
-
setPinned
public void setPinned(boolean pinned)
Change state of properties 'pin' of view- Parameters:
pinned
-true
if view should be is pinned,false
otherwise
-
setInputElements
public void setInputElements(ICallHierarchyResult member)
Sets new input for showing call hierarchy- Parameters:
member
- newICallHierarchyResult
, can benull
if there is no for showing
-
refresh
public void refresh()
Refreshes view
-
saveState
public void saveState(org.eclipse.ui.IMemento memento)
- Specified by:
saveState
in interfaceorg.eclipse.ui.IPersistable
- Specified by:
saveState
in interfaceorg.eclipse.ui.IViewPart
- Overrides:
saveState
in classorg.eclipse.ui.part.ViewPart
-
getInputElements
public ICallHierarchyResult getInputElements()
Gets current input elements- Returns:
- current input elements, can be
null
if there is no for showing
-
createPartControl
public void createPartControl(org.eclipse.swt.widgets.Composite parent)
- Specified by:
createPartControl
in interfaceorg.eclipse.ui.IWorkbenchPart
- Specified by:
createPartControl
in classorg.eclipse.ui.part.WorkbenchPart
-
queryAdded
public void queryAdded(ICallHierarchyQuery query)
Description copied from interface:ICallHierarchyQueryListener
Called when an query has been added to the system.- Specified by:
queryAdded
in interfaceICallHierarchyQueryListener
- Parameters:
query
- the query that has been added, can't benull
-
queryRemoved
public void queryRemoved(ICallHierarchyQuery query)
Description copied from interface:ICallHierarchyQueryListener
Called when a query has been removed.- Specified by:
queryRemoved
in interfaceICallHierarchyQueryListener
- Parameters:
query
- the query that has been removed, can't benull
-
queryStarting
public void queryStarting(ICallHierarchyQuery query)
Description copied from interface:ICallHierarchyQueryListener
Called before anISearchQuery
is starting.- Specified by:
queryStarting
in interfaceICallHierarchyQueryListener
- Parameters:
query
- the query about to start, can't benull
-
queryFinished
public void queryFinished(ICallHierarchyQuery query)
Description copied from interface:ICallHierarchyQueryListener
Called after anISearchQuery
has finished.- Specified by:
queryFinished
in interfaceICallHierarchyQueryListener
- Parameters:
query
- the query that has finished, can't benull
-
getHistoryEntries
public ICallHierarchyResult[] getHistoryEntries()
Gets all elements if Call hierarchy history- Returns:
- all elements if Call hierarchy history, can't be
null
-
gotoHistoryEntry
public void gotoHistoryEntry(ICallHierarchyResult entry)
Shows call hierarchy from the element in history- Parameters:
entry
- history call hierarchy element, can't benull
-
handleOpen
public void handleOpen(ISelection selection)
Open text editor by selection in call hierarchy view- Parameters:
selection
- selection from call hierarchy view, can benull
-
handleFocusOn
public void handleFocusOn(ISelection selection)
Focuses on selection element from call hierarchy view- Parameters:
selection
- selection from call hierarchy view, can benull
-
handleFindReferences
public void handleFindReferences(ISelection selection)
Find references for element from selection- Parameters:
selection
- selection from call hierarchy view, can benull
-
selectionChanged
public void selectionChanged(SelectionChangedEvent event)
- Specified by:
selectionChanged
in interfaceISelectionChangedListener
-
getSelection
public ISelection getSelection()
Gets actual call hierarchy view selection- Returns:
- actual call hierarchy view selection, can't be
null
-
setCallMode
public void setCallMode(int mode)
Sets actual call hierarchy mode- Parameters:
mode
- actual call hierarchy mode
-
computeOrientation
public void computeOrientation()
Computes orientation forLocationViewer
-
setOrientation
public void setOrientation(boolean isHierarchyOnly)
Sets actual orientation forLocationViewer
- Parameters:
isHierarchyOnly
-true
if we shouldn't showLocationViewer
,false
otherwise
-
cancelJobs
public void cancelJobs()
Cancels building of call hierarchy
-
setCancelEnabled
public void setCancelEnabled(boolean enabled)
Changes enabled ofCallHierarchyViewPageActions.CancelSearchAction
- Parameters:
enabled
-true
if action is enabled,false
otherwise
-
-