Is there an Eclipse module to place semicolons in PDT? - php

The java editor options for eclipse include an option for automatically placing a semicolon at the end of a statement if you type it anywhere in the line.
Eclipse PDT does not seem to have a similar option for PHP. Is anyone aware of a module that adds this capability (or any other way to avoid having to manually move the cursor out of a nested set of parens to add the statement terminator?

Currently the PDT doesn't support such functionality.
For Java you can find it under Window -> Preferences -> Java -> Editor -> Typing and here Automatically insert at correct position: Semicolons.
However there's no such option under PHP -> Editor -> Typing.
As far as I'm aware at one point someone had an idea of implementing this feature, however PDT team in recent years is really struggling (you most likely work on Eclipse Helios PDT which is based on a Helios release of Eclipse from 2010, while current version of Eclipse is Juno from mid 2012, and Eclipse team is working on moving into the Kepler release) so I wouldn't count on this feature being implemented in any foreseeable future.
As far as I'm aware - there's also no additional plugin to support such functionality in PHP.

Related

Eclipse JUNO PHP Formatter

I've downloaded the Eclipse PDT package as well as however, I can't find any options for formatting my PHP such as specifying line breaks, etc.
In this answer to another question, https://stackoverflow.com/a/3517764, there is a screenshot of what I understand is what I should be seeing. However, all I see is an extremely basic setting panel where I can set whether or not I want spaces or tabs to be used and how many to be used.
Any help on getting a good formatter would be great.
Ideally, it'd be a formatter for within Eclipse as opposed to another tool.
I'm currently using Eclipse Juno 4.2.2
Cheers
From what I see, PDT 3.1.x branch doesn't have a fully customizable code formatting rules. If you go and install/update to PDT 3.2 branch you'll get java-like code formatting options.
In Eclipse Juno go to:
Help > Install New Software
Click the "Add" button that appears near the top right
For Name you can put "PDT 3.2 Release" (or whatever you want really)
For Location you HAVE to put http://download.eclipse.org/tools/pdt/updates/3.2/release
Once you update/install PDT and restart eclipse if you go to
Window > Preferences > PHP > Code Style > Formatter
You'll see a highly customizable formatter to use.
Note, I got the link for the 3.2 release from: http://projects.eclipse.org/projects/tools.pdt

How to Remove Zend Studio Components from Existing Eclipse PDT?

I have Eclipse PDT Indigo installed. I downloaded it form zend's site. From the first day it was prompting me to try the original product Zend Studio. But eclipse PDT was actually serving purpose as it did for many years. But one day I installed it. Just clicked a tempting button.
Now I dont want to use it. Still 15 days remaining. But How do I remove it? From the software center I try to uninstall it. But how do I do it?
What have I tried?
I opened the Help menu. There was "install new software". Nothing like "uninstall". I though in the "install new software" dialog there might be a way to deselect them. But no. There is no way.
Under Indigo/3.7 the "Help > About Eclipse > Installation Details > Installed Software tab > Uninstall..." option works. For some.
Source: FAQ How do I remove a plug-in?
Please let me know if that solved your issue.
I went to zend-eclipse-php/plugins directory and removed all com.zend stuff from there (files and directories). Don't know what was gone but Eclipse stopped bugging about the license. And don't know what's that org.zend stuff - at least the name implies it's not commercial.
That's pretty much the standard way of getting rid of unnecessary Eclipse plugins.

Disable or speed up DLTK indexing in Eclipse PDT?

I am using Eclipse PDT Helios with Aptana Studio on Windows XP SP3.
Very often, my workflow is interrupted because Eclipse starts a DLTK indexing process that lasts 30 seconds, sometimes up to 2 minutes - which is annoying.
I wonder if there is any way to:
Either turn that off or
Run the DLTK indexing process less frequently.
I didn't find any possibility to change regarding parameters in Window > Preferences.
PDT 2.2 (the one in Helios) is using a local database engine, H2, to store information. I wrote a post highlighting how to improve the performance of the new indexer.
There might be another way, but it's requires hacking and I haven't tried it myself since the early builds of PDT 2.2 so YMMV: use a newer version of H2. You see, PDT 2.2 uses H2 version 1.1.117. The current version is 1.2.140. Basically, it involves downloading a newer version from the h2 site, and replacing the current H2 JAR in the plugins folder with this Jar. I should really write a blog post about it. I just need to find some time...
I also have/had this problem and turned off "Build Automatically" in the projects menu.
Which seems to have resolved the problem for me...
So question is, and please excuse my ignorance here... but what is "Build" required for in PHP world.
There are some issue currently being worked out with the dltk.core.index process:
See bug 319130 from yesterday (August 4th).

Can I setup Eclipse to show code changes

I have used Netbeans before with Subversion (SVN), and I liked how it showed me what I had changed since last commit, using the coloring in the left margin.
Can Eclipse do the same? I have installed Subclipse.
Visit Window -> Preferences -> General -> Editors -> Text Editors -> Quick Diff, and enable
Enable quick diff
Show differences in overview ruler
SubVersive and Subclipse can both show changed files in the project explorer and differences between versions in the history. I currently use Subversive and am happy with it (although installing it was painful the first time.)
Had a similar problem. It turn out that the SVN Label decorations in eclipse weren't enable.
Preferences: General/Appearance/Label Decorators
This post helped me out:
SVN-connected project not showing version info in eclipse

Which Eclipse version to install on Linux for PHP development

I have Slackware 12.1 and wish to try out Eclipse for PHP/HTML/JavaScript development. However, it seems I'm facing myriad of possible options and I'd hate to miss the best thing and give up on Eclipse (I'm currently using Geany, but I'm missing some stuff like , for example, auto-complete for JavaScript)
I'm currently looking into just installing All-in-one PDT package version 1.0.3 from here:
http://www.eclipse.org/pdt/downloads/
However, that seems to be Eclipse 3.3. There's also Slackware package for 3.4 here:
http://repository.slacky.eu/slackware-12.1/development/eclipse/3.4/
But it says it a "Classic" version. I'm not sure how hard would be to add PHP, HTML, JavaScript support for it.
Note: I don't plan to run PHP through Eclipse's integrated web server or anything like that. I just want a powerful editor.
P.S. Also, recommendations for something better than Eclipse that is for Linux and free are also welcome. I already used Kate, SciTE, Geany, Emacs, Vi and Bluefish, so those are not interesting.
Important: whatever you recommend, please explain reasons why. Don't rush to be the fastest gun in the west, as I'll downvote such answers that only say "use this"
I second Aptana wholeheartedly. Since it is based very closely off of Eclipse, if you ever decide to do coding that Aptana will not cover, you are still used to the general interface of Eclipse.
I don't want to say it is cut down, because it is not. It just has what you need for the languages and technologies you will be using it for. You can still add other plugins to it as well for SVN, CVS, etc. The interface is a bit less crowded as well.
I don't do a whole lot of javascript coding, but man, that is where is stands out from the crowd. It does a fantastic job with Javascript.
Also, you don't have to use Aptana's built in Jetty server to run PHP; you can just tell it where you local Apache server is.
If you want auto-complete for JavaScript, in that case you should to use some plug-in for Eclipse such as Aptana Studio, but Aptana is more than auto-compete tool for javascript, it has included a lot of unnecessary things that you don't need for regular development.
I have the same problem to find the right solution for JavaScript in Eclipse, Aptana was ok, but I hate the additional features that Aptana includes, I didn't find any good tool which could be added to Eclipse, for JavaScript :( For script languages such as JSP, Eclipse is like a song...nice,sweet and smooth...;)
I would recommend to use Eclipse 3.3 with PHP Development Tools. The All-in-one package should work fine. The great thing about using Eclipse as a PHP IDE is that you have great integration for Zend Debugger/XDebug and you can use common Eclipse Extensions like Mylyn or Subclipse also for PHP.
Eclipse 3.4 isn't useful for PHP Development at the moment because the final version of PDT 2.0 got delayed.
You could also take a look at Aptana or the current Netbeans 6.5 Milestone which both support PHP. Until PDT 2.0 they both provide better JavaScript Support than the current Eclipse 3.3 based PDT. Aptana is also based upon Eclipse.
I'm still using Eclipse 3.3.2 and PDT 1.0.3, and I'm pretty happy with it. I tried upgrading to Eclipse 3.4, using a few recent builds of PDT 2.0, but it was buggy. It would hang for a long time in certain situations (like when I was copying text in a PHP editor). And it would keep re-parsing all my code every time I re-launched Eclipse, which took forever. These issues will probably get fixed eventually, but I'd hold on unless you really want Eclipse 3.4.
Aptana is a good choice, dedicated Eclipse clone for web development.
I personally use Krusader's editor, which is crippled version of Kate (KWrite). Fast, nice code highlight, and many useful shortcuts (like Ctrl+D to comment selection language wise).
Javascript with PDT Eclipse and the plugin jseclipse makes all your problems go away! :)
With jseclipse the regular "Goto function with F3 keyboard press" works.

Categories