Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Can I append additional identifier data to a Resource ?
Can I append additional identifier data to a Resource ? [message #62608] Wed, 04 June 2003 12:35 Go to next message
Eclipse UserFriend
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 #62679 is a reply to message #62608] Wed, 04 June 2003 13:16 Go to previous messageGo to next message
Eclipse UserFriend
I just discovered Session Properties. Can these be
used for this purpose ?

"Campbell McCausland" <campbell@projtech.com> wrote in message
news:bbl6ti$9hr$1@rogue.oti.com...
> 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 #62791 is a reply to message #62679] Wed, 04 June 2003 15:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: chaves.nospam.inf.ufsc.br

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
Re: Can I append additional identifier data to a Resource ? [message #62824 is a reply to message #62791] Wed, 04 June 2003 16:28 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Can I append additional identifier data to a Resource ? [message #63477 is a reply to message #62824] Thu, 05 June 2003 07:10 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:Missing an announce newsgroup
Next Topic:searching resources in IPackageFragmentRoot
Goto Forum:
  


Current Time: Tue May 06 02:13:09 EDT 2025

Powered by FUDForum. Page generated in 0.27044 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top