In the samples console, you create a new workspace and import the context-aware rule
definition sample.
About this task
This sample extends the Rule Designer
API. The required sample plug-ins are delivered as predeployed.
Procedure
To import the ruleawareofcontext sample:
-
Click and specify a new workspace directory.
Eclipse shuts down and restarts with a blank workspace.
-
Open the Samples Console (see Running samples from the the Samples Console).
-
In the Samples and Tutorials tab, expand .
-
Under Context-aware rule definition, click Import
projects.
If one or more files already exist in your workspace,
Rule Designer displays a warning message.
Rule
Explorer displays the imported sample project files:
- ruleawareofcontext-rules: rule project
- ruleawareofcontext-xom: XOM project
-
Click . (On Mac, click .)
-
In the Preferences dialog, select .
-
Select Model: Default extension.
-
Click Change from Workspace and navigate to the file
ruleawareofcontext-rules > data/ruleawareofcontext.brmx.
-
Select Data: Default extension.
-
Click Change from Workspace and navigate to the file
ruleawareofcontext-rules > data > ruleawareofcontext.brdx.
-
Click Apply and Close.
A dialog reminds you that you must restart Eclipse to see the changes.
-
Click and click Launch without changing the workspace location.
Eclipse shut downs and restarts.
Rule Designer now recognizes the rule model
extension. You might have to rebuild the rule project so that the rules include the extension.