Changeset 3377 for devel-tools/trunk
- Timestamp:
- Feb 6, 2008, 12:00:09 AM (13 years ago)
- 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 5 5 import org.eclipse.jface.text.ITextViewer; 6 6 import 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;10 7 import org.refal.plus.rfpdt.comp.ast.AstImplem; 11 8 import org.refal.plus.rfpdt.comp.ast.AstNode; 12 import org.refal.plus.rfpdt.comp.ast. AstRef;9 import org.refal.plus.rfpdt.comp.ast.IHoverInfo; 13 10 14 11 public class RfpTextHover extends DefaultTextHover { … … 27 24 return null; 28 25 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)) 39 27 return null; 40 return astDecl.toString();28 return ((IHoverInfo) astNode).getHoverInfo(); 41 29 } 42 30 }
Note: See TracChangeset
for help on using the changeset viewer.