"Kevin Decker" <kdecker3@uiuc.edu> wrote on 09/23/2005 12:41:53 PM:
> Has anyone seen an issue where an actions with subclipse will produce a
> “Workspace Path Validation Error”?
Yes, a few others have reported similar problems. They have never
reported back that they could not resolve it though.
> Where <path> is the same in both cases. I have done both the switch
workspace
> and –data arg, with no luck. Subclipse works workspaces that were
created
> prior to the subclipse installation, but new workspaces do not seem to
work.
> This occurs on two separate machines (although the eclipse install sans
> subclipse are file copies of each other).
This is what the code is doing. Anyone see what is wrong?
public static boolean validateWorkspacePath() {
File file =
ResourcesPlugin.getWorkspace().getRoot().getLocation().toFile();
String canonicalPath = null;
try {
canonicalPath = file.getCanonicalPath();
} catch (IOException e) {
e.printStackTrace();
}
if (!file.getAbsolutePath().equals(canonicalPath)) {
MessageDialog.openError(Display.getCurrent().getActiveShell(),
...
We need to have this check in there, as we used to get a ton of problems
without it. If you start Eclipse with a capitalization that does not
match the file system path it leads to problems. This is because Eclipse
does not normalize the path in its internal code. It then does literal
string comparisons of that path in certain places which can cause
problems. For example, there are certain cases where we have to take a
path name that Subversion provides us (in the correct case from the file
system) and then use that info to construct an Eclipse object, such as an
IResource. The Eclipse code will not construct the object is the case
does not match.
So, we added this code as a safety check to identify the situation so that
the user can fix it.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. and SoftLanding Europe Plc by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
Received on Sat Sep 24 04:02:19 2005