>Eclipse: The Bare Minimum of XML Editing

>Elliotte Rusty Harold recently described what he wants or needs in an xml editor:

I still prefer using plain vanilla text editors and the command line myself. At the end of the day, XML is just text; and an excellent text editor does a better job of it than a a text editor that’s an afterthought in a product designed to shield users from raw XML. At most, I want some extra features on the side that don’t get in my way when I’m just typing; for instance, a menu item to check the document for well-formedness or a spell checker that’s smart enough to ignore tags. I don’t want anything that gets in the way of my typing like auto-tag closing or tree views.

Let’s address some of these.

Validation/Well-Formedness:

During editing using any of the XML based editors, right mouse click and then select Validate. This validates for grammar constraints as well as well-formedness. You can turn off as you type validation in the Preferences->Validation menu.

Tag Aware Spell Checker:

This is built into the WTP XML editor, items in tags are not checked for spelling. WTP comes with a built in spellchecker. Spell Checking can be enabled or disabled through Preferences->General->Editor->Spelling.

Auto Content Assistance:

This is on by default but can be turned to manual mode by changing the option in Preferences->XML->XML Files->Editor. Turn off “Automatically Make Suggestions”. If you need content assistance you can still activate it by hitting CMD-Space or Ctrl-Space.

Auto Completion of Tags:

Don’t like auto completion of end tags while typing. Yep there is a preference for that. Preferences->XML->XML Files->Editor->Typing. Turn off any features you don’t like.

Turn off Code Folding:

Don’t want to have Code Folding. Turn this off in Preferences->General->Editors->Structured Text Editor.

Tree Views and Hierarchy Views:

Don’t want to see tree views or hierarchy view of the XML. In WTP switch to the editors Source Tab. When you reopen the file it’ll open in source tab mode. Don’t want to see an outline view being updated. Close the Outline view.

There you go, you know have an XML Editor that is Grammar Aware, XML Catalog Aware, with Validation, Well-Formedness Checking, and Spell Checking, that does not intrude in typing. Granted most of these options are turned on by default because the vast majority of people want them turned on, however, how you configure these options for your own way of working is entirely up to the user.

Advertisements
This entry was posted in eclipse, xml. Bookmark the permalink.

One Response to >Eclipse: The Bare Minimum of XML Editing

  1. >Good post, I agree!One common question you may want to help people with is how to take the XML editing functionality from WTP and add it to their RCP applications. In the past, I was never able to find good documentation on this topic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s