@Override public void handleInlineJavadocLink(IJavaElement target) { JavaElementBrowserInput newInput= new JavaElementBrowserInput(fCurrent, target); JavadocView.this.setInput(newInput); }
@Override public void run() { setLinkingEnabled(!fLinking); updateLinkImage(false); }
protected void createActions() { super.createActions(); fSelectAllAction= new SelectAllAction(getControl(), (SelectionProvider)getSelectionProvider()); }
/** * 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); }
/** * Refreshes the view. * * @since 3.3 */ private void refresh() { doSetInput(computeInput(getOrignalInput())); }
/** * Finds and returns the Java elements for the given editor selection. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException if accessing the type root fails */ public static IJavaElement[] codeResolve(JavaEditor editor, ITextSelection selection) throws JavaModelException { return codeResolve(getInput(editor), selection); }
/** * Finds and returns the Java element that contains the * text selection in the given editor. * * @param editor the Java editor * @param selection the text selection * @return the Java elements for the given editor selection * @throws JavaModelException */ public static IJavaElement getElementAtOffset(JavaEditor editor, ITextSelection selection) throws JavaModelException { return getElementAtOffset(getInput(editor), selection); }
public LinkAction() { super(InfoViewMessages.LinkAction_label, SWT.TOGGLE); setToolTipText(InfoViewMessages.LinkAction_tooltip); setChecked(fLinking); }
protected IAction getCopyToClipboardAction() { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 if (fIsUsingBrowserWidget) return null; return super.getCopyToClipboardAction(); }
@Override public void widgetSelected(SelectionEvent e) { fireSelectionChanged(); } });
/** * Determines all necessary details and delegates the computation into * a background thread. * * @param part the workbench part */ private void computeAndSetInput(final IWorkbenchPart part) { computeAndDoSetInput(part, null, false); }
@Override public void handleInlineJavadocLink(IJavaElement target) { JavaElementBrowserInput newInput= new JavaElementBrowserInput(fCurrent, target); JavadocView.this.setInput(newInput); }
@Override public void run() { setLinkingEnabled(!fLinking); updateLinkImage(false); }
@Override protected IAction getCopyToClipboardAction() { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 if (fIsUsingBrowserWidget) return null; return super.getCopyToClipboardAction(); }
@Override public void widgetSelected(SelectionEvent e) { fireSelectionChanged(); } });
/** * Sets the input for this view. * * @param element the java element */ public final void setInput(final IJavaElement element) { computeAndDoSetInput(null, element, false); }
@Override protected IAction getCopyToClipboardAction() { // FIXME: see https://bugs.eclipse.org/bugs/show_bug.cgi?id=63022 if (fIsUsingBrowserWidget) return null; return super.getCopyToClipboardAction(); }
/** * Determines all necessary details and delegates the computation into * a background thread. * * @param part the workbench part */ private void computeAndSetInput(final IWorkbenchPart part) { computeAndDoSetInput(part, null, false); }
/** * Sets whether this info view reacts to selection * changes in the workbench. * * @param enabled if <code>true</code> then the input is set on selection changes */ protected void setLinkingEnabled(boolean enabled) { fLinking= enabled; if (fLinking && fLastSelectionProvider != null) { computeAndDoSetInput(fLastSelectionProvider, null, true); } }