mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 01:36:01 +02:00
Cosmetics.
This commit is contained in:
parent
1d9c709b88
commit
36442384d4
12 changed files with 46 additions and 86 deletions
|
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IASTExpressionList extends IASTExpression {
|
public interface IASTExpressionList extends IASTExpression {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>NESTED_EXPRESSION</code> describes the relationship between
|
* <code>NESTED_EXPRESSION</code> describes the relationship between
|
||||||
* <code>IASTExpressionList</code> and the nested
|
* <code>IASTExpressionList</code> and the nested
|
||||||
|
@ -29,7 +28,7 @@ public interface IASTExpressionList extends IASTExpression {
|
||||||
/**
|
/**
|
||||||
* Get nested expressions.
|
* Get nested expressions.
|
||||||
*
|
*
|
||||||
* @return <code>IASTExpression [] </code> nested expressions
|
* @return <code>IASTExpression[] </code> nested expressions
|
||||||
*/
|
*/
|
||||||
public IASTExpression[] getExpressions();
|
public IASTExpression[] getExpressions();
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ package org.eclipse.cdt.core.dom.ast;
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface IASTInitializerExpression extends IASTEqualsInitializer {
|
public interface IASTInitializerExpression extends IASTEqualsInitializer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <code>INITIALIZER_EXPRESSION</code> represents the relationship between
|
* <code>INITIALIZER_EXPRESSION</code> represents the relationship between
|
||||||
* an <code>IASTInitializerExpression</code>. and its <code></code>IASTExpression</code>.
|
* an <code>IASTInitializerExpression</code>. and its <code></code>IASTExpression</code>.
|
||||||
|
|
|
@ -24,8 +24,8 @@ public interface IValue {
|
||||||
Long numericalValue();
|
Long numericalValue();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an internal representation of the expression that builds up the
|
* Returns an internal representation of the expression that builds up
|
||||||
* value. It is suitable for instantiating dependent values but may not be
|
* the value. It is suitable for instantiating dependent values but may not be
|
||||||
* used for the purpose of displaying values.
|
* used for the purpose of displaying values.
|
||||||
*/
|
*/
|
||||||
char[] getInternalExpression();
|
char[] getInternalExpression();
|
||||||
|
@ -37,8 +37,8 @@ public interface IValue {
|
||||||
IBinding[] getUnknownBindings();
|
IBinding[] getUnknownBindings();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a signature containing both the internal representation and the
|
* Returns a signature containing both the internal representation and
|
||||||
* unknown bindings. The representation is sufficient to distinguish values
|
* the unknown bindings. The representation is sufficient to distinguish values
|
||||||
* for the purpose of instantiation, it may not be used to display the value.
|
* for the purpose of instantiation, it may not be used to display the value.
|
||||||
*/
|
*/
|
||||||
char[] getSignature();
|
char[] getSignature();
|
||||||
|
|
|
@ -30,7 +30,6 @@ import org.eclipse.cdt.internal.core.parser.scanner.Lexer;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IScanner {
|
public interface IScanner {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a map from {@link String} to {@link IMacroBinding} containing
|
* Returns a map from {@link String} to {@link IMacroBinding} containing
|
||||||
* all the definitions that are defined at the current point in the
|
* all the definitions that are defined at the current point in the
|
||||||
|
|
|
@ -20,9 +20,8 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
|
||||||
/**
|
/**
|
||||||
* Initializer with equals sign (copy initialization)
|
* Initializer with equals sign (copy initialization)
|
||||||
*/
|
*/
|
||||||
public abstract class ASTEqualsInitializer extends ASTNode implements IASTEqualsInitializer,
|
public abstract class ASTEqualsInitializer extends ASTNode
|
||||||
IASTAmbiguityParent {
|
implements IASTEqualsInitializer, IASTAmbiguityParent {
|
||||||
|
|
||||||
private IASTInitializerClause fArgument;
|
private IASTInitializerClause fArgument;
|
||||||
|
|
||||||
public ASTEqualsInitializer() {
|
public ASTEqualsInitializer() {
|
||||||
|
|
|
@ -182,7 +182,6 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
protected boolean functionCallCanBeLValue= false;
|
protected boolean functionCallCanBeLValue= false;
|
||||||
protected boolean skipTrivialExpressionsInAggregateInitializers= false;
|
protected boolean skipTrivialExpressionsInAggregateInitializers= false;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks the beginning of the current declaration. It is important to clear the mark whenever we
|
* Marks the beginning of the current declaration. It is important to clear the mark whenever we
|
||||||
* enter a nested declaration, in order to avoid holding on to all the tokens.
|
* enter a nested declaration, in order to avoid holding on to all the tokens.
|
||||||
|
@ -2122,7 +2121,6 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected IASTStatement parseCompoundStatement() throws EndOfFileException, BacktrackException {
|
protected IASTStatement parseCompoundStatement() throws EndOfFileException, BacktrackException {
|
||||||
IASTCompoundStatement compound = compoundStatement();
|
IASTCompoundStatement compound = compoundStatement();
|
||||||
return compound;
|
return compound;
|
||||||
|
@ -2501,7 +2499,6 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canBeTypeSpecifier() throws EndOfFileException {
|
protected boolean canBeTypeSpecifier() throws EndOfFileException {
|
||||||
|
|
||||||
final int lt1 = LT(1);
|
final int lt1 = LT(1);
|
||||||
switch (lt1) {
|
switch (lt1) {
|
||||||
// simple type specifiers:
|
// simple type specifiers:
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.eclipse.cdt.core.dom.ast.INodeFactory;
|
||||||
* Abstract base class for node factories.
|
* Abstract base class for node factories.
|
||||||
*/
|
*/
|
||||||
public abstract class NodeFactory implements INodeFactory {
|
public abstract class NodeFactory implements INodeFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final void setOffsets(IASTNode node, int offset, int endOffset) {
|
public final void setOffsets(IASTNode node, int offset, int endOffset) {
|
||||||
((ASTNode) node).setOffsetAndLength(offset, endOffset-offset);
|
((ASTNode) node).setOffsetAndLength(offset, endOffset-offset);
|
||||||
|
|
|
@ -29,13 +29,11 @@ import org.eclipse.core.runtime.Assert;
|
||||||
* @since 5.0.1
|
* @since 5.0.1
|
||||||
*/
|
*/
|
||||||
public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmbiguousDeclarator {
|
public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmbiguousDeclarator {
|
||||||
|
|
||||||
private IASTDeclarator[] dtors = new IASTDeclarator[2];
|
private IASTDeclarator[] dtors = new IASTDeclarator[2];
|
||||||
private int dtorPos=-1;
|
private int dtorPos= -1;
|
||||||
|
|
||||||
|
|
||||||
public CASTAmbiguousDeclarator(IASTDeclarator... decls) {
|
public CASTAmbiguousDeclarator(IASTDeclarator... decls) {
|
||||||
for(IASTDeclarator d : decls) {
|
for (IASTDeclarator d : decls) {
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
addDeclarator(d);
|
addDeclarator(d);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +61,7 @@ public class CASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmb
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTDeclarator[] getDeclarators() {
|
public IASTDeclarator[] getDeclarators() {
|
||||||
dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos );
|
dtors = ArrayUtil.trimAt(IASTDeclarator.class, dtors, dtorPos);
|
||||||
return dtors;
|
return dtors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,15 +29,14 @@ import org.eclipse.core.runtime.Assert;
|
||||||
* <br>
|
* <br>
|
||||||
* Example: void f(int (D)); // is D a type?
|
* Example: void f(int (D)); // is D a type?
|
||||||
*/
|
*/
|
||||||
public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode implements IASTAmbiguousDeclarator, ICPPASTDeclarator {
|
public class CPPASTAmbiguousDeclarator extends ASTAmbiguousNode
|
||||||
|
implements IASTAmbiguousDeclarator, ICPPASTDeclarator {
|
||||||
private IASTDeclarator[] dtors = new IASTDeclarator[2];
|
private IASTDeclarator[] dtors = new IASTDeclarator[2];
|
||||||
private int dtorPos=-1;
|
private int dtorPos= -1;
|
||||||
private IASTInitializer fInitializer;
|
private IASTInitializer fInitializer;
|
||||||
|
|
||||||
|
|
||||||
public CPPASTAmbiguousDeclarator(IASTDeclarator... decls) {
|
public CPPASTAmbiguousDeclarator(IASTDeclarator... decls) {
|
||||||
for(IASTDeclarator d : decls) {
|
for (IASTDeclarator d : decls) {
|
||||||
if (d != null) {
|
if (d != null) {
|
||||||
addDeclarator(d);
|
addDeclarator(d);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import org.eclipse.cdt.core.dom.ast.ASTVisitor;
|
||||||
import org.eclipse.cdt.internal.core.dom.parser.ASTProblem;
|
import org.eclipse.cdt.internal.core.dom.parser.ASTProblem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cpp-specific implementation allows actions to visit the problem.
|
* C++-specific implementation allows actions to visit the problem.
|
||||||
*/
|
*/
|
||||||
public class CPPASTProblem extends ASTProblem {
|
public class CPPASTProblem extends ASTProblem {
|
||||||
|
|
||||||
|
@ -41,19 +41,19 @@ public class CPPASTProblem extends ASTProblem {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean accept( ASTVisitor action ){
|
public boolean accept(ASTVisitor action) {
|
||||||
if( action.shouldVisitProblems ){
|
if (action.shouldVisitProblems) {
|
||||||
switch( action.visit( this ) ){
|
switch (action.visit(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT : return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
case ASTVisitor.PROCESS_SKIP : return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( action.shouldVisitProblems ){
|
if (action.shouldVisitProblems) {
|
||||||
switch( action.leave( this ) ){
|
switch (action.leave(this)) {
|
||||||
case ASTVisitor.PROCESS_ABORT : return false;
|
case ASTVisitor.PROCESS_ABORT: return false;
|
||||||
case ASTVisitor.PROCESS_SKIP : return true;
|
case ASTVisitor.PROCESS_SKIP: return true;
|
||||||
default : break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -51,7 +51,6 @@ import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.Highlighte
|
||||||
import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle;
|
import org.eclipse.cdt.internal.ui.editor.SemanticHighlightingManager.HighlightingStyle;
|
||||||
import org.eclipse.cdt.internal.ui.text.ICReconcilingListener;
|
import org.eclipse.cdt.internal.ui.text.ICReconcilingListener;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Semantic highlighting reconciler - Background thread implementation.
|
* Semantic highlighting reconciler - Background thread implementation.
|
||||||
* Cloned from JDT.
|
* Cloned from JDT.
|
||||||
|
@ -59,12 +58,10 @@ import org.eclipse.cdt.internal.ui.text.ICReconcilingListener;
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collects positions from the AST.
|
* Collects positions from the AST.
|
||||||
*/
|
*/
|
||||||
private class PositionCollector extends ASTVisitor {
|
private class PositionCollector extends ASTVisitor {
|
||||||
|
|
||||||
/** The semantic token */
|
/** The semantic token */
|
||||||
private SemanticToken fToken= new SemanticToken();
|
private SemanticToken fToken= new SemanticToken();
|
||||||
private int fMinLocation;
|
private int fMinLocation;
|
||||||
|
@ -82,12 +79,8 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
shouldVisitImplicitNameAlternates = visitImplicitNames;
|
shouldVisitImplicitNameAlternates = visitImplicitNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#visit(org.eclipse.cdt.core.dom.ast.IASTTranslationUnit)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTTranslationUnit tu) {
|
public int visit(IASTTranslationUnit tu) {
|
||||||
|
|
||||||
// visit macro definitions
|
// visit macro definitions
|
||||||
IASTPreprocessorMacroDefinition[] macroDefs= tu.getMacroDefinitions();
|
IASTPreprocessorMacroDefinition[] macroDefs= tu.getMacroDefinitions();
|
||||||
for (IASTPreprocessorMacroDefinition macroDef : macroDefs) {
|
for (IASTPreprocessorMacroDefinition macroDef : macroDefs) {
|
||||||
|
@ -115,9 +108,6 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return super.visit(tu);
|
return super.visit(tu);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#visit(org.eclipse.cdt.core.dom.ast.IASTDeclaration)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTDeclaration declaration) {
|
public int visit(IASTDeclaration declaration) {
|
||||||
if (!declaration.isPartOfTranslationUnitFile()) {
|
if (!declaration.isPartOfTranslationUnitFile()) {
|
||||||
|
@ -126,9 +116,6 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#leave(org.eclipse.cdt.core.dom.ast.IASTDeclaration)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int leave(IASTDeclaration declaration) {
|
public int leave(IASTDeclaration declaration) {
|
||||||
// if (!shouldVisitCatchHandlers && declaration instanceof IASTFunctionDefinition) {
|
// if (!shouldVisitCatchHandlers && declaration instanceof IASTFunctionDefinition) {
|
||||||
|
@ -154,9 +141,6 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#visit(org.eclipse.cdt.core.dom.ast.IASTDeclarator)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTDeclarator declarator) {
|
public int visit(IASTDeclarator declarator) {
|
||||||
// if (declarator instanceof ICPPASTFunctionTryBlockDeclarator) {
|
// if (declarator instanceof ICPPASTFunctionTryBlockDeclarator) {
|
||||||
|
@ -165,9 +149,6 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#visit(org.eclipse.cdt.core.dom.ast.IASTStatement)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTStatement statement) {
|
public int visit(IASTStatement statement) {
|
||||||
// if (!shouldVisitCatchHandlers && statement instanceof ICPPASTCatchHandler) {
|
// if (!shouldVisitCatchHandlers && statement instanceof ICPPASTCatchHandler) {
|
||||||
|
@ -176,9 +157,6 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
return PROCESS_CONTINUE;
|
return PROCESS_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.ASTVisitor#visit(org.eclipse.cdt.core.dom.ast.IASTName)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int visit(IASTName name) {
|
public int visit(IASTName name) {
|
||||||
if (visitNode(name)) {
|
if (visitNode(name)) {
|
||||||
|
@ -226,7 +204,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// fallback in case no image location available
|
// Fallback in case no image location available
|
||||||
IASTNodeLocation[] nodeLocations= name.getNodeLocations();
|
IASTNodeLocation[] nodeLocations= name.getNodeLocations();
|
||||||
if (nodeLocations.length == 1 && !(nodeLocations[0] instanceof IASTMacroExpansionLocation)) {
|
if (nodeLocations.length == 1 && !(nodeLocations[0] instanceof IASTMacroExpansionLocation)) {
|
||||||
addNodeLocation(nodeLocations[0], highlightingStyle);
|
addNodeLocation(nodeLocations[0], highlightingStyle);
|
||||||
|
@ -319,20 +297,14 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
/** Highlightings - cache for background thread, only valid during {@link #reconciled(IASTTranslationUnit, boolean, IProgressMonitor)} */
|
/** Highlightings - cache for background thread, only valid during {@link #reconciled(IASTTranslationUnit, boolean, IProgressMonitor)} */
|
||||||
private HighlightingStyle[] fJobHighlightings;
|
private HighlightingStyle[] fJobHighlightings;
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.internal.ui.text.java.ICReconcilingListener#aboutToBeReconciled()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void aboutToBeReconciled() {
|
public void aboutToBeReconciled() {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.cdt.internal.ui.text.ICReconcilingListener#reconciled(IASTTranslationUnit, boolean, IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void reconciled(IASTTranslationUnit ast, boolean force, IProgressMonitor progressMonitor) {
|
public void reconciled(IASTTranslationUnit ast, boolean force, IProgressMonitor progressMonitor) {
|
||||||
// ensure at most one thread can be reconciling at any time
|
// Ensure at most one thread can be reconciling at any time
|
||||||
synchronized (fReconcileLock) {
|
synchronized (fReconcileLock) {
|
||||||
if (fIsReconciling)
|
if (fIsReconciling)
|
||||||
return;
|
return;
|
||||||
|
@ -410,12 +382,13 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
newPositions.add(current);
|
newPositions.add(current);
|
||||||
}
|
}
|
||||||
fRemovedPositions= newPositions;
|
fRemovedPositions= newPositions;
|
||||||
// positions need to be sorted by ascending offset
|
// Positions need to be sorted by ascending offset
|
||||||
Collections.sort(fAddedPositions, new Comparator<Position>() {
|
Collections.sort(fAddedPositions, new Comparator<Position>() {
|
||||||
@Override
|
@Override
|
||||||
public int compare(final Position p1, final Position p2) {
|
public int compare(final Position p1, final Position p2) {
|
||||||
return p1.getOffset() - p2.getOffset();
|
return p1.getOffset() - p2.getOffset();
|
||||||
}});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -450,7 +423,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stop reconciling positions.
|
* Stops reconciling positions.
|
||||||
*/
|
*/
|
||||||
protected void stopReconcilingPositions() {
|
protected void stopReconcilingPositions() {
|
||||||
fRemovedPositions.clear();
|
fRemovedPositions.clear();
|
||||||
|
@ -459,7 +432,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Install this reconciler on the given editor, presenter and highlightings.
|
* Installs this reconciler on the given editor, presenter and highlightings.
|
||||||
* @param editor the editor
|
* @param editor the editor
|
||||||
* @param sourceViewer the source viewer
|
* @param sourceViewer the source viewer
|
||||||
* @param presenter the semantic highlighting presenter
|
* @param presenter the semantic highlighting presenter
|
||||||
|
@ -479,7 +452,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Uninstall this reconciler from the editor
|
* Uninstalsl this reconciler from the editor
|
||||||
*/
|
*/
|
||||||
public void uninstall() {
|
public void uninstall() {
|
||||||
if (fPresenter != null)
|
if (fPresenter != null)
|
||||||
|
@ -496,7 +469,7 @@ public class SemanticHighlightingReconciler implements ICReconcilingListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Schedule a background job for retrieving the AST and reconciling the Semantic Highlighting model.
|
* Schedules a background job for retrieving the AST and reconciling the Semantic Highlighting model.
|
||||||
*/
|
*/
|
||||||
private void scheduleJob() {
|
private void scheduleJob() {
|
||||||
final ICElement element= fEditor.getInputCElement();
|
final ICElement element= fEditor.getInputCElement();
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* Anton Leherbauer (Wind River Systems) - Adapted for CDT
|
* Anton Leherbauer (Wind River Systems) - Adapted for CDT
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.editor;
|
package org.eclipse.cdt.internal.ui.editor;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.dom.ast.IASTName;
|
import org.eclipse.cdt.core.dom.ast.IASTName;
|
||||||
|
@ -24,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public final class SemanticToken {
|
public final class SemanticToken {
|
||||||
|
|
||||||
/** AST node */
|
/** AST node */
|
||||||
private IASTNode fNode;
|
private IASTNode fNode;
|
||||||
|
|
||||||
|
@ -35,7 +33,7 @@ public final class SemanticToken {
|
||||||
|
|
||||||
/** AST root */
|
/** AST root */
|
||||||
private IASTTranslationUnit fRoot;
|
private IASTTranslationUnit fRoot;
|
||||||
private boolean fIsRootResolved= false;
|
private boolean fIsRootResolved;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Returns the binding, can be <code>null</code>.
|
* @return Returns the binding, can be <code>null</code>.
|
||||||
|
@ -44,7 +42,7 @@ public final class SemanticToken {
|
||||||
if (!fIsBindingResolved) {
|
if (!fIsBindingResolved) {
|
||||||
fIsBindingResolved= true;
|
fIsBindingResolved= true;
|
||||||
if (fNode instanceof IASTName)
|
if (fNode instanceof IASTName)
|
||||||
fBinding= ((IASTName)fNode).resolveBinding();
|
fBinding= ((IASTName) fNode).resolveBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
return fBinding;
|
return fBinding;
|
||||||
|
|
Loading…
Add table
Reference in a new issue