Hi,
I've just started working for a company that uses IntelliJ 4.0.
They enforce very strict code style rules on all the
developers. Unfortunatley, I really don't like the current
coding style, but I can't argue about it either. I would
like to be able to edit a file, reformat the code to my
liking with the push of a button, and then reformat back
before I check in.
How would I do something like this with IntelliJ?
Thanks
SPC - 20 May 2004 19:33 GMT
The 'coding style' part of the IDE settings dialog lets you save a
particular scheme with a name. So, you could have yours saved with a
different name and switch between the two as and when you need to.
However, I'd strongly recommend that you just grit your teeth and
learn to love your employers coding style. If you reformat code,
modify it, and format it back, and the commit it into a CVS system,
the diffs will almost certainly be more extreme than if you'd changed
the code in the approved style and committed. There's nothing worse
than trying to work out what's changed when it's buried among a load
of fluff that has resulted from layout changes, and your
co-programmers may not love you for it :-) or :-( depending...
Steve
> Hi,
>
[quoted text clipped - 9 lines]
>
> Thanks
Shane Petroff - 20 May 2004 19:38 GMT
> How would I do something like this with IntelliJ?
Ctrl+Alt+L
They should have their style templates set up already, so just get a
hold of the xml file. Ultimately though, it's going to be easier to deal
with the new style directly.
--
Shane