void (AnActionButton button) { final ExternalResourceManager erm = ExternalResourceManager.getInstance(); final List<String> allURIs = new ArrayList<>(Arrays.asList(erm.getResourceUrls(null, true))); final Collection<Namespace> namespaces = myNamespaceTableModel.getNamespaces(); for (Namespace namespace : namespaces) { allURIs.remove(namespace.getUri()); } Collections.sort(allURIs); final DataContext dataContext = DataManager.getInstance().getDataContext(myNamespaceTable); final Project project = CommonDataKeys.PROJECT.getData(dataContext); final AddNamespaceDialog dlg = new AddNamespaceDialog(project, myUnresolvedPrefixes, allURIs, AddNamespaceDialog.Mode.EDITABLE); if (dlg.showAndGet()) { myNamespaceTableModel.addNamespace(new Namespace(dlg.getPrefix(), dlg.getURI())); } }