*/
public static Widget getEditorViewer(RuleAsset asset, RuleViewer viewer) {
RulePackageSelector.currentlySelectedPackage = asset.metaData.packageName;
// depending on the format, load the appropriate editor
if (asset.metaData.format.equals(AssetFormats.BUSINESS_RULE)) {
return new RuleModeller(asset, new RuleModellerWidgetFactory());
} else if (asset.metaData.format.equals(AssetFormats.DSL_TEMPLATE_RULE)) {
return new RuleValidatorWrapper(new DSLRuleEditor(asset), asset);
} else if (asset.metaData.format.equals(AssetFormats.BPEL_PACKAGE)
&& Preferences.getBooleanPref("flex-bpel-editor")) {
return new BPELWrapper(asset, viewer);