Community
Participate
Working Groups
R3.0 I copied an existing workspace but had several problems due to hard coded paths in files. One of them was: .metadata\.plugins\org.eclipse.jdt.core\savedIndexNames.txt The very bad thing about this is that it points into my original workspace and I then can get very strange behavior and even modify/corrupt the original workspace. I think it should be possible to copy an existing workspace and then use it without running into various problems.
R3.0 I copied an existing workspace but had several problems due to hard coded paths in files. One of them was caused by the launch configs in: .metadata\.plugins\org.eclipse.debug.core\.launches The very bad thing about this is that it points into my original workspace and I then can get very strange behavior and even modify/corrupt the original workspace. I think it should be possible to copy an existing workspace and then use it without running into various problems.
Ignore comment 1 - it was meant for Debug's bug.
Kent - can you check this ? When copying workspace, it shouldn't interfere with original one.
Note: checked for all refs to my orignal workspace and this one showed up. No direct indication that this causes harm.
Its not going to corrupt your workspace but search results can definitely be inaccurate.
Fred: Since you now own indexing, I'll let you 'fix' this one. ;) I suspect all we need is to change the IndexManager in 2 places: private String savedIndexFileName = "savedIndexNames.txt"; //$NON-NLS-1$ private File savedIndexNamesFile = new File(getJavaPluginWorkingLocation ().append(savedIndexFileName).toOSString()); and: private SimpleLookupTable getIndexStates() { if (indexStates != null) return indexStates; this.indexStates = new SimpleLookupTable(); char[] savedIndexNames = readIndexState(); if (savedIndexNames.length > 0) { // must ensure that the saved path matches the expected path, otherwise workspace was moved char[] pathToFolder = savedIndexNamesFile.getName().toCharArray (); pathToFolder = CharOperation.subarray(pathToFolder, 0, pathToFolder.length - savedIndexFileName.length()); char[][] names = CharOperation.splitOn('\n', savedIndexNames); for (int i = 0, l = names.length; i < l; i++) { char[] name = names[i]; if (name.length > 0 && CharOperation.prefixEquals (name, pathToFolder, true)) this.indexStates.put(new String(name), SAVED_STATE); } } return this.indexStates; }
Re: comment 5: what about Open Type?
Kent, I own Search engine from now but not indexing. So you can release 'my' fix ;)
Fixed in 3.0.1 maintance stream & HEAD. Dani: Open Type will get the wrong answer, but the workspace should not be corrupted.
Kent - how will this fix perform when reopening a 3.0 workspace ? Is it going to cause entire reindexing ?
Note that fix for bug 69028 caused entire reindexing anyway.
It will only cause reindexing if the jdt_core plugin location has moved.
Verified for 3.0.1 RC1