Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
logInfo("Searching in target project: " + targetProjects);

// For Partial results, we are going to filter out based on a list in the engine
int s = IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.APPLICATION_LIBRARIES | IJavaSearchScope.SYSTEM_LIBRARIES;
int s = IJavaSearchScope.SOURCES | IJavaSearchScope.REFERENCED_PROJECTS | IJavaSearchScope.APPLICATION_LIBRARIES;
if (analysisMode.equals(sourceOnlyAnalysisMode)) {
logInfo("KONVEYOR_LOG: source-only analysis mode only scoping to Sources");
s = IJavaSearchScope.SOURCES;
Expand All @@ -227,7 +227,7 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
logInfo("unable to find workspace directory location");
return new ArrayList<>();
}

if (includedPaths != null && includedPaths.size() > 0) {
ArrayList<IJavaElement> includedFragments = new ArrayList<IJavaElement>();
for (IJavaProject proj : targetProjects) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import org.eclipse.jdt.core.IClassFile;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.ITypeRoot;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTParser;
Expand All @@ -32,21 +32,15 @@ public List<SymbolInformation> get(SearchMatch match) {
// For Method Calls we will need to do the local variable trick
try {
MethodReferenceMatch m = (MethodReferenceMatch) match;
IJavaElement e = (IJavaElement) m.getElement();
IMethod e = (IMethod) m.getElement();
SymbolInformation symbol = new SymbolInformation();
Location location = getLocation((IJavaElement) match.getElement(), match);
symbol.setName(e.getElementName());
symbol.setKind(convertSymbolKind(e));
symbol.setContainerName(e.getParent().getElementName());
symbol.setLocation(location);
if (this.query.contains(".")) {
ICompilationUnit unit = null;
if (m.getElement() instanceof IMethod) {
unit = ((IMethod) m.getElement()).getCompilationUnit();
} else if (m.getElement() instanceof IField) {
unit = ((IField) m.getElement()).getCompilationUnit();
}

ICompilationUnit unit = e.getCompilationUnit();
if (unit == null) {
IClassFile cls = (IClassFile) ((IJavaElement) e).getAncestor(IJavaElement.CLASS_FILE);
if (cls != null) {
Expand Down
Loading