コード例 #1
0
 private Combo createAssertionCombo() {
   final Combo c = new Combo(this, SWT.NONE);
   for (final Assertion assertion : Assertion.values()) {
     c.add(assertion.toString());
   }
   c.select(0);
   c.addSelectionListener(
       new SelectionAdapter() {
         @Override
         public void widgetSelected(final SelectionEvent e) {
           AssertionComposite.this.orCondition.updateFilter();
         }
       });
   final RowData rowData = new RowData();
   rowData.width = 75;
   c.setLayoutData(rowData);
   return c;
 }
コード例 #2
0
 public Filter getExpression() {
   final String attr = this.attributeText.getText();
   final String ass = this.assertionCombo.getText();
   final String val = this.valueText.getText();
   final FilterAssertion assertion = new FilterAssertion(attr, Assertion.fromString(ass), val);
   if (val.contains("*")) // $NON-NLS-1$
   {
     assertion.setAssertion(Assertion.SUBSTRING);
     assertion.setValue(val.split("\\*")); // $NON-NLS-1$
   }
   if (this.notCheck.getSelection()) {
     return FilterExpression.negate(assertion);
   }
   return assertion;
 }