Changeset 3377 for devel-tools/trunk


Ignore:
Timestamp:
Feb 6, 2008, 12:00:09 AM (13 years ago)
Author:
yura
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/src/org/refal/plus/rfpdt/editor/RfpTextHover.java

    r3374 r3377  
    55import org.eclipse.jface.text.ITextViewer;
    66import org.eclipse.jface.text.source.ISourceViewer;
    7 import org.refal.plus.rfpdt.comp.ast.AstCall;
    8 import org.refal.plus.rfpdt.comp.ast.AstDecl;
    9 import org.refal.plus.rfpdt.comp.ast.AstFuncDef;
    107import org.refal.plus.rfpdt.comp.ast.AstImplem;
    118import org.refal.plus.rfpdt.comp.ast.AstNode;
    12 import org.refal.plus.rfpdt.comp.ast.AstRef;
     9import org.refal.plus.rfpdt.comp.ast.IHoverInfo;
    1310
    1411public class RfpTextHover extends DefaultTextHover {
     
    2724            return null;
    2825        AstNode astNode = SearchVisitor.search(astImplem, hoverRegion.getOffset());
    29         AstDecl astDecl = null;
    30         if (astNode instanceof AstDecl)
    31             astDecl = (AstDecl) astNode;
    32         else if (astNode instanceof AstFuncDef)
    33             astDecl = ((AstFuncDef) astNode).funcDecl;
    34         else if (astNode instanceof AstRef)
    35             astDecl = ((AstRef) astNode).decl;
    36         else if (astNode instanceof AstCall)
    37             astDecl = ((AstCall) astNode).funcDecl;
    38         if (astDecl == null)
     26        if (!(astNode instanceof IHoverInfo))
    3927            return null;
    40         return astDecl.toString();
     28        return ((IHoverInfo) astNode).getHoverInfo();
    4129    }
    4230}
Note: See TracChangeset for help on using the changeset viewer.