Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to persist large objects?
How to persist large objects? [message #330804] Wed, 13 August 2008 18:26 Go to next message
Nikola Borisov is currently offline Nikola BorisovFriend
Messages: 10
Registered: July 2009
Junior Member
Hi All,

I'm developing a plugin for Eclipse and
I would like to associate with each of the files my Editor is editing a
text string. Unfortunately this text string is fairly big (around 50 K) so
i tried two things:

Creating a marker (one per file) and setting my string to one of the
properties on the file.... BOOM I got assertion failed: Marker property
value is too long.

Then i found out about setPersistentProperty on IResource ... (But the doc
says this one also has a limit of 2K ;(

I'm really sad now... Any other ideas of how to make my String persistent
across launches of Eclipse

Thanks
Nikola Borisov
Re: How to persist large objects? [message #330845 is a reply to message #330804] Thu, 14 August 2008 14:38 Go to previous messageGo to next message
Paul E. Keyser is currently offline Paul E. KeyserFriend
Messages: 878
Registered: July 2009
Senior Member
Nikola Borisov wrote:
> Hi All,
>
> I'm really sad now... Any other ideas of how to make my String
> persistent across launches of Eclipse
>

First a query -- this 50-K-string is distinct from the (I)File saved to
disk? (I guess so.)

Here's a suggestion -- in the "state location"
(<ode>Activator.getDefault().getStateLocation()</code>) of your plug-in,
write out (TXT? XML?) files that contain that String, with some sort of
id-system allowing you to associate the special file to the "regular"
(I)File.

-Paul
Re: How to persist large objects? [message #330902 is a reply to message #330845] Fri, 15 August 2008 17:38 Go to previous message
Nikola Borisov is currently offline Nikola BorisovFriend
Messages: 10
Registered: July 2009
Junior Member
Thanks Paul,

Yes you are right it is not the file itself. My big string is in fact a
debug information that the compiler throws for the files, that lets me
know where I can place breakpoints. Usually people have a bin folder and
just make the compiler spit the compiled code there but that is not what i
want in my case.

I will try your suggestion of basically implementing my own persistence...
I was just hoping that there will be some platform way. Why is there a
limit on the amount of data you can store?

Thanks.

Nikola
Previous Topic:Access the Global Preferences of Eclipse
Next Topic:ant and OperationCanceledException
Goto Forum:
  


Current Time: Thu Jul 04 05:22:48 GMT 2024

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

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

Back to the top