Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 162184 Details for
Bug 293474
Editing extensions in PDE editor creates invalid plugin.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Updated fix
clipboard.txt (text/plain), 2.74 KB, created by
Curtis Windatt
on 2010-03-16 13:02:52 EDT
(
hide
)
Description:
Updated fix
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2010-03-16 13:02:52 EDT
Size:
2.74 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java,v >retrieving revision 1.30 >diff -u -r1.30 XMLInputContext.java >--- src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java 15 Apr 2008 14:57:22 -0000 1.30 >+++ src/org/eclipse/pde/internal/ui/editor/context/XMLInputContext.java 16 Mar 2010 17:02:25 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2008 IBM Corporation and others. >+ * Copyright (c) 2003, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -108,6 +108,7 @@ > if (node.getOffset() > -1) { > // this is an element that was of the form <element/> > // it now needs to be broken up into <element><new/></element> >+ // Note that the node here has the correct stored length (the previous value, not what will be written out during the write() call), see bug 293474 > op = new ReplaceEdit(node.getOffset(), node.getLength(), node.write(false)); > } else { > // try to insert after last sibling that has an offset >@@ -217,15 +218,18 @@ > Object changedObject = attr; > TextEdit op = null; > if (offset > -1) { >+ // Attribute exists, replace the old value with the new value > if (newValue == null || newValue.toString().length() == 0) { > int length = attr.getValueOffset() + attr.getValueLength() + 1 - attr.getNameOffset(); > op = getAttributeDeleteEditOperation(attr.getNameOffset(), length); > } else { >- op = new ReplaceEdit(offset, attr.getValueLength(), getWritableAttributeNodeValue(event.getNewValue().toString())); >+ int oldLength = ((String) event.getOldValue()).length(); >+ op = new ReplaceEdit(offset, oldLength, getWritableAttributeNodeValue(event.getNewValue().toString())); > } > } > > if (op == null) { >+ // Attribute doesn't exist, check if the parent exists and add the attribute to it > IDocumentElementNode node = attr.getEnclosingElement(); > IDocument doc = getDocumentProvider().getDocument(getInput()); > if (node.getOffset() > -1) { >@@ -233,6 +237,7 @@ > int len = getNextPosition(doc, node.getOffset(), '>'); > op = new ReplaceEdit(node.getOffset(), len + 1, node.writeShallow(shouldTerminateElement(doc, node.getOffset() + len))); > } else { >+ // Parent doesn't exist in the doc, write out whole parent to the doc > insertNode(node, ops); > return; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 293474
:
150655
|
150656
|
153946
|
154363
|
162109
| 162184