📄 pythonnode.java
字号:
/*
* Created on Oct 8, 2006
* @author Fabio
*/
package org.python.pydev.navigator.elements;
import org.python.pydev.outline.ParsedItem;
public class PythonNode implements Comparable, IWrappedResource {
/**
* This is sthe parent (PythonFile or PythonNode) for this object
*/
public Object parent;
/**
* The entry itself
*/
public ParsedItem entry;
/**
* The pythonfile where this node is contained
*/
public PythonFile pythonFile;
/**
* Constructor
*
* @param pythonFile this is the file that contains this node
* @param parent this is the parent for this item (a PythonFile or another PythonNode)
* @param e the parsed item that represents this node.
*/
public PythonNode(PythonFile pythonFile, Object parent, ParsedItem e) {
this.parent = parent;
this.entry = e;
this.pythonFile = pythonFile;
}
@Override
public String toString() {
return entry.toString();
}
public int compareTo(Object o) {
if(!(o instanceof PythonNode)){
return 0;
}
return entry.compareTo(((PythonNode)o).entry);
}
public Object getParentElement() {
return parent;
}
public ParsedItem getActualObject() {
return entry;
}
public PythonSourceFolder getSourceFolder() {
return pythonFile.getSourceFolder();
}
public PythonFile getPythonFile(){
return pythonFile;
}
public int getRank() {
return IWrappedResource.RANK_PYTHON_NODE;
}
public Object getAdapter(Class adapter) {
//return pythonFile.getAdapter(adapter);
return null;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -