- 2009-11-29: mongodb_watchdog module created by dereine, ported to D7 by me in about half an hour, and migrated in a larger MongoDB project by damz before the hour ended. Wow...
- 2009-07-13: 100% unit test coverage on Taxonews for both D6 and D7 versions
- 2009-02-03: the new Drupal-based site for the golden jubilee of the french "Ministère de la Culture", which OSInet helped build, is now online
- 2009-01-22: new API site for CCK à la api.drupal.org
Formatting PHP code in Eclipse PDT and Zend Neon
Submitted by fgm on Tue, 2007-08-21 09:24
By default, the current Eclipse-based PHP IDE (PDT) uses an indenting style based on One True Brace, and the upcoming Zend Neon version happens to be also Eclipse-based.
For developers working with OSInet Drupal modules or PHP-GTK code, or anyone wishing to apply the OSInet coding style, or another form of Whitesmiths / Symbian PHP formatting, Eclipse allows for customizing the bracing/commenting style by hand-tuning, or to make things simpler, by just importing the OSInet rules for Zend Studio / Eclipse PDT.
| Attachment | Size |
|---|---|
| neon_formatting.xml | 13.28 KB |





Importing styles
exporting styles
Importing formatting preferences in Zend Studio Neon
It's really simple, at least in Zend Studio Neon: go to
Preferences/PHP/Formatter.Then click on
Importand choose the XML file with the conventions. If conventions by the same name exist, you will be asked whether to override them or rename the imported conventions. Apply, and you can now use them.Not sure how how this relates to the default PDT system, though.
Exporting formatting rules from Zend Studio Neon
It's pretty much like importing them: go to
Preferences/PHP/Formatter.Then click on
Exportand name the resulting XML file with the formatting preferences.Importing rules into PDT
Hi,
on PDT still no luck to import OSInet rules, does anybody know how to make it?
Thanks
Zend Studio for Eclipse > PDT
It seems this feature is only present when using the full Zend Studio for Eclipse, which is more featured than the basic PDT.
See the section about "Editor and File Management" at: http://www.zend.com/en/products/studio/compare
PDT 2.0 is out
And still no way to import/export formatting rules. I guess this will remain Zend Studio-only.
How can I import the osinet profile xml into pdt?
In Eclipse 3.4 the PDT environment does not have an import option under preferences @ PHP > Code Style > Formatter to import the Osinet profile from the supplied XML. Should I try to import at PHP > Code Style > Code Templates?
code templates are different from the formatter
code templates are different from the formatter. code templates work with the auto complete function. so if you have code template for say drupal hooks which then you can import these at PHP > Code Style > Code Templates and have them trigger options available when you type "hook_" ctrl+space
This is different from formatter which will clean up the page and bring {} to where you want them etc.
PDT only has 2 formatting options spaces and indentation size. PHPeclipse has more code formatting options but doesn't do remote debugging with xdebug yet. there is no perfect option.