How to show only methods and class-members?

2k views Asked by At

I am trying to find out whether NetBeans v7.1 can fold everything in a Java class except:

  • class name
  • member names
  • method names

So this simple class:

public class Example {
  private int someValue;
  public Example() {
    // Constructor logic
  }

  public void doSomething() {
    // method body
  }
}

Would fold into:

public class Example {
  private int someValue;
  public Example() { }
  public void doSomething() { }
}

Do you know any Java IDE that can do this? If so please let me know which one.

2

There are 2 answers

0
DKSan On BEST ANSWER

Ok,

just type ctrl + shift + -

This should do the trick for you

0
Nery Jr On

Go to the Navigator window and start typing the method name you seek. The method will be automatically selected in the Navigator tree, just then hitting that Netbeans will position the cursor in the method definition in the code editor window. If the Navigator window is not displayed you can turn in on using "Window -> Navigating -> Navigator" (or press Ctrl-7)