mcfly soft
mcfly soft

Reputation: 11645

What is the shortcut for rearrange code in Elipse?

In IntelliJ there is a command earrange Code which moves variables to the top of a class and methods afterwards.

Is there a similar shortcut for eclipse ?

Upvotes: 0

Views: 256

Answers (1)

howlger
howlger

Reputation: 34135

The Sort Members command has no shortcut by default.

You can either execute the command via Quick Access (Ctrl+3 and entering Sort Members) or add a shortcut binding in Window > Preferences: Generals > Keys.

You can also add a so-called Save Action so that the Sort Members is automatically executed when saving: in Project > Properties: Java Editor > Save Actions enable Additional actions, click Configure... and in the tab Code Organizing enable Sort members.

Upvotes: 1

Related Questions