Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Help me write this plugin?
Help me write this plugin? [message #1729426] Thu, 14 April 2016 06:11
Kauan Klein is currently offline Kauan KleinFriend
Messages: 8
Registered: April 2016
Location: Brazil, RJ, Petrópolis
Junior Member
Please, I want to write a plugin that will impose compile time checking of immutability and other things during build. I want to use Java AST during compilation to gather the annotations and then check if the constraints imposed hold true. I try to follow the manual but it's not a bit clear in my opinion. My problem is with the plugin thing. If I could do this as a simple Java application it would be done by now. I don't think I can use an annotation processor because I need to analyze the whole project, not just one class, to know if a field declared as immutable remains immutable.

So far, I'm just trying to make the plugin work something basic, just print as warnings the names of the fields in each class during build. But I can't seem to make this work.

Here's the code:

https://github.com/Starless2001/Plugin-for-Eclipse

It's really small. The annotations themselves don't need to be taken into consideration, because the project I use for testing uses other annotations (dumb things like @FinalField, @IntField, @Constructor, etc).

The classes that should do the job are:


  • ABCBuilder


then under \implementation\


  • JavaASTParser
  • FieldCollector


I didn't touch the "Nature" classes because I have no idea what they are for, even after reading the manual.

Please, any help would be much appreciated. Starting to use an API as complex as eclipse's is never easy.
Previous Topic:Get ASTNode for corresponding IVariableBinding?
Next Topic:Java Started: Return Code 13
Goto Forum:
  


Current Time: Tue Apr 16 13:44:01 GMT 2024

Powered by FUDForum. Page generated in 0.50217 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top