void addDSLSentences() { //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL) if (!ruleModeller.isDSLEnabled()) { return; } for (final DSLSentence sen : oracle.getDSLActions()) { final String sentence = sen.toString(); final String key = "DSL" + sentence; choices.addItem(sentence, key); cmds.put(key, new Command() { public void execute() { addNewDSLRhs(sen, Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex()))); hide(); } }); } }
private void addDSLSentences() { //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL) if (!ruleModeller.isDSLEnabled()) { return; } for (final DSLSentence sen : oracle.getDSLConditions()) { final String sentence = sen.toString(); final String key = "DSL" + sentence; choices.addItem(sentence, key); cmds.put(key, new Command() { public void execute() { addNewDSLLhs(sen, Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex()))); hide(); } }); } }
void addDSLSentences() { //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL) if (!ruleModeller.isDSLEnabled()) { return; } for (final DSLSentence sen : oracle.getDSLActions()) { final String sentence = sen.toString(); final String key = "DSL" + sentence; choices.addItem(sentence, key); cmds.put(key, new Command() { public void execute() { addNewDSLRhs(sen, Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex()))); hide(); } }); } }
private void addDSLSentences() { //DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL) if (!ruleModeller.isDSLEnabled()) { return; } for (final DSLSentence sen : oracle.getDSLConditions()) { final String sentence = sen.toString(); final String key = "DSL" + sentence; choices.addItem(sentence, key); cmds.put(key, new Command() { public void execute() { addNewDSLLhs(sen, Integer.parseInt(positionCbo.getValue(positionCbo.getSelectedIndex()))); hide(); } }); } }
public void setDSLSentences( final List<DSLSentence> dslSentences ) { if ( tree.getItem( 0 ) != null ) { tree.clear(); } if ( dslSentences != null ) { for ( DSLSentence dslSentence : dslSentences ) { final TreeItem it = new TreeItem(); it.setHTML( "<small>" + dslSentence.toString() + "</small>" ); it.setUserObject( dslSentence ); tree.addItem( it ); } } }