Bug 559722 - [code mining] Delayed syntax coloring
Summary: [code mining] Delayed syntax coloring
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-30 14:18 EST by Craig Setera CLA
Modified: 2024-01-16 04:43 EST (History)
3 users (show)

See Also:


Attachments
Syntax highlighting before editing the file (36.51 KB, image/png)
2020-01-30 14:18 EST, Craig Setera CLA
no flags Details
Same range after inserting a space (40.87 KB, image/png)
2020-01-30 14:19 EST, Craig Setera CLA
no flags Details
Code minings preferences (175.38 KB, image/png)
2020-02-04 07:15 EST, Craig Setera CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Setera CLA 2020-01-30 14:18:42 EST
Created attachment 281659 [details]
Syntax highlighting before editing the file

In recent releases, I'm seeing that the Java editor is not completing the syntax highlighting until a change is made in the editor.  This is really frustrating as many times I just want to open a file to look at it and having complete syntax highlighting helps in being able to read the code.  I can't say for sure whether this is Java specific, but that is where I'm seeing it on a daily basis.

FWIW... I do have the Darkest Dark support installed if that makes any difference.  I have disabled it for the attached screenshots with the same behavior.  Of course, that does not mean that it is not somehow involved.
Comment 1 Craig Setera CLA 2020-01-30 14:19:33 EST
Created attachment 281660 [details]
Same range after inserting a space
Comment 2 Roland Grunberg CLA 2020-01-31 10:28:02 EST
Do you by any chance have Code Minings (Java -> Editor -> Code Minings) enabled from the preferences page (Window -> Preferences). I've only ever seen this happen in relation to that feature.

If not, the only other thing I can think of is maybe a bug in the whitespace annotations being rendered.
Comment 3 Craig Setera CLA 2020-01-31 10:51:00 EST
You may have nailed it.  I need to work with code minings turned off for a while to be sure, but initially it seems better.  

I was not really aware of the code minings support, although it looks really interesting.  However, if I have to choose between getting my syntax highlighting immediately or getting code minings, I will choose syntax highlighting.
Comment 4 Roland Grunberg CLA 2020-01-31 12:36:39 EST
Adding Mickael on CC as he may have more insight into this. I have noticed in the past that multiline declarations/expressions can sometimes mess with the code mining annotation rendering.

The only other non-codemining case I can remember is Bug 553441.
Comment 5 Craig Setera CLA 2020-01-31 17:22:14 EST
Turning off code minings seems to have resolved the issue for me.  Since I was not using them, this isn't a huge loss for me.  However, now that I know they are there, I'd be interested in helping understand why they aren't working so I can actually start to use them.
Comment 6 Roland Grunberg CLA 2020-02-03 10:39:02 EST
(In reply to Craig Setera from comment #5)
> Turning off code minings seems to have resolved the issue for me.  Since I
> was not using them, this isn't a huge loss for me.  However, now that I know
> they are there, I'd be interested in helping understand why they aren't
> working so I can actually start to use them.

That's appreciated. I think the only way to catch this is to have the features enabled and work down from there to a simpler snippet that reproduces. Or just post the larger snippet of code and maybe I can narrow it down. Generally most rendering problems have been with "Show Method Parameter Names" enabled because this is the only one that renders information in-line.
Comment 7 Mickael Istria CLA 2020-02-04 03:37:34 EST
I also sometimes see that and agree it's likely to be an issue about the parameter names code mining changing the style erroneously in some cases.
Does anyone already figured out steps to reproduce? To me, it happens kind of randomly.
Comment 8 Craig Setera CLA 2020-02-04 07:15:54 EST
Created attachment 281694 [details]
Code minings preferences

I was going to try to see if I could reproduce with a smaller set of code minings configured.  I went to the preferences and enabled code minings, but none of the other controls are enabled.  I'm not sure why that might be, but it seemed wrong to me?  For now, I'm going to disable again so that I can get through the day, but can try other ideas if you let me know.
Comment 9 Mickael Istria CLA 2020-02-04 09:35:43 EST
(In reply to Craig Setera from comment #8)
> I went to the preferences and enabled code minings, but
> none of the other controls are enabled.

That seems like another bug to report in a separate ticket.
Comment 10 Eclipse Genie CLA 2022-01-25 04:11:09 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 11 Eclipse Genie CLA 2024-01-16 04:43:51 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.