Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Preventing modify -> rename-the-file -> save exception(Not sure where to ask this one...)
Preventing modify -> rename-the-file -> save exception [message #546469] Tue, 13 July 2010 00:48 Go to next message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

It looks like the Java and JS editors have a way to block a user from renaming a file resource when they're open in that editor and have unsaved changes.

I've started to delve into "refactoringContributions" and am sincerely hoping there's an easier way to do it.

So how can I hook into the "file so-n-so has unsaved changes" system?

They also take renaming a parent directory or their project in stride. How the heck do they do that?


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

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

Google Code Search
Re: Preventing modify -> rename-the-file -> save exception [message #546991 is a reply to message #546469] Wed, 14 July 2010 21:06 Go to previous message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

I've fallen back to myFileEditorInput.getFile().exists()... which will allow me to give the user some options.

At some point in the future however, it'd be nice to Do Things Right. My question remains, though it's of purely academic interest at this point.


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

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

Google Code Search
Previous Topic:Quick Fix behaviour problem
Next Topic:Eclipse (Helios) not showing any Errors
Goto Forum:
  


Current Time: Fri Dec 19 10:59:00 GMT 2014

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

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