| java.lang.Object org.drools.eclipse.dsl.editor.DSLAdapter
DSLAdapter | public class DSLAdapter (Code) | | This holds the DSL configuration for an editor instance.
When loading, it will find the DSL file, and load the applicable lists.
This provides a link between the editor and the DSL features of the rule language.
It will look for a DSL configuration, as named in the rule file, in the same directory as the rule file.
Failing this, it will search one directory above the rule file.
Failing that, it will search the root of the project in the workspace.
author: Michael Neale author: Kris Verlaenen |
Constructor Summary | |
public | DSLAdapter(String content, IFile input) This will sniff out the DSL config file name from the content. | | DSLAdapter() |
DSLAdapter | public DSLAdapter(String content, IFile input) throws CoreException(Code) | | This will sniff out the DSL config file name from the content.
It will then use the IFile input to search around for the file itself.
TODO: provide an alternative that just loads off a stream (for non IDEs workbenches like jlibrary).
Parameters: content - Rule source Parameters: input - File from the FileEditorInput |
findDSLConfigName | static String findDSLConfigName(String content)(Code) | | Sniffs out the expander/DSL config name as best it can.
|
getDSLContent | public static Reader getDSLContent(String ruleSource, IResource input) throws CoreException(Code) | | Get a reader to the DSL contents
|
hasConditions | public boolean hasConditions()(Code) | | |
hasConsequences | public boolean hasConsequences()(Code) | | |
isValid | public boolean isValid()(Code) | | |
listConditionItems | public List listConditionItems()(Code) | | |
listConsequenceItems | public List listConsequenceItems()(Code) | | |
readConfig | void readConfig(InputStream stream) throws IOException, CoreException(Code) | | This will load in the DSL config file, using the DSLMapping from drools-compiler
|
|
|