blob: 292408e2198adba61edb906022c13cfd4c6b2a7d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
/*******************************************************************************
* Copyright (c) 2004 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 Corp. - Rational Software - initial implementation
*******************************************************************************/
/*
* Created on Apr 21, 2004
*/
package org.eclipse.cdt.internal.core.parser.pst;
import java.util.Iterator;
import org.eclipse.cdt.core.parser.ast.IASTNode;
import org.eclipse.cdt.internal.core.parser.ast.complete.ASTNode;
import org.eclipse.cdt.internal.core.parser.ast.complete.ASTSymbol;
/**
* @author aniefer
*/
public class ExtensibleSymbolExtension implements ISymbolASTExtension {
protected final IExtensibleSymbol extensibleSymbol;
protected final ASTNode primaryDeclaration;
public ExtensibleSymbolExtension( IExtensibleSymbol symbol, IASTNode node ){
primaryDeclaration = (ASTNode) node;
extensibleSymbol = symbol;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.pst.ISymbolASTExtension#getPrimaryDeclaration()
*/
public ASTNode getPrimaryDeclaration() {
return primaryDeclaration;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.pst.ISymbolASTExtension#getAllDefinitions()
*/
public Iterator getAllDefinitions() {
// TODO Auto-generated method stub
return null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.pst.ISymbolASTExtension#addDefinition(org.eclipse.cdt.internal.core.parser.ast.complete.ASTSymbol)
*/
public void addDefinition(ASTSymbol definition) throws ExtensionException {
// TODO Auto-generated method stub
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.core.parser.pst.ISymbolOwner#getSymbol()
*/
public ISymbol getSymbol() {
if( extensibleSymbol instanceof ISymbol )
return (ISymbol) extensibleSymbol;
return null;
}
public IExtensibleSymbol getExtensibleSymbol(){
return extensibleSymbol;
}
}
|