Skip to content

Don’t $@!% with IDocument.DEFAULT_CONTENT_TYPE

I’ve been doing some general bug fixing of the Specfile Editor today and noticed that we had some problems with partitioning the document. We had defined 4 types of partitions for spec files:

  • Files (for a single %files section)
  • Scriptlets (i.e. %post, %prep, etc.)
  • Changelog
  • Default (for everything that is not one of the above)

What I noticed is that the default partition never got used, instead the IDocument.DEFAULT_CONTENT_TYPE partition was used for this. After digging through the code for a while and “fixing” what seemed to be the places that caused this, I ended up completely foobaring the partitioner.

Turns out that the Eclipse Text framework doesn’t support having a different default partition, and will happily barf in your lap if you try to force it.

Morale of the story children: Don’t $@!% with IDocument.DEFAULT_CONTENT_TYPE.

One Comment

  1. Matej Cepl wrote:

    Still not willing to push the spec editor to update site? I would be very interesting in testing it, but too lazy to compile it myself ;-).

    Wednesday, August 15, 2007 at 9:58 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*