Author Topic: PHP class browser  (Read 3919 times)

SimonHF

  • Community Member
  • Posts: 43
  • Hero Points: 0
PHP class browser
« on: December 12, 2014, 06:06:59 PM »
I'm trying to use SlickEdit on a large PHP code base. There's over 2000 classes. SlickEdit does not seem to recognize the class hierarchies and let me navigate to parent and child classes. Is this a bug or is the feature not implemented? Unfortunately my boss says this feature works great in the netbeans editor but I'm not keen to switch away from SlickEdit... Please help!

SimonHF

  • Community Member
  • Posts: 43
  • Hero Points: 0
Re: PHP class browser
« Reply #1 on: December 12, 2014, 07:29:05 PM »
I'm guessing it is meant to work because I just came across a class for the first time where it listed the parent class in the class browser. I could even navigate to the parent class. However, it failed to list the parent of the parent child :-( So can PHP class browsing be listed as a bug to be fixed, please?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7099
  • Hero Points: 540
Re: PHP class browser
« Reply #2 on: December 12, 2014, 07:32:13 PM »
Please post a small sample and steps to reproduce. Thanks
« Last Edit: December 12, 2014, 07:56:38 PM by Clark »

SimonHF

  • Community Member
  • Posts: 43
  • Hero Points: 0
Re: PHP class browser
« Reply #3 on: December 12, 2014, 08:37:59 PM »
Please find attached a simple PHP class hierarchy which works and can be run on the command line:

Simons-MacBook-Pro:class-sample simon$ ls
*.vtg         a-grand-parent.php   a.php
a-child.php      a-parent.php
Simons-MacBook-Pro:class-sample simon$ php a.php
this is AChild constructing
this is AParent constructing
this is AGrandParent constructing

If I'm examining the file a-parent.php then in the class browser I would expect to be able to browser to the child class (a-child.php) and the parent class (a-grand-parent.php).

However, in the base classes pane for the class AParent then I see no surrounding classes. Go to derived class works but go to base class does not work.

Interestingly, if I strip out all the use of namespace (FOO) then I can get the base class pane to show all three classes in hierarchy. Also, if I click each class separately and then click on the base class pane then often the base class pane will not update. For example, right now I'm editing a-child.php, I have clicked on the base class pane but it's stuck showing AGrandParent. If I click on the show derived class arrow then it tells me that AGrandParent has no child classes.

So, can it be that it's almost working without namespaces but buggy. And with namespaces it does not work at all?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 7099
  • Hero Points: 540
Re: PHP class browser
« Reply #4 on: December 12, 2014, 09:20:02 PM »
Thanks for posting this. It looks like namespaces are not supported yet. There's no color coding for the "namespace" keyword and the parser gets lost when it sees "\FOO\SomeClass". We will put this on our todo list.