Tag Archives: Code folding

My Eclipse code-folding plugin

I will probably have to start with some apologies for letting you guys wait so long for the plugin I have announced in a couple of previous posts, but (as you probably already know the excuse) I’ve been very busy lately.
However in order to keep things short: here is the download link. It is not a real release, but the version I’ve been tweaking for a while and I am currently using. There are still problems with it, but most of the time it works (or at least using another programmer excuse: it works for me [smile/]). Please give it a try and let me know.

4 Comments

Filed under Uncategorized

Eclipse code-folding plugin: Coffee-Bytes

In a previous post I was talking about some small changes I have applied to one of the first OSS projects I was a core developer and committer: Coffee-Bytes. After that post, I have received quite a few messages expressing their interest in this plugin and the changes I have done to make it work with Eclipse 3.2.

Lately I have been very busy (speaking at JavaZone and JAOO) and I haven’t been able to do much about it. Still, on this project we were two developers, so before doing anything I will have to discuss these details and see what are the options. However, I promise I will keep everybody interested posted.

category:

5 Comments

Filed under Uncategorized

Eclipse API and Code Folding

One of the my first open source projects I have worked on was Coffee-Bytes code folding plugin. It happened a long time ago and at some point the development has been discontinued.

However, tonight, working on some very long sources I have remembered it and I said I should give it a new try. Unfortunately, once I enabled it no editors could been displayed. Checking the .log file I have found the reason: the folding code was broken with a NoSuchMethod exception.

I have found in my archives the last version of the plugin and I thought I should check the API. To my surprise the API was still available (or at least reachable), but what made me post this entry is a feature added in Eclise 3.1: Access Restrictions, according to which when you create a plugin you can restrict others plugin access to its code. While I find the idea quite good (as it makes the API more clear), I have found out that almost everything related to java source code editors is restricted, and I am wondering why? I thought some other plugins would benefit from a clear API (for example AJDT), and now finding this makes me wonder about the reasons (I am quite sure there are good reasons).

However, getting back to the points of this entry, you can read more about Access restrictions: here.

Following the last advise specified at the above link:

But what if you really, really, really, really need to use the class? In that case, you can use it, but you need to be aware of what it means (four really’s usually does it for me).

I have done some small changes to readapt the code and now I have again Coffee-Bytes code folding working on Eclipse 3.2. Just look at the picture to see how reach it is compaired with the default code folding offered by Eclipse:

Reach Eclipse Code Folding

It offers you folding for:

  • top level types
  • normal methods
  • constructors
  • getters and setters
  • main methods
  • inner types
  • static initializers
  • import statements
  • source headers
  • comment blocks
  • javadocs

and even User defined code folding:

User defined code folding

category:

14 Comments

Filed under Uncategorized