use of bndtools.shared.URLDialog in project bndtools by bndtools.
the class ReposPreferencePage method doAddRepo.
private void doAddRepo() {
URLDialog dialog = new URLDialog(getShell(), "Add repository URL", false);
if (dialog.open() == Window.OK) {
URI location = dialog.getLocation();
String locationStr = location.toString();
templateRepos.add(locationStr);
vwrRepos.add(locationStr);
}
}
use of bndtools.shared.URLDialog in project bndtools by bndtools.
the class RepositorySelectionPart method doAddStandaloneLink.
private void doAddStandaloneLink() {
try {
URLDialog dialog = new URLDialog(editor.getSite().getShell(), "Add repository URL");
if (dialog.open() == Window.OK) {
URI location = dialog.getLocation();
Attrs attrs = new Attrs();
if (dialog.getName() != null)
attrs.put("name", dialog.getName());
HeaderClause clause = new HeaderClause(location.toString(), attrs);
repositories.add(clause);
refreshFromModel();
markDirty();
}
} catch (Exception e) {
throw Exceptions.duck(e);
}
}
Aggregations