Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] location may overlap another resource?

a question always about linked resources, (my question is a question about cdt I think?)
public IStatus validateLinkLocationURI(IResource resource, URI unresolvedLocation) do validation of a link resource location verifying:
1. if resource linking is disabled
2.the resource is the right type..etc
for the 7th: Iterate over each known project and ensure that the location does not conflict with any project locations or linked resource locations
I got the message below:
"message"= "Location 'Z:\\\\S-Gold\\\\\_lib\\\\_src' may overlap another resource. This can cause unexpected side-effects." (id=9466)
CASE_INSENSITIVE_ORDER= String$CaseInsensitiveComparator  (id=9467)
serialPersistentFields= ObjectStreamField[0]  (id=9468)
serialVersionUID= -6849794470754667710
count= 126

Another project in the same workspace has already included the location as link resource. I think that's the problem.
But when i tried to add a link resource doing new folder, add link, browse the resource location, I succeeded. Why when my code can't pass?
public void addLinks(String linkfile, String linkPath) {
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IFolder link = project.getFolder(linkfile);
IPath location = new Path(linkPath);
// IStatus i = workspace.validateLinkLocation(link, location);
if (workspace.validateLinkLocation(link, location).isOK()) {
try {
link.createLink(location, IResource.NONE, null);
} catch (CoreException e) {
} else {
// invalid location, throw an exception or warn user

thanks a lot


Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail, c'est gratuit ! Inscrivez-vous

Back to the top