/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IndexLocation indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } /**
/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IndexLocation indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } /**
/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IPath indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } public void saveIndex(Index index) throws IOException {
/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IndexLocation indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } /**
/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IndexLocation indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } /**
/** * Resets the index for a given path. * Returns true if the index was reset, false otherwise. */ public synchronized boolean resetIndex(IPath containerPath) { // only called to over write an existing cached index... String containerPathString = containerPath.getDevice() == null ? containerPath.toString() : containerPath.toOSString(); try { // Path is already canonical IndexLocation indexLocation = computeIndexLocation(containerPath); Index index = getIndex(indexLocation); if (VERBOSE) { Util.verbose("-> reseting index: "+indexLocation+" for path: "+containerPathString); //$NON-NLS-1$ //$NON-NLS-2$ } if (index == null) { // the index does not exist, try to recreate it return recreateIndex(containerPath) != null; } index.reset(); return true; } catch (IOException e) { // The file could not be created. Possible reason: the project has been deleted. if (VERBOSE) { Util.verbose("-> failed to reset index for path: "+containerPathString); //$NON-NLS-1$ e.printStackTrace(); } return false; } } /**