}
}
//Add Tapestry components into autocomplete menu
ElemDecl temp = null;
jcmdoc = getDefaultTapestryCMDocument();
CMNamedNodeMap tapestryelements = jcmdoc.getElements();
for (int j = 0; j < tapestryelements.getLength(); j++) {
if(j == 0) temp = (ElemDecl) tapestryelements.item(j);
CMElementDeclaration ed = (CMElementDeclaration) tapestryelements.item(j);
if (!rejectElements.contains(ed.getNodeName())) {
nodeList.add(ed);
}
}
//load tapestry 5 custom components
if(temp != null){
collectCustomComponents();
if(tapestryCustomComponents != null){
for(int i=0; i<tapestryCustomComponents.size(); i++){
TapestryComponentModel tcm = tapestryCustomComponents.get(i);
ElemDecl cloneElement = (ElemDecl) temp.clone(tcm.nodeName, tcm.attributes);
nodeList.add(cloneElement);
}
}
}
}