Valentin wrote:
> > I'm a pretty hardcore emacs advocate, but I've been looking at
> > Intellij for a couple of days and I'm being won over. (Now if only I
> > could get a set of emacs keybindings :-).
>
> BTW, the emacs keymap for IDEA will be provided very soon.
I'm looking forward to it, very much!
> > What I'd *like* to do is be able to point at a method and have
> > IDEA convert all instance variable references to parameters, and edit
> > the method calls appropriately. Come to think of it, what I'd really
> > like is to be able to just move the method off to another class and
> > have IDEA figure out what instance variables need to be added to the
> > method call. However, I don't see a way to do either of those.
>
> We already thought about some refactorings that, in particular, could
> simplify performing this operation.
> For instance, there could be something like "Make Method Static"
> refactoring. It converts an instance method to a static method by either
> passing the whole instance of the containing class or only the fields that
> are accessed within it. Then you could move it to another class by "Move
> Members" refactoring. Is it something that could help you?
This would be excellent; I hadn't thought of it in that context,
but yes, basically I want a way to make a method static, preferably by
having the caller pass in the fields that are accessed.
As a side note, maybe "Move Members" should be named "Move Static
Member"?
> > So instead, I'm trying to tweak the Tools/IDE Options/Code
> > Style/Name Prefix settings, the idea being to get IDEA to reformat the
> > code with variable name prefixes like loc_ for local variables, inst_
> > for instance variables, etc, so I can then go in and do some macro'd
> > changes (I always religiously use the "this." prefix for instance
> > variables). However, when I click "apply", nothing happens. When I
> > click Code/Layout Code, the other changes (brace style, etc) happen,
> > but the field and variable names don't change. When I select some
> > text and try to do Layout Code, same results.
>
> As I understand, what you need, is automatic changing of all variables to
> match the naming convention from the code style options. Obviously, it's not
> the thing that should be done by code reformatter (is it changing code
> formatting??). Instead, there could be a special option for doing this.
A special option would be fine; personally I'd consider it a
formatting change (since there's no functional change, just changing
the labels), but I can see the distinction.
In the same area, it'd be nice to have some ability to tweak the
whitespace around getters/setters - I generally like to group my
instance variables and their getter/setter methods together with no
blank lines between them. Since the vast majority of the
getter/setter methods are trivial, this helps cut down on the clutter
and group each variable/getter/setter as a cluster. If you added this
code style option, being able to set whether the variable declaration
comes before or after the getter/setter might also be nice.
Side note: One of the things that really bugged me about
VisualAge when I worked with it briefly in 1999 was that it ordered
the methods and variables alphabetically, instead of allowing the
developer to group them together in logical sets.
> Also, we currently working on some set of code 'inspections' that will check
> different aspects of the source code (such as code style violations,
> possible errors, dead code, etc). For most of the inspections, there will be
> an option to automatically correct all problems found. I think, this will
> cover this issue.
This sounds useful; I think Parasoft's JTest has something very
similar (it tests for various hundreds of style rules). They allow
the user to turn rules on or off, or add new rules. They claimed this
feature was very popular with a lot of their customers. I don't think
I'd like it for my own use. Then again I guess nobody really likes
being told their style sucks. Based on the price of JTest I suspect
those customers were mostly large corporations. I can see I might like
it a lot as an impartial mechanism to get everybody in a large
organization using a similar style.
Steven J. Owens
[EMAIL PROTECTED]
_______________________________________________
Eap-list mailing list
[EMAIL PROTECTED]
http://www.intellij.com/mailman/listinfo/eap-list