1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2013-11-27 17:30:49 -08:00
parent 08293b3f58
commit c9909363f9
2 changed files with 5 additions and 23 deletions

View file

@ -31,14 +31,14 @@ public abstract class DeclarationGenerator {
}
/**
* Creates a new {@link IASTDeclSpecifier}DeclSpecifier for a given {@link IType}.
* Creates a new {@link IASTDeclSpecifier} for a given {@link IType}.
* @param type the type to describe
* @return the generated declaration specifier
*/
public abstract IASTDeclSpecifier createDeclSpecFromType(IType type);
/**
* Creates a new {@link IASTDeclarator}Declarator for a given {@link IType}.
* Creates a new {@link IASTDeclarator} for a given {@link IType}.
* @param type the type to describe
* @param name the name for the declarator
* @return the generated declarator

View file

@ -150,9 +150,6 @@ public class CSourceHover extends AbstractCEditorTextHover {
fSource= null;
}
/*
* @see org.eclipse.cdt.internal.core.model.ASTCache.ASTRunnable#runOnAST(IASTTranslationUnit)
*/
@Override
public IStatus runOnAST(ILanguage lang, IASTTranslationUnit ast) {
if (ast != null) {
@ -389,10 +386,8 @@ public class CSourceHover extends AbstractCEditorTextHover {
}
String source= buffer.getDocument().get(sourceStart, sourceEnd - sourceStart);
return source;
} catch (BadLocationException e) {
// Ignore - should not happen anyway
if (DEBUG) e.printStackTrace();
CUIPlugin.log(e);
} finally {
mgr.disconnect(location, LocationKind.LOCATION, fMonitor);
}
@ -408,12 +403,10 @@ public class CSourceHover extends AbstractCEditorTextHover {
* otherwise {@code null}.
*/
private String computeHoverForDeclaration(IASTName name) {
ICPPASTDeclarator declarator =
CPPVisitor.findAncestorWithType(name, ICPPASTDeclarator.class);
ICPPASTDeclarator declarator = CPPVisitor.findAncestorWithType(name, ICPPASTDeclarator.class);
if (declarator == null)
return null;
IASTDeclaration declaration =
CPPVisitor.findAncestorWithType(declarator, IASTDeclaration.class);
IASTDeclaration declaration = CPPVisitor.findAncestorWithType(declarator, IASTDeclaration.class);
IASTDeclSpecifier declSpec = null;
if (declaration instanceof IASTSimpleDeclaration) {
declSpec = ((IASTSimpleDeclaration) declaration).getDeclSpecifier();
@ -672,9 +665,6 @@ public class CSourceHover extends AbstractCEditorTextHover {
super();
}
/*
* @see ITextHover#getHoverInfo(ITextViewer, IRegion)
*/
@Override
public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) {
IEditorPart editor = getEditor();
@ -862,10 +852,6 @@ public class CSourceHover extends AbstractCEditorTextHover {
return keywords.contains(name);
}
/*
* @see org.eclipse.jface.text.ITextHoverExtension#getHoverControlCreator()
* @since 3.0
*/
@Override
public IInformationControlCreator getHoverControlCreator() {
return new IInformationControlCreator() {
@ -881,10 +867,6 @@ public class CSourceHover extends AbstractCEditorTextHover {
};
}
/*
* @see IInformationProviderExtension2#getInformationPresenterControlCreator()
* @since 3.0
*/
@Override
public IInformationControlCreator getInformationPresenterControlCreator() {
return new IInformationControlCreator() {