final OpenDeclarationAction openDeclarationAction= new OpenDeclarationAction(iControl); tbm.add(openDeclarationAction);
@Override public void inputChanged(Object newInput) { backAction.update(); forwardAction.update(); if (newInput == null) { selectionProvider.setSelection(new StructuredSelection()); } else if (newInput instanceof BrowserInformationControlInput) { BrowserInformationControlInput input= (BrowserInformationControlInput) newInput; Object inputElement= input.getInputElement(); selectionProvider.setSelection(new StructuredSelection(inputElement)); boolean isJavaElementInput= inputElement instanceof IJavaElement; showInJavadocViewAction.setEnabled(isJavaElementInput); openDeclarationAction.setEnabled(isJavaElementInput); } } };
public OpenDeclarationAction(BrowserInformationControl infoControl) { fInfoControl= infoControl; setText(JavaHoverMessages.JavadocHover_openDeclaration); JavaPluginImages.setLocalImageDescriptors(this, "goto_input.png"); //$NON-NLS-1$ //TODO: better images }
final OpenDeclarationAction openDeclarationAction= new OpenDeclarationAction(iControl); tbm.add(openDeclarationAction);
@Override public void inputChanged(Object newInput) { backAction.update(); forwardAction.update(); if (newInput == null) { selectionProvider.setSelection(new StructuredSelection()); } else if (newInput instanceof BrowserInformationControlInput) { BrowserInformationControlInput input= (BrowserInformationControlInput) newInput; Object inputElement= input.getInputElement(); selectionProvider.setSelection(new StructuredSelection(inputElement)); boolean isJavaElementInput= inputElement instanceof IJavaElement; showInJavadocViewAction.setEnabled(isJavaElementInput); openDeclarationAction.setEnabled(isJavaElementInput); } } };
public OpenDeclarationAction(BrowserInformationControl infoControl) { fInfoControl= infoControl; setText(JavaHoverMessages.JavadocHover_openDeclaration); JavaPluginImages.setLocalImageDescriptors(this, "goto_input.png"); //$NON-NLS-1$ //TODO: better images }