Authors:
ORFJackal
logos
Apache

External Code Formatter

Products: IntelliJ IDEA

Vendor: Esko Luontola

Email: N/A

Website: http://github.com/orfjackal/extformatter

SourceCode: ExternalCodeFormatter_1605.zip

Bugtracker page

Description:

Allows using external code formatters, especially Eclipse's code formatter, as well as any command line code formatting tools, from within IntelliJ IDEA. Solves the problem of maintaining a common code style in team environments where both IDEA and Eclipse are used.
Downloads: 5610
Rating:
Participated in rating: 11
Version Since Build Until Build File/URL Size (Kb) Date Details
1.0.4. 95. 95.*. Download 128.49 2011-10-05 20:47:43 details
1.0.3. 80.9000. 85.*. Download 128.5 2009-06-23 01:27:57 details
. .
1 update is hidden show all updates
Screenshot #598

Recent change notes:

1.0.4 (2009-11-04)
- Compatible with IDEA 9

1.0.3 (2009-06-23)
- Fixed Eclipse code formatter on non-Windows platforms

1.0.2 (2009-02-14)
- Compatible with IDEA 8

1.0.1 (2008-01-22)
- Fixed a file cache issue: When a file was reformatted more than once, the changes between the reformats were lost.

1.0.0 (2007-12-21)
- Minor refactorings

0.5.0 (2007-12-19)
- Support for Undo (Ctrl+Z)
- Help documentation for using a custom code formatter

0.4.0 (2007-12-14)
- Support for any code formatter which has a command line interface

0.3.0 (2007-12-12)
- Improved performance: Reformats all selected files by starting Eclipse only once

0.2.0 (2007-12-11)
- Added help documentation
- Added program icons
- Switched development platform to IDEA 7.0 and JDK 1.5 for maximum compatibility

0.1.0 (2007-12-05)
- Initial release

Known issues
- Does not support reformatting a selection within a file. Implementation of this feature is not planned, until there is a code formatting tool (executable on the command line) which supports reformatting a text range.

General usage instructions:

When enabled, this plugin replaces IDEA's built-in code formatter transparently. If the selected code formatter does not support a file type, or you try to reformat a text selection, the plugin will automatically fall back to using IDEA's built-in code formatter.

Click "Help" in the plugin's settings dialog for instructions. You must have Eclipse 3.2 or later installed to use the Eclipse code formatter. Any other command line code formatting tool can also be used.

Comments:

12>
meo
2012-02-24 17:02:04
I have to recommend my plugin Eclipse Code formatter http://plugins.intellij.net/plugin/?idea&id=6546

It formattes directly from IntelliJ.
.
blessing2011
2011-10-18 20:30:59
This website can develop you to manage plugins from your IDE.Help you find more plugin information.Auto used parts in chicago also help consumer contented of its good quality products..http://www.northshoretowinginc.com/auto-wrecking-services/auto-parts
.
obender
2011-07-16 00:53:38
Not compatible with v 10.x
.
Anonymous
Rated:
2010-07-14 16:39:20
This plugin gets the job done once you've configured Eclipse correctly.
I also had the problem where it wouldn't format my files according to the eclipse formatting preferences, but I got it solved. This it what you have to do to get the plugin working correctly:
1. Make sure the following setting is enabled on the Eclipse project: Right click on the project in Eclipse --> Properties --> Formatter --> "Enable project specific settings". When this setting is enabled, the "workspace\yourProject\.settings\org.eclipse.jdt.core.prefs" file will be filled up with the formatter preferences.
2. Once you've done this, you can configure the plugin in Intellij according to the examples giving in the configuration window.

The downside of this plugin is that it takes some time to format a file compared to the build-in formatter and it also shows an eclipse splash screen. So I only use it right before I do a commit to SVN.

Thanks for creating this plugin!
.
jvassbo
Rated:
2009-11-24 15:21:13
Is there really no way of doing this without having to have eclipse installed?
Somehow convert the eclipse profile xml into IDEA's format?

