Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Temporary Files & Editors
Temporary Files & Editors [message #545744] Thu, 08 July 2010 20:59 Go to next message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

Okay, I've been banging my head against this, in one form or another, off and on for a couple months now, with no help from the forums... so lets step back a bit.

What's the Approved/Official way to create temporary files for use in editors?

EDIT:

Eureka! The answer is right here:
http://www.eclipse.org/forums/index.php?t=msg&goto=52618 2&#msg_526182

Hallvard does things a bit differently than what I ended up with, but the results are the same. A String that can be loaded into an editor, modified, and saved back into memory.

So: Happy ending after all.


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search

[Updated on: Thu, 08 July 2010 22:41]

Report message to a moderator

Re: Temporary Files & Editors [message #545951 is a reply to message #545744] Fri, 09 July 2010 16:55 Go to previous message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

My happy ending is wilted and moldy.

It turns out that the Java & JS editors both have issues when the IStorage.getFullPath returns null... but only when "quick diff" is turned on. :/ Turn it off, and getFullPath -> null is fine.

And there's already a bug open on the issue. Sadly, this bug has been open since March of 2009. The good news is that I may have sparked some activity with my comments.

Returning other fudged up paths from getFullPath produces Other Issues:

Path.Empty: NPE while trying to determine the file type
new Path("/blah/blah.TheRightExtension") produces an editor with no line numbers that throws a wrapped IndexOutOfBounds exception during code completion.

The stack traces are attached to my most recent comment on the bug if you're curious.

I believe Hallvard was working with some XML editor that apparently doesn't share this issue. Good for him. Not so good for me.

So until this year-plus-old bug is fixed, my question remains:

How should I create temporary files to be opened in an editor?

Anyone?


FOLLOWUP (July 14, 2010): The bug has a patch awaiting review. Looks like I might get a "happily ever after" after all.

Turns out the Eclipse devs like it when you can reproduce your bug in a simple plugin that they can test with. Go figure.


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search

[Updated on: Wed, 14 July 2010 16:40]

Report message to a moderator

Previous Topic:"org.junit4" in target platform?
Next Topic:No cookies in dev mode?
Goto Forum:
  


Current Time: Sat Apr 20 00:47:01 GMT 2024

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

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

Back to the top