📄 stepentity.java
字号:
package demo.pluginA.treeview.data;import java.beans.PropertyChangeListener;import java.beans.PropertyChangeSupport;import java.util.List;import java.util.ArrayList;import org.eclipse.ui.views.properties.IPropertyDescriptor;import org.eclipse.ui.views.properties.TextPropertyDescriptor;import demo.pluginA.treeview.data.ITreeEntry;public class StepEntity implements ITreeEntry { private Long id; private String name; private String discription; private List children = new ArrayList(); public StepEntity() { } public StepEntity(String name, String desc) { this.name = name; this.discription = desc; //this.option = opt; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public List getChildren() { return children; } public void setChildren(List children) { this.children = children; } public String getName() { return name; } public void setDescription(String des) { this.discription = des; } /*public void setOption(Boolean opt) { this.option = opt; }*/ public void setName(String name) { this.name = name; } public String getDiscription() { return discription; } /*public Boolean getOption() { return option; }*/ // property protected IPropertyDescriptor[] descriptors = new IPropertyDescriptor[] { new TextPropertyDescriptor( PROP_NAME, "Name") }; public IPropertyDescriptor[] getPropertyDescriptors() { IPropertyDescriptor[] ret = new IPropertyDescriptor[descriptors.length]; for (int i = 0; i < descriptors.length; i++) ret[i] = descriptors[i]; return ret; } public Object getPropertyValue(Object id) { if (PROP_NAME.equals(id)) { return name; } return null; } public boolean isPropertySet(Object id) { if (PROP_NAME.equals(id)) return true; else return false; } public void setPropertyValue(Object id, Object value) { if (PROP_NAME.equals(id)) { name = value.toString(); firePropertyChange(PROP_NAME, null, this); } } public void resetPropertyValue(Object id) { } public Object getEditableValue() { return this; } // property listener PropertyChangeSupport listeners = new PropertyChangeSupport(this); public void addPropertyChangeListener(PropertyChangeListener l) { listeners.addPropertyChangeListener(l); } public void firePropertyChange(String prop, Object old, Object newValue) { listeners.firePropertyChange(prop, old, newValue); } public void fireStructureChange(String prop, Object child) { listeners.firePropertyChange(prop, null, child); } public void removePropertyChangeListener(PropertyChangeListener l) { listeners.removePropertyChangeListener(l); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -