rem: objectsArray[objectIndex].xulElt.parentNode.removeChild(objectsArray[objectIndex].xulElt); objectsArray.splice(objectIndex, 1); selectTreeItem(objectsArray[Math.min(objectIndex, objectsArray.length - 1)].xulElt); 
add: toSplice = 1; 
context: function RemoveObject(){  var objectIndex = FindObjectIndexInObjectsArray(gDialog.selectedObject);  if (objectIndex == -1) return;  var ruleIndex;  switch (gDialog.selectedType) {    case SHEET:      var ownerNode = gDialog.selectedObject.ownerNode;      ownerNode.parentNode.removeChild(ownerNode);      Restart();      if (objectIndex < objectsArray.length )        selectTreeItem(objectsArray[objectIndex].xulElt);      break;    case IMPORT_RULE:      var ruleIndexInTree = FindObjectIndexInObjectsArray(gDialog.selectedObject.parentStyleSheet);      objectsArray[ruleIndexInTree].modified = true;      ruleIndex = getRuleIndexInRulesList(gDialog.selectedObject.parentStyleSheet.cssRules,                                          gDialog.selectedObject);      if (ruleIndex != -1) {        gDialog.selectedObject.parentStyleSheet.deleteRule(ruleIndex);      }      Restart();      objectsArray[ruleIndexInTree].modified = true;      if (objectIndex < objectsArray.length )        selectTreeItem(objectsArray[objectIndex].xulElt);      break;    case STYLE_RULE:      ruleIndexInTree = FindObjectIndexInObjectsArray(gDialog.selectedObject.parentStyleSheet);      objectsArray[ruleIndexInTree].modified = true;      if (gDialog.selectedObject.parentRule) {        /* this style rule is contained in an at-rule */        /* need to remove the rule only from the at-rule listing it */        ruleIndex = getRuleIndexInRulesList(gDialog.selectedObject.parentRule.cssRules,                                            gDialog.selectedObject);        if (ruleIndex != -1) {          gDialog.selectedObject.parentRule.deleteRule(ruleIndex);        }      }      else {        ruleIndex = getRuleIndexInRulesList(gDialog.selectedObject.parentStyleSheet.cssRules,                                            gDialog.selectedObject);        if (ruleIndex != -1) {          gDialog.selectedObject.parentStyleSheet.deleteRule(ruleIndex);        }      }      objectsArray[objectIndex].xulElt.parentNode.removeChild(objectsArray[objectIndex].xulElt);      objectsArray.splice(objectIndex, 1);      selectTreeItem(objectsArray[Math.min(objectIndex, objectsArray.length - 1)].xulElt);      break;  }}
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/5ad7f3e49e917bfa61d8a12cf84d7045c9e8e630/EdCssProps.js/clean/extensions/editor/cascades/resources/content/EdCssProps.js