3

I know that markers can be added only for IResource(s), could they be added for linked resources ?
I've got the linked resource name from .project, using org.eclipse.core.internal.Project.internalGetDescription() and getLinks(). But it seems that something is missing, Eclipse is complaining about the fact that the resource does not exist.
I'm creating the resource using Workspace.newResource([PATH]), where the PATH is an IPath built correctly using the linked resource name from .project and the rest of path towards the file name.

Maybe somebody has worked with this before ?

mmmmmm
  • 32,227
  • 27
  • 88
  • 117
cristinak
  • 43
  • 3

1 Answers1

1

Don't call Workspace.newResource([PATH]) directly, get the resource from the IProject or IWorkspaceRoot using its path and #getFile() or #getFolder(). That it's a linked resource shouldn't matter if you're doing this right. If you're still having problems, tell us exactly what its complaint is.

nitind
  • 19,089
  • 4
  • 34
  • 43