Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Hyperlinking source files
Hyperlinking source files [message #88383] Tue, 06 January 2009 06:53 Go to next message
Pavel is currently offline PavelFriend
Messages: 10
Registered: July 2009
Junior Member
//firstly, sorry for my English
I've used Zend Studio for Eclipse for a long time, use some other editors.
PTD now is my choice, but there is one problem for me: i can't find normally hyperlinking in editor:
for example, I have a code:
---
<?php
include "libs/class.name.php"; // in this file class "name" defined

$c=new name();
$c->doIt();
?>
---
Now, if i hover on "name()" or at "doIt()" with Ctrl and click, editor open needful code.
!But If i do it on "libs/class.name.php" - there are no effects: but family Zend Studio for Eclipse will open source file.
I see at Hyperlinking configure and does not find a cause of this.

Is PDT doesn't have this ability or I have a curves hands? :)
Re: Hyperlinking source files [message #88428 is a reply to message #88383] Tue, 06 January 2009 15:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.zend.com

Hi,

libs/class.name.php must be found according to the Include Path.
For example, if class.name.php is placed in /MyProject/a/b/c/libs, there
should be an entry in Include Path:

/MyProject/a/b/c

Best regards,

<rapkasta@gmail.com> wrote in message
news:op.unbpe2elpszu1d@localhost.localdomain...
> //firstly, sorry for my English
> I've used Zend Studio for Eclipse for a long time, use some other editors.
> PTD now is my choice, but there is one problem for me: i can't find
> normally hyperlinking in editor:
> for example, I have a code:
> ---
> <?php
> include "libs/class.name.php"; // in this file class "name" defined
>
> $c=new name();
> $c->doIt();
> ?>
> ---
> Now, if i hover on "name()" or at "doIt()" with Ctrl and click, editor
> open needful code. !But If i do it on "libs/class.name.php" - there are no
> effects: but family Zend Studio for Eclipse will open source file.
> I see at Hyperlinking configure and does not find a cause of this.
>
> Is PDT doesn't have this ability or I have a curves hands? :)
Re: Hyperlinking source files [message #88502 is a reply to message #88428] Tue, 06 January 2009 18:17 Go to previous messageGo to next message
Pavel is currently offline PavelFriend
Messages: 10
Registered: July 2009
Junior Member
Tue, 06 Jan 2009 20:34:08 +0500, Michael Spector <michael@zend.com> написал:

> libs/class.name.php must be found according to the Include Path.
> For example, if class.name.php is placed in /MyProject/a/b/c/libs, there
> should be an entry in Include Path:
>
> /MyProject/a/b/c

Yes, i know. I talk about something second:
for example i have next code:

[script.php]
<?php
include "file.php";
?>
file.php placed in directory "A" and script "script.php" in "A", i need next: if i hover mouse at "file.php" and click - pdt must open "file.php" to edit. Now it doesn't open, but if i write:
<?php

....
some_func(...);
?>
and hover mouse on some_func, click "CTRL+left mouse", file ( where some_func defined) will open in editor.

P.S. So sorry for my english,next for russian people, i wrote in russian

Есть код, в котором есть инкуд некоторого файла, я хочу (как в том же Zend Studio), чтобы после наведения мышкой на имя файла + нажатия на ctrl и кнопку мыши, этот самый файл открылся в новом табе для редактирования...
Re: Hyperlinking source files [message #88532 is a reply to message #88502] Wed, 07 January 2009 08:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.zend.com

Sorry, but I cannot re-create this issue.
I have two files in my project: test.php and test2.php
test2.php contents are:

<?php
include "test.php";
?>

When staying on "test.php" and pressing CTRL - it hyperlinks. When clicking
on it - test.php is opened in a new editor.
What am I doing wrong? :)


<rapkasta@gmail.com> wrote in message
news:op.unck2yqepszu1d@localhost.localdomain...
> Tue, 06 Jan 2009 20:34:08 +0500, Michael Spector <michael@zend.com>
> ???????:
>
>> libs/class.name.php must be found according to the Include Path.
>> For example, if class.name.php is placed in /MyProject/a/b/c/libs, there
>> should be an entry in Include Path:
>>
>> /MyProject/a/b/c
>
> Yes, i know. I talk about something second: for example i have next code:
>
> [script.php]
> <?php
> include "file.php";
> ?>
> file.php placed in directory "A" and script "script.php" in "A", i need
> next: if i hover mouse at "file.php" and click - pdt must open "file.php"
> to edit. Now it doesn't open, but if i write:
> <?php
>
> ...
> some_func(...);
> ?>
> and hover mouse on some_func, click "CTRL+left mouse", file ( where
> some_func defined) will open in editor.
>
> P.S. So sorry for my english,next for russian people, i wrote in russian
>
> ???? ???, ? ??????? ???? ????? ?????????? ?????, ? ???? (??? ? ??? ?? Zend
> Studio), ????? ????? ????????? ?????? ?? ??? ????? + ??????? ?? ctrl ?
> ?????? ????, ???? ????? ???? ???????? ? ????? ???? ??? ??????????????...
Re: Hyperlinking source files [message #88561 is a reply to message #88532] Wed, 07 January 2009 08:56 Go to previous messageGo to next message
Pavel is currently offline PavelFriend
Messages: 10
Registered: July 2009
Junior Member
> When staying on "test.php" and pressing CTRL - it hyperlinks. When
> clicking
> on it - test.php is opened in a new editor.
> What am I doing wrong? :)
Shit, shit....hags...
I do it now, and it's really work, but in my real project files placed in different directory, and in this tree:
~~~~~~
-directory
+++second.php
first.php
~~~~~~~~~
and in second.php:
<?php
include "../first.php";
?>

hyperlinking doesn't work!

But if i place second.php in directory, where first.php placed and write "include 'first.php'" hyperlinking work!
Re: Hyperlinking source files [message #88638 is a reply to message #88561] Wed, 07 January 2009 15:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: michael.zend.com

This is a little bit tricky... PDT includes search mechanism works like
PHP's one does:

Files for including are first looked for in each include_path entry relative
to the current working directory, and then in the directory of current
script. E.g. if your include_path is libraries, current working directory is
/www/, you included include/a.php and there is include "b.php" in that file,
b.php is first looked in /www/libraries/ and then in /www/include/. If
filename begins with ./ or ../, it is looked only in the current working
directory.

We suppose in PDT, that current working directory will be the Project root,
therefore the file could not be found.
I guess we can change this to the script directory (parent directory of
current script).
I've fixed this bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=258260)
in CVS and 2.0.1 branch.

Best regards,

<rapkasta@gmail.com> wrote in message
news:op.undprrx1pszu1d@localhost.localdomain...
>> When staying on "test.php" and pressing CTRL - it hyperlinks. When
>> clicking
>> on it - test.php is opened in a new editor.
>> What am I doing wrong? :)
> Shit, shit....hags...
> I do it now, and it's really work, but in my real project files placed in
> different directory, and in this tree:
> ~~~~~~
> -directory
> +++second.php
> first.php
> ~~~~~~~~~
> and in second.php:
> <?php
> include "../first.php";
> ?>
>
> hyperlinking doesn't work!
>
> But if i place second.php in directory, where first.php placed and write
> "include 'first.php'" hyperlinking work!
Re: Hyperlinking source files [message #88668 is a reply to message #88638] Wed, 07 January 2009 15:30 Go to previous message
Pavel is currently offline PavelFriend
Messages: 10
Registered: July 2009
Junior Member
No Message Body
Previous Topic:Where can I download ZendDebugger v5.2.15 ?
Next Topic:[Announce] PDT 2.1.0M4 is available
Goto Forum:
  


Current Time: Tue Apr 23 09:19:19 GMT 2024

Powered by FUDForum. Page generated in 0.03552 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top