Skip to content

Commit

Permalink
fix "hiding" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T authored and jukzi committed Jan 26, 2024
1 parent f656d75 commit f3b06e9
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,12 +646,12 @@ protected TreeModelViewer createTreeViewer(Composite parent) {

int style = getViewerStyle();
fPresentationContext = new DebugModelPresentationContext(getPresentationContextId(), this, fModelPresentation);
final TreeModelViewer variablesViewer = new TreeModelViewer(parent, style, fPresentationContext);
variablesViewer.getControl().addFocusListener(new FocusAdapter() {
final TreeModelViewer v = new TreeModelViewer(parent, style, fPresentationContext);
v.getControl().addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
fTreeHasFocus = true;
fSelectionProvider.setActiveProvider(variablesViewer);
fSelectionProvider.setActiveProvider(v);
setGlobalActions();
}

Expand All @@ -665,7 +665,7 @@ public void focusLost(FocusEvent e){
getViewSite().getActionBars().updateActionBars();
}
});
variablesViewer.getPresentationContext().addPropertyChangeListener(
v.getPresentationContext().addPropertyChangeListener(
event -> {
if (IPresentationContext.PROPERTY_COLUMNS.equals(event.getProperty())) {
IAction action = getAction("ShowTypeNames"); //$NON-NLS-1$
Expand All @@ -675,10 +675,10 @@ public void focusLost(FocusEvent e){
}
});

variablesViewer.addPostSelectionChangedListener(getTreeSelectionChangedListener());
v.addPostSelectionChangedListener(getTreeSelectionChangedListener());
DebugUITools.addPartDebugContextListener(getSite(), this);

return variablesViewer;
return v;
}

private void setGlobalActions() {
Expand Down

0 comments on commit f3b06e9

Please sign in to comment.