Can I append additional identifier data to a Resource ? [message #62608] |
Wed, 04 June 2003 12:35  |
Eclipse User |
|
|
|
I have a data file that contains many independently
editable text items. Is there a way to append internal
identifier data to, say, an IPath?
I'm particularly interested in the case where the
Resource is obtained on opening a Marker. I need
my editor to locate the data inside the specified
resource. It seems that creating a Bookmark
(for example) fails because it checks for the
existence of the Resource.
Something like what is supported by web browsers
on URLs when additional data is needed (they
use # and ? separators depending on the situation).
Thanks in advance,
Campbell
|
|
|
|
|
|
Re: Can I append additional identifier data to a Resource ? [message #63477 is a reply to message #62824] |
Thu, 05 June 2003 07:10  |
Eclipse User |
|
|
|
Hi.
You might want to check out Markers. Markers are used to persist resource
metadata.
Check out extension point org.eclipse.core.resources.markers.
Markers are added to resources via IResource.createMarker(String identifier)
The identifier is the same as the identifier in the extension point.
Markers are (as far as I know) magically stored in the workspace, unless
they are declared as Transient.
Check out IMarker interface also.
Good luck, regards
Emil Einarsson
"Campbell McCausland" <campbell@projtech.com> skrev i meddelandet
news:bblki9$l1q$1@rogue.oti.com...
> Hi Rafael,
>
> Here's the story:-
>
> I have a legacy data file that contains different editable text elements,
> I don't want to split it up because that would break backwards
> compatibility (though I'll do it if I have to).
>
> Therefore, when an editor is invoked, I need it to have access to
> identifier data that will allow it to locate the correct data for editing
> inside the larger file. I also want to have this data available to the
> the editor.equals() function so that Eclipse will not try to open an
> editor twice on the same text element.
>
> Does that help ?
>
> Please see posting 'How do I specify an Object Contribution to an
> Editor . . . .' (and 'Trouble getting overrideActionId to work') for
> more context. They refer to a different and partially successful
> way of achieving the result I seek.
>
> best regards and thanks for the response,
>
> Campbell
>
>
> <chaves.nospam@inf.ufsc.br> wrote in message
> news:bbli4b$ikj$1@rogue.oti.com...
> > Maybe. Session properties are transient - if you need to access the data
> > across Eclipse sessions, you should use persistent properties (also in
> > IResource), provided the state you want to associate is not too big.
> >
> > But besides the question you made in the subject line, I did not
> > understand what you are trying to do.
> >
> > Rafael
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.26761 seconds