Community
Participate
Working Groups
Hello, consider this simple test program which does not work as expected since org.eclipse.core.internal.resources.PathVariableManager.validateValue(URI) always returns null. I see this problem on Eclipse 3.7 and 3.8-prereleases. try { String path = "C:\\temp"; java.net.URI value = new java.io.File(path).toURI(); IPathVariableManager pathManager = ResourcesPlugin.getWorkspace().getPathVariableManager(); String name = "somename"; IStatus statusName = pathManager.validateName(name); IStatus statusValue = pathManager.validateValue(value); if (statusName == null || statusValue == null) { System.err.println("statusName is " + (statusName == null ? "null" : ("not null: '" + statusName + "'."))); System.err.println("statusValue is " + (statusValue == null ? "null" : ("not null: '" + statusValue + "'."))); } else if (statusName.isOK() && statusValue.isOK()) { pathManager.setURIValue(name, value); System.out.println("Everything is fine"); } else { if (!statusName.isOK()) { System.err.println("statusName is not OK."); } if (!statusValue.isOK()) { System.err.println("statusValue is not OK."); } } } catch (CoreException e) { System.err.println("CoreException: " + e.getMessage()); } Output from program: statusName is not null: 'Status OK: unknown code=0 OK null'. statusValue is null See also http://stackoverflow.com/questions/9831280/ipathvariablemanager-validatevalueuri-returns-null where I first asked about this problem and was told to file a bug report (sorry for delaying so long in doing so). Hope this problem can be fixed, bye!
Pushed to Gerrit https://git.eclipse.org/r/6233
i confirm the report, i found it too right at this moment...
Fixed with 57d034980475e3937a5cb5efe00b39797bc3026e.
Marking FIXED.