[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[RFC] Autoshare + Autoadd combined patch

From: Magnus Naeslund(t) <mag_at_fbab.net>
Date: 2005-03-18 02:24:26 CET

In preparation of Panagiotis applying his auto-share patch, I added my
patch on top of that and fixed some stuff to a combined patch.

Attached to issue 261
The Patch:
http://subclipse.tigris.org/nonav/issues/showattachment.cgi/34/subclipse-autoshare+autoadd-rfc3.diff

Notable things:

Added more safety, also to the auto-share function.
Added better Job handling.
Added yes/no dialog before adding.
Added a way for ui to dispatch a dialog helper to core.
Mostly everything (in the auto-add part) works as I want them.

Issues (or things I just don't know yet):

I didn't find any good uniform way of displaying a simple dialogs. I
will ofcourse be corrected if I'm wrong about this (and change my code).
All over there seems to be some small differences in message dialog
handling so i couldn't use them (notably the
ISVNPromptUserPassword.askYesNo() method that I could have used, if the
topic wasn't fixed).

To solve this I added a ui.util.SimpleDialogsHelper that the UI plugin
pushes to SVNProviderPlugin via the
SVNProviderPlugin.setSimpleDialogsHelper() method.
The core package can then use it via the
SVNProviderPlugin.getSimpleDialogsHelper(). I've provided two simple
dialogs as an example (I use one of them).
Hopefully this is an good idea that all can should use :)

Another issue is the asynch way the ui and core plugins comes up.
If I'm really REALLY fast I can get to schedule my job before the Dialog
Helper is hooked. Is there some good info on the rules between ui and
core startup? I fixed it right now by rescheduling my job until it gets
hooked, but maybe I could fix it with sleep() waiting in the
SVNProviderPlugin.getSimpleDialogsHelper() method, the core can't live
without the ui, right?

This problem should also exist in getSvnPromptUserPassword(), the (only)
caller would fail to ask for a password correctly if the ui isn't up.

I'll read up on the auto-share function, but as it looks now it won't
work on external (things that aren't in the workbench) projects that are
imported thru the "Import existing project" wizard.
This is because the whole path handling in Eclipse is centered about the
workbench and files relative to that, that seems to mess things up.
I've stepped thru the auto-share code and seen it miss files that I
myself can see. This is somewhat weird, but as a result I've gone back
to using real Files in my auto-add part. That seems to work better.

This thing did grow a bit now with my dialog addition and everyting, and
I desperatley need some comments on if this is a good/bad thing I did.
Also I would appreciate some info on how auto-share is supposed to work,
if I won't find it in the list archives.

if there is anything I can do to help you comment on this, please tell me!

Regards,
Magnus
Received on Fri Mar 18 12:24:26 2005

This is an archived mail posted to the Subclipse Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.