Question

I'm creating a NetBeans module with multiple services (code assist, project, debugger etc.)

I've noticed that after I registered my ProjectFactory via the @ServiceProvider annotation, the TaskFactory which is registered by the @MimeRegistration annotation stops working. I.e. its one and only method create(Snapshot snapshot) for creating parsing tasks, like ParserResultTasks for error annotations, is not being invoked anymore, thus no parsing.

However, once I invoke the parser explicitly, e.g. through ParserManager.parse within a CompletionProvider, everything works again. Also, I should probably note that the project, editor and parser implementations are all in separate modules.

Is there anything else I have to pay attention to if the ProjectFactory and TaskFactory are being used together? Perhaps adding the TaskFactory to the lookup of the project?

Update

All of a sudden everything is working. I don't know what the problem was, perhaps the META registrations haven't been loaded correctly after changes were made? I don't know. But now everything seems to do what it supposed do.

I'm still open for possible suggestions where things can go wrong when using both, project and parsing API together (if that at all was the problem).

Update2

No, it's not working. Filed in a bug report, see https://netbeans.org/bugzilla/show_bug.cgi?id=230558

Was it helpful?

Solution

Ok, turns out it was a bug after all, but it has been fixed now.

See the full story over here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top