private Label makePatternLabel( Pattern52 p ) { StringBuilder patternLabel = new StringBuilder(); String factType = p.getFactType(); String boundName = p.getBoundName(); if ( factType != null && factType.length() > 0 ) { if ( p.isNegated() ) { patternLabel.append( Constants.INSTANCE.negatedPattern() ).append( " " ).append( factType ); } else { patternLabel.append( factType ).append( " [" ).append( boundName ).append( "]" ); } } return new Label( patternLabel.toString() ); }
private void doPatternLabel() { if ( editingPattern.getFactType() != null ) { StringBuilder patternLabel = new StringBuilder(); String factType = editingPattern.getFactType(); String boundName = editingPattern.getBoundName(); if ( factType != null && factType.length() > 0 ) { if ( editingPattern.isNegated() ) { patternLabel.append( Constants.INSTANCE.negatedPattern() ).append( " " ).append( factType ); } else { patternLabel.append( factType ).append( " [" ).append( boundName ).append( "]" ); } } this.patternLabel.setText( patternLabel.toString() ); } doFieldLabel(); doOperatorLabel(); }
private ListBox loadBoundFacts() { Set<String> facts = new HashSet<String>(); for ( Pattern52 p : model.getPatterns() ) { if ( !p.isNegated() ) { facts.add( p.getBoundName() ); } } ListBox box = new ListBox(); for ( Iterator<String> iterator = facts.iterator(); iterator.hasNext(); ) { String b = (String) iterator.next(); box.addItem( b ); } String[] globs = this.oracle.getGlobalVariables(); for ( int i = 0; i < globs.length; i++ ) { box.addItem( globs[ i ] ); } return box; }
private ListBox loadPatterns() { Set<String> vars = new HashSet<String>(); ListBox patterns = new ListBox(); for ( Pattern52 p : model.getPatterns() ) { if ( !vars.contains( p.getBoundName() ) ) { patterns.addItem( ( p.isNegated() ? Constants.INSTANCE.negatedPattern() + " " : "" ) + p.getFactType() + " [" + p.getBoundName() + "]", p.getFactType() + " " + p.getBoundName() + " " + p.isNegated() ); vars.add( p.getBoundName() ); } } return patterns; }
String boundName = ccPattern.getBoundName(); if ( factType != null && factType.length() > 0 ) { if ( ccPattern.isNegated() ) { label.append( Constants.INSTANCE.negatedPattern() ).append( " " ).append( factType ); } else {