[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform] Re: How to edit external files and mark them

Jeff Johnston wrote:

I have a text editor for editing autoconf configure files. I am using the IResource marker methods for marking warnings and errors in the file. This works fine for files in the Workspace because I can acquire an IFile from the Workspace root. However, for external files, I am out of luck. I've tried a number of ideas, but I can't see a way to get an IResource to use for marking these external files. What is the recommended method for handling this and/or where I can see an example?

You can't create an IFile for it. You have two choices:
1. create your markers on the IWorkspaceRoot resource and define a protocol on how to map them to your external files. JDT uses such
an approach for "markers" on external JARs


2. implement your own kind of "markers". To make them appear in your text editor you can use Annotations (org.eclipse.jface.text.source.Annotation).

Dani


-- Jeff J.