/** Tests if the current workbench selection is a suitable container to use. */ private void initialize() { if (selection != null && selection.isEmpty() == false && selection instanceof IStructuredSelection) { IStructuredSelection ssel = (IStructuredSelection) selection; if (ssel.size() > 1) { return; } Object obj = ssel.getFirstElement(); if (obj instanceof IResource) { IContainer container; if (obj instanceof IContainer) { container = (IContainer) obj; } else { container = ((IResource) obj).getParent(); } containerText.setText(container.getFullPath().toString()); } } fileText.setText("new.gaml"); }
private void handleOpen(IStructuredSelection selection) { Object object = selection.getFirstElement(); if (object instanceof IProductPlugin) { ManifestEditor.openPluginEditor(((IProductPlugin) object).getId()); } }