Skip to content

Commit 892d9e9

Browse files
committed
Fix conflicts
Signed-off-by: Juan Manuel Leflet Estrada <jleflete@redhat.com>
2 parents 0c70a81 + a072cb0 commit 892d9e9

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/SampleDelegateCommandHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
212212
logInfo("Searching in target project: " + targetProjects);
213213

214214
// For Partial results, we are going to filter out based on a list in the engine
215-
int s = IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.APPLICATION_LIBRARIES | IJavaSearchScope.SYSTEM_LIBRARIES;
215+
int s = IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.APPLICATION_LIBRARIES;
216216
if (analysisMode.equals(sourceOnlyAnalysisMode)) {
217217
logInfo("KONVEYOR_LOG: source-only analysis mode only scoping to Sources");
218218
s = IJavaSearchScope.SOURCES;

java-analyzer-bundle.core/src/main/java/io/konveyor/tackle/core/internal/symbol/MethodCallSymbolProvider.java

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
import org.eclipse.jdt.core.IClassFile;
99
import org.eclipse.jdt.core.ICompilationUnit;
10-
import org.eclipse.jdt.core.IField;
1110
import org.eclipse.jdt.core.IJavaElement;
1211
import org.eclipse.jdt.core.IMethod;
12+
import org.eclipse.jdt.core.ITypeRoot;
1313
import org.eclipse.jdt.core.compiler.IProblem;
1414
import org.eclipse.jdt.core.dom.AST;
1515
import org.eclipse.jdt.core.dom.ASTParser;
@@ -32,21 +32,15 @@ public List<SymbolInformation> get(SearchMatch match) {
3232
// For Method Calls we will need to do the local variable trick
3333
try {
3434
MethodReferenceMatch m = (MethodReferenceMatch) match;
35-
IJavaElement e = (IJavaElement) m.getElement();
35+
IMethod e = (IMethod) m.getElement();
3636
SymbolInformation symbol = new SymbolInformation();
3737
Location location = getLocation((IJavaElement) match.getElement(), match);
3838
symbol.setName(e.getElementName());
3939
symbol.setKind(convertSymbolKind(e));
4040
symbol.setContainerName(e.getParent().getElementName());
4141
symbol.setLocation(location);
4242
if (this.query.contains(".")) {
43-
ICompilationUnit unit = null;
44-
if (m.getElement() instanceof IMethod) {
45-
unit = ((IMethod) m.getElement()).getCompilationUnit();
46-
} else if (m.getElement() instanceof IField) {
47-
unit = ((IField) m.getElement()).getCompilationUnit();
48-
}
49-
43+
ICompilationUnit unit = e.getCompilationUnit();
5044
if (unit == null) {
5145
IClassFile cls = (IClassFile) ((IJavaElement) e).getAncestor(IJavaElement.CLASS_FILE);
5246
if (cls != null) {

0 commit comments

Comments
 (0)