I could use this feature for the current project I'm working on, but I am NOT installing eclipse just to get this plugin working. What an overhead...
.
Anonymous
2009-11-11 15:50:03
Installed for community edition(Windows). It doesn't format code according to project-selected formatting style. My guess is that it formats using the default style. And BTW flashing Eclipse and command line window is also "no fun".
.
Anonymous
Rated:
2009-11-06 16:43:26
Today I installed the plugin for use with the IDEA9 Community Edition and it works great! Many thanks to ORFJackal and also to jaikiran for making it work with IDEA9.

Carsten
.
jaikiran
2009-10-26 20:19:52
Esko,

As per this reply on the IDEA forum thread http://www.jetbrains.net/devnet/message/5247929#5248005 ,using the until-build is not recommended. So i am going to remove that attribute from the plugin.xml and commit it (to the forked repo), unless of-course you think otherwise.
.
jaikiran
2009-10-24 14:12:34
I have now got this working locally. Just had to change the "until-build" number in the plugin.xml. However, i don't like the new build numbers as i explain here http://www.jetbrains.net/devnet/message/5247929#5247929

So the fix would either be to remove the until-build attribute from the plugin.xml (which i don't think is a great idea - but i don't know the best practices around this) or wait for someone from the IDEA team to comment on what is the correct upper limit for the build number against IDEA9.
.
jaikiran
2009-10-23 10:34:46
Thanks for being responsive :) I'll take a look at it this week and report back here.
.
ORFJackal
2009-10-22 14:17:38
I'm hoping that somebody would pick up this project, as my time is limited. Anybody can fork the project at http://github.com/orfjackal/extformatter and make the necessary changes and then notify me about it.

The plugin API should not have changed much between IDEA 8 and 9, so it might be enough to just change the range of compatible build numbers and then test that it works.
.
jaikiran
2009-10-22 11:04:23
I downloaded the community edition of IDEA (version 9.0 Beta) and tried using the latest 1.0.3 version of this plugin against it. However, it complains that it's not compatible with the version of IDEA. Admittedly, this plugin was meant for 8.x version of IDEA, so are there any plans to make it compatible with the community edition?

I posted about this in the IDEA forums http://www.jetbrains.net/devnet/thread/284308?tstart=30, but haven't seen any reply yet. So i thought this would be a better place to ask.
.
Anonymous
Rated:
2009-08-14 07:22:03
Hi,
Thanks for your update. I tested on the ubuntu with intellij8.1. It works!
.
Anonymous
Rated:
2009-06-04 16:44:03
Same as in previous post - it doesn't work under linux
.
Anonymous
2009-04-21 09:07:26
On linux, I got the following exceptions -
java.io.IOException: Cannot run program ""/home/myhomedirectory/installfiles/eclipse/eclipse"": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:431)
at java.lang.Runtime.exec(Runtime.java:328)
at net.orfjackal.extformatter.ExecuterImpl.execute(ExecuterImpl.java:46)
at net.orfjackal.extformatter.EclipseCodeFormatter.reformatMany(EclipseCodeFormatter.java:70)
at net.orfjackal.extformatter.OptimizingReformatQueue.useReformatMany(OptimizingReformatQueue.java:82)
at net.orfjackal.extformatter.OptimizingReformatQueue.flush(OptimizingReformatQueue.java:59)
at net.orfjackal.extformatter.plugin.ExternalizedCodeStyleManager.reformatOptimally(ExternalizedCodeStyleManager.java:134)
at net.orfjackal.extformatter.plugin.ExternalizedCodeStyleManager.reformatWithUndoSupport(ExternalizedCodeStyleManager.java:116)
at net.orfjackal.extformatter.plugin.ExternalizedCodeStyleManager.access$200(ExternalizedCodeStyleManager.java:46)
at net.orfjackal.extformatter.plugin.ExternalizedCodeStyleManager$1.run(ExternalizedCodeStyleManager.java:88)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:171)
at net.orfjackal.extformatter.plugin.util.WriteActionRunner.run(WriteActionRunner.java:37)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:2)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:100)
at net.orfjackal.extformatter.plugin.util.CommandRunner.run(CommandRunner.java:46)
at net.orfjackal.extformatter.plugin.util.ConditionalRunner.run(ConditionalRunner.java:37)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:16)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:35)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:99)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:217)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.(UNIXProcess.java:148)
at java.lang.ProcessImpl.start(ProcessImpl.java:65)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 29 more
.
12>