Problem marker doesn'r refresh properly [message #1222572] |
Fri, 20 December 2013 19:53 |
|
Hi,
I have some xtext based emf models from which I create java code.
When I call the builders on Ctrl+S (Auto build activated) the builder is started.
But the builder results to manipulate java classes.
When I remove e.g. model elements I could run in an compile error, because I used generated
java classes, which are not available any more. That compile error is a legal situation and I expect it to be shown in problems view.
If I have the file open, where the error occurs, I have an error marker in the editor. But neither in navigator nor in problems view this error is visible. I have to Resave this java class to trigger a rebuild to make this error visible.
I've added project.getResource().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor()) after running my builder, which doesn't have an influence.
Can you please tell me, what's a clean implementation for this problem?
Thanks in advance
Cheers
Markus
|
|
|
Re: Problem marker doesn'r refresh properly [message #1222735 is a reply to message #1222572] |
Sat, 21 December 2013 07:34 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Markus,
Are you using Xtext's builder infrastructure or you've written your own
builder?
On 20/12/2013 8:53 PM, Markus Oley wrote:
> Hi,
> I have some xtext based emf models from which I create java code. When
> I call the builders on Ctrl+S (Auto build activated) the builder is
> started. But the builder results to manipulate java classes.
> When I remove e.g. model elements I could run in an compile error,
> because I used generated java classes, which are not available any
> more. That compile error is a legal situation and I expect it to be
> shown in problems view.
> If I have the file open, where the error occurs, I have an error
> marker in the editor. But neither in navigator nor in problems view
> this error is visible. I have to Resave this java class to trigger a
> rebuild to make this error visible.
> I've added
> project.getResource().refreshLocal(IResource.DEPTH_INFINITE, new
> NullProgressMonitor()) after running my builder, which doesn't have an
> influence.
> Can you please tell me, what's a clean implementation for this problem?
>
> Thanks in advance
> Cheers
> Markus
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problem marker doesn'r refresh properly [message #1222884 is a reply to message #1222735] |
Sat, 21 December 2013 18:31 |
|
Hi Ed,
thank you for your quick answer,
both
We are using XText's builder infrastructure and have registered our own BuilderParticipant.
And in this participant we do the refrehLocal-call at the end.
But XText related validation errors are correctly shown. Only the artifacts which are created by our generator, which are java classes, are the one's, who's errors are not correctly refreshed.
I have to manually open the generated javaclass and resave it to see error markers in problems view. But it would be nice to see them as soon as they are created.
Perhaps you have an idea how I could receive this functionality?
Cheers
Markus
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02350 seconds