drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/dsl/editor/DSLAdapter.java
void readConfig(InputStream stream) throws IOException, CoreException {
        DSLTokenizedMappingFile file = new DSLTokenizedMappingFile();
        file.parseAndLoad(new InputStreamReader(stream));

        DSLMapping grammar = file.getMapping();
        List<DSLMappingEntry> conditions = grammar.getEntries( DSLMappingEntry.CONDITION );
        List<DSLMappingEntry> consequences = grammar.getEntries( DSLMappingEntry.CONSEQUENCE );
        
        conditionProposals = buildProposals(conditions);
        consequenceProposals = buildProposals(consequences);
        
        dslTree.buildTree(grammar);
    }
void readConfig(InputStream stream) throws IOException, CoreException {
        DSLTokenizedMappingFile file = new DSLTokenizedMappingFile();
        file.parseAndLoad(new InputStreamReader(stream));

        DSLMapping grammar = file.getMapping();
        List<DSLMappingEntry> conditions = grammar.getEntries( DSLMappingEntry.CONDITION );
        List<DSLMappingEntry> consequences = grammar.getEntries( DSLMappingEntry.CONSEQUENCE );
        
        conditionProposals = buildProposals(conditions);
        consequenceProposals = buildProposals(consequences);
        
        dslTree.buildTree(grammar);
    }
void readConfig ( InputStream stream ) throws IOException , CoreException { DSLTokenizedMappingFile file = new DSLTokenizedMappingFile ( ) ; file . parseAndLoad ( new InputStreamReader ( stream ) ) ; DSLMapping grammar = file . getMapping ( ) ; List < DSLMappingEntry > conditions = grammar . getEntries ( DSLMappingEntry . CONDITION ) ; List < DSLMappingEntry > consequences = grammar . getEntries ( DSLMappingEntry . CONSEQUENCE ) ; conditionProposals = buildProposals ( conditions ) ; consequenceProposals = buildProposals ( consequences ) ; dslTree . buildTree ( grammar ) ; }
This will load in the DSL config file, using the DSLMapping from drools-compiler
This will load in the DSL config file using the DSLMapping from drools - compiler