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.
- Switch to the Samples Console perspective.
- In the Samples and Tutorials view, navigate to and
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 .
- 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 OK. A dialog
reminds you that you must restart Eclipse to see the changes.
- Click and
click OK 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.