Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324963 - NEW works as a link to go to source
Summary: NEW works as a link to go to source
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 minor (vote)
Target Milestone: ---   Edit
Assignee: Zhongwei Zhao CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-10 09:10 EDT by Petyo Tanchev CLA
Modified: 2020-05-14 11:08 EDT (History)
3 users (show)

See Also:
zhaozhongwei: review? (ganoro)
qiangsheng.w: review+
zhaozhongwei: review? (zhaozhongwei)


Attachments
patch (1.19 KB, patch)
2010-10-06 07:01 EDT, Zhongwei Zhao CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petyo Tanchev CLA 2010-09-10 09:10:47 EDT
Found on 2.2.1.v20100906

Have a code like this:

<?php
class AAA{

}
$aaa = new AAA()

When you  Ctrl+Click the 'new' it brings you to the class declaration, the same as when you do this on 'AAA()'
Comment 1 Zhongwei Zhao CLA 2010-09-27 23:52:38 EDT
I could not reproduce this bug on branch and head,when I Ctrl+Click the 'new' ,nothing happened!Maybe it has been fixed.
Comment 2 Roy Ganor CLA 2010-09-28 04:47:38 EDT
(In reply to comment #1)
> I could not reproduce this bug on branch and head,when I Ctrl+Click the 'new'
> ,nothing happened!Maybe it has been fixed.

there is missing a ";" in the code snippet. if you add it then the problem occurs.
Comment 3 Zhongwei Zhao CLA 2010-10-06 07:01:03 EDT
Created attachment 180310 [details]
patch
Comment 4 Zhongwei Zhao CLA 2011-04-28 23:32:30 EDT
fixed
Comment 5 Zhongwei Zhao CLA 2011-04-29 08:42:11 EDT
the patch causes other bugs.
Comment 6 Zhongwei Zhao CLA 2011-09-08 00:58:37 EDT
first I thought this bug should be fixed in the core model,but it will cause other bugs,so now I judge if the selected word is "new",if so it will return null in PHPHyperlinkDetector.detectHyperlinks.
I think it is ok now,because new is keyword,it could not be class/function/field name.
Comment 7 Kalin CLA 2011-10-20 02:32:58 EDT
Verified.
Closing....