Property (Lavender 'p' Icon) Determination

Hi,

I'm morally opposed to "get..." and "set..." prefixes on property / attribute accessors and mutators. I eschew them in code I write for my own projects. Instead, I just use the property name and allow overloading handle the distinction betwen accessor and mutator.

Is it possible to get IDEA (6.02) to detect my properties and flag them as such in the Structure view?

I noticed that my boolean accessors, for which I do use the "is..." prefix, are properly detected and the methods grouped with their corresponding fields under a Property icon in the Structure view, so at least it's respecting my field naming conventions, which I did specify in the Settings.


Thanks.

Randall Schulz

0
38 comments
Avatar
Permanently deleted user

Hi Randall,

One thing to keep in mind is that some people believe IDEA is suffering because of too many new features. Some folks are vigilant about arguing against more features especially if they see those features as not broadly beneficial. Hani used to jump all over people about their new feature requests in a style much more abrasive than anything you have experienced. Hani - where are you, oh defender of IDEA? ;)
Lots of feature requests die on the vine but you have submitted the feature request which is your best first step.

Jon

0
Avatar
Permanently deleted user

You denigrated a legitimate request on my part based solely on your perception of its utility and popularity, insinuating that breaking with convention is somehow a reprehensible thing to do.

Exactly right, except I would put a "needlessly" before "breaking with convention" and tone down the "reprehensible" to "foolish". All those activities seem to be part and parcel of deliberating what features should go into a product, and implies no personal animus to you at all. Discussing features is what we do here, after all. Why you took such personal offence to my trashing of your request is quite beyond me. I didn't even trash it half as hard as it deserved! Am I supposed to not say anything when someone posts the least worthy feature request I've ever seen? Sorry, that's how bad, bloated products get created, and I certainly wish to avoid that fate for IDEA. I certainly don't think it was worth making personal remarks about me, a total stranger. That was just rude and uncalled for, although I guess in the case of "free-thinkers" accomodations need to be made.

--Dave Griffith

0
Avatar
Permanently deleted user

Hani used to jump all over people about their new feature requests in a style much more abrasive than anything you have experienced.

That's true. I didn't even call him an asshat, in spite of the obvious temptations, and I think that's the word Hani uses nowadays to say he likes you!

--Dave Griffith

0
Avatar
Permanently deleted user

Believe me, I understand the issue--I'm a software developer. But I consider it the vendor's job to integrate new features while maintaining the integrity of the program. It's the only way a product can continue to adapt to ever-expanding demands. And since software development is so far from being a mature field, ongoing changes to the tools are a fact of life (more so than any particular naming convention!). So to make a business of selling a general-purpose IDE, it's a practical necessity to keep adding capabilities.

I've tried IDE after IDE for many years, and the problem I've had with all of them has been the narrow, my-way-or-the-highway approach they take to development. In contrast, the development systems I've most enjoyed using have been the ones characterized as programmable editors such as MPW and jEdit. In fact, I just switched from jEdit, though I keep it around 'cause there are still some things for which I find it superior (just as I continue to use Vim for some things).

The real tipping-point issue for me in switching to IDEA is the intensive semantic coding support that IDEA has (refactoring, inspections, etc.). This class of features has become too important a capability for me to ignore in favor of a better editing experience.

Compare this with Eclipse. I could not stand actually developing code in Eclipse. The editor is painful and the Java-specific support was insufficient to make up for it.. So I stayed with jEdit.

Anyway, since IDEA is a commercial product, I feel I have the right to expect more responsiveness from the vendor, especially to what is a very simple request. I expect them to rise to the challenge of finding ways to increase the product's capabilities without losing control over its user interface or undermining its stability and reliability.

Now if it were an open-source project, then I wouldn't make as big a deal about it, since there would at least be the option for me to take matters into my own hands.

Randall Schulz

0
Avatar
Permanently deleted user

Now if it were an open-source project, then I wouldn't make as big a deal about it, since there would at least be the option for me to take matters into my own hands.

Why don't you write a plug-in?

0
Avatar
Permanently deleted user

Could a plug-in do this?

I assume they have full access to the source code and presumably can access some form of AST for the code and do the required analysis. Can they also affect, directly or indirectly, the Structure display and any other built-in displays that show code classification icons?

I already asked whether a BeanInfo class would be recognized, but I received no answer, affirmative or negative, on that.

Randall Schulz

0
Avatar
Permanently deleted user

Hello Randall,

RS> Could a plug-in do this?
RS>
RS> I assume they have full access to the source code and presumably can
RS> access some form of AST for the code and do the required analysis.
RS> Can they also affect, directly or indirectly, the Structure display
RS> and any other built-in displays that show code classification icons?

You can register a class which will return a custom icon for any element
of the PSI (which is IntelliJ IDEA's name for the AST tree).

RS> I already asked whether a BeanInfo class would be recognized, but I
RS> received no answer, affirmative or negative, on that.

No, BeanInfo classes are not used for determining whether the method is a
property getter or setter.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

Hi,

BeanInfo classes are not used for property determination in structure view.
You can play with JavaScript plugin sources for the AST stuff,
StructureViewExtension / StructureViewFactoryEx classes (closed API from
idea.jar)


Randall Schulz wrote:

Could a plug-in do this?

I assume they have full access to the source code and presumably can access some form of AST for the code and do the required analysis. Can they also affect, directly or indirectly, the Structure display and any other built-in displays that show code classification icons?

I already asked whether a BeanInfo class would be recognized, but I received no answer, affirmative or negative, on that.

Randall Schulz


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.