mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 20:25:46 +02:00
Cleanup some obsolete references to old parser
This commit is contained in:
parent
811b4049aa
commit
5b7ebd2927
4 changed files with 12 additions and 697 deletions
|
@ -91,8 +91,8 @@ public class CStructureCreatorTest extends BaseUITestCase {
|
|||
assertEquals(ICElement.C_VARIABLE, child.getTypeCode());
|
||||
child= (DocumentRangeNode)children[8];
|
||||
assertEquals(ICElement.C_USING, child.getTypeCode());
|
||||
DocumentRangeNode linkageSpec= (DocumentRangeNode)children[9];
|
||||
assertEquals(ICElement.C_STORAGE_EXTERN, linkageSpec.getTypeCode());
|
||||
child= (DocumentRangeNode)children[9];
|
||||
assertEquals(ICElement.C_FUNCTION, child.getTypeCode());
|
||||
|
||||
// namespace children
|
||||
children= namespace.getChildren();
|
||||
|
@ -190,12 +190,6 @@ public class CStructureCreatorTest extends BaseUITestCase {
|
|||
assertEquals(ICElement.C_METHOD, child.getTypeCode());
|
||||
child= (DocumentRangeNode)children[2];
|
||||
assertEquals(ICElement.C_METHOD_DECLARATION, child.getTypeCode());
|
||||
|
||||
// extern "C" children
|
||||
children= linkageSpec.getChildren();
|
||||
assertEquals(1, children.length);
|
||||
child= (DocumentRangeNode)children[0];
|
||||
assertEquals(ICElement.C_FUNCTION, child.getTypeCode());
|
||||
}
|
||||
|
||||
public void testStructureCreatorNodeSizes() throws Exception {
|
||||
|
@ -243,14 +237,14 @@ public class CStructureCreatorTest extends BaseUITestCase {
|
|||
// merge in extern "C" children to match cmodel hierarchy
|
||||
for (int i = 0; i < nodeChildren.length; i++) {
|
||||
DocumentRangeNode childNode= (DocumentRangeNode)nodeChildren[i];
|
||||
if (childNode.getTypeCode() == ICElement.C_STORAGE_EXTERN) {
|
||||
Object[] linkageSpecChildren= childNode.getChildren();
|
||||
Object[] newArray= new Object[nodeChildren.length - 1 + linkageSpecChildren.length];
|
||||
System.arraycopy(nodeChildren, 0, newArray, 0, i);
|
||||
System.arraycopy(linkageSpecChildren, 0, newArray, i, linkageSpecChildren.length);
|
||||
System.arraycopy(nodeChildren, i+1, newArray, i + linkageSpecChildren.length, nodeChildren.length - i - 1);
|
||||
nodeChildren= newArray;
|
||||
}
|
||||
// if (childNode.getTypeCode() == ICElement.C_STORAGE_EXTERN) {
|
||||
// Object[] linkageSpecChildren= childNode.getChildren();
|
||||
// Object[] newArray= new Object[nodeChildren.length - 1 + linkageSpecChildren.length];
|
||||
// System.arraycopy(nodeChildren, 0, newArray, 0, i);
|
||||
// System.arraycopy(linkageSpecChildren, 0, newArray, i, linkageSpecChildren.length);
|
||||
// System.arraycopy(nodeChildren, i+1, newArray, i + linkageSpecChildren.length, nodeChildren.length - i - 1);
|
||||
// nodeChildren= newArray;
|
||||
// }
|
||||
}
|
||||
ICElement[] cElementChildren;
|
||||
if (cElement instanceof IParent) {
|
||||
|
|
|
@ -1,315 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2007 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* QNX Software System
|
||||
* Anton Leherbauer (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.compare;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
import org.eclipse.cdt.core.model.ICElement;
|
||||
import org.eclipse.cdt.core.parser.IProblem;
|
||||
import org.eclipse.cdt.core.parser.ast.ASTClassKind;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFunction;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTMacro;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTMethod;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTVariable;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
|
||||
/**
|
||||
* @deprecated As of CDT 5.0. This class is not used anymore. Kept for reference only.
|
||||
*/
|
||||
public class CParseTreeBuilder extends SourceElementRequestorAdapter {
|
||||
|
||||
private Stack fStack = new Stack();
|
||||
private IDocument fDocument;
|
||||
|
||||
/**
|
||||
* Syntax Error.
|
||||
*/
|
||||
public class ParseError extends Error {
|
||||
|
||||
/**
|
||||
* Comment for <code>serialVersionUID</code>
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
public CParseTreeBuilder(CNode root, IDocument doc) {
|
||||
fDocument = doc;
|
||||
fStack.clear();
|
||||
fStack.push(root);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier)
|
||||
*/
|
||||
public void enterClassSpecifier(IASTClassSpecifier classSpecification) {
|
||||
String name = classSpecification.getName();
|
||||
int start = classSpecification.getStartingOffset();
|
||||
if (classSpecification.getClassKind().equals(ASTClassKind.CLASS)) {
|
||||
push(ICElement.C_CLASS, name, start);
|
||||
} else if (classSpecification.getClassKind().equals(ASTClassKind.STRUCT)) {
|
||||
push(ICElement.C_STRUCT, name, start);
|
||||
} else if (classSpecification.getClassKind().equals(ASTClassKind.UNION)) {
|
||||
push(ICElement.C_UNION, name, start);
|
||||
} else if (classSpecification.getClassKind().equals(ASTClassKind.ENUM)) {
|
||||
push(ICElement.C_ENUMERATION, name, start);
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterCompilationUnit(org.eclipse.cdt.core.parser.ast.IASTCompilationUnit)
|
||||
*/
|
||||
public void enterCompilationUnit(IASTCompilationUnit compilationUnit) {
|
||||
push(ICElement.C_UNIT, "Translation Unit", 0); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterFunctionBody(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void enterFunctionBody(IASTFunction function) {
|
||||
push(ICElement.C_FUNCTION, function.getName(), function.getStartingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterInclusion(org.eclipse.cdt.core.parser.ast.IASTInclusion)
|
||||
*/
|
||||
public void enterInclusion(IASTInclusion inclusion) {
|
||||
push(ICElement.C_INCLUDE, inclusion.getName(), inclusion.getStartingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterLinkageSpecification(org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification)
|
||||
*/
|
||||
public void enterLinkageSpecification(IASTLinkageSpecification linkageSpec) {
|
||||
push(ICElement.C_STORAGE_EXTERN, linkageSpec.getLinkageString(), linkageSpec.getStartingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterMethodBody(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void enterMethodBody(IASTMethod method) {
|
||||
push(ICElement.C_METHOD, method.getName(), method.getStartingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterNamespaceDefinition(org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition)
|
||||
*/
|
||||
public void enterNamespaceDefinition(IASTNamespaceDefinition namespaceDefinition) {
|
||||
push(ICElement.C_NAMESPACE, namespaceDefinition.getName(), namespaceDefinition.getStartingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public void enterTemplateDeclaration(IASTTemplateDeclaration declaration) {
|
||||
push(ICElement.C_TEMPLATE_VARIABLE, "export", declaration.getStartingOffset()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateInstantiation(org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation)
|
||||
*/
|
||||
public void enterTemplateInstantiation(IASTTemplateInstantiation instantiation) {
|
||||
push(ICElement.C_TEMPLATE_VARIABLE, "template instantiation", instantiation.getStartingOffset()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateSpecialization(org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization)
|
||||
*/
|
||||
public void enterTemplateSpecialization(IASTTemplateSpecialization specialization) {
|
||||
push(ICElement.C_TEMPLATE_VARIABLE, "template specialization", specialization.getStartingOffset()); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier)
|
||||
*/
|
||||
public void exitClassSpecifier(IASTClassSpecifier classSpecification) {
|
||||
pop(classSpecification.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitCompilationUnit(org.eclipse.cdt.core.parser.ast.IASTCompilationUnit)
|
||||
*/
|
||||
public void exitCompilationUnit(IASTCompilationUnit translationUnit) {
|
||||
pop(fDocument.getLength());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitFunctionBody(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void exitFunctionBody(IASTFunction function) {
|
||||
pop(function.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitInclusion(org.eclipse.cdt.core.parser.ast.IASTInclusion)
|
||||
*/
|
||||
public void exitInclusion(IASTInclusion inclusion) {
|
||||
pop(inclusion.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitLinkageSpecification(org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification)
|
||||
*/
|
||||
public void exitLinkageSpecification(IASTLinkageSpecification linkageSpec) {
|
||||
pop(linkageSpec.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitMethodBody(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void exitMethodBody(IASTMethod method) {
|
||||
pop(method.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitNamespaceDefinition(org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition)
|
||||
*/
|
||||
public void exitNamespaceDefinition(IASTNamespaceDefinition namespaceDefinition) {
|
||||
pop(namespaceDefinition.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public void exitTemplateDeclaration(IASTTemplateDeclaration declaration) {
|
||||
pop(declaration.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateExplicitInstantiation(org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation)
|
||||
*/
|
||||
public void exitTemplateExplicitInstantiation(IASTTemplateInstantiation instantiation) {
|
||||
pop(instantiation.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateSpecialization(org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization)
|
||||
*/
|
||||
public void exitTemplateSpecialization(IASTTemplateSpecialization specialization) {
|
||||
pop(specialization.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptEnumerationSpecifier(org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier)
|
||||
*/
|
||||
public void acceptEnumerationSpecifier(IASTEnumerationSpecifier enumeration) {
|
||||
push(ICElement.C_ENUMERATION, enumeration.getName(), enumeration.getStartingOffset());
|
||||
pop(enumeration.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptFunctionDeclaration(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void acceptFunctionDeclaration(IASTFunction function) {
|
||||
push(ICElement.C_FUNCTION_DECLARATION, function.getName(), function.getStartingOffset());
|
||||
pop(function.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptMacro(org.eclipse.cdt.core.parser.ast.IASTMacro)
|
||||
*/
|
||||
public void acceptMacro(IASTMacro macro) {
|
||||
push(ICElement.C_MACRO, macro.getName(), macro.getStartingOffset());
|
||||
pop(macro.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptMethodDeclaration(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void acceptMethodDeclaration(IASTMethod method) {
|
||||
push(ICElement.C_METHOD_DECLARATION, method.getName(), method.getStartingOffset());
|
||||
pop(method.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptProblem(org.eclipse.cdt.core.parser.IProblem)
|
||||
*/
|
||||
public boolean acceptProblem(IProblem problem) {
|
||||
// Do nothing.
|
||||
return true;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptTypedefDeclaration(org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration)
|
||||
*/
|
||||
public void acceptTypedefDeclaration(IASTTypedefDeclaration typedef) {
|
||||
push(ICElement.C_TYPEDEF, typedef.getName(), typedef.getStartingOffset());
|
||||
pop(typedef.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptUsingDeclaration(org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration)
|
||||
*/
|
||||
public void acceptUsingDeclaration(IASTUsingDeclaration usageDeclaration) {
|
||||
push(ICElement.C_USING, usageDeclaration.usingTypeName(), usageDeclaration.getStartingOffset());
|
||||
pop(usageDeclaration.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptUsingDirective(org.eclipse.cdt.core.parser.ast.IASTUsingDirective)
|
||||
*/
|
||||
public void acceptUsingDirective(IASTUsingDirective usageDirective) {
|
||||
push(ICElement.C_USING, usageDirective.getNamespaceName(), usageDirective.getStartingOffset());
|
||||
pop(usageDirective.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptVariable(org.eclipse.cdt.core.parser.ast.IASTVariable)
|
||||
*/
|
||||
public void acceptVariable(IASTVariable variable) {
|
||||
push(ICElement.C_VARIABLE, variable.getName(), variable.getStartingOffset());
|
||||
pop(variable.getEndingOffset());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptField(org.eclipse.cdt.core.parser.ast.IASTField)
|
||||
*/
|
||||
public void acceptField(IASTField field) {
|
||||
push(ICElement.C_FIELD, field.getName(), field.getStartingOffset());
|
||||
pop(field.getEndingOffset());
|
||||
}
|
||||
|
||||
private CNode getCurrentContainer() {
|
||||
return (CNode) fStack.peek();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new CNode with the given type and name to the current container.
|
||||
*/
|
||||
private void push(int type, String name, int declarationStart) {
|
||||
fStack.push(new CNode(getCurrentContainer(), type, name, declarationStart, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the current Java node by setting its end position
|
||||
* and pops it off the stack.
|
||||
*/
|
||||
private void pop(int declarationEnd) {
|
||||
CNode current = getCurrentContainer();
|
||||
current.setAppendPosition(declarationEnd);
|
||||
current.setLength(declarationEnd - current.getRange().getOffset());
|
||||
fStack.pop();
|
||||
}
|
||||
}
|
|
@ -270,8 +270,7 @@ class CStructureCreatorVisitor extends CPPASTVisitor {
|
|||
push(ICElement.C_USING, ASTStringUtil.getQualifiedName(usingDirective.getQualifiedName()), startOffset);
|
||||
pop(endOffset);
|
||||
} else if (node instanceof ICPPASTLinkageSpecification) {
|
||||
ICPPASTLinkageSpecification linkageSpec= (ICPPASTLinkageSpecification)node;
|
||||
push(ICElement.C_STORAGE_EXTERN, "extern \"" + linkageSpec.getLiteral() + '"', startOffset); //$NON-NLS-1$
|
||||
// declarations get flattened
|
||||
} else if (node instanceof ICPPASTTemplateDeclaration) {
|
||||
// handled at child declaration level
|
||||
} else if (node instanceof ICPPASTTemplateSpecialization) {
|
||||
|
@ -394,8 +393,7 @@ class CStructureCreatorVisitor extends CPPASTVisitor {
|
|||
} else if (node instanceof ICPPASTUsingDirective) {
|
||||
// handled in visit
|
||||
} else if (node instanceof ICPPASTLinkageSpecification) {
|
||||
assert getCurrentContainer().getTypeCode() == ICElement.C_STORAGE_EXTERN;
|
||||
pop(endOffset);
|
||||
// declarations get flattened
|
||||
} else if (node instanceof ICPPASTTemplateDeclaration) {
|
||||
// handled at child declaration level
|
||||
} else if (node instanceof ICPPASTTemplateSpecialization) {
|
||||
|
|
|
@ -1,362 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2007 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial implementation base on code from rational/IBM
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.ui.compare;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.cdt.core.parser.CodeReader;
|
||||
import org.eclipse.cdt.core.parser.DefaultProblemHandler;
|
||||
import org.eclipse.cdt.core.parser.IProblem;
|
||||
import org.eclipse.cdt.core.parser.ISourceElementRequestor;
|
||||
import org.eclipse.cdt.core.parser.ParserMode;
|
||||
import org.eclipse.cdt.core.parser.ParserUtil;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTASMDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTAbstractTypeSpecifierDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTClassSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCodeScope;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTCompilationUnit;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTEnumeratorReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTField;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFieldReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFunction;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTFunctionReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTInclusion;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTMacro;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTMethod;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTMethodReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTNamespaceReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTParameterReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateParameterReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTTypedefReference;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTUsingDirective;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTVariable;
|
||||
import org.eclipse.cdt.core.parser.ast.IASTVariableReference;
|
||||
|
||||
/**
|
||||
* @deprecated As of CDT 5.0. This class is not used anymore. Kept for reference only.
|
||||
*/
|
||||
public class SourceElementRequestorAdapter implements ISourceElementRequestor {
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptAbstractTypeSpecDeclaration(org.eclipse.cdt.core.parser.ast.IASTAbstractTypeSpecifierDeclaration)
|
||||
*/
|
||||
public void acceptAbstractTypeSpecDeclaration(IASTAbstractTypeSpecifierDeclaration abstractDeclaration) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptASMDefinition(org.eclipse.cdt.core.parser.ast.IASTASMDefinition)
|
||||
*/
|
||||
public void acceptASMDefinition(IASTASMDefinition asmDefinition) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptClassReference(org.eclipse.cdt.core.parser.ast.IASTClassReference)
|
||||
*/
|
||||
public void acceptClassReference(IASTClassReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptElaboratedForewardDeclaration(org.eclipse.cdt.core.parser.ast.IASTElaboratedTypeSpecifier)
|
||||
*/
|
||||
public void acceptElaboratedForewardDeclaration(IASTElaboratedTypeSpecifier elaboratedType) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptEnumerationReference(org.eclipse.cdt.core.parser.ast.IASTEnumerationReference)
|
||||
*/
|
||||
public void acceptEnumerationReference(IASTEnumerationReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptEnumerationSpecifier(org.eclipse.cdt.core.parser.ast.IASTEnumerationSpecifier)
|
||||
*/
|
||||
public void acceptEnumerationSpecifier(IASTEnumerationSpecifier enumeration) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptField(org.eclipse.cdt.core.parser.ast.IASTField)
|
||||
*/
|
||||
public void acceptField(IASTField field) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptFieldReference(org.eclipse.cdt.core.parser.ast.IASTFieldReference)
|
||||
*/
|
||||
public void acceptFieldReference(IASTFieldReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptFunctionDeclaration(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void acceptFunctionDeclaration(IASTFunction function) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptFunctionReference(org.eclipse.cdt.core.parser.ast.IASTFunctionReference)
|
||||
*/
|
||||
public void acceptFunctionReference(IASTFunctionReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptMacro(org.eclipse.cdt.core.parser.ast.IASTMacro)
|
||||
*/
|
||||
public void acceptMacro(IASTMacro macro) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptMethodDeclaration(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void acceptMethodDeclaration(IASTMethod method) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptMethodReference(org.eclipse.cdt.core.parser.ast.IASTMethodReference)
|
||||
*/
|
||||
public void acceptMethodReference(IASTMethodReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptNamespaceReference(org.eclipse.cdt.core.parser.ast.IASTNamespaceReference)
|
||||
*/
|
||||
public void acceptNamespaceReference(IASTNamespaceReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptProblem(org.eclipse.cdt.core.parser.IProblem)
|
||||
*/
|
||||
public boolean acceptProblem(IProblem problem) {
|
||||
return DefaultProblemHandler.ruleOnProblem( problem, ParserMode.QUICK_PARSE );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptTypedefDeclaration(org.eclipse.cdt.core.parser.ast.IASTTypedefDeclaration)
|
||||
*/
|
||||
public void acceptTypedefDeclaration(IASTTypedefDeclaration typedef) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptTypedefReference(org.eclipse.cdt.core.parser.ast.IASTTypedefReference)
|
||||
*/
|
||||
public void acceptTypedefReference(IASTTypedefReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptUsingDeclaration(org.eclipse.cdt.core.parser.ast.IASTUsingDeclaration)
|
||||
*/
|
||||
public void acceptUsingDeclaration(IASTUsingDeclaration usageDeclaration) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptUsingDirective(org.eclipse.cdt.core.parser.ast.IASTUsingDirective)
|
||||
*/
|
||||
public void acceptUsingDirective(IASTUsingDirective usageDirective) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptVariable(org.eclipse.cdt.core.parser.ast.IASTVariable)
|
||||
*/
|
||||
public void acceptVariable(IASTVariable variable) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptVariableReference(org.eclipse.cdt.core.parser.ast.IASTVariableReference)
|
||||
*/
|
||||
public void acceptVariableReference(IASTVariableReference reference) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier)
|
||||
*/
|
||||
public void enterClassSpecifier(IASTClassSpecifier classSpecification) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterCompilationUnit(org.eclipse.cdt.core.parser.ast.IASTCompilationUnit)
|
||||
*/
|
||||
public void enterCompilationUnit(IASTCompilationUnit compilationUnit) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterFunctionBody(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void enterFunctionBody(IASTFunction function) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterInclusion(org.eclipse.cdt.core.parser.ast.IASTInclusion)
|
||||
*/
|
||||
public void enterInclusion(IASTInclusion inclusion) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterLinkageSpecification(org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification)
|
||||
*/
|
||||
public void enterLinkageSpecification(IASTLinkageSpecification linkageSpec) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterMethodBody(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void enterMethodBody(IASTMethod method) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterNamespaceDefinition(org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition)
|
||||
*/
|
||||
public void enterNamespaceDefinition(IASTNamespaceDefinition namespaceDefinition) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public void enterTemplateDeclaration(IASTTemplateDeclaration declaration) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateInstantiation(org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation)
|
||||
*/
|
||||
public void enterTemplateInstantiation(IASTTemplateInstantiation instantiation) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterTemplateSpecialization(org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization)
|
||||
*/
|
||||
public void enterTemplateSpecialization(IASTTemplateSpecialization specialization) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitClassSpecifier(org.eclipse.cdt.core.parser.ast.IASTClassSpecifier)
|
||||
*/
|
||||
public void exitClassSpecifier(IASTClassSpecifier classSpecification) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitCompilationUnit(org.eclipse.cdt.core.parser.ast.IASTCompilationUnit)
|
||||
*/
|
||||
public void exitCompilationUnit(IASTCompilationUnit compilationUnit) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitFunctionBody(org.eclipse.cdt.core.parser.ast.IASTFunction)
|
||||
*/
|
||||
public void exitFunctionBody(IASTFunction function) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitInclusion(org.eclipse.cdt.core.parser.ast.IASTInclusion)
|
||||
*/
|
||||
public void exitInclusion(IASTInclusion inclusion) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitLinkageSpecification(org.eclipse.cdt.core.parser.ast.IASTLinkageSpecification)
|
||||
*/
|
||||
public void exitLinkageSpecification(IASTLinkageSpecification linkageSpec) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitMethodBody(org.eclipse.cdt.core.parser.ast.IASTMethod)
|
||||
*/
|
||||
public void exitMethodBody(IASTMethod method) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitNamespaceDefinition(org.eclipse.cdt.core.parser.ast.IASTNamespaceDefinition)
|
||||
*/
|
||||
public void exitNamespaceDefinition(IASTNamespaceDefinition namespaceDefinition) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateDeclaration(org.eclipse.cdt.core.parser.ast.IASTTemplateDeclaration)
|
||||
*/
|
||||
public void exitTemplateDeclaration(IASTTemplateDeclaration declaration) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateExplicitInstantiation(org.eclipse.cdt.core.parser.ast.IASTTemplateInstantiation)
|
||||
*/
|
||||
public void exitTemplateExplicitInstantiation(IASTTemplateInstantiation instantiation) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitTemplateSpecialization(org.eclipse.cdt.core.parser.ast.IASTTemplateSpecialization)
|
||||
*/
|
||||
public void exitTemplateSpecialization(IASTTemplateSpecialization specialization) {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#enterCodeBlock(org.eclipse.cdt.core.parser.ast.IASTScope)
|
||||
*/
|
||||
public void enterCodeBlock(IASTCodeScope scope) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#exitCodeBlock(org.eclipse.cdt.core.parser.ast.IASTScope)
|
||||
*/
|
||||
public void exitCodeBlock(IASTCodeScope scope) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptEnumeratorReference(org.eclipse.cdt.core.parser.ast.IASTEnumerationReference)
|
||||
*/
|
||||
public void acceptEnumeratorReference(IASTEnumeratorReference reference)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptParameterReference(org.eclipse.cdt.internal.core.parser.ast.complete.ASTParameterReference)
|
||||
*/
|
||||
public void acceptParameterReference(IASTParameterReference reference)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#createReader(java.lang.String)
|
||||
*/
|
||||
public CodeReader createReader(String finalPath, Iterator workingCopies) {
|
||||
return ParserUtil.createReader(finalPath, workingCopies );
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptTemplateParameterReference(org.eclipse.cdt.core.parser.ast.IASTTemplateParameterReference)
|
||||
*/
|
||||
public void acceptTemplateParameterReference(IASTTemplateParameterReference reference) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.parser.ISourceElementRequestor#acceptFriendDeclaration(org.eclipse.cdt.core.parser.ast.IASTDeclaration)
|
||||
*/
|
||||
public void acceptFriendDeclaration(IASTDeclaration declaration) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue