• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JBuilder4: Re-indent all ?

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I'm working with JBuilder4 and I wondered if there is a way to reformat / reindent the whole code like Emacs' C-M-\ ?
Thanks for help,
Dennis
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Edit - select all
tab until it's indented the way you want.
If you want spaces instead of tabs, select the option to replace spaces with tabs on save. There was also some shortcut, like ctrl-shift-i tab, but I don't know how it's different.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Selecting All and then pressing tab moves all the code in the same way, but I'm looking for a way to make JBuilder apply indenting rules such as incrementing tabs after curly braces.
So when you got code that's not indented at all like
class Foo {
Object obj;
public static void main(String[] args) {
// blub
}
}
and you select everything and press ???, the code should look like this:
class Foo {
Object obj;
public static void main(String[] args) {
// blub
}
}
Emacs does support this, involving standard and personal settings. (Ctrl-Alt-AltGr-\ on selection)
respect,
Dennis
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay, the last one was lousy as whitespace is being removed.
the second snippet of code should be well-indented like
class Foo {
...Object obj;
...public static void main(String[] args) {
......//blub
...}
}
So sorry ;-)
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use CNTRL-K-I to indent in and CNTRL-K-U to unindent on JBuilder3
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that's what i was actually looking 4.
unfortunately, on jbuilder4, it wouldn't work..
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic