Author Topic: Editing XML and wrapping  (Read 3080 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Editing XML and wrapping
« on: August 25, 2014, 04:39:37 PM »
When I edit an XML file, Slick is *very* insistent that lines should be wrapped.
Given this long line:
            <echo level="info">STUFF: out.absolute.dir ${out.absolute.dir}/classes</echo> <!-- out.absolute.dir E:\saaapaaauaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaases...      -->
[/size]
[/size]If I attempt to edit it, Slick reformats to:

             <echo level="info">STUFF: out.absolute.dir ${out.absolute.dir}/classes </echo> <!-- out.absolute.dir                 E:\saaapaaauaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaases...      -->
It will *not* allow me to re-join the line together
I changed the XML right coloumn setting to 800, but it still does this.
I didn't see an option to just not wrap the text.
How do I do that?

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: Editing XML and wrapping
« Reply #1 on: August 25, 2014, 05:20:19 PM »
Because I'm curious about these things...

What are your "comment wrap" settings?  There are such settings, and your example looks like line comment wrap is turned on.

Interestingly, I cannot get your text (comment) to wrap, and I'm trying (by turning comment wrapping on).  I have (generally) all wrapping turned off for my uses.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Editing XML and wrapping
« Reply #2 on: August 25, 2014, 06:06:34 PM »
Do you have XML document formatting enabled?  (Look under Document->XML/HTML Formatting)  If so, there's  a checkbox under that same menu to quickly disable the comment wrap for formatting.

If that's not it, I need to go back to the drawing board, because that was the only way I could reproduce that.

Also as a heads up, there is some overlap between the comment wrap for XML/HTML formatting and the standard language options comment wrap setting.  Hopefully I'll have the duplicate settings removed from the XML/HTML formatting setup so there isn't any confusion about which takes precedence when.

       Thanks for the report.


jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Editing XML and wrapping
« Reply #3 on: August 25, 2014, 06:48:56 PM »
In the "Document" menu, ..
OIC, Document->XML / HTML Formatting / Content Wrap.
OK, unchecking that fixes it.

#1: So, why is there a menu Formatting -> Comment Wrap?#2: Shouldn't that be in the Formatting submenu?#3: Where does this option appear in the Option dialog?

In "Options", search for "Content Wrap".
Under XML/Text languages, several things appear, but XML isn't one of them.
Under "Android Resource XML", "Formatting" shows up - but "Content" nor "Wrap" appears here.
Under "XSD",  "Formatting" - looks like the same formatting as "Android Resource" plus an extra box of controls with "auto formatting options".

#4: Why can XSD have a wrapping option, but other XML/Text languages do not?
#5: Why does Search in Options find pages with no matches? (Presumably because those control are hidden - so they shouldn't match).




patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Editing XML and wrapping
« Reply #4 on: August 25, 2014, 07:45:43 PM »
1/2/3) There are some settings that are duplicated between the standard options dialog and the Formatting section.  I'm trying to get rid of the duplicates for the next beta drop. That particular setting is one of the oddball ones, because it appears in that menu, but the settings under Language Settings -> XML/HTML -> Comment Wrap/Word Wrap are actually separate settings.  It's an accident of history, but it's confusing.

As far as the search goes, that is interpreted as "content AND wrap", so that filtered out pages that didn't have both I believe.  Just searching for 'wrap' does find and XML and HTML pages.

4) There should be Word Wrap and Comment wrap entries for XML, HTML, if you go to Document -> XML Settings

5) We may also have some bad keywords defined in the option xml file as well, we'll have to look.