Remove unnecessary System.out.println

This commit is contained in:
aboyko
2023-02-06 10:41:24 -05:00
parent 2e1642e100
commit 57da884bfd
7 changed files with 0 additions and 81 deletions

View File

@@ -15,7 +15,6 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import org.eclipse.core.runtime.Assert;
import org.eclipse.lsp4e.LSPEclipseUtils;
@@ -80,12 +79,6 @@ public class GotoSymbolDialogModel {
};
private static final String SEARCH_BOX_HINT_MESSAGE = "@/ -> request mappings, @+ -> beans, @> -> functions, @ -> all spring elements";
private static final boolean DEBUG = false;//(""+Platform.getLocation()).contains("kdvolder");
private static void debug(String string) {
if (DEBUG) {
System.out.println(string);
}
}
@FunctionalInterface
public interface OKHandler {
@@ -148,9 +141,7 @@ public class GotoSymbolDialogModel {
SymbolsProvider sp = currentSymbolsProvider.getValue();
if (sp!=null) {
String currentProviderName = sp.getName();
debug("Fetching "+currentProviderName);
String query = searchBox.getValue();
debug("Fetching symbols... from symbol provider, for '"+query+"'");
Collection<SymbolContainer> fetched = sp.fetchFor(query);
if (keyBindings==null) {
status.setValue(HighlightedText.plain(currentProviderName));
@@ -223,13 +214,6 @@ public class GotoSymbolDialogModel {
this.symbolsProviders = symbolsProviders;
this.currentSymbolsProviderIndex = 0;
this.currentSymbolsProvider.setValue(symbolsProviders[0]);
if (DEBUG) {
searchBox.addListener((e, v) -> {
debug("searchBox = "+v);
});
unfilteredSymbols.addListener((e, v) -> debug("raw = "+summary(filteredSymbols.getValue())));
filteredSymbols.addListener((e, v) -> debug("filtered = "+summary(filteredSymbols.getValue())));
}
}
public GotoSymbolDialogModel setFavourites(FavouritesPreference favourites) {
@@ -241,10 +225,6 @@ public class GotoSymbolDialogModel {
return favourites;
}
private List<String> summary(Collection<Match<SymbolContainer>> collection) {
return collection.stream().map(match -> match.value.getName()).collect(Collectors.toList());
}
public LiveExpression<Collection<Match<SymbolContainer>>> getSymbols() {
return filteredSymbols;
}

View File

@@ -49,14 +49,6 @@ import reactor.core.publisher.Flux;
*/
public abstract class CachingValueProvider<T> {
// protected static final boolean DEBUG = (""+Platform.getLocation()).contains("kdvolder");
//
// protected static void debug(String string) {
// if (DEBUG) {
// System.out.println(string);
// }
// }
private static final Duration DEFAULT_TIMEOUT = Duration.ofMillis(1000);
/**
@@ -128,7 +120,6 @@ public abstract class CachingValueProvider<T> {
// debug("trying to solve "+query+" incrementally");
CacheEntry cached = cache.get(key(expectedType));
if (cached!=null) {
System.out.println("cached "+expectedType+": "+cached);
if (cached.isComplete) {
// debug("filtering "+subquery+" -> "+query);
return cached.values

View File

@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IJavaElement;
@@ -34,7 +33,6 @@ import org.eclipse.jdt.core.search.SearchParticipant;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.core.search.SearchRequestor;
import org.springsource.ide.eclipse.commons.frameworks.core.FrameworkCoreActivator;
import org.springsource.ide.eclipse.commons.livexp.util.ExceptionUtil;
import reactor.core.publisher.Flux;
import reactor.core.publisher.ReplayProcessor;
@@ -61,14 +59,6 @@ import reactor.util.concurrent.Queues;
*/
public class FluxJdtSearch {
private static final boolean DEBUG = (""+Platform.getLocation()).contains("kdvolder");
private static void debug(String string) {
if (DEBUG) {
System.out.println(string);
}
}
private SearchEngine engine = new SearchEngine();
private IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
private SearchPattern pattern = null;
@@ -142,7 +132,6 @@ public class FluxJdtSearch {
@Override
public void acceptSearchMatch(SearchMatch match) throws CoreException {
if (isCanceled) {
debug("!!!! canceling search !!!!");
//Stop searching
throw new OperationCanceledException();
}
@@ -175,16 +164,10 @@ public class FluxJdtSearch {
Job job = new Job("Search for "+pattern) {
@Override
protected IStatus run(IProgressMonitor monitor) {
long start = System.currentTimeMillis();
debug("Starting search for '"+pattern+"'");
try {
searchEngine().search(pattern, participants, scope, requestor, monitor);
requestor.done();
} catch (Exception e) {
debug("Canceled search for: "+pattern);
debug(" exception: "+ExceptionUtil.getMessage(e));
long duration = System.currentTimeMillis() - start;
debug(" duration: "+duration+" ms");
requestor.cancel();
}
return Status.OK_STATUS;

View File

@@ -130,7 +130,6 @@ public class HtmlTooltip extends ToolTip {
@Override
public void changing(LocationEvent event) {
super.changing(event);
System.out.println("location = " + event.location);
try {
if (event.location!=null) {
if (event.location.startsWith("about:")) { //about:blank url

View File

@@ -125,7 +125,6 @@ public class ConcourseLanguageServerInitializer {
});
// workspace.onDidChangeConfiguraton(settings -> {
// System.out.println("Config changed: "+params);
// Integer val = settings.getInt("languageServerExample", "maxNumberOfProblems");
// if (val!=null) {
// maxProblems = ((Number) val).intValue();

View File

@@ -20,7 +20,6 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.IJavaElement;
@@ -60,14 +59,6 @@ import reactor.util.concurrent.Queues;
*/
public class FluxJdtSearch {
private static final boolean DEBUG = (""+Platform.getLocation()).contains("kdvolder");
private static void debug(String string) {
if (DEBUG) {
System.out.println(string);
}
}
private SearchEngine engine = new SearchEngine();
private IJavaSearchScope scope = SearchEngine.createWorkspaceScope();
private SearchPattern pattern = null;
@@ -136,7 +127,6 @@ public class FluxJdtSearch {
@Override
public void acceptSearchMatch(SearchMatch match) throws CoreException {
if (isCanceled) {
debug("!!!! canceling search !!!!");
//Stop searching
throw new OperationCanceledException();
}
@@ -169,16 +159,10 @@ public class FluxJdtSearch {
Job job = new Job("Search for "+pattern) {
@Override
protected IStatus run(IProgressMonitor monitor) {
long start = System.currentTimeMillis();
debug("Starting search for '"+pattern+"'");
try {
searchEngine().search(pattern, participants, scope, requestor, monitor);
requestor.done();
} catch (Exception e) {
debug("Canceled search for: "+pattern);
debug(" exception: "+e.getMessage());
long duration = System.currentTimeMillis() - start;
debug(" duration: "+duration+" ms");
requestor.cancel();
}
return Status.OK_STATUS;

View File

@@ -88,20 +88,6 @@ public class FilteringURLResourceLoader extends ResourceLoader {
return r != null ? r : ImmutableList.of();
} catch (Exception e) {
LOGGER.log(Level.SEVERE, e, null);
// } finally {
// long duration = System.currentTimeMillis() - start;
// long total = timeUsed.addAndGet(duration);
// long requestCount = request.incrementAndGet();
// System.out.println("Time spent finding resources:");
// System.out.println(" requests = " + requestCount);
// System.out.println(" avg = " + total / requestCount);
// System.out.println(" total = " + total);
// System.out.println(" index built/reused = " + indexBuilt.get() +" / "+indexReused.get());
// System.out.println("Jar scan counts:");
// for (Entry<String, AtomicLong> e : jarScanned.entrySet()) {
// System.out.println(" "+e.getValue().get() +": "+e.getKey());
// }
}
}
return ImmutableSet.of();
@@ -217,10 +203,7 @@ public class FilteringURLResourceLoader extends ResourceLoader {
String resourceName = ze.getName();
if (interestingResourceNames.test(resourceName)) {
//Example url: jar:file:/home/kdvolder/.m2/repository/org/springframework/boot/spring-boot/2.1.4.RELEASE/spring-boot-2.1.4.RELEASE.jar!/META-INF/spring.factories
// System.out.println("FOUND "+resourceName+" in "+url);
requestor.put(resourceName, "jar:"+url+"!/"+ze);
// } else {
// System.out.println("mismatch: "+ze.getName());
}
ze = zip.getNextEntry();
}