Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 302038

Summary: Semantic Highlighting is lost in many cases
Product: z_Archived Reporter: Silver Zachara <silver.zachara>
Component: PDTAssignee: PHP UI <php.ui-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: major    
Priority: P1 CC: gadi, ganoro, legend7z, zhaozhongwei
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 312376, 315003    
Bug Blocks:    
Attachments:
Description Flags
example
none
patch for wtp sse
none
bad postition for syntax coloring rules
none
right postition for syntax coloring none

Description Silver Zachara CLA 2010-02-06 08:45:19 EST
Hi,

i'm using latest N build from Hudson and semantic highlig. disappears every minute, but not whole file, but only some part of file.

Any exception in log.
Comment 1 Silver Zachara CLA 2010-02-11 09:34:17 EST
Hi dev,

do you have completely implemented new Semantic Highlighting in latest N builds ?

I'm asking, because i want to know if I can submitting issues or should I wait for complete implementation ?
Comment 2 Roy Ganor CLA 2010-02-15 08:49:08 EST
yes, it works on latest nightly.

When you open issues it will be great if you can attach the log with the description of the exception.

Many thanks!

Closing this issue unless you have the log attached.
Comment 3 Silver Zachara CLA 2010-02-16 14:54:24 EST
(In reply to comment #2)
> yes, it works on latest nightly.
> 

still reproducible

> When you open issues it will be great if you can attach the log with the
> description of the exception.
> 
> Many thanks!
> 

i didn't attach any description, because i didn't know, if semantic highlighting is fully implemented, so because i have asked you when it is fully implemented.

> Closing this issue unless you have the log attached.

When i will have some time i reopen this bug and i attach some description.
Comment 4 Silver Zachara CLA 2010-02-17 18:31:24 EST
Hi,

here is one example:
http://www.megaupload.com/?d=KPJEZFME
Comment 5 Zhongwei Zhao CLA 2010-02-23 22:24:13 EST
Hi,sNop
I have seen the avi.
Can you upload an example file(or project) to reproduce this bug?
Comment 6 Silver Zachara CLA 2010-02-28 11:15:08 EST
hi Zhao,

sry, i must switched back to PDT 2.1.3 because of this bug, so i can test and reproduce this bug and i can't upload whole project because of the licence, but i know, that this bug is reproducible on every php file in the project, so it's very light to reproducible.

When i will have more time and you will still need my files, i upload them.
Comment 7 Silver Zachara CLA 2010-03-16 06:57:39 EDT
Can somebody look at the code which relate with Semantic Highlighting ?

There is simply something bad. I want to switch back to the 2.2 branch
Comment 8 xu jiaxi CLA 2010-03-16 09:08:24 EDT
Created attachment 162155 [details]
example
Comment 9 xu jiaxi CLA 2010-03-16 09:08:53 EDT
hi Zhao,
I have uploaded an example to reproduce the bug.
select var $b and you will see the highlighting is lost.
sorry for my pool English :)
Comment 10 Zhongwei Zhao CLA 2010-05-11 03:44:43 EDT
Created attachment 167869 [details]
patch for wtp sse

patch for wtp sse
Comment 11 Zhongwei Zhao CLA 2010-05-16 23:37:15 EDT
mark as fixed for bug 312376,but we need use wtp RC1 or later version.
Comment 12 Zhongwei Zhao CLA 2010-05-24 19:56:45 EDT
mark as fixed
Comment 13 Zhongwei Zhao CLA 2010-05-28 22:34:19 EDT
Reopen it,because it still exists in some cases!
Comment 14 Silver Zachara CLA 2010-06-01 09:37:06 EDT
Hi dev,

i must write few line relate to this issue.

I think, that should be max. effort to fix this problem, because there is only RC4 !!! and then GA !! :
http://wiki.eclipse.org/Helios/Simultaneous_Release_Plan

Because when GA will be out and this problem will be still exists, so it will be big problem and PDT 2.2 will be very bad release.

So PDT QA and testers should create fictitious PDT project and should programming fictitious classes ( OOP PHP ) and the same with structural PHP, in order to be reproduced every possible problem when Semantic Highlighting is lost.

The other site of this issue is that the primary/main code is in the WST, so when the problem will be identified and will be in WST, so PDT devs must wait for new WTP build and there is only RC4 and the GA!

Simply this bug must be fixed before GA, because I think that this is big problem of the PDT 2.2

I hope that someone takes this problem into their own hands and take care to resolve.

Have a nice day.
Comment 15 Zhongwei Zhao CLA 2010-06-01 09:57:01 EDT
Hi,actually I have put much time on this issue.But on the other side I am not a php developer as you,so basically  I use simple php grammar to reproduce this bug,so I failed.Sometimes why you try to reproduce the bug  intentional,the result may be opposite.

By the way,even I can reproduce this bug,I am not sure if I can fix it,but I promise we will do our best!

