Rick
Rick

Reputation: 91

Eclipse Plugin Development: Code Review

I'm trying to write a plugin for Eclipse which should analyse all java files in the open project.

Is it possible to add my code to the code parser of Eclipse itself? Currently, I'm able to load the workspace and iterating over all java files but any changes after the first iteration are missed.

Upvotes: 0

Views: 157

Answers (1)

greg-449
greg-449

Reputation: 111142

You can use the org.eclipse.jdt.core.compilationParticipant extension point to define a class extending org.eclipse.jdt.core.compiler.CompilationParticipant which will be called at various points during the compilation of a project.

You can also use an IResourceChangeListener to listen for changes to individual resources:

ResourcesPlugin.getWorkspace().addResourceChangeListener(listener);

Upvotes: 1

Related Questions