Re: [eclipsedarcs-develop] progress of the support of the eclipse rename refactoring ?
Status: Alpha
Brought to you by:
radoslawg
|
From: Leif F. <hi...@le...> - 2007-11-09 22:39:31
|
> Well, indeed maybe I was not very clear.
>
> I confirm I'm referring to EclipseDarcs plugin functionality.
>
> I usually work in the Java Perspective, and renaming a file in java
> (corresponding to 'darcs mv' command) is called a "Rename Refactoring"
> since java class names and filenames must be synchronized (thus a
> refactoring of a java class name implies a rename of its enclosing file).
Ah, got it :-)
Yes, I remember, we had that on the radar at some time, but nobody
seemed to miss it that much since then ;-) In my own practice, I just
re-add the file - which is admittedly not really the same as doing
'darcs mv'. ('Darcs mv' lets Darcs keep a continuous history of the same
file, while removing/deleting/creating/adding is, strictly speaking,
something different.)
The problem there is that 'darcs mv' does not only register the file as
renamed - it is actually a command that renames the file. In other
words, if the file already has been renamed, it's too late, you can't
call 'darcs mv' then. But obviously the actual renaming must be done by
Eclipse; thus we can't have Darcs rename the file.
Now in this situation the correct way to implement this would be to use
a resource modification hook, very deep down in Eclipse's workspace
mechanism. Out implementation of this hook would intercept the
refactoring at the very place where the file is renamed and call 'darcs
mv' instead of letting Eclipse rename the file. However, interfering
with these mechanisms is anything but trivial, there are a lot of things
that need to be considered, and the risk to the files in the workspace
is high if this isn't done properly. So from my point of view, the
cost-benefit ratio here wasn't good enough.
The plan B would be to implement a background mechanism that runs
whenever files are renamed in Eclipse, and re-add the file to the Darcs
repo when the original file was already under revision control. I even
think there was once a first implementation of that approach. That's a
bit more convenient (you haven't to re-add the file manually, it goes
automatically), but it's not exactly the same as 'darcs mv'.
Well, I guess there are no immediate plans to get this working, at least
not for me personally (I'm currently more busy with the EclipseFP plugin
which I mentioned). Maybe someone else on the list? I wouldn't be
opposed if someone would contribute a patch :-)
Thanks && ciao,
Leif
>
> 2007/11/9, Leif Frenzel <hi...@le...
> <mailto:hi...@le...>>:
>
> Hi Laurent,
>
> > I'm quite new to darcs and trying to self evaluate it.
> > For the time being I'm investigating the current capabilities of the
> > eclipseDarcs plugin agains my current use cases, and what comes
> first is
> > the ability (or not) to support the rename refactoring.
> Welcome to the Darcs users community :-)
>
> Are you sure, however, that you actually mean the Darcs-Plugin? Darcs is
> a revision control system that helps to manage changes to files in the
> source tree, and we support the integration of Darcs in Eclipse. There
> isn't actually a use case for refactorings in this context. (Or maybe I
> just can't see the connection directly, so please elaborate :-)
>
> Did you perhaps mean the programming language Haskell (which is the
> language in which Darcs is written)? This would not be very far off
> topic, since most of us here at EclipseDarcs are also involved with
> Haskell (and even Haskell for Eclipse). There is an Eclipse plugin for
> Haskell, which is named EclipseFP (eclipsefp.sf.net
> <http://eclipsefp.sf.net>) and where
> refactoring support is definitely on the road map for the next months.
>
> >
> > I saw the subject was debated on the mailing list 2 years ago, but it
> > seems to me (as for the current 0.4.0 stable version), that this
> > functionality is not yet implemented.
> >
> > Do you confirm that, and could you possibly tell me where the
> > functionality is placed in you roadmap ?
> At the moment, EclipseDarcs is very quiet. Since we are working in our
> spare time on it, there are phases from time to time when we do
> something (and there has been no such phase for a while now). So
> EclipseDarcs currently integrates some, but not all features of Darcs in
> Eclipse. As to the current extent of usability, you may be interested in
> this blog post:
>
> http://cohatoe.blogspot.com/2007/03/using-darcs-and-eclipsedarcs.html
>
> Hope this helps, feel free to ask if you need more info :-)
>
> Thanks && ciao,
> Leif
>
> >
> > Thanks in advance,
> >
> > Regards,
> >
> > --
> > Laurent Petit
> >
> >
> >
> ------------------------------------------------------------------------
>
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems? Stop.
> > Now Search log events and configuration files using AJAX and a
> browser.
> > Download your FREE copy of Splunk now >> http://get.splunk.com/
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > eclipsedarcs-develop mailing list
> > ecl...@li...
> <mailto:ecl...@li...>
> > https://lists.sourceforge.net/lists/listinfo/eclipsedarcs-develop
>
>
>
>
> --
> Cordialement,
>
> Laurent PETIT
> SQLI Lyon
|