Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Copy-on-write editing ?
Copy-on-write editing ? [message #327782] Thu, 01 May 2008 17:05 Go to next message
Paul Gover is currently offline Paul GoverFriend
Messages: 1
Registered: July 2009
Junior Member
I'm working on a project with a very large source tree in an SCM, using
Eclipse 3.3 under Linux (Gentoo). Our development process is to copy the
entire tree to a directory under /var, and then create a sandbox tree
which mirrors the source tree. We have a special makefile processor that
picks modified source from the sandbox, but defaults to the main source
tree if there's nothing in the sandbox.

This makes it easy to perform incremental builds, run different sandboxes
when fixing different defects or developing different changes, and so
forth.

I would like to use Eclipse on this (mainly Java, but somethimes C++) by
importing a sandbox directory structure as an external project. That
doesn't work directly, as the sandbox is missing much of the source tree.
I thought that populating the sandbox with links (symbolic or hard) to the
missing source tree files (e.g. cp -url $sourceroot $sandboxroot) would
give the imported project a complete tree below the sandbox directory I
wanted to work on. And it works! Eclipse sees all I want. But ...

The trouble is, Eclipse is too clever - it appears the editors open the
input files R/W, and rewrite the file's contents when I save. This means
that it updates the source tree file, even if that means following a
symbolic link.

What I wanted was Eclipse to delete the old file (i.e. the (symbolic or
hard) link in the sandbox, and create a new file of the same name in the
sandbox. That way, the sandbox gets populated with changed files, the
source tree isn't touched, and the sandbox tree is a mixture of updated
files and links to unmodified source. AFAIK, this behaviour is called
"copy on write".

I get the impression that once-upon-a-time, Eclipse worked that way, and
got modified to the current "update in place" mechanism in response to a
bug report.

Is there any configuration option to get copy on write? I've not found
anything in the workbench properties, nor in Eclipse help nor on the
Internet.
Re: Copy-on-write editing ? [message #327806 is a reply to message #327782] Fri, 02 May 2008 13:21 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Paul Gover wrote:
> I'm working on a project with a very large source tree in an SCM, using
> Eclipse 3.3 under Linux (Gentoo). Our development process is to copy
> the entire tree to a directory under /var, and then create a sandbox
> tree which mirrors the source tree. We have a special makefile
> processor that picks modified source from the sandbox, but defaults to
> the main source tree if there's nothing in the sandbox.
> This makes it easy to perform incremental builds, run different
> sandboxes when fixing different defects or developing different changes,
> and so forth.
>
> I would like to use Eclipse on this (mainly Java, but somethimes C++) by
> importing a sandbox directory structure as an external project. That
> doesn't work directly, as the sandbox is missing much of the source
> tree. I thought that populating the sandbox with links (symbolic or
> hard) to the missing source tree files (e.g. cp -url $sourceroot
> $sandboxroot) would give the imported project a complete tree below the
> sandbox directory I wanted to work on. And it works! Eclipse sees all
> I want. But ...
>
> The trouble is, Eclipse is too clever - it appears the editors open the
> input files R/W, and rewrite the file's contents when I save. This
> means that it updates the source tree file, even if that means following
> a symbolic link.
>
> What I wanted was Eclipse to delete the old file (i.e. the (symbolic or
> hard) link in the sandbox, and create a new file of the same name in the
> sandbox. That way, the sandbox gets populated with changed files, the
> source tree isn't touched, and the sandbox tree is a mixture of updated
> files and links to unmodified source. AFAIK, this behaviour is called
> "copy on write".
>
> I get the impression that once-upon-a-time, Eclipse worked that way, and
> got modified to the current "update in place" mechanism in response to a
> bug report.
>
> Is there any configuration option to get copy on write? I've not found
> anything in the workbench properties, nor in Eclipse help nor on the
> Internet.
>

I have been using Eclipse since the 2.0 version and don't ever recall it
having a "copy on write" behavior. It certainly has no support for
anything like that now.
I'm pretty sure you could do what you want by writing a custom plugin,
but that is not a trivial task if you have never written Eclipse plugins
before. I'm not 100% certain, but I think you'd want to start by
learning about Eclipse file System API
(http://wiki.eclipse.org/index.php/EFS) to determine if it is extensible
in a way that would support your needs.

If you do decide to develop such a plugin, feel free to come back to
this group with specific questions; also, the eclipse.platform.pde group
might be helpful when you've got questions about the plugin dev tools.
Finally, this is something that could be a nice contribution back to the
platform; you'd have to convince the dev team of the platform project
that it is worthwhile to include, but a working code base goes a long
way towards that goal ;-)

Hope this helps,
Eric
Previous Topic:Databinding and Date Selection Widgets
Next Topic:extending java builder in eclipse?
Goto Forum:
  


Current Time: Mon Jul 29 20:51:51 GMT 2024

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

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

Back to the top