NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Veteran

Joined: 30 Aug 2006
Posts: 116
Reply with quote
I'd LOVE to see this too please. This is one of the most important features possible - if done correctly it can save hours and hours of work, and I know how PHPEd and its fans pride themselves in the work efficiency that PHPEd imparts.

One thing I'd like to point dmitri and yfaktor to would be that due a company already has a free beautifier tool, which has been VERY buggy, but which features a pretty much everything one can imagine. I hesitate to include a URL to that product because they make a competing php editor (far inferior to PHPEd, I assure you), but you can google for the word "phpcodebeautifier" and it will come up.

I only include this information so that dmitri and yfaktor might see some of the options that this beautifier has as far as code structuring. I'm hoping that an integrated code beautifier will

- support MANY VARIOUS code standards (freeform options, not just provide templates)
- allow users to code format entire projects
- as black suggests, allow us to select a block of code to format
- allow code formatting from the workspace or file list, so that we can select a file or files and right click to code format.
- allow code formatting based on file type.
- allow us to save code formatting "profiles", which can be assigned on a per project basis. This is in case some projects are done to a client's stringent specifications which might different from another client's, or even to your own company's standards.
- allow the code formatting settings to be exported to a file which can be imported in another PHPEd. Essentially it would be cool to be able to export the code formatting and make it available as a file that you could distribute to your team. This is especially useful for OPen Source projects where team leaders can make their PHPEd code formatting settings available for download to all volunteers.
View user's profileFind all posts by rudderSend private message


Joined: 03 Dec 2006
Posts: 26
Reply with quote
I cannot seem to get the beautifier to work. it shows in the log that it was called but the PHP code never changes. All it does is add a skeleton html page at the bottom of the php code. What am I missing?
View user's profileFind all posts by RavenSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
please read this howto-use-a-php-script-for-my-editing-t753.html
Don't forget, if any of the directories contain spaces, you have to quote them.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 26
Reply with quote
I found my setup error but now it isn't recognizing @FName@. It says "No input file specified in the Log yet it pops up a message saying the file was externally modified. Reload?" and it shows the correct path and file name.
View user's profileFind all posts by RavenSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
do you run @php@, @phpcli@, @php5@ or @php5cli@ ?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 03 Dec 2006
Posts: 26
Reply with quote
@php5@

Here is my setup string:
@php5@ -q "C:\Program Files\nusphere\php5\PEAR\PHPBeautifier\Beautifier.php" "@FName@"

I have tried @FName@ with and without quotes - same result.
View user's profileFind all posts by RavenSend private messageVisit poster's website


Joined: 10 Feb 2004
Posts: 93
Reply with quote
I havent been too impressed with Polystyle. I dont like the way it does the formatting by default, and while I have tried to edit the style (both graphically, and from within PhpEd) it never seems to get it right. For example, I use PhpDoc extensively. For some reason, on a test file, Polystyle moved all of my phpdoc comments for the function descriptions to the top of the file... uh, wtf?

now, there is a 95% chance that I'm, doing something wrong, but to be honest, I dont have the time to learn the quirks of another product. If I change the formatting so that there is a space between the } and the word else, I dont have time to figure out why it still makes it }else.

The one rudder mentioned ([url=]phpCodeBeautifier[/url]) seems to format the code exactly the way i like it as its defaults. And the instructions on how to use it are pretty straight forward ([url]phpCodeBeautifier/manual.php[/url]). While it says there is a GUI version, I could only find a GUI for version 0.8. version 1.0.1 seems to be command line only. While the GUI does save profiles, and allows you to reuse those profiles, I cant find info on how to use a profile with the command line version. But hey, its free. Doesnt seem like it would be that hard to integrate into PhpEd, even if it was "unofficial" Wink
View user's profileFind all posts by gilzowSend private messageAIM Address


Joined: 23 Jul 2008
Posts: 18
Reply with quote
dmitri wrote:
right, I have some ideas but first I'd prefer to see what people who are using our product like to get.


What is the status of the plans to create a built-in code-beautifier for PHPEd?
View user's profileFind all posts by materixSend private message


Joined: 07 Mar 2007
Posts: 26
Reply with quote
I am also looking for the feature. In netbeans, it is built in and you only have to press ALT+SHIFT+F and it formats. Pretty simple.

I dont think there should be an external formatter, but PHPed should use its own built in formatter, all the major IDE's these days have their own built in Formatters.
View user's profileFind all posts by Ibn SaeedSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
In PhpED you can Edit->Reindent Code and it will format your file.
If you want to run this function with Ctrl-Alt-F shortcut, feel free to assign it in Tools->Settings->Editor shortcuts

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 07 Mar 2007
Posts: 26
Reply with quote
dmitri wrote:
In PhpED you can Edit->Reindent Code and it will format your file.
If you want to run this function with Ctrl-Alt-F shortcut, feel free to assign it in Tools->Settings->Editor shortcuts


I checked the Edit Menu, and i did not find Reindent code.
View user's profileFind all posts by Ibn SaeedSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
Dear black,
I did not mean polystyle. I meant our own NuSphere code formatter that is available in PhpED version 5.8.
You can select your piece of code and reformat it.

@Ibn Saeed

Quote:
I checked the Edit Menu, and i did not find Reindent code.


if you're using version 5.8, it should be there. If not, try Right Click on menu->Customize->Commands tab->select "Edit" in the category->scroll the pane on the right to the bottom where you can find "Re-indent code". Drag it to the menu.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
How do I install a code beautify or formatter?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 3  

  
  
 Reply to topic