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 @@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.jdt.internal.core.search.indexing;

import static org.eclipse.jdt.internal.core.JavaModelManager.trace;

import java.io.IOException;
import java.net.URI;
import java.util.HashSet;
Expand All @@ -36,7 +34,6 @@
import org.eclipse.jdt.internal.core.ClasspathEntry;
import org.eclipse.jdt.internal.core.JavaProject;
import org.eclipse.jdt.internal.core.index.Index;
import org.eclipse.jdt.internal.core.search.processing.JobManager;
import org.eclipse.jdt.internal.core.util.Util;

public class IndexAllProject extends IndexRequest {
Expand Down Expand Up @@ -230,9 +227,7 @@ public boolean visit(IResourceProxy proxy) throws CoreException {
// request to save index when all cus have been indexed... also sets state to SAVED_STATE
this.manager.request(new SaveIndex(this.containerPath, this.manager));
} catch (CoreException | IOException e) {
if (JobManager.VERBOSE) {
trace("-> failed to index " + this.project + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(e, "Failed to index " + this.project + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
this.manager.removeIndex(this.containerPath);
return false;
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.jdt.internal.core.search.indexing;

import static org.eclipse.jdt.internal.core.JavaModelManager.trace;

import java.io.IOException;
import java.net.URI;
import org.eclipse.core.filesystem.EFS;
Expand All @@ -27,7 +25,6 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.internal.compiler.util.SimpleLookupTable;
import org.eclipse.jdt.internal.core.index.Index;
import org.eclipse.jdt.internal.core.search.processing.JobManager;
import org.eclipse.jdt.internal.core.util.Util;

public class IndexBinaryFolder extends IndexRequest {
Expand Down Expand Up @@ -137,9 +134,7 @@ public boolean visit(IResourceProxy proxy) throws CoreException {
// request to save index when all class files have been indexed... also sets state to SAVED_STATE
this.manager.request(new SaveIndex(this.containerPath, this.manager));
} catch (CoreException | IOException e) {
if (JobManager.VERBOSE) {
trace("-> failed to index " + this.folder + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(e, "Failed to index " + this.folder + ": " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
this.manager.removeIndex(this.containerPath);
return false;
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,12 @@
*******************************************************************************/
package org.eclipse.jdt.internal.core.search.indexing;

import static org.eclipse.jdt.internal.core.JavaModelManager.trace;

import java.io.IOException;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.internal.core.index.Index;
import org.eclipse.jdt.internal.core.search.processing.JobManager;
import org.eclipse.jdt.internal.core.util.Util;

class RemoveFolderFromIndex extends IndexRequest {
Expand Down Expand Up @@ -65,9 +62,7 @@ public boolean execute(IProgressMonitor progressMonitor) {
}
}
} catch (IOException e) {
if (JobManager.VERBOSE) {
trace("-> failed to remove " + this.folderPath + " from index because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(e, "Failed to remove " + this.folderPath + " from index: " + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
return false;
} finally {
monitor.exitRead(); // free read lock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
*******************************************************************************/
package org.eclipse.jdt.internal.core.search.indexing;

import static org.eclipse.jdt.internal.core.JavaModelManager.trace;

import java.io.IOException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.internal.core.index.Index;
import org.eclipse.jdt.internal.core.search.processing.JobManager;
import org.eclipse.jdt.internal.core.util.Util;

/*
* Save the index of a project.
Expand All @@ -43,9 +42,7 @@ public boolean execute(IProgressMonitor progressMonitor) {
monitor.enterWrite(); // ask permission to write
this.manager.saveIndex(index);
} catch (IOException e) {
if (JobManager.VERBOSE) {
trace("-> failed to save index " + this.containerPath + " because of the following exception:", e); //$NON-NLS-1$ //$NON-NLS-2$
}
Util.log(Status.warning("Failed to save index " + this.containerPath + ". The index will not be persisted into disk but it is still available in memory and it is usable: " + e.getMessage(), e)); //$NON-NLS-1$ //$NON-NLS-2$
return false;
} finally {
monitor.exitWrite(); // free write lock
Expand Down
Loading