⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pythonnode.java

📁 Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re
💻 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 + -