So,I think we should be together on this issue.As you said,the time left is very limited!!!!
Comment 16 Silver Zachara CLA 2010-06-01 11:43:53 EDT
(In reply to comment #15)
> By the way,even I can reproduce this bug,I am not sure if I can fix it,but I
> promise we will do our best!

ok, thank you for your effort.

> So,I think we should be together on this issue.As you said,the time left is very
> limited!!!!

ok, so pls send me links to the lasts stable WTP, PDT and DLTK and I try find out more casesm where Semantic Highli. lost.

Thank you.

Roy's help would be very appreciate to fix this issue.
Comment 17 Zhongwei Zhao CLA 2010-06-01 11:57:37 EDT
you can find pdt all in one package at

http://build.eclipse.org/technology/epp/epp_build/36/download/20100529-0916/

Thanks for your effort too!
Comment 18 Silver Zachara CLA 2010-06-01 12:46:21 EDT
(In reply to comment #17)
> you can find pdt all in one package at
> 
> http://build.eclipse.org/technology/epp/epp_build/36/download/20100529-0916/

Thanks, i'm going to do it.
Comment 19 Zhongwei Zhao CLA 2010-06-04 04:00:03 EDT
Hi sNop

I do not know if you can reproduce this issue with the newest pdt,can you give me some feedback,if you can not reproduce it ,I will not waste my time on the meaningless testing:),if you can,I am very happy to see the file or the video!
Comment 20 Silver Zachara CLA 2010-06-04 12:54:51 EDT
(In reply to comment #19)
> if you can not reproduce it ,I will not waste my time on the
> meaningless testing:),if you can,I am very happy to see the file or the video!

Hi zhao,

I have tried reproduce this issue yesterday, but without success, but I have tried it to reproduce only few minutes.

Today I have to rewrite code, which is responsible for displaying wegpages in my eshop (must rewrite View implementation of my MVC design pattern).
I'm going to do it now, so if this issue still exists, I discover it today and of course i'll let you know.

I will use this build:
http://build.eclipse.org/technology/epp/epp_build/36/download/20100603-0922/20100603-0922_eclipse-php-helios-RC3-win32.win32.x86_64.zip
Comment 21 Zhongwei Zhao CLA 2010-06-04 20:32:54 EDT
OK,thanks!

Because it really took me a long time to try to reproduce it,because Roy said he encountered several times:(,but I never got even one time.

Hope this bug has been gone,because it is really annoying!
Comment 22 Roy Ganor CLA 2010-06-17 08:39:05 EDT
*** Bug 315003 has been marked as a duplicate of this bug. ***
Comment 23 Roy Ganor CLA 2010-08-09 05:07:08 EDT
this has been fixed, will be available in Eclipse Helios SR-1
Comment 24 Silver Zachara CLA 2010-08-09 06:27:59 EDT
Hi,

I have worked with large project ZF + Doctrine about 2 weeks and I can tell that any critical lost of the Syntax Coloring, but sometimes when some exception occurs which relates with some other bug ( I don't know which bug it's now ) isn't the Syntax Coloring applied for my own setting - the Syntax Coloring for this *Parameter Variables* ( I have set underline and other color ) ins't applied applied.
So when I discover what cause this problem I post it here.
Comment 25 Zhongwei Zhao CLA 2010-08-09 07:32:04 EDT
Hi sNop

first thanks very much for your help.
second there are two kinds of highlighting,syntax and semantic,so when one region belongs to both of them,only one of them will be applied!
Comment 26 Silver Zachara CLA 2010-08-09 15:03:02 EDT
Created attachment 176179 [details]
bad postition for syntax coloring rules
Comment 27 Silver Zachara CLA 2010-08-09 15:04:29 EDT
(In reply to comment #25)
> second there are two kinds of highlighting,syntax and semantic,so when one
> region belongs to both of them,only one of them will be applied!

Hi zhao,

can you explain me what is the difference between semantic highlighting a syntax coloring ?

From this document:
http://wiki.eclipse.org/PDT/Dev2Dev/Semantic

I deduce that when you programmaticly set some rules for sematic highlighting so as is wrote in this doc: "The rules are automatically added to the Syntax Coloring preference page: ".
And then I define my own rules and it should work and situations like in the screenshot which I have posted in above comment shouldn't happend, it should look like screenshot below.

Pls, kick me on the right way.
Comment 28 Silver Zachara CLA 2010-08-09 15:05:27 EDT
Created attachment 176180 [details]
right postition for syntax coloring
Comment 29 Zhongwei Zhao CLA 2010-08-09 23:54:47 EDT
Hi sNop

You are right,the attachment is a bug(not what I said,I mean,for example,a class which belongs to "Classes" may also belong to "Internal classss").

So,as I said,I can not reproduce your issue with trivial project,so I will try to reproduce it when I have some time!Sorry for this!
Comment 30 Gadi Goldbarg CLA 2010-08-20 09:26:28 EDT
No longer reproducible. Closing...

Kalin Yanev
kalin.a@zend.com