File tree Expand file tree Collapse file tree 4 files changed +6
-24
lines changed
org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing Expand file tree Collapse file tree 4 files changed +6
-24
lines changed Original file line number Diff line number Diff line change 1313 *******************************************************************************/
1414package org .eclipse .jdt .internal .core .search .indexing ;
1515
16- import static org .eclipse .jdt .internal .core .JavaModelManager .trace ;
17-
1816import java .io .IOException ;
1917import java .net .URI ;
2018import java .util .HashSet ;
3634import org .eclipse .jdt .internal .core .ClasspathEntry ;
3735import org .eclipse .jdt .internal .core .JavaProject ;
3836import org .eclipse .jdt .internal .core .index .Index ;
39- import org .eclipse .jdt .internal .core .search .processing .JobManager ;
4037import org .eclipse .jdt .internal .core .util .Util ;
4138
4239public class IndexAllProject extends IndexRequest {
@@ -230,9 +227,7 @@ public boolean visit(IResourceProxy proxy) throws CoreException {
230227 // request to save index when all cus have been indexed... also sets state to SAVED_STATE
231228 this .manager .request (new SaveIndex (this .containerPath , this .manager ));
232229 } catch (CoreException | IOException e ) {
233- if (JobManager .VERBOSE ) {
234- trace ("-> failed to index " + this .project + " because of the following exception:" , e ); //$NON-NLS-1$ //$NON-NLS-2$
235- }
230+ Util .log (e , "Failed to index " + this .project + ": " + e .getMessage ()); //$NON-NLS-1$ //$NON-NLS-2$
236231 this .manager .removeIndex (this .containerPath );
237232 return false ;
238233 } finally {
Original file line number Diff line number Diff line change 1313 *******************************************************************************/
1414package org .eclipse .jdt .internal .core .search .indexing ;
1515
16- import static org .eclipse .jdt .internal .core .JavaModelManager .trace ;
17-
1816import java .io .IOException ;
1917import java .net .URI ;
2018import org .eclipse .core .filesystem .EFS ;
2725import org .eclipse .core .runtime .IProgressMonitor ;
2826import org .eclipse .jdt .internal .compiler .util .SimpleLookupTable ;
2927import org .eclipse .jdt .internal .core .index .Index ;
30- import org .eclipse .jdt .internal .core .search .processing .JobManager ;
3128import org .eclipse .jdt .internal .core .util .Util ;
3229
3330public class IndexBinaryFolder extends IndexRequest {
@@ -137,9 +134,7 @@ public boolean visit(IResourceProxy proxy) throws CoreException {
137134 // request to save index when all class files have been indexed... also sets state to SAVED_STATE
138135 this .manager .request (new SaveIndex (this .containerPath , this .manager ));
139136 } catch (CoreException | IOException e ) {
140- if (JobManager .VERBOSE ) {
141- trace ("-> failed to index " + this .folder + " because of the following exception:" , e ); //$NON-NLS-1$ //$NON-NLS-2$
142- }
137+ Util .log (e , "Failed to index " + this .folder + ": " + e .getMessage ()); //$NON-NLS-1$ //$NON-NLS-2$
143138 this .manager .removeIndex (this .containerPath );
144139 return false ;
145140 } finally {
Original file line number Diff line number Diff line change 1313 *******************************************************************************/
1414package org .eclipse .jdt .internal .core .search .indexing ;
1515
16- import static org .eclipse .jdt .internal .core .JavaModelManager .trace ;
17-
1816import java .io .IOException ;
1917import org .eclipse .core .resources .IProject ;
2018import org .eclipse .core .runtime .IPath ;
2119import org .eclipse .core .runtime .IProgressMonitor ;
2220import org .eclipse .core .runtime .Path ;
2321import org .eclipse .jdt .internal .core .index .Index ;
24- import org .eclipse .jdt .internal .core .search .processing .JobManager ;
2522import org .eclipse .jdt .internal .core .util .Util ;
2623
2724class RemoveFolderFromIndex extends IndexRequest {
@@ -65,9 +62,7 @@ public boolean execute(IProgressMonitor progressMonitor) {
6562 }
6663 }
6764 } catch (IOException e ) {
68- if (JobManager .VERBOSE ) {
69- trace ("-> failed to remove " + this .folderPath + " from index because of the following exception:" , e ); //$NON-NLS-1$ //$NON-NLS-2$
70- }
65+ Util .log (e , "Failed to remove " + this .folderPath + " from index: " + e .getMessage ()); //$NON-NLS-1$ //$NON-NLS-2$
7166 return false ;
7267 } finally {
7368 monitor .exitRead (); // free read lock
Original file line number Diff line number Diff line change 1313 *******************************************************************************/
1414package org .eclipse .jdt .internal .core .search .indexing ;
1515
16- import static org .eclipse .jdt .internal .core .JavaModelManager .trace ;
17-
1816import java .io .IOException ;
1917import org .eclipse .core .runtime .IPath ;
2018import org .eclipse .core .runtime .IProgressMonitor ;
19+ import org .eclipse .core .runtime .Status ;
2120import org .eclipse .jdt .internal .core .index .Index ;
22- import org .eclipse .jdt .internal .core .search . processing . JobManager ;
21+ import org .eclipse .jdt .internal .core .util . Util ;
2322
2423/*
2524 * Save the index of a project.
@@ -43,9 +42,7 @@ public boolean execute(IProgressMonitor progressMonitor) {
4342 monitor .enterWrite (); // ask permission to write
4443 this .manager .saveIndex (index );
4544 } catch (IOException e ) {
46- if (JobManager .VERBOSE ) {
47- trace ("-> failed to save index " + this .containerPath + " because of the following exception:" , e ); //$NON-NLS-1$ //$NON-NLS-2$
48- }
45+ Util .log (Status .warning ("Failed to save index " + this .containerPath + ": " + e .getMessage (), e )); //$NON-NLS-1$ //$NON-NLS-2$
4946 return false ;
5047 } finally {
5148 monitor .exitWrite (); // free write lock
You can’t perform that action at this time.
0 commit comments