Nice editing there, Eclipse.



  • Considering that editing XML is one of the main things Eclipse does, I wouldn't have expected it to make a mistake like this:

     

    <tool command="foo-coff-g++" id="cdt.managedbuild.foo.gnu.cpp.linker.cygxfoo" name="%ToolName.linker.cygwinxfoo.gnu.cpp" -="" superclass="cdt.managedbuild.foo.gnu.cpp.linker.cygwin">Index: org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
    ===================================================================
    --- org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml (revision 459)
    +++ org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml (working copy)
    @@ -1655,12 +1655,18 @@
    id="cdt.managedbuild.foo.gnu.c.linker.cygxfoo"
    name="%ToolName.linker.cygwinxfoo.gnu.c"
    superClass="cdt.managedbuild.foo.gnu.c.linker.cygwin">
    - </tool>
    + </t<option
    + category="gnu.c.link.category.general"
    + command="-nostartfiles"
    + defaultValue="true"
    + id="gnu.c.link.option.nostart.cygxfoo"
    + name="%Option.Posix.Linker.NoStartFiles"
    + superClass="gnu.c.link.option.nostart"
    + valueType="boolean">
    <tool
    command="foo-coff-g++"
    id="cdt.managedbuild.foo.gnu.cpp.linker.cygxfoo"
    - name="%ToolName.linker.cygwinxfoo.gnu.cpp"
    - superClass="cdt.managedbuild.foo.gnu.cpp.linker.cygwin">
    + name="%ToolName.linker.cygwgnu.c.link.option.nostart.cygxfoo superClass="cdt.managedbuild.foo.gnu.cpp.linker.cygwin">
    </tool>
    <tool
    command="foo-coff-gcc"
    </tool> <tool command="foo-coff-gcc"></tool> 

    All I was doing was cutting and pasting a toolchain option from one branch of the tree to another in the XML editor.  Not surprisingly, it lost track of all the subsequent nodes after this change.  Ouch.




  • Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!



  • @Cad Delworth said:

    Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!

    Convicted monopolist.



  • @morbiuswilters said:

    @Cad Delworth said:

    Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!

    Convicted monopolist.


    Yes, they are. But XML Notepad 2007 is freeware, and I find it useful, so your point is … ?



  •  I think there is a bug in  eclipse 3.6 since M3 or something  in plugin.xml editor ...

    not sure though if its known or fixed or just  appears under special configurations.. though I have had problems with that..

     



  • @morbiuswilters said:

    @Cad Delworth said:

    Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!

    Convicted monopolist.

    Park Lane and Mayfair? With hotels?



  • @davedavenotdavemaybedave said:

    @morbiuswilters said:

    @Cad Delworth said:

    Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!

    Convicted monopolist.

    Park Lane Park Place and Mayfair Boardwalk? With non-foreign hotels?

     

    FTFY.



  • @Cad Delworth said:

    @morbiuswilters said:

    @Cad Delworth said:

    Good grief! Even M$ XML Notepad doesn't make stuff-ups like that!

    Convicted monopolist.

    Yes, they are. But XML Notepad 2007 is freeware, and I find it useful, so your point is … ?

    I was mocking the obvious mental retardation that would lead you to say "M$".



  • Can someone explain please? I'm a JSON guy, I don't see anything obviously wrong... except the cut-off tag at the end? Is that the WTF? Or did you just not paste in the whole line?



  • @blakeyrat said:

    Can someone explain please? I'm a JSON guy, I don't see anything obviously wrong... except the cut-off tag at the end? Is that the WTF? Or did you just not paste in the whole line?
    Well, for starters, it changed "</tool>" to "</t", among other things. It'd be like putting the closing brace for a sub-object after the colon for a field in a different sub-object, but before the field's data. i.e. your object's been turned from steak into hamburger meat, forget about it and try again.



  • @Quicksilver said:

     I think there is a bug in  eclipse 3.6 since M3 or something  in plugin.xml editor ...

    not sure though if its known or fixed or just  appears under special configurations.. though I have had problems with that..

    Yeh, I have a theory.  I think I had edited one of the attributes of the node and had unsaved changes at the point when I cut and pasted it from one part of the tree to another; maybe while you're editing it, it leaves the node content in an inconsistent/incomplete state, with an unclosed trailing quote.. something like that seems to have gone on in the second set of changed lines.  I'll see if I can reproduce it.




  • @TwelveBaud said:

    @blakeyrat said:
    Can someone explain please? I'm a JSON guy, I don't see anything obviously wrong... except the cut-off tag at the end? Is that the WTF? Or did you just not paste in the whole line?
    Well, for starters, it changed "</tool>" to "</t", among other things. It'd be like putting the closing brace for a sub-object after the colon for a field in a different sub-object, but before the field's data. i.e. your object's been turned from steak into hamburger meat, forget about it and try again.

    Perhaps a little clarification is in order: Eclipse offers you a gui-based editor which understands the schema of an XML document and lets you edit the DOM nodes in a tree structure:

    Eclipse XML DOM-based editor GUI

    So when you click on one of those nodes, and use the cut and paste options to move it under another node, the editor is really doing something wrong if it doesn't generate well-formed XML but instead shoves a block of text corresponding to the xml node you were moving right into the middle of some node's closing tag! 

     



  • Problem seems to be to me some sort of overwriting problem..

    i.e. what you replace with the moved text is not deleted and then the pasted stuff inserted ... it seems like it just overrides it... so if you copy something longer over where before was a shorter node no problem .. though if the present note is longer you get errors from what is left...

     

    not sure though I think something like that happened...  just thought it was some strange config issue is had...

     

     

    still I am surprised that eclipse does not look in the exsd file ... as that should pretty much be an xml schema that should be useable for verifying that a change worked..


Log in to reply