Community
Participate
Working Groups
Eclipse 3.3 comes with a "Code Style" feature for Java only. (Preferences -> Java -> Code Style) It would be awesome if this was also available for PHP. Related article: http://www.ibm.com/developerworks/opensource/library/os-eclipse-clean/index.html Maybe contact the authors of that article / the Java code style feature to see how much refactoring is needed to get this to work with PHP too. Maybe make it PHP 5 only since PHP 5 is closer to Java. My main problem with PDT's code formatter is that it doesn't support more flexible rules for indention. My requirements: - Displayed tab length = 8 spaces - Indent by 4 spaces - Replace all leading whitespace with tabs (= Smart tabs) (e.g. 8 spaces indention should be replaced by / set to 1 tab, 12 spaces should be replaced by 1 tab + 4 spaces) PDT makes this pretty much impossible and it's a lot of manual work for me. Java under Eclipse 3.3 makes this super easy with the Code Style settings.
You could also include support to call PHP_CodeSniffer if installed (http://pear.php.net/package/PHP_CodeSniffer ). Some predefined rules for Zend and PEAR would be great.
Has there been any further considerations by the PDT team to support more code formatting/styling options? This enhancement request has been open for quite some time now. Would love to see this feature included for PHP development, Zend Studio handles code formatting maybe Zend would be willing to contribute their formatting over to the PDT project to support interoperability?
Its been almost a month since the last comment was made (by myself). Not to be a bother, but for PDT to be a mature toolkit for PHP developers we really should have more advanced options for Code Styling/Code Formatting similar to those the the Java development tools have. I'd be willing to bang around with the Plug-in development and try my hand at this and provide a proposed patch, but I have almost no time. Maybe if it doesn't look like any movement by the PDT team will occur on this front quickly I'll be able to give it a shot. It would be nice if we could get a comment from the PDT team or some one associated with it that reflects whether this is actively being considered and when we might see it.
hi Sean, in a few days a new project http://www.eclipse.org/proposals/pdt-incubator/ is going to be created where the pdt team will accept these kind of contributions. to make clear, we see this as important feature, but it was just not contributed on the very first days of the project.
(In reply to comment #4) > hi Sean, > in a few days a new project http://www.eclipse.org/proposals/pdt-incubator/ is > going to be created where the pdt team will accept these kind of contributions. > > to make clear, we see this as important feature, but it was just not > contributed on the very first days of the project. Hi Roy, Thank you very much for your reply! I look forward to the incubator project being opened. Maybe if no one else moves on it I will be able to contribute to the project! I've been very pleased and happy with PDT to date and would love the chance to give back to the community. Again, thank you for your response!
moving to 2.2.0M1
(In reply to comment #6) > moving to 2.2.0M1 I had begun to do some work locally to implement a DLTK-driven code style/formatter for the PDT project. Other projects took precedence so I put it on the back burner, but if it would be of any use I could start a Google Code project or add an attachment to this thread if it would assist you guys at all?
(In reply to comment #6) > moving to 2.2.0M1 Hm ... At what stage is the introduction formatter? PDT 2.2 release in fact already taken place -((
I still had this on my voting list. By now this is implemented and this issue can be closed :)
Thanks:) Closed.