diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallHierarchy.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallHierarchy.java index fc2b5c591b..822b4e345a 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallHierarchy.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallHierarchy.java @@ -35,6 +35,8 @@ import org.eclipse.jdt.internal.corext.dom.IASTSharedValues; import org.eclipse.jdt.internal.corext.refactoring.util.JavaElementUtil; import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; +import org.eclipse.jdt.ls.core.internal.contentassist.StringMatcher; import org.eclipse.jface.preference.IPreferenceStore; public class CallHierarchy { @@ -124,7 +126,7 @@ private MethodWrapper[] getRoots(IMember[] members, boolean callers) { addRoot(member, roots, callers); } } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); } } else { addRoot(member, roots, callers); diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallLocation.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallLocation.java index ba6d2f8e30..b2c55e08ea 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallLocation.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallLocation.java @@ -17,7 +17,7 @@ import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.IOpenable; import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.Document; @@ -93,7 +93,7 @@ private void initCallTextAndLineNumber() { try { fLineNumber= document.getLineOfOffset(fStart) + 1; } catch (BadLocationException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.logException(e); } } } @@ -112,7 +112,7 @@ private IBuffer getBufferForMember() { buffer = openable.getBuffer(); } } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); } return buffer; } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CalleeAnalyzerVisitor.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CalleeAnalyzerVisitor.java index 7f8b735f06..7e2603186b 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CalleeAnalyzerVisitor.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CalleeAnalyzerVisitor.java @@ -41,7 +41,7 @@ import org.eclipse.jdt.internal.corext.dom.Bindings; import org.eclipse.jdt.internal.corext.dom.HierarchicalASTVisitor; import org.eclipse.jdt.internal.corext.util.JavaModelUtil; -import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; class CalleeAnalyzerVisitor extends HierarchicalASTVisitor { private final CallSearchResultCollector fSearchResults; @@ -62,7 +62,7 @@ class CalleeAnalyzerVisitor extends HierarchicalASTVisitor { this.fMethodStartPosition = sourceRange.getOffset(); this.fMethodEndPosition = fMethodStartPosition + sourceRange.getLength(); } catch (JavaModelException jme) { - JavaPlugin.log(jme); + JavaLanguageServerPlugin.log(jme); } } @@ -268,7 +268,7 @@ protected void addMethodCall(IMethodBinding calledMethodBinding, ASTNode node) { fSearchResults.addMember(fMember, referencedMember, position, position + node.getLength(), number < 1 ? 1 : number); } } catch (JavaModelException jme) { - JavaPlugin.log(jme); + JavaLanguageServerPlugin.log(jme); } } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallerMethodWrapper.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallerMethodWrapper.java index 4fc23ead36..2b16b2d21d 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallerMethodWrapper.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/CallerMethodWrapper.java @@ -35,7 +35,7 @@ import org.eclipse.jdt.core.search.SearchPattern; import org.eclipse.jdt.internal.corext.util.JdtFlags; import org.eclipse.jdt.internal.corext.util.SearchUtils; -import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; public class CallerMethodWrapper extends MethodWrapper { /** @@ -153,7 +153,7 @@ protected Map findChildren(IProgressMonitor progressMonitor) return searchRequestor.getCallers(); } catch (CoreException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); return new HashMap<>(0); } } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/Implementors.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/Implementors.java index c4845ab4c6..f6e0b96036 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/Implementors.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/Implementors.java @@ -21,7 +21,7 @@ import org.eclipse.jdt.core.IMethod; import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; /** * The main plugin class to be used in the desktop. @@ -73,7 +73,7 @@ public IJavaElement[] searchForImplementors(IJavaElement[] elements, } } } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); } } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/JavaImplementorFinder.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/JavaImplementorFinder.java index cba7b06af8..ba5c7c4dae 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/JavaImplementorFinder.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/JavaImplementorFinder.java @@ -19,7 +19,7 @@ import org.eclipse.jdt.core.IType; import org.eclipse.jdt.core.ITypeHierarchy; import org.eclipse.jdt.core.JavaModelException; -import org.eclipse.jdt.internal.ui.JavaPlugin; +import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin; public class JavaImplementorFinder implements IImplementorFinder { @Override @@ -34,7 +34,7 @@ public Collection findImplementingTypes(IType type, IProgressMonitor prog return result; } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); } return null; @@ -52,7 +52,7 @@ public Collection findInterfaces(IType type, IProgressMonitor progressMon return result; } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.log(e); } return null;