I'm used to Visual Studio 2010 "Format Document" menu option to reformat JavaScript source. Now trying Dart Editor looking for menu option to reformat .dart source code? Is this feature supported?
Code formatting is WIP and will probably be available soon.
see
https://code.google.com/p/dart/issues/detail?id=2059
https://codereview.chromium.org/16562012/
There is no code formatting yet, unfortunately. I am sure this is something that will be added within the end of 2014 or 2015 though.
I have Source Wizard for Delphi 7 (a code formatter).
I'm switching to Delphi 2009. I tried loading *.pas (created with D2009) in Source Wizard in Delphi 7 and there were no problems processing them.
How can I make it to show like a menu item in D2009's menu..?
If you want to have an item in the tools menu, you can simply click on Tools->Configure Tools (or similar, I have a German Delphi version here).
If you are trying to port a Delphi 7 OTA (Open Tools API) wizard, you have to change the code to the new API, because it changed in the transition from the Aurora IDE (D1 - D7) to the Galileo IDE (D8+).
How do I write a Delphi Galileo IDE Expert?
Or are you asking for a specific tool that is called "Source Wizard"?
PS: It would not hurt to clarify your question a bit. A more specific question gets you better answers.
Edit: You may look at GExperts for the integrated source formatter that is based on DelForExp like the "Delphi Source Wizard" seems to be:
http://www.dummzeuch.de/delphi/gexperts/english.html
The formatter in Delphi 2010 is really an annoying thing to me.
I prefer formatting my code manually.
I believe I do it better.
How can I disable it?
NOTE: Answers on why I don't use it in the first place will not be accepted. I need it switched OFF. Nothing more, nothing less.
Install DDevExtensions from Andreas Hausladen.
In its last version:
Version 2.0 (2009-09-13)
Added: Embarcadero RAD Studio 2010 support
Added: Editor tab double click action (zoom, super-zoom)
Added: Source Formatter hotkey (Ctrl+D) can be disabled
Remove or rename the file Embarcadero.Modeling.Formatter.dll in Delphi's bin directory.
There is no need for downloading and installing an extension, not even for deleting a file!
In the Delphi 10 Options head to:
Formatting / Delphi / Profiles and Status
(the captions may differ slightly, I have translated them from German)
There is a Checkbox there, titled "Activate Formatting".
Possible downside: This Formatter feature is also deactivated in the Edit menu.
I want to add Delphi-4 code to VSS via the IDE. Is that possible?
How to do so?
I am working on enhancements for a code written in Delphi 4. The name of the folder is "testCheck".
I tried saving the code directly into VSS by clicking
workgroups\Add "testCheck" to version control
then i checked the VSS to see the latest versions.... I am unable to find the latest version.
Now when I go back to the IDE the "workgroups\Add "testCheck" to version control"
cannot be clicked.it has become unclickable.
Any idea of what the method is to save/ copy code from Delphi IDE to VSS?
Thanks and Regards
Vas
I've used VssConneXion to interface to VSS from Delphi 7. Not certain of their support for version 4. Although I'm running as fast as I can towards SVN currently.
Are there any utilities that reformat Delphi code ?
EDIT
I am using Delphi 2006
Some feedback
Thanks to all that answered this question
I have been using the JCF code formatter - it works well and my code is been formated to Object Pascal Style Guide
You can try the "Jedi code Format". See more information here: http://jedicodeformat.sourceforge.net/
The formatting engine of DelForExp has been integrated into the code base of GExperts. An experimental version of GExperts including a "Code formatter" here:
http://blog.dummzeuch.de/experimental-gexperts-version/
Separate information/downloads for DelForExp here.
Regards.
I have been for some time releasing experimental GExperts versions that include the code formatter formerly known as DelForEx with some improvements and fixes. The latest release is from 2020-10-23 and supports the following Delphi versions:
Delphi 6 to 7
Delphi 2005 to 2010
Delphi XE
Delphi XE2 to XE8
Delphi 10 to 10.4
Delphi 11 (Danger, Alpha version for now 2021-10-24)
Please note, though, that I am using it only with Delphi 2007, so the other versions may have unknown bugs. Also, not all language improvements of later Delphi versions will work, e.g. nested types, generics and anonymous methods.
see gexperts.dummzeuch.de for details.
btw: Any help improving the formatter, especially adding the new language constructs would be appreciated. The source code can be downloaded from the subversion repository linked from my homepage.
I found this: JEDI Code Format
lextudio - Code Beautifier Collection 6 for CodeGear RAD Studio 2007
http://code.google.com/p/lextudio/
Yes,
I always used TWM's experimental version os GExperts which support this feature.
In Delphi 2006 and 2007 it works perfectly (Don't know about older versions though).
The current version is adding support to Delphi 2009, but I don't know in which stage it is, you can find more about it here:
http://www.dummzeuch.de/delphi/gexperts/english.html
BTW: There is an integrated Source Code Formatter since Delphi 2010.
Free Pascal also has a codeformatter, ptop, but it only implements the more basic dialect (say D4-D6 level).
Lazarus recently changed to use the Jedi codeformatter afaik.
The TWM version of GExperts works well and is nicely integrated into the IDE. It enables you to write and modify your code without worrying too much about exact formatting, then just hit the assigned hot-key and it instantly reformats. I have always found it easy to set up to match the style I prefer, and not as complex as JEDI Code Format, which looked like overkill to me.
The Delphi 2009 version is now available from the link posted above, though based on a beta release of GExperts. It is still much the same formatter underneath, though, and is unaware of the syntax of some of the newer Delphi enhancements.
I just made an online pascal code beautifier based on JCF. You may try it at https://pak.lebah.web.id/jcf
HTH.
There is OPEdit II which is free, and works very well.
It's a full text editor, with code refactoring and code browsing.
There is a text formatter, which uses the internal code parser, therefore handle conditional defines just as a real Delphi compiler.
See http://www.codefactor2.com
There is a program PascalFormat