VS Code和Java Outline:类的继承字段/方法?

huangapple 未分类评论44阅读模式
英文:

VS Code and Java Outline: Inherited Fields/Methods of a Class?

问题

在VS Code中,有没有办法显示从父类继承的字段和方法?

我有这个基类:

public abstract class BaseModel {

  @Transient
  public String SEQUENCE_NAME;

  @Id
  public long id;

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

以及它的子类:

public class NavigationMenuItem extends BaseModel {

  private String text;
  private String path;

  public NavigationMenuItem(String text, String path) {
    SEQUENCE_NAME = "navigation_menu_item_sequence";
    this.setText(text);
    this.setPath(path);
  }

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  public String getPath() {
    return path;
  }

  public void setPath(String path) {
    this.path = path;
  }

}

在VS Code的Java Outline窗格中,它只显示了NavigationMenuItem类的字段和方法。

是否有办法也包括父类的字段和方法?

英文:

Is there a way for VS code to display fields/methods inherited from a super class?

I have this base class:

public abstract class BaseModel {

  @Transient
  public String SEQUENCE_NAME;

  @Id
  public long id;

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

and it's child class


public class NavigationMenuItem extends BaseModel {

  private String text;
  private String path;

  public NavigationMenuItem(String text, String path) {
    SEQUENCE_NAME = "navigation_menu_item_sequence";
    this.setText(text);
    this.setPath(path);
  }

  public String getText() {
    return text;
  }

  public void setText(String text) {
    this.text = text;
  }

  public String getPath() {
    return path;
  }

  public void setPath(String path) {
    this.path = path;
  }



}

in VS Code Java Outline pane, it's only showing fields/methods from NavigationMenuItem .

Is there a way to also include the parent fields/methods?

huangapple
  • 本文由 发表于 2020年7月26日 10:09:36
  • 转载请务必保留本文链接:https://java.coder-hub.com/63095423.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定