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 822b4e345a..9acfeb6185 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 @@ -34,10 +34,8 @@ import org.eclipse.jdt.core.search.SearchEngine; 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 { private static final String PREF_USE_IMPLEMENTORS= "PREF_USE_IMPLEMENTORS"; //$NON-NLS-1$ @@ -58,15 +56,7 @@ public static CallHierarchy getDefault() { } public boolean isSearchUsingImplementorsEnabled() { - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - - return settings.getBoolean(PREF_USE_IMPLEMENTORS); - } - - public void setSearchUsingImplementorsEnabled(boolean enabled) { - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - - settings.setValue(PREF_USE_IMPLEMENTORS, enabled); + return true; } public Collection getImplementingMethods(IMethod method) { @@ -196,33 +186,6 @@ public boolean isIgnored(String fullyQualifiedName) { return false; } - public boolean isFilterEnabled() { - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - return settings.getBoolean(PREF_USE_FILTERS); - } - - public void setFilterEnabled(boolean filterEnabled) { - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - settings.setValue(PREF_USE_FILTERS, filterEnabled); - } - - /** - * Returns the current filters as a string. - * @return returns the filters - */ - public String getFilters() { - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - - return settings.getString(PREF_FILTERS_LIST); - } - - public void setFilters(String filters) { - fFilters = null; - - IPreferenceStore settings = JavaPlugin.getDefault().getPreferenceStore(); - settings.setValue(PREF_FILTERS_LIST, filters); - } - /** * Returns filters for packages which should not be included in the search results. * @@ -230,21 +193,7 @@ public void setFilters(String filters) { */ private StringMatcher[] getIgnoreFilters() { if (fFilters == null) { - String filterString = null; - - if (isFilterEnabled()) { - filterString = getFilters(); - - if (filterString == null) { - filterString = DEFAULT_IGNORE_FILTERS; - } - } - - if (filterString != null) { - fFilters = parseList(filterString); - } else { - fFilters = null; - } + fFilters = parseList(DEFAULT_IGNORE_FILTERS); } return fFilters; @@ -290,7 +239,7 @@ static CompilationUnit getCompilationUnitNode(IMember member, boolean resolveBin return (CompilationUnit) parser.createAST(null); } } catch (JavaModelException e) { - JavaPlugin.log(e); + JavaLanguageServerPlugin.logException(e); } return null; } diff --git a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/MethodWrapper.java b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/MethodWrapper.java index d0f6d56aaf..7be80d401f 100644 --- a/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/MethodWrapper.java +++ b/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/corext/callhierarchy/MethodWrapper.java @@ -24,8 +24,6 @@ import org.eclipse.jdt.core.IJavaElement; import org.eclipse.jdt.core.IMember; import org.eclipse.jdt.core.search.IJavaSearchConstants; -import org.eclipse.jdt.internal.ui.callhierarchy.MethodWrapperWorkbenchAdapter; -import org.eclipse.ui.model.IWorkbenchAdapter; /** * This class represents the general parts of a method call (either to or from a @@ -70,8 +68,6 @@ public MethodWrapper(MethodWrapper parent, MethodCall methodCall) { public T getAdapter(Class adapter) { if (adapter == IJavaElement.class) { return (T) getMember(); - } else if (adapter == IWorkbenchAdapter.class){ - return (T) new MethodWrapperWorkbenchAdapter(this); } else { return null; } @@ -146,11 +142,6 @@ public boolean equals(Object oth) { return false; } - if (oth instanceof MethodWrapperWorkbenchAdapter) { - //Note: A MethodWrapper is equal to a referring MethodWrapperWorkbenchAdapter and vice versa (bug 101677). - oth= ((MethodWrapperWorkbenchAdapter) oth).getMethodWrapper(); - } - if (oth.getClass() != getClass()) { return false; }