英文:
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?
专注分享java语言的经验与见解,让所有开发者获益!
评论