forked from eclipse-jdt/eclipse.jdt.core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial work to separate out the interfaces at play in completion eng…
…ine and parser
- Loading branch information
Rob Stryker
committed
Jan 30, 2024
1 parent
69a3085
commit 86921b2
Showing
19 changed files
with
15,139 additions
and
14,741 deletions.
There are no files selected for viewing
14,818 changes: 14,818 additions & 0 deletions
14,818
...eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/BaseCompletionEngine.java
Large diffs are not rendered by default.
Oops, something went wrong.
14,747 changes: 46 additions & 14,701 deletions
14,747
org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ICompletionEngine.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.internal.codeassist; | ||
|
||
import org.eclipse.jdt.internal.compiler.util.HashtableOfObject; | ||
|
||
public interface ICompletionEngine { | ||
public HashtableOfObject getTypeCache(); | ||
public int getOpenedBinaryTypes(); | ||
public void incrementOpenedBinaryTypes(); | ||
} |
22 changes: 22 additions & 0 deletions
22
...eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/IMissingTypesGuesser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2004, 2006 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.internal.codeassist; | ||
|
||
import org.eclipse.jdt.internal.codeassist.MissingTypesGuesser.GuessedTypeRequestor; | ||
import org.eclipse.jdt.internal.compiler.ast.TypeReference; | ||
import org.eclipse.jdt.internal.compiler.lookup.Scope; | ||
|
||
public interface IMissingTypesGuesser { | ||
public void guess(TypeReference typeRef, Scope scope, GuessedTypeRequestor requestor); | ||
} |
22 changes: 22 additions & 0 deletions
22
...t.core/codeassist/org/eclipse/jdt/internal/codeassist/IUnresolvedReferenceNameFinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.eclipse.jdt.internal.codeassist; | ||
|
||
import org.eclipse.jdt.internal.codeassist.UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor; | ||
import org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration; | ||
import org.eclipse.jdt.internal.compiler.ast.Initializer; | ||
import org.eclipse.jdt.internal.compiler.lookup.ClassScope; | ||
import org.eclipse.jdt.internal.compiler.lookup.Scope; | ||
|
||
public interface IUnresolvedReferenceNameFinder { | ||
|
||
public void find(char[] startWith, Initializer initializer, ClassScope scope, int from, char[][] discouragedNames, | ||
UnresolvedReferenceNameRequestor nameRequestor); | ||
|
||
public void find(char[] startWith, AbstractMethodDeclaration methodDeclaration, int from, char[][] discouragedNames, | ||
UnresolvedReferenceNameRequestor nameRequestor); | ||
|
||
public void findAfter(char[] startWith, Scope scope, ClassScope classScope, int from, int to, | ||
char[][] discouragedNames, UnresolvedReferenceNameRequestor nameRequestor); | ||
|
||
public void findBefore(char[] startWith, Scope scope, ClassScope classScope, int from, int recordTo, int parseTo, | ||
char[][] discouragedNames, UnresolvedReferenceNameRequestor nameRequestor); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...core/codeassist/org/eclipse/jdt/internal/codeassist/complete/ICompletionParserFacade.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 IBM Corporation and others. | ||
* | ||
* This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License 2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.jdt.internal.codeassist.complete; | ||
|
||
import org.eclipse.jdt.internal.compiler.CompilationResult; | ||
import org.eclipse.jdt.internal.compiler.ast.ASTNode; | ||
import org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration; | ||
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; | ||
import org.eclipse.jdt.internal.compiler.util.HashtableOfObjectToInt; | ||
|
||
/** | ||
* The purpose of this interface is to isolate how various internal classes | ||
* are using the parser, and to allow for drop-in replacements of different parser | ||
* implementations while conforming to the same interface. | ||
*/ | ||
public interface ICompletionParserFacade extends IScannerProvider { | ||
|
||
HashtableOfObjectToInt getSourceEnds(); | ||
|
||
CompilationUnitDeclaration parseCompilationUnitDeclaration(ICompilationUnit sourceUnit, | ||
CompilationResult result, int actualCompletionPosition2); | ||
|
||
ASTNode getEnclosingNode(); | ||
ASTNode getAssistNodeParent(); | ||
ASTNode getAssistNode(); | ||
void setEnclosingNode(ASTNode providesStmt); | ||
} |
Oops, something went wrong.