Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem marker doesn'r refresh properly(Problem marker doesn'r refresh properly)
Problem marker doesn'r refresh properly [message #1222572] Fri, 20 December 2013 19:53 Go to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
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 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
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 Go to previous messageGo to next message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Hi Ed,

thank you for your quick answer,
both Smile

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
Re: Problem marker doesn'r refresh properly [message #1223414 is a reply to message #1222884] Mon, 23 December 2013 10:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Markus,

It's probably better to ask on the eclipse.modeling.tmf forum in this
case. Note that things like Xcore's Java generator and the Xtend's Java
generator also generate Java code and it doesn't suffer from the type of
problem you describe, so I'm sure it can be made to work in a
straightforward way. It sounds like the Java builder isn't kicking in
after your builder.


On 21/12/2013 7:31 PM, Markus Oley wrote:
> 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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem marker doesn'r refresh properly [message #1223471 is a reply to message #1223414] Mon, 23 December 2013 13:44 Go to previous message
Markus Oley is currently offline Markus OleyFriend
Messages: 304
Registered: July 2009
Location: Germany
Senior Member
Ok, thanks for your answer,
and have a merry christmas
Previous Topic:Intelligent IDE / Feature Clean up
Next Topic:Limiting LCS in compare
Goto Forum:
  


Current Time: Wed Apr 24 14:33:26 GMT 2024

Powered by FUDForum. Page generated in 0.02350 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top