Hen Zrihen
Hen Zrihen

Reputation: 21

syso shortcut isn't working in Eclipse IDE

Example: so when I'm trying to use the shortcut syso in eclipse IDE it opens a suggestion pop up instead of just displaying System.out.println like it used to any suggestions to fix this? (I added an example to show what's happening)

Upvotes: 0

Views: 854

Answers (2)

howlger
howlger

Reputation: 34255

See Nitin Dahyabhai's answer for the straightforward and recommended solution.

Alternatively, to avoid that the content assist proposes for syso also the type jdk.internal.misc.FileSystemOption, you can add to the system library the access rule Forbidden **/internal/** (assuming Hide forbidden references is enabled in Type Filters):

  1. Go to Project > Properties: Java Build Path tab Libraries
  2. Select Acceess rules which is a sub-node of the JRE System Library
  3. Click Edit...
  4. In the Type Access Rules dialog, click Add...
  5. In the Add Access Rules dialog, enter **/internal/** click OK
  6. In the Type Access Rules dialog, click OK
  7. Click Apply and Close

enter image description here

Alternatively, you can change the name of the sysout template in the preferences in Java > Editor > Templates.

Upvotes: 0

nitind
nitind

Reputation: 20003

You could use the Type Filters preference page for this, as you almost never want to refer to anything in the jdk.internals packages, and it will apply regardless of the JDK you're using.

Type Filters preference page, with an arrow pointing to the Add Packages button, showing a popup filtering on jdk.internal packages

Upvotes: 1

Related Questions