How to write an Eclipse plugin [message #1729150] |
Mon, 11 April 2016 10:20  |
Eclipse User |
|
|
|
Hello, I'm new to the forum. I've been using eclipse for some time, though.
I have a plan to implement a few Java annotations that would check things like immutability and out parameters. My first intuition was to write a standalone application but I have no idea of how to check an entire project and it's dependencies
So my doubts are:
Which languages can I use to write a plugin?
Is the following list of actions possible to be achieved by a plugin:
- invoke the Build action to report build errors (without actually generating any output would be ideal, but not a requirement).
- if the Build action succeed, run my plugin as a "compiler" of sorts. It wont compile, only perform syntatic and semantic analysis and emit errors regarding my annotations.
- if my plugin analysis passes, invoke Build for real this time, otherwise just output to the user what is wrong.
Can it be done?
|
|
|
Re: How to write an Eclipse plugin [message #1729210 is a reply to message #1729150] |
Tue, 12 April 2016 04:33   |
Eclipse User |
|
|
|
On 11-Apr-16 16:51, Kauan Klein wrote:
> Hello, I'm new to the forum. I've been using eclipse for some time, though.
>
> I have a plan to implement a few Java annotations that would check
> things like immutability and out parameters. My first intuition was to
> write a standalone application but I have no idea of how to check an
> entire project and it's dependencies
>
> So my doubts are:
>
> Which languages can I use to write a plugin?
Java is the obvious choice..
> Is the following list of actions possible to be achieved by a plugin:
>
>
> invoke the Build action to report build errors (without actually
> generating any output would be ideal, but not a requirement).
>
> if the Build action succeed, run my plugin as a "compiler" of sorts. It
> wont compile, only perform syntatic and semantic analysis and emit
> errors regarding my annotations.
>
> if my plugin analysis passes, invoke Build for real this time, otherwise
> just output to the user what is wrong.
>
>
> Can it be done?
>
Yes. First look at eclipse plugin tutorials, I don't have a favourite.
Then maybe you could get along with
https://eclipse.org/articles/Article-Builders/builders.html
|
|
|
|
|
|
Re: How to write an Eclipse plugin [message #1729546 is a reply to message #1729513] |
Fri, 15 April 2016 05:55  |
Eclipse User |
|
|
|
Kauan Klein wrote on Fri, 15 April 2016 02:20When I run the runtime eclipse application, how do I know it is being built using my plugin?
Are you intending to invoice based on your plugin use?
It is not in accordance of the Eclipse philosophy.
You can see if the plugin is in your Eclipse by Help -> Installation Details -> Plug-ins.
Please note that the plug-in is dynamically added in, the base Eclipse needs not be built with it. Please read the Eclipse platform documentation.
|
|
|
Powered by
FUDForum. Page generated in 0.08340 seconds