@Override public boolean handleExternalLink(final URL url, Display display) { if (fCurrent == null || !(fCurrent.getInputElement() instanceof URL && url.toExternalForm().equals(((URL) fCurrent.getInputElement()).toExternalForm()))) { fCurrent= new URLBrowserInput(fCurrent, url); if (fBackAction != null) { fBackAction.update(); fForthAction.update(); } if (fInputSelectionProvider != null) fInputSelectionProvider.setSelection(new StructuredSelection(url)); } return false; }
@Override public boolean handleExternalLink(final URL url, Display display) { if (fCurrent == null || !(fCurrent.getInputElement() instanceof URL && url.toExternalForm().equals(((URL) fCurrent.getInputElement()).toExternalForm()))) { fCurrent= new URLBrowserInput(fCurrent, url); if (fBackAction != null) { fBackAction.update(); fForthAction.update(); } if (fInputSelectionProvider != null) fInputSelectionProvider.setSelection(new StructuredSelection(url)); } return false; }
@Override public void handleTextSet() { IJavaElement input= getOrignalInput(); if (input == null) return; if (fCurrent == null || !fCurrent.getInputElement().equals(input)) { fCurrent= new JavaElementBrowserInput(null, input); if (fBackAction != null) { fBackAction.update(); fForthAction.update(); } } } }));
/** * Set input to the given input. * * @param input the input for the view * @since 3.4 */ public void setInput(BrowserInput input) { fCurrent= input; Object inputElement= input.getInputElement(); if (inputElement instanceof IJavaElement) { setInput((IJavaElement) inputElement); } else if (inputElement instanceof URL) { fBrowser.setUrl(((URL) inputElement).toExternalForm()); if (fInputSelectionProvider != null) fInputSelectionProvider.setSelection(new StructuredSelection(inputElement)); } fForthAction.update(); fBackAction.update(); }
/** * Set input to the given input. * * @param input the input for the view * @since 3.4 */ public void setInput(BrowserInput input) { fCurrent= input; Object inputElement= input.getInputElement(); if (inputElement instanceof IJavaElement) { setInput((IJavaElement) inputElement); } else if (inputElement instanceof URL) { fBrowser.setUrl(((URL) inputElement).toExternalForm()); if (fInputSelectionProvider != null) fInputSelectionProvider.setSelection(new StructuredSelection(inputElement)); } fForthAction.update(); fBackAction.update(); }
@Override public void handleTextSet() { IJavaElement input= getOrignalInput(); if (input == null) return; if (fCurrent == null || !fCurrent.getInputElement().equals(input)) { fCurrent= new JavaElementBrowserInput(null, input); if (fBackAction != null) { fBackAction.update(); fForthAction.update(); } } } }));
public ForthAction() { setText(InfoViewMessages.JavadocView_action_forward_name); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }
public ForthAction() { setText(InfoViewMessages.JavadocView_action_forward_name); ISharedImages images= PlatformUI.getWorkbench().getSharedImages(); setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); update(); }