Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-core-dev] Re: formatter

> 1)   markers should be updated during formatting. It is
>      problematic to loose breakpoints or bookmarks
>      as a side effect of a format.

Talk about a fun problem... yikes...

> 2)   there needs to be API to get at formatting options.
>      code generation options/refactoring depend on these settings
>      as well.
>
> 3)   there needs to be a preference UI that enables
>      presenting the formatting options of plugged-in formatters
>      in a consistent way.

Actually, I'd combine these... The formatter option page should present
options for each formatter plugin. The plugins should manage their own
preferences as they normally do (no api necessary).

Of course the question is, how to pick the "active" code formatter?

I'm thinking
1) a list of registered formatters is presented on the main formatter page
2) each listed formatter can be selected, similar to the default JVM
3) options can be set for each on a subpage of the formatter part of the
prefs dialog

If there's no custom formatter registered, the whole thing could be
collapsed into just the default formatter.

> Having said this, I still think your insights from doing the JIndent work
> on these issues would be very useful to us.

I have to try it with 2.0 and see how it works. The JIndent folks are very
interested ;)

I'll let you know my thoughts then.

Glad to hear y'all are concerned about multiple editor extensions. I think
in addition to these, we may need some other editor plugins at some point;
hard to say. I've had some very cool editor ideas in mind for a long time,
mainly to help visualize blocks using graphics and/or colored backgrounds.
I've also got some ideas on expression editors that might help visualize
complex expressions in code (as an editable truth table, perhaps). Some of
these might be easy as actions, while others would need editor tweaks...

> What kind of code assist extensions do you have in mind?

Hard to say at this point... the obvious one was macros (which y'all did a
better-than-swell job on with templates -- kudos!), though I'm starting to
think about some patterns ideas, vocabulary helpers (like providing lists of
common names used in other programs, for use when defining new variables and
such), declaration helpers (make something like "BigBadDog _bigBadDog;"
easier to enter), and so on. These are just off the top of my head and I
feel others starting to push forward, attempting to push out the ones I just
wrote down (thankfully, as I've already forgotten them)

-- Scott



Back to the top