private static Constants constants = ((Constants) GWT.create( Constants.class ));
public static TreeNode getPackageItemStructure(String packageName,
String uuid) {
TreeNode pkg = new TreeNode( packageName );
pkg.setAttribute( "uuid",
uuid );
pkg.setAttribute( "icon",
"images/package.gif" );
pkg.appendChild( makeItem( constants.BusinessRuleAssets(),
"images/rule_asset.gif",
AssetFormats.BUSINESS_RULE_FORMATS ) );
pkg.appendChild( makeItem( constants.TechnicalRuleAssets(),
"images/technical_rule_assets.gif",
new String[]{AssetFormats.DRL} ) );
pkg.appendChild( makeItem( constants.Functions(),
"images/function_assets.gif",
new String[]{AssetFormats.FUNCTION} ) );
pkg.appendChild( makeItem( constants.DSLConfigurations(),
"images/dsl.gif",
new String[]{AssetFormats.DSL} ) );
pkg.appendChild( makeItem( constants.Model(),
"images/model_asset.gif",
new String[]{AssetFormats.MODEL, AssetFormats.DRL_MODEL} ) );
if ( Preferences.getBooleanPref( "flex-bpel-editor" ) ) {
pkg.appendChild( makeItem( constants.RuleFlows(),
"images/ruleflow_small.gif",
new String[]{AssetFormats.RULE_FLOW_RF, AssetFormats.BPMN2_PROCESS, AssetFormats.BPEL_PACKAGE} ) );
} else {
pkg.appendChild( makeItem( constants.RuleFlows(),
"images/ruleflow_small.gif",
new String[]{AssetFormats.RULE_FLOW_RF, AssetFormats.BPMN2_PROCESS} ) );
}
pkg.appendChild( makeItem( constants.Enumerations(),
"images/enumeration.gif",
new String[]{AssetFormats.ENUMERATION} ) );
pkg.appendChild( makeItem( constants.TestScenarios(),
"images/test_manager.gif",
new String[]{AssetFormats.TEST_SCENARIO} ) );
pkg.appendChild( makeItem( constants.XMLProperties(),
"images/new_file.gif",
new String[]{AssetFormats.XML, AssetFormats.PROPERTIES} ) );
pkg.appendChild( makeItem( constants.OtherAssetsDocumentation(),
"images/new_file.gif",
new String[0] ) );
pkg.appendChild(makeItem(constants.WorkingSets(), "images/workingset.gif", new String[] {AssetFormats.WORKING_SET}));
return pkg;
}