|Re: [eclipse-dev] Want to understand how "language editor" plugins spawn project builds|
I recommend you start with
https://eclipse.org/articles/Article-Builders/builders.html and see if
that answers your questions.
A quote from the summary: "The first of these is incremental project
builders, which create some built state based on the project contents,
and then keep that built state synchronized as the project contents
On 10 December 2015 at 16:40, David Karr <davidmichaelkarr@xxxxxxxxx> wrote:
> This may seem like a "user" question, but I'm asking it here because I need
> to understand how some of the main Eclipse plugins work, so I can make a
> similar change.
> I've somewhat inherited a codebase for an Eclipse plugin that is used to
> view and edit source files in a somewhat obscure specification language.
> The plugin produces projects that are Maven Java projects, although the
> source files are not Java. Not that it matters, but the files it edits are
> called "Yang" files.
> The plugin is pretty functionally complete for what it has to do, but it has
> one basic flaw. It compiles the current Yang file well enough (using a
> parser from another open-source project) while in the editor, but the only
> time it compiles any other Yang files in the project, or in any project in
> the workspace, is if I load a particular Yang file in the editor, or if I do
> a "Project"->"Clean".
> This is an annoying issue, because Yang files can "import" other Yang files,
> and those imported Yang files can define types and other components that are
> referenced from "importing" Yang files. If I make a change in an "imported"
> Yang file and save it, I would expect the "importing" Yang file to
> immediately update based on that change. For instance, if the importing
> file was referencing a field that would be defined in an imported file, but
> isn't defined yet, and I add that field to the imported file, the importing
> file should have a red mark immediately disappear.
> This is how Java editing works in Eclipse, and I really need this plugin to
> do the same thing.
> I've been examining the codebase for a few weeks now, and stepping through
> code in the debugger, but I'm realizing I need to understand how the "core"
> Eclipse plugins make this sort of thing happen.
> Can someone give me some advice on this?
Back to the top