tags:

views:

415

answers:

5

I'm writing a plug-in for Eclipse that decorates things in a Java source editor.

I have to decide whether to make the extra effort (and pay a performance/memory cost) to place the annotations on every visible source file in the editor, or just support one active file at a time.

I know that in my experience, I rarely ever have two source files visible at the same time within the same workbench window. Note that I am talking about two source files visible at the same time, not one file visible and a whole bunch of others hidden as tabs.

I'm wondering what other people's usage pattern is.

Note: this is community-wikid.

+2  A: 

Personally, not too often. Maybe a couple of times per week, and even then it's not entirely necessary.

mandaleeka
That's my experience, too. It happens, but not too often.
Ola Eldøy
A: 

Not sure how you would be impacted in the case of a side-by-side diffs (e.g. from SVN). Are bound by the number of windows/tabs itself (1 vs. many), or by the number of visible documents being annotated (1 vs. many, where many may appear in the same window/tab)?

I use side-by-side diff quite often.

Cheers, V.

vladr
I meant two separate files. Diffs have a separate editor in Eclipse.
Uri
A: 

Hmmm.. Think of some of the effects currently in Eclipse.

Eclipse highlights variable names when you click on them. Since there could be same-named variables in other classes it might make sense at first to do the highlighting in all visible code panes, but at the same time, those same-named variables aren't necessarily the same type and may not mean the same thing. So Eclipse only highlights in the current pane.

When you run a search in files, it does makes sense to highlight the variable names (or whatever search string you used) in all panes at the same time, because now they all should have the same meaning to you.

Does the plugin you're adding makes sense to happen in all visible panes?

I always have more than one code pane open. I develop Python at work and usually have Eclipse dragged across two wide-screen monitors. On occasion I actually have three code panes open. This helps when looking at three levels of the stack I can switch between them using the call stack and not lose my place in a different frame. Admittedly it ends up looking like a cockpit after a while, but I can switch between different workspace layouts (Code, Debug, Install, NSIS scripts, etc) when it gets too cluttered.

(BTW what is your plugin going to do?)

Chris Cameron
My plugin decorates (adds boxes around) certain function calls where there is specific information associated with their targets ("surprises" in their JavaDocs). I'm doing some reengineering, and wondering whether to support multiple panes.
Uri
It does sound like it would be useful to have that on all visible panes. Maybe it would be beneficial to build your plugin with an "Active Pane" / "All Panes" toggle? Considering all of the other things going on in Eclipse I wonder if anyone would even notice the performance hit :)
Chris Cameron
A: 

Always. At least two files, in some cases three. In very few cases I have just one file showing up.

That's what I like about wide-screen monitors. A 20" monitor, with 1680X1050 resolution, is enough to view two files with a package explorer on the side.

zvikico
A: 

I try to stick with one file at a time but often end up with two side-by-side when code assist isn't presenting enough info for me to get a good overview of a particular coding feature (sort of like a reference window and a coding window). HTH.

Oliver