### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.core Index: src/org/eclipse/pde/internal/core/schema/Schema.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/Schema.java,v retrieving revision 1.66 diff -u -r1.66 Schema.java --- src/org/eclipse/pde/internal/core/schema/Schema.java 10 Jul 2007 14:17:51 -0000 1.66 +++ src/org/eclipse/pde/internal/core/schema/Schema.java 13 Jul 2007 22:39:17 -0000 @@ -399,6 +399,8 @@ private ISchemaAttribute processAttribute(ISchemaElement element, Node elementNode) { String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$ + if (aname == null) + return null; String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$ String ause = getAttribute(elementNode, "use"); //$NON-NLS-1$ String avalue = getAttribute(elementNode, "value"); //$NON-NLS-1$ @@ -611,6 +613,8 @@ private ISchemaElement processElement(ISchemaObject parent, Node elementNode) { String aname = getAttribute(elementNode, "name"); //$NON-NLS-1$ + if (aname == null) + return null; String atype = getAttribute(elementNode, "type"); //$NON-NLS-1$ String aref = getAttribute(elementNode, "ref"); //$NON-NLS-1$ @@ -921,6 +925,16 @@ String nodeName = child.getNodeName().toLowerCase(Locale.ENGLISH); if (nodeName.equals("element")) { //$NON-NLS-1$ ISchemaElement element = processElement(this, child); + if (element == null) { + fValid = false; + return; + } + ISchemaAttribute[] attributes = element.getAttributes(); + for (int j = 0; j < attributes.length; j++) + if (attributes[j] == null) { + fValid = false; + return; + } fElements.addElement(element); } else if (nodeName.equals("annotation")) { //$NON-NLS-1$ processSchemaAnnotation(child); #P org.eclipse.pde.ui Index: src/org/eclipse/pde/internal/ui/editor/schema/SchemaAttributeDetails.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaAttributeDetails.java,v retrieving revision 1.29 diff -u -r1.29 SchemaAttributeDetails.java --- src/org/eclipse/pde/internal/ui/editor/schema/SchemaAttributeDetails.java 11 Jul 2007 21:17:42 -0000 1.29 +++ src/org/eclipse/pde/internal/ui/editor/schema/SchemaAttributeDetails.java 13 Jul 2007 22:39:19 -0000 @@ -309,8 +309,12 @@ public void textValueChanged(FormEntry entry) { if (blockListeners()) return; - fAttribute.setName(fName.getValue()); - setDecription(NLS.bind(PDEUIMessages.SchemaAttributeDetails_description, fAttribute.getName())); + if (fName.getValue().length() != 0) { + fAttribute.setName(fName.getValue()); + setDecription(NLS.bind(PDEUIMessages.SchemaAttributeDetails_description, fAttribute.getName())); + } else { + fName.setValue(fAttribute.getName(), true); + } } }); fDepTrue.addSelectionListener(new SelectionAdapter() { Index: src/org/eclipse/pde/internal/ui/editor/schema/SchemaElementDetails.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaElementDetails.java,v retrieving revision 1.22 diff -u -r1.22 SchemaElementDetails.java --- src/org/eclipse/pde/internal/ui/editor/schema/SchemaElementDetails.java 12 Jul 2007 22:11:18 -0000 1.22 +++ src/org/eclipse/pde/internal/ui/editor/schema/SchemaElementDetails.java 13 Jul 2007 22:39:19 -0000 @@ -145,9 +145,13 @@ public void textValueChanged(FormEntry entry) { if (blockListeners()) return; - fElement.setName(fName.getValue()); - ((Schema)fElement.getSchema()).updateReferencesFor(fElement, ISchema.REFRESH_RENAME); - setDecription(NLS.bind(PDEUIMessages.SchemaElementDetails_description, fElement.getName())); + if (fName.getValue().length() != 0) { + fElement.setName(fName.getValue()); + ((Schema)fElement.getSchema()).updateReferencesFor(fElement, ISchema.REFRESH_RENAME); + setDecription(NLS.bind(PDEUIMessages.SchemaElementDetails_description, fElement.getName())); + } else { + fName.setValue(fElement.getName(),true); + } } }); fDepTrue.addSelectionListener(new SelectionAdapter() {