}
}
private void handleEdit() {
Namespace namespace = null;
Object element = ((StructuredSelection) psrViewer.getSelection()).getFirstElement();
// get parent if element is string
if (element instanceof String) {
element = ((PsrController)psrViewer.getContentProvider()).getParent(element);
}
if (element instanceof Namespace) {
namespace = ((Namespace) element).clone();
}
if (namespace != null) {
PsrDialog diag = new PsrDialog(psrViewer.getTree().getShell(),
namespace.clone(),
getPage().getComposerEditor().getProject());
if (diag.open() == Dialog.OK) {
Namespace nmspc = psr.get(namespace.getNamespace());
nmspc.clear();
nmspc.setNamespace(diag.getNamespace().getNamespace());
nmspc.addPaths(diag.getNamespace().getPaths());
}
}
}