/** * Creates the actions and action groups for this view. */ protected void createActions() { fGotoInputAction= new GotoInputAction(this); fGotoInputAction.setEnabled(false); fCopyToClipboardAction= new CopyToClipboardAction(getViewSite()); ISelectionProvider provider= getSelectionProvider(); if (provider != null) provider.addSelectionChangedListener(fCopyToClipboardAction); }
private void doSetInput(Object input, String description) { doSetInput(input); boolean hasValidInput= input != null; fGotoInputAction.setEnabled(hasValidInput); IJavaElement inputElement= getOrignalInput(); String toolTip= hasValidInput && inputElement != null ? JavaElementLabels.getElementLabel(inputElement, TOOLTIP_LABEL_FLAGS) : ""; //$NON-NLS-1$ setContentDescription(description); setTitleToolTip(toolTip); }
private void doSetInput(Object input, String description) { doSetInput(input); boolean hasValidInput= input != null; fGotoInputAction.setEnabled(hasValidInput); IJavaElement inputElement= getOrignalInput(); String toolTip= hasValidInput && inputElement != null ? JavaElementLabels.getElementLabel(inputElement, TOOLTIP_LABEL_FLAGS) : ""; //$NON-NLS-1$ setContentDescription(description); setTitleToolTip(toolTip); }
private void doSetInput(Object input) { setInput(input); fGotoInputAction.setEnabled(true); IJavaElement inputElement= getInput(); long flags; if (inputElement instanceof ILocalVariable) flags= LOCAL_VARIABLE_TITLE_FLAGS; else flags= TITLE_FLAGS; setContentDescription(JavaElementLabels.getElementLabel(inputElement, flags)); setTitleToolTip(JavaElementLabels.getElementLabel(inputElement, TOOLTIP_LABEL_FLAGS)); } }
/** * Creates the actions and action groups for this view. */ protected void createActions() { fGotoInputAction= new GotoInputAction(this); fGotoInputAction.setEnabled(false); fCopyToClipboardAction= new CopyToClipboardAction(getViewSite()); fToggleLinkAction= new LinkAction(); fToggleLinkAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR); fToggleLinkAction.updateLinkImage(false); ISelectionProvider provider= getSelectionProvider(); if (provider != null) provider.addSelectionChangedListener(fCopyToClipboardAction); }
/** * Creates the actions and action groups for this view. */ protected void createActions() { fGotoInputAction= new GotoInputAction(this); fGotoInputAction.setEnabled(false); fCopyToClipboardAction= new CopyToClipboardAction(getViewSite()); fToggleLinkAction= new LinkAction(); fToggleLinkAction.setActionDefinitionId(IWorkbenchCommandConstants.NAVIGATE_TOGGLE_LINK_WITH_EDITOR); fToggleLinkAction.updateLinkImage(false); ISelectionProvider provider= getSelectionProvider(); if (provider != null) provider.addSelectionChangedListener(fCopyToClipboardAction); }