Permalink
Browse files

GUI field for adding tag to ScopedSelection.

  • Loading branch information...
1 parent acaeb2f commit 2d9d5bd39795326485c4882eb9a81102b7306ffc @cderoove committed Jan 11, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 ExapusRAP/src/exapus/gui/editors/view/definition/SelectionDialog.java
@@ -36,6 +36,7 @@
private Text scopedSelectionNameText;
private Selection selection;
+ private Text scopedSelectionTagText;
public Selection getSelection() {
return selection;
@@ -119,6 +120,12 @@ public void selectionChanged(SelectionChangedEvent event) {
nameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
scopedSelectionNameText = new Text(scopedSelectionComposite, SWT.BORDER);
scopedSelectionNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,1,1));
+
+ Label tagLabel = new Label(scopedSelectionComposite, SWT.NONE);
+ tagLabel.setText("Tag:");
+ tagLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));
+ scopedSelectionTagText = new Text(scopedSelectionComposite, SWT.BORDER);
+ scopedSelectionTagText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,1,1));
return composite;
}
@@ -156,6 +163,9 @@ private void updateSelection() {
if(selScope.isEmpty())
return;
selection = new ScopedSelection(name, (Scope) selScope.getFirstElement());
+ String scopedSelectionTag = scopedSelectionTagText.getText().trim();
+ if(!scopedSelectionTag.isEmpty())
+ ((ScopedSelection) selection).setTag(scopedSelectionTag);
return;
}

0 comments on commit 2d9d5bd

Please sign in to comment.