Does IntelliJ have some shortcut for changing access modifers?

已回答

Does IntelliJ have some shortcut for changing access modifers? For example, it would be nice if I could put the cursor at some class member and then press Alt + Up to widen access or Alt + Down to make it more restrictive

0

So far you can change it by using the Alt+Enter intention:

  1. Put your caret under some methods eg: void foo() {}
  2. Alt-Enter on method, pick "Change access modifier"
  3. Select "public" or any other access modifier

Please tell us if this fit your needs.

0

Yeah, I know. It is similar, but not exactly what I wanted

0

Hi Nad Chel

I've created a feature request for that: https://youtrack.jetbrains.com/issue/IDEA-327818/Add-shortcut-for-a-quick-Change-access-modifier-action

Feel free to vote and watch the YouTrack item in order to be notified once it has updates. See this article if you are not familiar with YouTrack.

 

 

 

0

请先登录再写评论。