@Override public void run() { Shell shell= JavaPlugin.getActiveWorkbenchShell(); SelectionDialog dialog= createAllPackagesDialog(shell); dialog.setTitle(getDialogTitle()); dialog.setMessage(PackagesMessages.GotoPackage_dialog_message); dialog.open(); Object[] res= dialog.getResult(); if (res != null && res.length == 1) gotoPackage((IPackageFragment)res[0]); }
private void gotoPackage(IPackageFragment p) { fPackageExplorer.selectReveal(new StructuredSelection(p)); if (!p.equals(getSelectedElement())) { MessageDialog.openInformation(fPackageExplorer.getSite().getShell(), getDialogTitle(), Messages.format(PackagesMessages.PackageExplorer_element_not_present, JavaElementLabels.getElementLabel(p, JavaElementLabels.ALL_DEFAULT))); } }
GotoPackageAction(PackageExplorerPart part) { super(PackagesMessages.GotoPackage_action_label); setDescription(PackagesMessages.GotoPackage_action_description); fPackageExplorer= part; PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GOTO_PACKAGE_ACTION); }
fGotoPackageAction= new GotoPackageAction(fPart); fGotoResourceAction= new GotoResourceAction(fPart); fCollapseAllAction= new CollapseAllAction(fPart);
fGotoPackageAction= new GotoPackageAction(fPart); fGotoResourceAction= new GotoResourceAction(fPart);
@Override public void run() { Shell shell= JavaPlugin.getActiveWorkbenchShell(); SelectionDialog dialog= createAllPackagesDialog(shell); dialog.setTitle(getDialogTitle()); dialog.setMessage(PackagesMessages.GotoPackage_dialog_message); dialog.open(); Object[] res= dialog.getResult(); if (res != null && res.length == 1) gotoPackage((IPackageFragment)res[0]); }
private void gotoPackage(IPackageFragment p) { fPackageExplorer.selectReveal(new StructuredSelection(p)); if (!p.equals(getSelectedElement())) { MessageDialog.openInformation(fPackageExplorer.getSite().getShell(), getDialogTitle(), Messages.format(PackagesMessages.PackageExplorer_element_not_present, p.getElementName())); } }
GotoPackageAction(PackageExplorerPart part) { super(PackagesMessages.GotoPackage_action_label); setDescription(PackagesMessages.GotoPackage_action_description); fPackageExplorer= part; PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GOTO_PACKAGE_ACTION); }
fGotoPackageAction= new GotoPackageAction(fPart); fGotoResourceAction= new GotoResourceAction(fPart);
public void run() { try { Shell shell= JavaPlugin.getActiveWorkbenchShell(); SelectionDialog dialog= createAllPackagesDialog(shell); dialog.setTitle(getDialogTitle()); dialog.setMessage(PackagesMessages.GotoPackage_dialog_message); dialog.open(); Object[] res= dialog.getResult(); if (res != null && res.length == 1) gotoPackage((IPackageFragment)res[0]); } catch (JavaModelException e) { } }
private void gotoPackage(IPackageFragment p) { fPackageExplorer.selectReveal(new StructuredSelection(p)); if (!p.equals(getSelectedElement())) { MessageDialog.openInformation(fPackageExplorer.getSite().getShell(), getDialogTitle(), Messages.format(PackagesMessages.PackageExplorer_element_not_present, JavaElementLabels.getElementLabel(p, JavaElementLabels.ALL_DEFAULT))); } }
GotoPackageAction(PackageExplorerPart part) { super(PackagesMessages.GotoPackage_action_label); setDescription(PackagesMessages.GotoPackage_action_description); fPackageExplorer= part; PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GOTO_PACKAGE_ACTION); }