public void run(ITextSelection selection) { IJavaElement input= SelectionConverter.getInput(fEditor); if (!ActionUtil.isProcessable(getShell(), input)) return; try { IJavaElement[] elements= SelectionConverter.codeResolveOrInputForked(fEditor); if (elements == null || elements.length == 0) return; IJavaElement candidate= elements[0]; if (elements.length > 1) { candidate= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_dialog_message); } if (candidate != null) { run(getResource(candidate)); } } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getDialogTitle(), ActionMessages.SelectionConverter_codeResolve_failed); } catch (InterruptedException e) { // cancelled } }
@Override public void run(ITextSelection selection) { IJavaElement input= SelectionConverter.getInput(fEditor); if (!ActionUtil.isProcessable(getShell(), input)) return; try { IJavaElement[] elements= SelectionConverter.codeResolveOrInputForked(fEditor); if (elements == null || elements.length == 0) return; IJavaElement candidate= elements[0]; if (elements.length > 1) { candidate= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_dialog_message); } if (candidate != null) { run(getResource(candidate)); } } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getDialogTitle(), ActionMessages.SelectionConverter_codeResolve_failed); } catch (InterruptedException e) { // cancelled } }
@Override public void run(ITextSelection selection) { IJavaElement input= SelectionConverter.getInput(fEditor); if (!ActionUtil.isProcessable(getShell(), input)) return; try { IJavaElement[] elements= SelectionConverter.codeResolveOrInputForked(fEditor); if (elements == null || elements.length == 0) return; IJavaElement candidate= elements[0]; if (elements.length > 1) { candidate= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_dialog_message); } if (candidate != null) { run(getResource(candidate)); } } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getDialogTitle(), ActionMessages.SelectionConverter_codeResolve_failed); } catch (InterruptedException e) { // cancelled } }
public void run(IResource resource) { if (resource == null) return; try { IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage(); IViewPart view= page.showView(IPageLayout.ID_RES_NAV); if (view instanceof ISetSelectionTarget) { ISelection selection= new StructuredSelection(resource); ((ISetSelectionTarget)view).selectReveal(selection); } } catch(PartInitException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed); } }
public void run(IResource resource) { if (resource == null) return; try { IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage(); IViewPart view= page.showView(JavaPlugin.ID_RES_NAV); if (view instanceof ISetSelectionTarget) { ISelection selection= new StructuredSelection(resource); ((ISetSelectionTarget)view).selectReveal(selection); } } catch(PartInitException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed); } }
public void run(IResource resource) { if (resource == null) return; try { IWorkbenchPage page= getSite().getWorkbenchWindow().getActivePage(); IViewPart view= page.showView(JavaPlugin.ID_RES_NAV); if (view instanceof ISetSelectionTarget) { ISelection selection= new StructuredSelection(resource); ((ISetSelectionTarget)view).selectReveal(selection); } } catch(PartInitException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.ShowInNavigatorView_error_activation_failed); } }