Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Problem with refresh
Problem with refresh [message #418576] Sun, 20 April 2008 14:01 Go to next message
Eclipse UserFriend
Originally posted by: hkumar.agrawal.gmail.com

Hi,

Apologies upfront for posting this is this forum too. I have not had much luck in the platform forum. Please excuse me.

My original thread is:

http://www.javalobby.org/thread.jspa?threadID=109071

Essentially the problem is that refresh on a resource is not working - think there is a functionality of a 'fastRefresh' and its not picking up file modifications done from outside workbench.

Any help/pointers are appreciated.

Thanks
Hemant
Re: Problem with refresh [message #418577 is a reply to message #418576] Sun, 20 April 2008 17:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Hemant,

If you're getting the old contents of a resource I'm quite sure you are
reading from a different resource that hasn't actually been modified at
all. Check the resource's getLocation value and look at that location
in the file system to confirm what contents really are changed. Eclipse
doesn't cache the old contents anywhere (well, it keeps a history, but
it won't just fetch the contents from the history), so if you are seeing
old contents I'm quite sure you've not actually changed the file you
think you've changed.


Hemant wrote:
> Hi,
>
> Apologies upfront for posting this is this forum too. I have not had much luck in the platform forum. Please excuse me.
>
> My original thread is:
>
> http://www.javalobby.org/thread.jspa?threadID=109071
>
> Essentially the problem is that refresh on a resource is not working - think there is a functionality of a 'fastRefresh' and its not picking up file modifications done from outside workbench.
>
> Any help/pointers are appreciated.
>
> Thanks
> Hemant
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Problem with refresh [message #418588 is a reply to message #418577] Mon, 21 April 2008 13:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: hkumar.agrawal.gmail.com

Hi,

I am dead sure that I am working on the same resource and that the same is surely getting updated on the filesystem. The weird thing is that if I debug (put just 1 breakpoint) and when that breakpoint hits just run, the problem goes away. So perhaps, the refresh happens or something.

As a nasty workaround for the problem, I created another resource by a unique name every time, copied the contents to this new file using java.util File api. And now everything works fine.

-Hemant
Re: Problem with refresh [message #418589 is a reply to message #418588] Mon, 21 April 2008 14:08 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Hemant,

Your comments imply that there might be underlying issues like OS delays
in actually flushing the saved contents to the physical disk. Just as
you appear to be sure that the file really is updated, I'm very sure
that if Eclipse is reading old contents it's pulling them out of the
actual file from the disk and not from somewhere else...


Hemant wrote:
> Hi,
>
> I am dead sure that I am working on the same resource and that the same is surely getting updated on the filesystem. The weird thing is that if I debug (put just 1 breakpoint) and when that breakpoint hits just run, the problem goes away. So perhaps, the refresh happens or something.
>
> As a nasty workaround for the problem, I created another resource by a unique name every time, copied the contents to this new file using java.util File api. And now everything works fine.
>
> -Hemant
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[Temporality][Teneo] EStoreEObjectImpl dynamicGet
Next Topic:How to set the input for the tree view?
Goto Forum:
  


Current Time: Sat Apr 27 02:05:10 GMT 2024

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

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

Back to the top