| Summary: | links to types and methods not working in PHPDoc tooltip | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Jacek Pospychala <jacek.pospychala> | ||||||
| Component: | PDT | Assignee: | Jacek Pospychala <jacek.pospychala> | ||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | ganoro, mauromol, qiangsheng.w, silviya | ||||||
| Version: | unspecified | Flags: | jacek.pospychala:
review?
(ganoro) qiangsheng.w: review+ zhaozhongwei: review+ |
||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 324636 | ||||||||
| Attachments: |
|
||||||||
Created attachment 178323 [details]
patch
Patch is based on JDT.
PHPDocumentationContentAccess.createSimpleMemberLink already had JDT-based impl commented out, so I uncommented it.
PHPElementLinks class was added analogously to JavaElementLinks from JDT, except that it's much simpler and uses PHP api (DltkCore and PHPUiPlugin), instead of JDT.
PHPDocumentationHover was changed to hook PHPElementLinks.ILinkHandler to tooltip's browser
guys, please take a look at the patch. IMHO it's not very risky, because previously links were not working at all. Created attachment 178503 [details]
patch
patch improved to correctly parse the URI with referenced element information. Compared to previous patch, main difference is PHPElementLinks.parseURI()
reviewed Applied to branch and head marking as fixed. Verified on Win/Lin/MAC - works now. Closing What is the target milestone of this? I'm using the following: PHP Development Tools (PDT) SDK Feature 2.2.1.v20101001-2300-53184QAN4JBQgLYPWMLcXn6Na9Od org.eclipse.php.sdk.feature.group Is it supposed to contain this fix? I see that it contains the fix for bug #324636 but the rendered links do not work for me. (In reply to comment #8) > What is the target milestone of this? I'm using the following: > > PHP Development Tools (PDT) SDK Feature > 2.2.1.v20101001-2300-53184QAN4JBQgLYPWMLcXn6Na9Od > org.eclipse.php.sdk.feature.group > > Is it supposed to contain this fix? I see that it contains the fix for bug > #324636 but the rendered links do not work for me. Hi I also have the 2.2.1.v20101001 and this works OK there. When you click on the link the in the doc-tip the content changes. Do you mean that you expected to be moved to the relevant place in the code? Because if so I am not sure that is the way it is supposed to work. It only changes the content of the doc-tip. (In reply to comment #9) > When you click on the link the in the doc-tip the content changes. > Do you mean that you expected to be moved to the relevant place in the code? No, the problem here is that when I click on the link, nothing happens (=> the content doesn't change). I'll try to post a simple test case here where I have this problem. Example will be good. Also what is your OS? (In reply to comment #11) > Example will be good. > Also what is your OS? This is a very simple tast case that fails for me: class Test { /** * @see ab() */ public function aa() { } /** * @see Test::aa() */ public function ab() { } } If I hit F2 on aa I see the link to ab, but if I click it does not change the contents of the phpDoc window. Same for ab. Other info: PHP Development Tools (PDT) SDK Feature 2.2.1.v20101001-2300-53184QAN4JBQgLYPWMLcXn6Na9Od org.eclipse.php.sdk.feature.group Eclipse 3.6.1 build M20100909-0800 Windows Vista 32-bit java.runtime.name=Java(TM) SE Runtime Environment java.runtime.version=1.6.0_22-b04 workspace is in D:\workspace-mauro The test project I created is named "Test bug 324656", so it's located in "D:\workspace-mauro\Test bug 324656" OK ... so what I see is the following:
1. If you have @see <class_name>::<method_name> it works.
In your case it works for:
/**
* @see Test::aa()
*/
public function ab()
{
}
2. If you have @see <method_name> (without <class_name>) it does not work.
In your case:
/**
* @see ab()
*/
public function aa()
{
}
So I guess we need to check if the second one is a valid case.
Jacek, Zhao what do you think?
Mauro and Silvia, thanks for investigating this! I opened bug 328432 for the not working case. |
for file: <?php /** * Enter description here ... * @author jacek */ class Abc { /** * asdasd * * @see Abc */ public function doStuff() { } } class Def extends Abc { /** * Do more and better stuff! * * @see Abc::doStuff() */ public function doStuff() { } } ?> Move mouse over Def::doStuff to see it's tooltip. Notice that there are links to Abc::doStuff and Abc type. Clicking them doesn't work. On some platforms it opens empty page in tooltip and on other it opens some directory contents.