From 9960da3ec45453d0a69c4c081c9f15c198356920 Mon Sep 17 00:00:00 2001 From: John Camelon Date: Fri, 16 Jan 2004 05:09:09 +0000 Subject: [PATCH] org.eclipse.cdt.core ==================== Changed IASTNode.LookupException to IASTNode.LookupError. Updated IASTElaboratedTypeSpecifier to remove redundant extends relationships. org.eclipse.cdt.ui ================== IASTNode.LookupException references changed to IASTNode.LookupError. --- core/org.eclipse.cdt.core/parser/ChangeLog-parser | 4 ++++ .../cdt/core/parser/ast/IASTElaboratedTypeSpecifier.java | 2 +- .../parser/org/eclipse/cdt/core/parser/ast/IASTNode.java | 6 +++--- .../cdt/internal/core/parser/ast/complete/ASTNode.java | 8 ++++---- core/org.eclipse.cdt.ui/ChangeLog | 7 +++++-- .../internal/ui/text/contentassist/CompletionEngine.java | 2 +- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/ChangeLog-parser b/core/org.eclipse.cdt.core/parser/ChangeLog-parser index b2d2f4248f4..4ab365d138e 100644 --- a/core/org.eclipse.cdt.core/parser/ChangeLog-parser +++ b/core/org.eclipse.cdt.core/parser/ChangeLog-parser @@ -1,3 +1,7 @@ +2004-01-16 John Camelon + Changed IASTNode.LookupException to IASTNode.LookupError. + Updated IASTElaboratedTypeSpecifier to remove redundant extends relationships. + 2004-01-15 Andrew Niefer Modified symbol table constructor to take a ParseMode as a parameter. Modified symbol table to use a TreeMap instead of HashMap when ParseMode is CONTEXTUAL_PARSE diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTElaboratedTypeSpecifier.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTElaboratedTypeSpecifier.java index f2345f80d59..b259608cac9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTElaboratedTypeSpecifier.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTElaboratedTypeSpecifier.java @@ -18,7 +18,7 @@ import org.eclipse.cdt.core.parser.ISourceElementCallbackDelegate; * @author jcamelon * */ -public interface IASTElaboratedTypeSpecifier extends IASTTypeSpecifier, IASTOffsetableElement, IASTQualifiedNameElement, ISourceElementCallbackDelegate, IASTOffsetableNamedElement { +public interface IASTElaboratedTypeSpecifier extends IASTTypeSpecifier, IASTQualifiedNameElement, ISourceElementCallbackDelegate, IASTOffsetableNamedElement { public String getName(); public ASTClassKind getClassKind(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTNode.java index e7add950bfe..079a6c2e2c2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/parser/ast/IASTNode.java @@ -48,7 +48,7 @@ public interface IASTNode { } } - public static class LookupException extends Exception + public static class LookupError extends Error { } @@ -64,8 +64,8 @@ public interface IASTNode { * @param kind * @param context * @return - * @throws LookupException + * @throws LookupError */ - public ILookupResult lookup( String prefix, LookupKind[] kind, IASTNode context) throws LookupException, ASTNotImplementedException; + public ILookupResult lookup( String prefix, LookupKind[] kind, IASTNode context) throws LookupError, ASTNotImplementedException; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTNode.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTNode.java index dfc49a641a8..7d5d617e336 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTNode.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/ast/complete/ASTNode.java @@ -33,7 +33,7 @@ public class ASTNode implements IASTNode { /* (non-Javadoc) * @see org.eclipse.cdt.core.parser.ast.IASTNode#lookup(java.lang.String, org.eclipse.cdt.core.parser.ast.IASTNode.LookupKind, org.eclipse.cdt.core.parser.ast.IASTNode) */ - public ILookupResult lookup(String prefix, LookupKind[] kind, IASTNode context) throws LookupException, ASTNotImplementedException { + public ILookupResult lookup(String prefix, LookupKind[] kind, IASTNode context) throws LookupError, ASTNotImplementedException { if( ! ( this instanceof ISymbolOwner ) || ( context != null && !(context instanceof ISymbolOwner) ) ){ return null; @@ -49,7 +49,7 @@ public class ASTNode implements IASTNode { if( context != null ){ ISymbol sym = (IContainerSymbol) ((ISymbolOwner)context).getSymbol(); if( sym == null || !(sym instanceof IContainerSymbol) ){ - throw new LookupException(); + throw new LookupError(); } qualification = (IContainerSymbol) sym; } @@ -57,7 +57,7 @@ public class ASTNode implements IASTNode { ISymbolOwner owner = (ISymbolOwner) this; ISymbol symbol = owner.getSymbol(); if( symbol == null || !(symbol instanceof IContainerSymbol) ){ - throw new LookupException(); + throw new LookupError(); } boolean lookInThis = false; @@ -93,7 +93,7 @@ public class ASTNode implements IASTNode { lookupResults = thisContainer.prefixLookup( filter, prefix, false ); } } catch (ParserSymbolTableException e) { - throw new LookupException(); + throw new LookupError(); } if(lookupResults == null) diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 91ad3780189..9b5de212fdf 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,5 +1,5 @@ -2004-01-13 Andrew Niefer - Updated CompletionEngine to catch ASTNotImplementedException from IASTNode.lookup +2004-01-16 John Camelon + IASTNode.LookupException references changed to IASTNode.LookupError. 2004-01-15 Hoda Amer Moved Content Assist log to the UI plugin @@ -10,6 +10,9 @@ Updated references of ParserNotImplementedException to ParseError. Updated references of CONTEXTUAL_PARSE to COMPLETION_PARSE. +2004-01-13 Andrew Niefer + Updated CompletionEngine to catch ASTNotImplementedException from IASTNode.lookup + 2004-01-13 John Camelon Updated CompletionEngine to handle IASTCompletionKind.CompletionKind.STATEMENT_START diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java index 8294ff92478..c54441e5079 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CompletionEngine.java @@ -398,7 +398,7 @@ public class CompletionEngine implements RelevanceConstants{ logLookups (kinds); ILookupResult result = searchNode.lookup (prefix, kinds, context); return result ; - } catch (IASTNode.LookupException ilk ){ + } catch (IASTNode.LookupError ilk ){ // do we want to do something here? ilk.printStackTrace(); return null;