Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Fragile Fences

Reply
Thread Tools

Fragile Fences

 
 
Virgil Green
Guest
Posts: n/a
 
      07-14-2005
Roedy Green wrote:
> On Wed, 13 Jul 2005 11:13:00 -0600, Chris Smith <(E-Mail Removed)>
> wrote or quoted :
>
>> That's not at all accurate. You would need to demonstrate even one
>> situation in which Eclipse deletes a source file and replaces it with
>> something generated from the internal parse tree. It never does so.

>
> Try this experiment. Write some code in Eclipse. Shut down eclipse.
> modify a source file with a text editor. Start up eclipse. Do not
> "refresh". and notice that your changes are missing. It is showing you
> something other than the flat files. It must have some other copy.
> That might be a cvs like repository or an internal representation, but
> it is not the flat files.


Nope. I changed my code with TextPad. Saved it. Opened up Eclipse. I
happened to have left that particular .java file open in Eclipse when I last
exited. It opened right up, showed me the changes and promptly informed me
that I had a compile error before I had touched the mouse or keyboard.

I've never had an externally initiated change to a source file fail to show
up in Eclipse. To expand on your experiment, I then opened the same file in
TextPad while I had it open in Eclipse. I removed the change via TextPad and
saved it. When I returned to Eclipse I was presented with a dialog
indicating that the file had been changed externally by another program and
it offered to reload it. TextPad will reciprocate with the same kind of
external change detection. I rely on that often in TextPad when watching
live log files.

I'm running a faily untweaked copy of Eclipse 3.0.2 build 200503110845 on a
Windows/2000 machine.

--
Virgil


 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-14-2005
On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
<(E-Mail Removed)> wrote or quoted :

>Nope. I changed my code with TextPad. Saved it. Opened up Eclipse. I
>happened to have left that particular .java file open in Eclipse when I last
>exited. It opened right up, showed me the changes and promptly informed me
>that I had a compile error before I had touched the mouse or keyboard.


do you have autorefresh from flat files turned on?

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      07-14-2005
On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
<(E-Mail Removed)> wrote or quoted :

> I removed the change via TextPad and
>saved it. When I returned to Eclipse I was presented with a dialog
>indicating that the file had been changed externally by another program and
>it offered to reload it.


That proves my point that Eclipse must have its own internal copy. If
it did not, how could it detect the change, and how could it offer to
carry on WITHOUT reloading.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
Raymond DeCampo
Guest
Posts: n/a
 
      07-14-2005
Roedy Green wrote:
> On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
> <(E-Mail Removed)> wrote or quoted :
>
>
>>I removed the change via TextPad and
>>saved it. When I returned to Eclipse I was presented with a dialog
>>indicating that the file had been changed externally by another program and
>>it offered to reload it.

>
>
> That proves my point that Eclipse must have its own internal copy. If
> it did not, how could it detect the change, and how could it offer to
> carry on WITHOUT reloading.
>


The same way all editors do this. They watch the file system, hopefully
with native code that does not require polling, to see if the time stamp
of the file changes from when they opened it.

Also, most editors keep a copy of the file while you are editing
partially in memory and/or on disk. Otherwise they would have to save
on each keystroke and implementing features such as undo would be
impossible.

Ray

--
XML is the programmer's duct tape.
 
Reply With Quote
 
Larry Barowski
Guest
Posts: n/a
 
      07-15-2005

"Raymond DeCampo" <(E-Mail Removed)> wrote in message
news:VxABe.144477$(E-Mail Removed)...
> Roedy Green wrote:
> > On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
> > <(E-Mail Removed)> wrote or quoted :
> >
> >
> >>I removed the change via TextPad and
> >>saved it. When I returned to Eclipse I was presented with a dialog
> >>indicating that the file had been changed externally by another program

and
> >>it offered to reload it.

> >
> >
> > That proves my point that Eclipse must have its own internal copy. If
> > it did not, how could it detect the change, and how could it offer to
> > carry on WITHOUT reloading.
> >

>
> The same way all editors do this. They watch the file system, hopefully
> with native code that does not require polling, to see if the time stamp
> of the file changes from when they opened it.


On Windows, most editors just check file mod times whenever
an application window gets focus. On an FFM system that would
be annoying though.


 
Reply With Quote
 
Virgil Green
Guest
Posts: n/a
 
      07-15-2005
Roedy Green wrote:
> On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
> <(E-Mail Removed)> wrote or quoted :
>
>> Nope. I changed my code with TextPad. Saved it. Opened up Eclipse. I
>> happened to have left that particular .java file open in Eclipse
>> when I last exited. It opened right up, showed me the changes and
>> promptly informed me that I had a compile error before I had touched
>> the mouse or keyboard.

