Skip to content

Commit

Permalink
registry fields are being filtered out in PropertyEditor panel
Browse files Browse the repository at this point in the history
+            //filter out everything form the registry, except:
+            //#1: decorator
+            //#2: isPort
+            //#3: isAbstract
+            //#4: DisplayFormat
+            //#5: position
+            //#6: rotation
  • Loading branch information
rkereskenyi committed Jan 24, 2014
1 parent c9a166a commit 6292657
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions client/js/Panels/PropertyEditor/PropertyEditorPanelController.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,36 @@ define(['logManager',
_addItemsToResultList(commonAttrs, "Attributes", propList, true);

//modify registry
//filter out everything form the registry, except:
//#1: decorator
//#2: isPort
//#3: isAbstract
//#4: DisplayFormat
//#5: position
//#6: rotation
var displayReg = false;
var enabledRegistryKeys = [];
enabledRegistryKeys.push(nodePropertyNames.Registry.position);
enabledRegistryKeys.push(nodePropertyNames.Registry.rotation);
enabledRegistryKeys.push(nodePropertyNames.Registry.lineStyle);
enabledRegistryKeys.push(nodePropertyNames.Registry.decorator);
enabledRegistryKeys.push(nodePropertyNames.Registry.isPort);
enabledRegistryKeys.push(nodePropertyNames.Registry.isAbstract);
enabledRegistryKeys.push(nodePropertyNames.Registry.DisplayFormat);
for (var it in commonRegs) {
if (commonRegs.hasOwnProperty(it)) {
if (commonRegs.hasOwnProperty(it)) {
//#1: filter out rows of 'MetaEditor.MemberCoord' from Registry
if (it.indexOf( nodePropertyNames.Registry.ProjectRegistry + '.') === 0) { //#3: make ProjectRegistry entries readonly
commonRegs[it].readOnly = true;
} else if (it.indexOf(MetaEditorConstants.META_SHEET_REGISTRY_KEY) === 0 ) { //filter out MetaAspectRegistry
delete commonRegs[it];
} else if (it.indexOf(ManualAspectConstants.MANUAL_ASPECTS_REGISTRY_KEY) === 0) { //filter out ManualAspectRegistry
displayReg = false;

i = enabledRegistryKeys.length;
while (i--) {
if (it.indexOf(enabledRegistryKeys[i]) === 0) {
displayReg = true;
break;
}
}

if (!displayReg) {
delete commonRegs[it];
}
}
Expand Down

0 comments on commit 6292657

Please sign in to comment.