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

📄 foldingentry.java

📁 Python Development Environment (Python IDE plugin for Eclipse). Features editor, code completion, re
💻 JAVA
字号:
/**
 * 
 */
package org.python.pydev.editor.codefolding;

import org.python.pydev.parser.visitors.scope.ASTEntry;

public class FoldingEntry{

    public FoldingEntry(int type, int startLine, int endLine, ASTEntry astEntry) {
        if(endLine < startLine){
            endLine = startLine;
        }
        this.type = type;
        this.startLine = startLine;
        this.endLine = endLine;
        this.astEntry = astEntry;
    }
    public final static int TYPE_IMPORT=1;
    public final static int TYPE_DEF=2;
    public final static int TYPE_COMMENT=3;
    public final static int TYPE_STR=4;
    public int type;
    public int startLine;
    public int endLine;
    public ASTEntry astEntry;
    
    
    @Override
    public int hashCode() {
        final int PRIME = 31;
        int result = 1;
        result = PRIME * result + endLine;
        result = PRIME * result + startLine;
        result = PRIME * result + type;
        return result;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final FoldingEntry other = (FoldingEntry) obj;
        if (endLine != other.endLine)
            return false;
        if (startLine != other.startLine)
            return false;
        if (type != other.type)
            return false;
        return true;
    }
    
    @Override
    public String toString() {
        StringBuffer buf = new StringBuffer();
        buf.append("FoldingEntry<");
        buf.append("type:");
        buf.append(type);
        buf.append(" startLine:");
        buf.append(startLine);
        buf.append(" endLine:");
        buf.append(endLine);
        buf.append(">");
        return buf.toString();
    }

    public ASTEntry getAstEntry() {
        return astEntry;
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -