Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Strategies for making XML content in StructuredTextEditor be formatted, and read-only?
Strategies for making XML content in StructuredTextEditor be formatted, and read-only? [message #1728317] Fri, 01 April 2016 21:36 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 802
Registered: July 2009
Senior Member
I'm building a view for an editor that will contain generated XML, and it should be read-only. I want the XML to be formatted.

These requirements are pretty similar to the "Effective POM" view of m2e, so I figured I could model it from that. Unfortunately, I don't see how in the M2E implementation this is done. I'm using a StructuredTextEditor just like it, but I don't see where it causes the content to be automatically formatted, and read-only.
Re: Strategies for making XML content in StructuredTextEditor be formatted, and read-only? [message #1728318 is a reply to message #1728317] Fri, 01 April 2016 22:04 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 802
Registered: July 2009
Senior Member
A little more information.

I did realize that the editor ignores my attempts to directly modify the buffer, so it's at least partially read-only. However, it says "Writable" in the status bar. In addition, I can right-click and select "Source..."->"Cleanup Document", and this will format the buffer the way I'd like to see it show up automatically.
Re: Strategies for making XML content in StructuredTextEditor be formatted, and read-only? [message #1728375 is a reply to message #1728318] Mon, 04 April 2016 04:41 Go to previous message
David M. Karr is currently offline David M. KarrFriend
Messages: 802
Registered: July 2009
Senior Member
Never mind, it was easy enough to run a Transformer on it afterwards. The fact that the status bar says "Writable" is a minor annoyance, but I suppose that's referring to the main file being edited, and this is just a "view" of that file, sort of.
Previous Topic:How-to: Integration between multiple eclipse versions?
Next Topic:Disable page in multi-page editor if syntax errors in main editor
Goto Forum:
  


Current Time: Fri Apr 26 06:23:41 GMT 2024

Powered by FUDForum. Page generated in 0.02687 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top