How to persist large objects? [message #330804] |
Wed, 13 August 2008 18:26  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03177 seconds