Skip to content

Commit

Permalink
show example url
Browse files Browse the repository at this point in the history
this makes it easier for the user to know what kind of URL to put in there, because you can view the example URL in the browser and see what it should contain

Signed-off-by: Christoph Rueger <[email protected]>
  • Loading branch information
chrisrueger committed Sep 29, 2024
1 parent 39d468f commit 3e12ce8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ public List<TemplateInfo> read(Parameters ps) {
* templates, see {@link #getAvailableTemplates()} internally maintained.
*/
public void add(TemplateInfo info) {
this.templates.add(info);
if (!templates.contains(info)) {
this.templates.add(info);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ protected Composite createDialogArea(Composite parent) {
container.setLayout(layout);

Label label = new Label(container, SWT.NONE);
label.setText("Template definitions. You can enter a URL or a file path");
label.setText(
"Template definitions. You can enter a URL or a file path");
label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 12, 1));

Text textField = new Text(container, SWT.BORDER);
textField.setText(
"https://raw.githubusercontent.com/bndtools/workspace-templates/refs/heads/master/index.bnd");
GridData textFieldLayoutData = new GridData(SWT.FILL, SWT.CENTER, true, false, 11, 1);
textFieldLayoutData.minimumWidth = 200;
textField.setLayoutData(textFieldLayoutData);
Expand Down

0 comments on commit 3e12ce8

Please sign in to comment.