diff --git a/core/org.eclipse.cdt.core/.classpath b/core/org.eclipse.cdt.core/.classpath index 5331ddcbabb..9d6202a599d 100644 --- a/core/org.eclipse.cdt.core/.classpath +++ b/core/org.eclipse.cdt.core/.classpath @@ -10,6 +10,5 @@ - diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/IPDOMDatabaseProvider.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/IPDOMDatabaseProvider.java deleted file mode 100644 index 5ff32cdd9c5..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/IPDOMDatabaseProvider.java +++ /dev/null @@ -1,27 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2005 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 - Initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.core.pdom; - -import java.sql.Connection; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.core.runtime.QualifiedName; - -public interface IPDOMDatabaseProvider { - - public static final QualifiedName dbNameKey - = new QualifiedName(CCorePlugin.PLUGIN_ID, "pdomDBName"); - - Connection getDatabase(String dbName, boolean create); - - void shutdownDatabase(String dbName); - -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOM.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOM.java deleted file mode 100644 index c48d1b19055..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOM.java +++ /dev/null @@ -1,134 +0,0 @@ -package org.eclipse.cdt.core.pdom; - -import java.sql.Connection; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IExtension; -import org.eclipse.core.runtime.IExtensionPoint; -import org.eclipse.core.runtime.Platform; - -public class PDOM { - - // The DOM hash map - private static Map pdomMap = new HashMap(); - - private Connection dbConn; - - private PDOM(Connection conn) { - dbConn = conn; - } - - /** - * Look up the name from the DOM in the PDOM and return the PDOM - * version of the Binding. - * - * @param name - * @return binding - */ - public IBinding resolveBinding(IASTName name) { - // look up the name in the PDOM - return null; - } - - /** - * Return all bindings that have this name as a prefix. - * This is used for content assist. - * - * @param prefix - * @return bindings - */ - public IBinding[] resolvePrefix(IASTName name) { - return new IBinding[0]; - } - - /** - * Add the name to the PDOM. This will also add the binding to the - * PDOM if it is not already there. - * - * @param name - */ - public void addName(IASTName name) { - - } - - /** - * Get all names stored in the PDOM for a given binding. - * - * @param binding - * @return declarations - */ - public Iterator getDeclarations(IBinding binding) { - return null; - } - - /** - * Get all names in the PDOM that refer to a given binding. - * @param binding - * @return references - */ - public Iterator getReferences(IBinding binding) { - return null; - } - - /** - * Clear all names from the PDOM that appear in the given file. - * This is used when reparsing a file. - * - * @param filename - */ - public void clearNamesInFile(String filename) { - - } - - /** - * Return the PDOM for the given project - * - * @param project - * @return the PDOM for the project - * @throws CoreException - */ - public static PDOM getPDOM(IProject project) throws CoreException { - // Get the name for the db - boolean create = false; - String dbName = project.getPersistentProperty(IPDOMDatabaseProvider.dbNameKey); - if (dbName == null) { - // New database - create = true; - // TODO - the name shouldn't be the project name in case the - // user changes it and creates a new one with the old name - dbName = project.getName(); - project.setPersistentProperty(IPDOMDatabaseProvider.dbNameKey, dbName); - } else { - // See if we got one already - PDOM pdom = (PDOM)pdomMap.get(dbName); - if (pdom != null) - return pdom; - } - - // Find our database provider - IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(CCorePlugin.PLUGIN_ID, "PDOMDatabaseProvider"); //$NON-NLS-1$ - IExtension[] extensions = extensionPoint.getExtensions(); - - if (extensions.length == 0) - // No DB providers - return null; - - // For now pick the first one. In the future we may want to support more - IConfigurationElement[] elements = extensions[0].getConfigurationElements(); - IPDOMDatabaseProvider dbProvider - = (IPDOMDatabaseProvider)elements[0].createExecutableExtension("class"); //$NON-NLS-1$ - - // create the PDOM - PDOM pdom = new PDOM(dbProvider.getDatabase(dbName, create)); - pdomMap.put(dbName, pdom); - return pdom; - } -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMASTServiceProvider.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMASTServiceProvider.java deleted file mode 100644 index 55b8b2ee4e4..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMASTServiceProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.eclipse.cdt.core.pdom; - -import org.eclipse.cdt.core.dom.IASTServiceProvider; -import org.eclipse.cdt.core.dom.ICodeReaderFactory; -import org.eclipse.cdt.core.dom.IParserConfiguration; -import org.eclipse.cdt.core.dom.ast.ASTCompletionNode; -import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IStorage; - -public class PDOMASTServiceProvider implements IASTServiceProvider { - - public IASTTranslationUnit getTranslationUnit(IFile fileToParse) - throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public IASTTranslationUnit getTranslationUnit(IStorage fileToParse, - IProject project, ICodeReaderFactory fileCreator) - throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public IASTTranslationUnit getTranslationUnit(IStorage fileToParse, - IProject project) throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public IASTTranslationUnit getTranslationUnit(IFile fileToParse, - ICodeReaderFactory fileCreator) throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public IASTTranslationUnit getTranslationUnit(IFile fileToParse, - ICodeReaderFactory fileCreator, IParserConfiguration configuration) - throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public ASTCompletionNode getCompletionNode(IFile fileToParse, int offset, - ICodeReaderFactory fileCreator) throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - - public ASTCompletionNode getCompletionNode(IStorage fileToParse, - IProject project, int offset, ICodeReaderFactory fileCreator) - throws UnsupportedDialectException { - // TODO Auto-generated method stub - return null; - } - -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMUnimplementedException.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMUnimplementedException.java deleted file mode 100644 index 259722e45b2..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/core/pdom/PDOMUnimplementedException.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.eclipse.cdt.core.pdom; - - -public class PDOMUnimplementedException extends Error { - - private static final long serialVersionUID = 99L; - -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCASTName.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCASTName.java deleted file mode 100644 index 79184e93afa..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCASTName.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.eclipse.cdt.internal.core.pdom; - -import org.eclipse.cdt.core.dom.ast.ASTNodeProperty; -import org.eclipse.cdt.core.dom.ast.ASTVisitor; -import org.eclipse.cdt.core.dom.ast.IASTFileLocation; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IASTNode; -import org.eclipse.cdt.core.dom.ast.IASTNodeLocation; -import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.pdom.PDOMUnimplementedException; - -public class PCASTName implements IASTName { - - public IBinding resolveBinding() { - throw new PDOMUnimplementedException(); - } - - public IBinding getBinding() { - throw new PDOMUnimplementedException(); - } - - public void setBinding(IBinding binding) { - throw new PDOMUnimplementedException(); - } - - public IBinding[] resolvePrefix() { - throw new PDOMUnimplementedException(); - } - - public char[] toCharArray() { - throw new PDOMUnimplementedException(); - } - - public boolean isDeclaration() { - throw new PDOMUnimplementedException(); - } - - public boolean isReference() { - throw new PDOMUnimplementedException(); - } - - public boolean isDefinition() { - throw new PDOMUnimplementedException(); - } - - public IASTTranslationUnit getTranslationUnit() { - throw new PDOMUnimplementedException(); - } - - public IASTNodeLocation[] getNodeLocations() { - throw new PDOMUnimplementedException(); - } - - public IASTFileLocation getFileLocation() { - throw new PDOMUnimplementedException(); - } - - public String getContainingFilename() { - throw new PDOMUnimplementedException(); - } - - public IASTNode getParent() { - throw new PDOMUnimplementedException(); - } - - public void setParent(IASTNode node) { - throw new PDOMUnimplementedException(); - } - - public ASTNodeProperty getPropertyInParent() { - throw new PDOMUnimplementedException(); - } - - public void setPropertyInParent(ASTNodeProperty property) { - throw new PDOMUnimplementedException(); - } - - public boolean accept(ASTVisitor visitor) { - throw new PDOMUnimplementedException(); - } - - public String getRawSignature() { - throw new PDOMUnimplementedException(); - } - -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCBasicType.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCBasicType.java deleted file mode 100644 index 148c8239314..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCBasicType.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.eclipse.cdt.internal.core.pdom; - -import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IASTExpression; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.c.ICBasicType; -import org.eclipse.cdt.core.pdom.PDOMUnimplementedException; - -public class PCBasicType implements ICBasicType { - - public Object clone() { - try { - return super.clone(); - } catch (CloneNotSupportedException e) { - return null; - } - } - - public boolean isComplex() { - throw new PDOMUnimplementedException(); - } - - public boolean isImaginary() { - throw new PDOMUnimplementedException(); - } - - public boolean isLongLong() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public int getType() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public IASTExpression getValue() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isSigned() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isUnsigned() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isShort() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isLong() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isSameType(IType type) { - throw new PDOMUnimplementedException(); - } - -} diff --git a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCVariable.java b/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCVariable.java deleted file mode 100644 index fdc6035ccee..00000000000 --- a/core/org.eclipse.cdt.core/pdom/org/eclipse/cdt/internal/core/pdom/PCVariable.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.eclipse.cdt.internal.core.pdom; - -import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IScope; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.IVariable; -import org.eclipse.cdt.core.pdom.PDOMUnimplementedException; - -public class PCVariable implements IVariable { - - public IType getType() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isStatic() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isExtern() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isAuto() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public boolean isRegister() throws DOMException { - throw new PDOMUnimplementedException(); - } - - public String getName() { - throw new PDOMUnimplementedException(); - } - - public char[] getNameCharArray() { - throw new PDOMUnimplementedException(); - } - - public IScope getScope() throws DOMException { - throw new PDOMUnimplementedException(); - } - -} diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/dom/IASTServiceProvider.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/dom/IASTServiceProvider.java index 25d30f3bb44..3432db83382 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/dom/IASTServiceProvider.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/dom/IASTServiceProvider.java @@ -33,7 +33,7 @@ public interface IASTServiceProvider { */ public static class UnsupportedDialectException extends Exception { - + public static final long serialVersionUID = 0; } /**