History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-25031
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Eugene Zhuravlev
Reporter: Martin Gittins
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

Better support for locally defined annotations

Created: 20 Feb 08 12:37   Updated: 06 Nov 08 23:04
Component/s: Compiling Project
Fix Version/s: Undefined

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Applies to all

Build: 7,590
Severity: High


 Description  « Hide
The current support for locally defined annotations is poor. To specify an annotation processer I have to add the option explicitly to the compiler options, and include that class as a dependency of every module in my project. There are several issues with this mechanism:
1. The compiler option is on a project wide basis so has to be the same for all modules - it should be possible to set this on a per-module basis. This is available on Netbeans.
2. Now every module has to include the annotation processor in its list of dependencies - even when not required. This is not true with Eclipse where annotation processors can be defined per Eclipse project. When inter-working with Eclipse this leads to confusion about the need for this dependency.
3. It seems to be impossible to have an annotation using and and an annotation defining module in the same project. If you include the annotation processor in the path you can't make the defining module and if you leave it out you cant make the using module.
4. If you want to see any source generated from your annotation(s) life is hard - you have to put on the -s option to the compiler and trick IDEA into knowing about the source - the only way I've found to do this is to define the compiler output path as a library and then add the generated directory as the source of this library. Far from obvious or clear. But this becomes impossible with more than one module because there can only be one directory specified for all generated source.

What is needed is explicit support for:

  • 'per module' compiler options - i.e. move this option to module settings.
  • explicit support for annotation processors (as in Eclipse), so I don't have to set the option directly.
  • ability to set generated output directory for each module and have it included as a source directory for debugging etc.

I've marked this as high as this is close to forcing me to switch to Eclipse, reluctant though I am to do so. Clearly for users who don't use their own annotations it is irrelevant.



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.