Bug 62093 - [syntax highlighting] Eclipse syntax highlighting fails (on large files?)
Summary: [syntax highlighting] Eclipse syntax highlighting fails (on large files?)
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: Christof Marti CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-05-13 09:41 EDT by Ian Brown CLA
Modified: 2007-06-22 10:04 EDT (History)
1 user (show)

See Also:


Attachments
Snapshot of editor with highlighting in disarray (46.67 KB, image/gif)
2004-05-13 09:46 EDT, Ian Brown CLA
no flags Details
Another shot of the broken highlights (38.34 KB, image/gif)
2004-05-13 09:50 EDT, Ian Brown CLA
no flags Details
The java file that is causing the problems (55.58 KB, text/plain)
2004-05-13 10:00 EDT, Ian Brown CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Brown CLA 2004-05-13 09:41:39 EDT
On Integration build I200405060200

I have a very large class file (1400 lines - not my usual practice!) that has 
been a complete pain as far as Eclipse goes - demonstrating many 'odd' issues 
that make me think Eclipse has a problem with its size (or complexity). Might 
not be - that's just a guess.

Anyway, the problem I am reporting here is a highlighting issue. The class 
highlights properly on load, but the highlighting degrades and disappears as I 
make changes to this file (have only noticed it on this one).

I will attach a screenshot or two, but essentially, the 
highlighting 'disappears' in methods that get edited - leaving all text as 
plain black.

In some cases, even chunks of commented-out code, or Javadoc start losing 
their highlights and colouring too.

I'll attach the file, too, but I don't know how much use you will be able to 
make of it as it has many dependencies on other classes
Comment 1 Ian Brown CLA 2004-05-13 09:46:39 EDT
Created attachment 10600 [details]
Snapshot of editor with highlighting in disarray

As you can see, the syntax highlighting has disappeared from most of this code
- including the Javadoc blocks.

But you will also see that it is still there fore the methods above, and little
snippets of the code blocks that are otherwise black

NB For reference, this is with a completely default implementation,
colour-scheme wise, with the new syntax-context highlighting on
Comment 2 Ian Brown CLA 2004-05-13 09:50:02 EDT
Created attachment 10601 [details]
Another shot of the broken highlights

This is another shot of the broken highlighting. This demonstrates (sort of)
how the formatting can manage to recover after all is lost - ie all-black at
the top. partially colourful in the centre, and working at the bottom of this
screenful
Comment 3 Ian Brown CLA 2004-05-13 10:00:06 EDT
Created attachment 10602 [details]
The java file that is causing the problems

This is the file with which I am experiencing this problem. It may or may not
be of use to you...

a) don't judge me on it - it is a work-in-progress dumping ground that will get
refactored into a bunch of nicer, smaller classes!

b) this class has also demonstrated other issues with Eclipse - such as invalid
reports of missing class files (which I also reported), and broken highlighting
issues that I noticed in much earlier Eclipse 3.0 builds (M1, M2 etc) that
seemed very intermittent, or the occasional loss of automatic cursor
indentation on newline.     May or may not be coincidence.

I'm a heavy-user of Eclipse 3.0 in terms of workspace size and usage of
milestone builds - and this is the only file I have *consistently* seen these
problems with. That might be coincidence, file size, complexity, a 'rogue'
character in the file somewhere, or maybe Eclipse just massively objects to how
I've written it and is forcing me to refactor!
Comment 4 Dani Megert CLA 2004-05-13 11:14:34 EDT
Christof, please look into this
Comment 5 Christof Marti CLA 2004-06-11 09:14:44 EDT
Ian, have you seen this on recent builds? Does it still occur if you turn off
advanced highlighting?
Comment 6 Christof Marti CLA 2004-06-14 04:46:10 EDT
Please reopen when you have additional information.
Comment 7 Ian Brown CLA 2004-06-16 04:24:01 EDT
Just for reference, I have had this happen again.

I had an anonymous inner class in the style

    Object found = find( new Visitor() { ... } );

and I refactored this to make a new local variable out of the 'new Visitor() 
{ ... }' construct

The refactoring was successful, but the editor did not catch up with the 
highlighting and the subsequent screen-full of code was all in black.

A simple page up/page down tidied this up...

It is pretty rare, so I'll report instances as they occur in case it gives any 
pointers, but it doesn't (anymore) happen with enough frequency to compel me 
to reopen it until I find something more predictable
Comment 8 Christof Marti CLA 2004-06-16 06:03:22 EDT
Were any messages written to the .log?
Comment 9 Dani Megert CLA 2007-06-22 09:58:59 EDT
Get rid of deprecated state.
Comment 10 Dani Megert CLA 2007-06-22 10:04:20 EDT
.