It seems that eclipse has always had some flaky auto-complete functionality. I'm now using Helios and still have trouble with eclipse refusing to offer auto-complete on some common tags in PHP. It's really hard to guess when the auto-complete will work as it seems to change it's mind and work on/off at it's own will.
Is there something that triggers auto-complete on/off for certain elements or features?
Is there something that triggers
auto-complete on/off for certain
elements or features?
I've just checked Helio, and the only one I know off of my head and so far in preferences is Template. You can trigger auto-complete with Code template and customized it. Other than that I can't seem to find a list of php syntax that would trigger it.
If it bothers you that some element aren't getting auto complete, then perhaps you can try code template?
You can try to change your PHP version in Eclipse to 5.3?
Code assist is only a pain for me when I declare classes and I assume it'll do curly braces after I declare the class, it doesn't, it tried to add interface and abstract in there before the curly braces >_>.
Unfortunately Eclipse Helios has the best auto-complete for php of any free IDE. Zend Studio for Eclipse is a lot better, but it is expensive. Zend's Debugger is also better than even the new PDT.
Apparently this is a common problem. Based on this thread I tried netbeans (OpenSource) and phpStorm ($$$) and I must admit that they both provide better code completion.
I'm guessing there is just something buggy in the PDT build for the time being that stops auto-complete from working at times. I'll have to wait a little while and come back to using it I guess.
Related
I am not looking for a debate on best, I just want to know what PHP IDE's have features for highlighting classes, functions and any other relationships outside of the viewed page, to save time on scrolling through pages of code. I would be accessing MVC like frameworks and want this to extend off of my existing page, so covering the actual project.
I have a handful of IDE's I am playing with, but yet to find something that extends to full project as well as I would like. Or maybe I have not used these to their full potential. Any thoughts or ideas would be greatly appreciated. I also have looked for IDE's recently to help with CMS projects, but that is a whole other story and would likely create a debate.
We use PHP Storm 3.
But there are some other IDEs like Aptana or PDT
We use Eclipse Classic http://www.eclipse.org/downloads/ with the PDT extension http://www.eclipse.org/projects/project.php?id=tools.pdt, you can add anything you need, as SVN, CVS, web tools (javascript, HTML, CSS, ...)
You can install PDT and anything else from the 'software install' inside Eclipse.
Another vote for PHPStorm.
But due to PHP's dynamic nature, there are lots of scenarios where the IDE cannot figure out what is going on without explicit help, no matter which IDE you choose.
For example, if your code looks like AbstractService::getInstance($service_class_name), the IDE cannot know the actual type of the returned object unless you annotate it using PHPDoc or it has specifically implemented support for such a pattern. In my experience, most PHP frameworks use strings like that a lot.
According to a poll here on StackOverflow, NetBeans is the best PHP IDE available. This is all fine and good, except for one thing: It appears to be terrible at checking syntax. I'm sure I must be doing something wrong?
I've previously used phpDesigner, which is a great program, but I've only got version 2007, and it doesn't support xDebug (I'd have to buy the new version if I wanted that). So I thought I'd try the much vaunted (and free) NetBeans.
But, as far as I can tell, it's syntax checking is horrible. For example: Note how the same file is handled by the two different IDEs.
First phpDesigner:
Pretty obvious where the problem is, right?
Then NetBeans:
Here there is nothing but a vague error message at the very bottom of the class, and it's not even near the function causing the error(!).
So my question is: Is it possible to get better syntax checking in NetBeans? I'm presuming there must be a way, and I'm just being really dumb.
Additionally: If this is not possible in NetBeans, what other free IDEs are available that do have this level of syntax checking?
Thanks for any help.
Some people have suggested Eclipse as a replacement, so I thought I'd test it.
It too correctly recognises the syntax error. (Makes me wonder if NetBeans is bugged.) I may just switch to Eclipse. Are there any other IDEs people think are worth trying?
Well it turns out that it's a bug in NetBeans. Here's the details of the bug:
http://netbeans.org/bugzilla/show_bug.cgi?id=168350
Update: It's been fixed in NetBeans 7.0.
I don't now much about NetBeans but why don't you try Eclipse with PDT? It has better syntax checking as NetBeans. Using the example presented in your post Eclipse will display the same error message as PHPDesigner (and in the right place). Give it a try.
Personally, I use (and love) VIM as an IDE, but at work we have to work with Eclipse and I think it will suits your needs.
I'm in the middle of a project created using CakePHP framework. I have been using notepad++ all along until now I am deciding to use Eclipse. The reason I like about notepad++ is its agility and simplicity. I tried opening eclipse today creating a new PHP project--it all seems more complex and complicated, I wonder what are the drawbacks if I changed in the middle of the way, to use Eclipse on my existing project. I also see there are some meta files along with misc. files automatically created when we start a project, does it mess up with the existing files? Ecplise prompted and asked to send data when we opened it, I wonder if that affects the privacy of our project.
Any advice related to the problems addressed would be appreciated. Thanks.
Best regards,
John Maxim
You could try Aptana 3.0. It's basically Eclipse optmized for PHP. Eclipse is a very configurable general IDE, but it can be daunting for new users, and there will be much functionality that you won't need.
Doing PHP with Eclipse is best with PDT (PHP Development Tools).
I use it with symfony and it's pretty good.
By default it does code completion, folding, syntax highlighting, bracket matching. If you use CVS you can also integrate that into Eclipse.
If you use XDebug or Zend Community that is also able to be integrated.
EDIT: Eclipse doesn't mess with your files, it adds three things to a normal PHP project (.settings folder, .buildpath, & .project). All of which are easy to remove and there are no lingering files/folders from Eclipse in your code.
Also, about security, I believe it just sends usage statistics, none of the code that you've written. But I'm not completely sure about this.
Another option is to try NetBeans.
I also used Notepad++ for all my work until a few months ago when I decided to give NetBeans a try. I had already tried it and Eclipse in the past but they both seemed to be too heavy for what I was doing. However, the most recent release of NetBeans worked out perfectly for me and has given me a great boost in productivity.
It does everything that I needed it to do and isn't as heavy as Eclipse, at least based on my limited experience.
I would suggest you give PHPStorm from Jetbrains a try. It's simpler than Eclipse or Aptana but much smarter than notepad++.
It's got code completion, source control integration (HG, Git, Subversion, etc.) Deployment setups that handle file copy, FTP, etc. I've switched from Dreamweaver to PHPStorm and haven't looked back.
There's a 45 day trial and the price is very reasonable. ($99 for personal license) Also, version 2.0 is imminent and packs a TON of new features.
I've been battling with several IDE's so far without much success, so I decided it would be ask someone wiser. I'd love one to have these features:
Fast code completion;
Completion for HTML (with tags and tags' content), CSS and, preferably, jQuery;
Debugger which can work with WampServer installation;
Completion for native PHP commands as well
Shortcut to go to a file in the current project/workspace (like Ctrl+Shift+O in Netbeans) --> What I meant here is that a shortcut to open a window, where you can type beginning of a file name and it will show you all matching files in project; so a way to navigate the project with keyboard only.
I have already tried some of IDE's:
Netbeans:
It is slow, really slow. The slowest IDE of them all I believe
Debugger had issues and overall I failed to make it work
You can barely customize auto-formatting (at least in the way I'd like to customize it) - you can either disable it or live with it
I am using it right now but strive to change it!
Eclipse PDT
Kinda slowish, though faster than Netbeans
There was no code hinting for native PHP commands #_#
After restarting IDE, the Debugger decided to stop adding ?X-DEBUGwhatever stuff to links and it stopped working as result
Subclipse didn't work!
Nusphere PHP Edit
Fast and shiny, good for my netbook, but there is no "Go to file" command
No JS hinting
Komodo and PHPDesigner 7 were disqualified for some reasons I can't really remember now but they were severe.
I tested a wide variety of IDE's but there is a real lot of them and pretty difficult to test them all, which is why I'd appreciate some input about one which fits all the above specified needs.
Consider vim. It's painful at first, but it does meet all of your requirements, unless you also have a (as of yet unspoken) requirement for a Graphical User Interface.
Fast Code Completion: Fastest I've ever encountered, C-x C-o
Yes, Yes, and Probably.
vim can use xdebug to get this functionality. How to set up on linux.
Yes.
:o supports tabbed completion even.
PHPStorm is a relatively new contender in the IDE scene by the people who make IDEA and Resharper. I can't say it's blazingly fast, but it's geared specifically toward PHP and has a lot of nice features. I feel it is a considerable improvement over Netbeans or Eclipse.
You might want to try the pre-release of the next version, since they've added a lot of new features.
Funnily enough I decided to settle for Aptana 3 Beta. Though lots of features don't work it is awfully quick and I love the antialiased font. Thanks to all for help anyway!
I'm developing PHP apps that leverage several frameworks (though not the Zend Framework yet...) and I make good use of Javascript (mostly jQuery). All mark-up is XHTML, of course, with CSS, etc. I'm looking to move beyond the beautiful simplicity of Notepad++. I'm using Windows Vista. I'm trying to decide between Zend Studio 7 or Dreamweaver CS4.
They seem pretty on par with each other, but the price points are different. I've seen a few lists of "Good things about Dreamweaver" or "Good things about Zend Studio" but I've yet to find a head-to-head comparison.
Any suggestions on the next IDE to move up to? In addition to the language support and basic error checking (syntax-related, like missing semi-colons or something), I'm looking for two things that are absolutely necessary:
"Projects" or something similar --
open a project and it gives a tree
listing of all related files
beneath. I'm pretty sure both
support this.
As lightweight as possible. Vista's a hog as it is,
and I'd like to have a lightweight
enough IDE that having 10 files open
and moving between them won't drain
my resources.
Other niceties:
Automatic documentation (not sure
what the phrase is, the stuff in
comments above functions with the
#parm stuff).
Templating.
SVN
support.
FTP/File upload
capabilities.
... And, if Zend or Dreamweaver isn't the thing -- any suggestions about what is?
i would suggest Netbease IDE PHP 6.7.
In is free , not so huge like Zend Studio or Dreamweaver.
It has support for
Syntax-highlighting
Templates
PHP Unit
JQuery
Dojo
Code completion for JS / PHP / HTML
Version Control (SVN)
and much more..
Download Netbeans
I suggest try few open source alternatives
Eclipse PDT - Is very good for php but currently don't good support jquery.
Aptana - I build on top of Eclipse and has good support for JQuery. It also has page preview feature.
You can configure different debuggers to work with them like PDT, Zend, Xdebug... all of them can be configured easily.
Zned Studio is also build on top of Eclipse, I have never used that so I can't say anything about it.
I had the same question about year ago. From then I tried many different IDE environments and a found that the most suited one was Netbeans.
The deal with Netbeans was that due to some performance issues it was the solidest IDE there.
As sad as it may be, from my perspective it is much better product than the Zend Studio For Eclipse 6 or 7 witch costs about 400$, (trust me I tried it since I unfortunately wasted the money on licence before I actually tested all available options).
It has the best code completion inspection and assistance, witch you can check yourself by downloading these two IDE-s and trying to code complete chaining method calls.
Support for unit testing is also something worth mentioning since it works. ZDE also has that feature but it is not that stable since sometimes it wont run.
JavaScript support is also solid, actually I think that is better than one in the Aptana, but the only downside of it is that is pretty slow when working with huge libraries such as Dojo. Now some may argue about that but the fact is that (at least with Dojo&dijit) library it has the best code inspection, and fine code completion support.
My opinion is that the only downside is the lack of support for Zend Debugger, and not so intuitive debugging variable, callstack and breakpoint windows.
For now my felling is that this is the best PHP IDE available, something like the Zend Studio 5.5 when it came out.
Netbeans is the clear choice here as long as you aren't limited on memory. It's got a good-sized footprint, but there's no product that can compare...not even Zend.
That being said, the new Aptana 3 was supposed to bring back full-fledged PHP support that was removed from Aptana 2+ (PDT just isn't a good plugin folks), but now that Appcelerator has taken over Aptana I'm a bit skeptical that the focus toward PHP will continue.
Yes Aptana Studio is good for PHP and also Netbeans. I like Netbeans more because it feels more solid. But Aptana has propably the best auto-complete support for javascript of all editors, but I don't really like the appearance of the editor - looks too 'macish'.
I would recommend both actually, side by side as each has its strengths and weaknesses
Zend Studio is excellent for:
PHP class coding enables you to view and browse class hierarchies, provides autocomplete, one click access to PHP Manual
unit testing
debugging
profiling
version control integration
Dreamweaver CS4 for
HTML coding
CSS editing
Other visual design
To me, I still have that impression of Dreamweaver being drag and drop for web "designers" and creating horrible html output that does that validate sometimes. If this still happens with DW CS4, then I would definitely go with Zend Studio.
Zend Studio actually supports with all the Eclipse Plugins that I would like to add for unit testing and continuous integration.
But Aptana and NetBeans are free!!! Which I think Zend editor is not, haven't tried that. I like Netbeans!!! I like Dreamweaver CS4 and use it on daily basis at my job(but not coding php). It's quite nice but I feel it's strength is the help you get with css properties. Besides that it's not better than Netbeans. if you like a shiny cool look like DW so go for Aptana, it has the best javascript autocompletion - really cool!! Saves a ton of time!! Even auto-completion for your JQuery code and other JS frameworks I think.
Actually Dreamweaver has become more of a dev tool (but I'm not entirely convinced of that). It has integration with Subversion which is kind of cool.
I like NetBeans because I've done some Java coding in it before and now it has support for PHP which is real nice, and it feels like a real dev. IDE.
But DW has this cool gray colors..