This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 246573 - Code Highlighting not consitent
Summary: Code Highlighting not consitent
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P2 normal with 1 vote (vote)
Assignee: bruno.flavio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-20 11:33 UTC by simas
Modified: 2015-09-29 22:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (26.73 KB, image/jpeg)
2014-08-20 11:33 UTC, simas
Details
Proposed patch: uses textEquals to compare the Identifier and the token text. (1.40 KB, patch)
2015-03-16 00:33 UTC, bruno.flavio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description simas 2014-08-20 11:33:44 UTC
Created attachment 148783 [details]
Screenshot

The code highlighting colors are mixed. See attachement.
Comment 1 bruno.flavio 2015-03-15 23:07:21 UTC
Issue verified with the attached screenshot.

Whenever the name of a member contains the type itself, the colouring of the Type is mixed with the name.

Example of a domain class, the lines 'releaseDate' and 'descritionString' will demonstrate the problem:

package org.bookstore
class Book {
    String title
    Date releaseDate
    String descriptionString
}
Comment 2 bruno.flavio 2015-03-16 00:33:35 UTC
Created attachment 152632 [details]
Proposed patch: uses textEquals to compare the Identifier and the token text.

This patch has been tested against the provided test cases.

It ensures that the token comparison takes into account the full Identifier text, not just the ending.
Comment 3 Martin Janicek 2015-03-16 11:01:26 UTC
Patch looks correct and safe to me. Good job Bruno!
Comment 4 bruno.flavio 2015-03-18 22:17:39 UTC
(In reply to Martin Janicek from comment #3)
> Patch looks correct and safe to me. Good job Bruno!

Martin, thank you for taking the time to review the patch. Should I set the issue to resolved before (or after?) the patch is applied to the repository?
Comment 5 Antonin Nebuzelsky 2015-07-10 13:41:20 UTC
Bruno, has the patch been integrated? Can you do so and close fixed?
Comment 6 bruno.flavio 2015-07-14 22:01:32 UTC
(In reply to Antonin Nebuzelsky from comment #5)
> Bruno, has the patch been integrated? Can you do so and close fixed?

Antonin, I don't have rights to apply the patch in the repository.

I asked in comment #4 what the right procedure is because I still don't know what the work flow is.

Could you help with this?
Comment 7 Antonin Nebuzelsky 2015-07-20 15:48:52 UTC
Included jkovalsky who's been helping you in the past (with issue 249599).
Comment 8 Jiri Kovalsky 2015-07-22 07:19:29 UTC
I will integrate the patch. Just a little patience please. My pile is high now. :) Thanks.
Comment 9 Jiri Kovalsky 2015-08-19 22:30:16 UTC
http://hg.netbeans.org/core-main/rev/f391469ca44a

Patch integrated. Thanks Bruno for your contribution!
Comment 10 Quality Engineering 2015-08-21 01:20:27 UTC
Integrated into 'main-silver', will be available in build *201508210002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f391469ca44a
User: Jiri Kovalsky <jkovalsky@netbeans.org>
Log: #246573: Code highlighting fixed when identifier contains type itself.
Comment 11 bruno.flavio 2015-08-23 19:30:23 UTC
Verified with test case described on Comment 1 as well as on other projects.

A member of the class whose name includes it's type (example: "String theString") no longer confuses the editor highlighting.