>
> do you have autorefresh from flat files turned on?


I don't know. What is that and where do you find it?

Checking around I see a setting at "Window|Preferences|Workbench" that is
labeled "Refresh workspace automatically" and note that it is turned off.

Also, in "Windows|Preferences|Workbench|Startup and Shutdown" there is a
setting labeled "Refresh workspace on startup" and that is also turned off.

Anyway, if you want me to check a particular setting amongst Eclipse's
plethora of settings, you're going to have be more specific/exact.

--
Virgil


 
Reply With Quote
 
Virgil Green
Guest
Posts: n/a
 
      07-15-2005
Roedy Green wrote:
> On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
> <(E-Mail Removed)> wrote or quoted :
>
>> I removed the change via TextPad and
>> saved it. When I returned to Eclipse I was presented with a dialog
>> indicating that the file had been changed externally by another
>> program and it offered to reload it.

>
> That proves my point that Eclipse must have its own internal copy. If
> it did not, how could it detect the change, and how could it offer to
> carry on WITHOUT reloading.


Hardly. Using that logic I'd have to conclude that TextPad has the same
attributes you are assigning to Eclipse. Rather both have the file loaded
into memory because they have the file open in edit mode and they could
simply overwrite the detected changes on the next save. It's a bit of a
stretch to claim that this feature lends credence to the notion that there
is some internal, permanant data store in use.

--
Virgil


 
Reply With Quote
 
Raymond DeCampo
Guest
Posts: n/a
 
      07-15-2005
Larry Barowski wrote:
> "Raymond DeCampo" <(E-Mail Removed)> wrote in message
> news:VxABe.144477$(E-Mail Removed)...
>
>>Roedy Green wrote:
>>
>>>On Thu, 14 Jul 2005 18:01:40 GMT, "Virgil Green"
>>><(E-Mail Removed)> wrote or quoted :
>>>
>>>
>>>
>>>>I removed the change via TextPad and
>>>>saved it. When I returned to Eclipse I was presented with a dialog
>>>>indicating that the file had been changed externally by another program

>
> and
>
>>>>it offered to reload it.
>>>
>>>
>>>That proves my point that Eclipse must have its own internal copy. If
>>>it did not, how could it detect the change, and how could it offer to
>>>carry on WITHOUT reloading.
>>>

>>
>>The same way all editors do this. They watch the file system, hopefully
>>with native code that does not require polling, to see if the time stamp
>>of the file changes from when they opened it.

>
>
> On Windows, most editors just check file mod times whenever
> an application window gets focus. On an FFM system that would
> be annoying though.
>
>


Those editors will miss out on changes that happen via background
processes, by network file access, etc. that occur while the window has
focus.

I'm not sure what you mean by a FFM system.

Ray

--
XML is the programmer's duct tape.
 
Reply With Quote
 
Larry Barowski
Guest
Posts: n/a
 
      07-15-2005

"Raymond DeCampo" <(E-Mail Removed)> wrote in message
news:hVTBe.31890$e%(E-Mail Removed)...
> Larry Barowski wrote:
> > On Windows, most editors just check file mod times whenever
> > an application window gets focus. On an FFM system that would
> > be annoying though.
> >

>
> Those editors will miss out on changes that happen via background
> processes, by network file access, etc. that occur while the window has
> focus.


True.

> I'm not sure what you mean by a FFM system.


Focus-follows-mouse - systems where the keyboard focus
is on the window under the mouse, and where that is not
necessarily the "top" window.


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      07-16-2005
On Fri, 15 Jul 2005 15:19:03 GMT, "Virgil Green"
<(E-Mail Removed)> wrote or quoted :

>Hardly. Using that logic I'd have to conclude that TextPad has the same
>attributes you are assigning to Eclipse. Rather both have the file loaded
>into memory because they have the file open in edit mode and they could
>simply overwrite the detected changes on the next save. It's a bit of a
>stretch to claim that this feature lends credence to the notion that there
>is some internal, permanant data store in use.


Text pad forgets its internal state when you shut it down. Eclipse
does not.

--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/...s_rumsfeld.htm

Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Threading question - read-read coherency almost, sort of, withseq_cst fences Joshua Maurice C++ 8 06-16-2011 09:32 PM
Fragile Thom Little ASP .Net 11 01-09-2006 01:38 PM
802.11b wireless and electric fences...... steve NZ Computing 26 03-13-2005 09:46 AM
More on 802.11b and eelctric fences. steve NZ Computing 1 03-12-2005 07:41 PM
Electric fences Lynn NZ Computing 38 12-26-2003 05:53 AM



Advertisments