Skip to content

Commit

Permalink
Move the 'search in' selection to a menu
Browse files Browse the repository at this point in the history
  • Loading branch information
gzsombor committed Nov 26, 2024
1 parent b9a9e6b commit c3f8667
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 310 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ protected void open(ISelection selection, boolean activate) {
private CancelSearchAction fCancelSearchAction;
private ExpandWithConstructorsAction fExpandWithConstructorsAction;
private RemoveFromViewAction fRemoveFromViewAction;
private ShowSearchInDialogAction fShowSearchInDialogAction;
private CompositeActionGroup fActionGroups;
private CallHierarchyViewer fCallHierarchyViewer;
private boolean fShowCallDetails;
Expand All @@ -245,13 +244,15 @@ protected void open(ISelection selection, boolean activate) {
private boolean fIsPinned;
private PinCallHierarchyViewAction fPinViewAction;
private ShowCallHierarchyFilterDialogAction fFiltersAction;
private final SearchInSelectionManager searchInManager;


public CallHierarchyViewPart() {
super();

fDialogSettings = JavaPlugin.getDefault().getDialogSettings();

searchInManager= new SearchInSelectionManager(this);
fIsPinned= false;
}

Expand Down Expand Up @@ -719,9 +720,10 @@ private void fillViewMenu() {
fieldSubMenu.add(fToggleFieldModeAction);
}
viewMenu.add(fieldSubMenu);
viewMenu.add(fShowSearchInDialogAction);
viewMenu.add(searchInManager.createSearchInMenu());
}


@Override
public void dispose() {
if (fActionGroups != null)
Expand Down Expand Up @@ -1040,7 +1042,6 @@ private void makeActions() {
fFocusOnSelectionAction = new FocusOnSelectionAction(this);
fCopyAction= new CopyCallHierarchyAction(this, fClipboard, fCallHierarchyViewer);
fSearchScopeActions = new SearchScopeActionGroup(this, fDialogSettings);
fShowSearchInDialogAction= new ShowSearchInDialogAction(this, fCallHierarchyViewer);
fFiltersActionGroup = new CallHierarchyFiltersActionGroup(this,
fCallHierarchyViewer);
fHistoryDropDownAction = new HistoryDropDownAction(this);
Expand Down Expand Up @@ -1153,7 +1154,7 @@ private void setContentDescription(int includeMask) {
* @since 3.7
*/
private int getIncludeMask() {
return fShowSearchInDialogAction.getSearchInDialog().getIncludeMask();
return this.searchInManager.getIncludeMask();
}

/**
Expand Down

This file was deleted.

Loading

0 comments on commit c3f8667

Please sign in to comment.