Development

자주쓰는 이클립스 단축키(Eclipse Hotkeys).

sonpro 2023. 3. 15. 10:10
반응형

Hotkeys

Hotkeys in Eclipse

As a programmer, you know that time is of the essence. You need to be able to work quickly and efficiently to meet deadlines and deliver quality code. One way to speed up your workflow is by using hotkeys in your IDE. In this blog post, we'll be discussing some of the most useful hotkeys in Eclipse.

Basic Navigation

Let's start with some basic navigation hotkeys. These will help you move around your code more quickly and easily.

  • Ctrl + Shift + T: Open a type (class, interface, enum, etc.) by name.
  • Ctrl + Shift + R: Open a resource (file, folder, etc.) by name.
  • Ctrl + E: Show a list of open editors.
  • Ctrl + F6: Switch between open editors.
  • Ctrl + Shift + F: Format the selected code.

Code Editing

Now let's move on to some hotkeys that will help you edit your code more efficiently.

  • Ctrl + Space: Show content assist (code completion).
  • Ctrl + 1: Quick fix (provides suggestions for fixing errors or warnings).
  • Ctrl + D: Delete a line.
  • Ctrl + Shift + O: Organize imports.
  • Alt + Shift + R: Rename a variable or method.

Debugging

Debugging is an important part of the development process. Here are some hotkeys that will help you debug your code more effectively.

  • F5: Step into (execute the current line and move to the next line).
  • F6: Step over (execute the current line and move to the next line, but don't step into any method calls on that line).
  • F7: Step return (execute the rest of the current method and return to the calling method).
  • F8: Resume (continue execution until the next breakpoint is hit).

Customizing Hotkeys

Of course, not everyone will find the same hotkeys useful. Fortunately, Eclipse allows you to customize your hotkeys to suit your needs. Here's how:

  1. Go to Window > Preferences.
  2. Expand the General section and select Keys.
  3. Use the search bar to find the command you want to assign a hotkey to.
  4. Select the command and click Add.
  5. Press the hotkey combination you want to use.
  6. Click OK to save your changes.

Conclusion

Hotkeys are a great way to speed up your workflow and become more efficient in Eclipse. By using the hotkeys we've discussed in this blog post, you'll be able to navigate your code, edit it, and debug it more quickly and easily. And if you find that the default hotkeys don't work for you, don't forget that you can customize them to your liking. Happy coding!

public class HelloWorld {     public static void main(String[] args) {         System.out.println("Hello, World!");     } } 
반응형