Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » eclipse overwrites new files with old files
eclipse overwrites new files with old files [message #305040] Wed, 21 June 2006 21:04 Go to next message
Eclipse User
Originally posted by: aziolk.rogers.com

I am using eclipse 3.1 with kodo 4.0. I am NOT using the kodo plugin.
I create my package.jdo file and store them in the same folder as my
..class files. Sometimes, and I can't figure out when and why eclipse
overwrites the files generated by kdo mapping tool which takes the
original package.jdo and modifies them outside eclipse. I think (this
is actually a guess) that because this file modification takes place
outside eclipse, it's not tracking the new file data and is for some
reason using a cached version of the original.

The way I know this overwtite is happening is that I backed up my
project and when comparing the backed up file to the current, the
timestamp of the backed up file is NEWER than the current file.

How can I prevent eclipse from doing that? I'm pretty sure I did a
refresh of the entire project after changing the packge.jdo files, but
I'm not entirely sure.

Any help would be welcome.
Re: eclipse overwrites new files with old files [message #305042 is a reply to message #305040] Wed, 21 June 2006 21:45 Go to previous messageGo to next message
Eclipse User
Originally posted by: wegener.cboenospam.com

Tony Ziolkowski wrote:

> I am using eclipse 3.1 with kodo 4.0. I am NOT using the kodo plugin.
> I create my package.jdo file and store them in the same folder as my
> ..class files. Sometimes, and I can't figure out when and why eclipse
> overwrites the files generated by kdo mapping tool which takes the
> original package.jdo and modifies them outside eclipse. I think (this
> is actually a guess) that because this file modification takes place
> outside eclipse, it's not tracking the new file data and is for some
> reason using a cached version of the original.

> The way I know this overwtite is happening is that I backed up my
> project and when comparing the backed up file to the current, the
> timestamp of the backed up file is NEWER than the current file.

> How can I prevent eclipse from doing that? I'm pretty sure I did a
> refresh of the entire project after changing the packge.jdo files, but
> I'm not entirely sure.

> Any help would be welcome.

The output folder that holds the compiled .class files is for derived
files only. Eclipse controls this folder. A Clean or Rebuild All will
wipe out the contents of the folder completely.

You want to place this file in a source directory. You can place it in an
existing directory or create a new directory to hold the file. The
Eclipse Java builder will copy any non Java file from source folders to
the corresponding output folder location. This is probably how your file
is getting over written. You already have a copy of the file in an
existing source folder. It is then copied on a full rebuild.
Re: eclipse overwrites new files with old files [message #305043 is a reply to message #305042] Thu, 22 June 2006 04:39 Go to previous messageGo to next message
Eclipse User
Originally posted by: aziolk.rogers.com

On Wed, 21 Jun 2006 21:45:24 +0000 (UTC), wegener@cboenospam.com (Dave
Wegener) wrote:

>Tony Ziolkowski wrote:
>
>> I am using eclipse 3.1 with kodo 4.0. I am NOT using the kodo plugin.
>> I create my package.jdo file and store them in the same folder as my
>> ..class files. Sometimes, and I can't figure out when and why eclipse
>> overwrites the files generated by kdo mapping tool which takes the
>> original package.jdo and modifies them outside eclipse. I think (this
>> is actually a guess) that because this file modification takes place
>> outside eclipse, it's not tracking the new file data and is for some
>> reason using a cached version of the original.
>
>> The way I know this overwtite is happening is that I backed up my
>> project and when comparing the backed up file to the current, the
>> timestamp of the backed up file is NEWER than the current file.
>
>> How can I prevent eclipse from doing that? I'm pretty sure I did a
>> refresh of the entire project after changing the packge.jdo files, but
>> I'm not entirely sure.
>
>> Any help would be welcome.
>
>The output folder that holds the compiled .class files is for derived
>files only. Eclipse controls this folder. A Clean or Rebuild All will
>wipe out the contents of the folder completely.
>
>You want to place this file in a source directory. You can place it in an
>existing directory or create a new directory to hold the file. The
>Eclipse Java builder will copy any non Java file from source folders to
>the corresponding output folder location. This is probably how your file
>is getting over written. You already have a copy of the file in an
>existing source folder. It is then copied on a full rebuild.
>
>
>
Then how am I supposed to develop JDO-based applications? As I
understand it, the packge.jdo file MUST reside in the same folder as
the .class files.
Re: eclipse overwrites new files with old files [message #305055 is a reply to message #305043] Thu, 22 June 2006 12:44 Go to previous messageGo to next message
Eclipse User
Originally posted by: lamont_gilbert.rigidsoftware.com

Tony Ziolkowski wrote:

> On Wed, 21 Jun 2006 21:45:24 +0000 (UTC), wegener@cboenospam.com (Dave
> Wegener) wrote:
>
>>Tony Ziolkowski wrote:
>>
>>> I am using eclipse 3.1 with kodo 4.0. I am NOT using the kodo plugin.
>>> I create my package.jdo file and store them in the same folder as my
>>> ..class files. Sometimes, and I can't figure out when and why eclipse
>>> overwrites the files generated by kdo mapping tool which takes the
>>> original package.jdo and modifies them outside eclipse. I think (this
>>> is actually a guess) that because this file modification takes place
>>> outside eclipse, it's not tracking the new file data and is for some
>>> reason using a cached version of the original.
>>
>>> The way I know this overwtite is happening is that I backed up my
>>> project and when comparing the backed up file to the current, the
>>> timestamp of the backed up file is NEWER than the current file.
>>
>>> How can I prevent eclipse from doing that? I'm pretty sure I did a
>>> refresh of the entire project after changing the packge.jdo files, but
>>> I'm not entirely sure.
>>
>>> Any help would be welcome.
>>
>>The output folder that holds the compiled .class files is for derived
>>files only. Eclipse controls this folder. A Clean or Rebuild All will
>>wipe out the contents of the folder completely.
>>
>>You want to place this file in a source directory. You can place it in an
>>existing directory or create a new directory to hold the file. The
>>Eclipse Java builder will copy any non Java file from source folders to
>>the corresponding output folder location. This is probably how your file
>>is getting over written. You already have a copy of the file in an
>>existing source folder. It is then copied on a full rebuild.
>>
>>
>>
> Then how am I supposed to develop JDO-based applications? As I
> understand it, the packge.jdo file MUST reside in the same folder as
> the .class files.


According to whom? I use JPOX JDO and they have a nice tool for eclipse. I
tell it where the jdo files are and it has no issue. My .JDO files are
next to my .java files.

IIRC, JDO augments the class files, so once the class files are modified I
don't believe the JDO files are even required. The tricky part with
eclipse is getting it to accept classfiles that dont exactly match the
source java files :D I think you have to turn off autobuild. Don't
remember exactly.

--
Respectfully,

CL Gilbert
"Verily, verily, I say unto you, He that entereth not by the door() into the
sheepfold{}, but climbeth up some other *way, the same is a thief and a
robber."
Re: eclipse overwrites new files with old files [message #305063 is a reply to message #305043] Thu, 22 June 2006 13:11 Go to previous message
Eclipse User
Originally posted by: automatic.javalobby.org

It must end up there, but you don't put it there. You put it in a source folder, Eclipse copies it to the bin folder. Like the previous poster said, Eclipse manages the contents of the bin folder on your behalf; you need to put it where Eclipse expects it to be.

Alex.
Previous Topic:64-bit Solaris Motif - how hard is it going to be?
Next Topic:Capabilities Preferences Removed?
Goto Forum:
  


Current Time: Tue Sep 23 02:19:52 GMT 2014

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

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