[SourceJammer-users] Re: using SimpleInterface to connect
Brought to you by:
robertmacgrogan
From: Riccardo C. <rc...@ar...> - 2005-07-29 15:27:43
|
Thanks a lot. I've tried : CommandCentral.getInstance().getGuiConf().getDefaultWorkingDirectory(); but the compiler complains that I have to give an argument to getDefaultWorkingDirectory. I tried null or new NodeName, but it fails with exceptions. Never mind I've found a way of finding the directory myself : I open the conf document found at AppConfig.getConfigFilePath() and with XMLUtil, I explore the document and find the local directory of the archive. So now I can call the function hasLocalFileChanged(). But unfortunately it does not do all what I want : It answers "true" when the file have been locally modified but "false" when the server file have been checked-in by someone else. I don't see why SourceVersionChecker.isStoredFileInfoAccurate() (called in hasLocalFileChanged) does not detect that the server version is not the same as mine in that case ? I'll be in holidays next week and see that after. Thanks for all your help Robert MacGrogan wrote: > Riccardo, > > GuiConf.getDefaultDirectory() should give you the default directory. But there are two > requirements for this to work. 1) When you start up your app, you've got to initialize AppConf to > point to the proper config directory. Call SimpleInterface.setConfDirectory() should work. And 2) > There must actually be a default directory configured for the user/archive you are logged into and > for the folder you are trying to find the default directory for. > > The easiest way to set up a default directory is to log in to your archive with the SJ client > first and set one up from there. Once you've done this, GuiConf.getDefaultDirectory() should pick > up the directory as long as 1) you're logging in using the same SJ user and 2) you point > SimpleInterface.setConfDirectory() to the same conf directory used by your SJ client. > > --Rob > > --- Riccardo Cohen <rc...@ar...> wrote: > > >>(PS:sorry for the mail on devel list, i made a little mistake) >> >>Thanks a lot >>Now my loop work correctly and I can know if a file is checked out with : >> >> if (info.isCheckedOut()) >> { >> String user=info.getCheckedOutToUser(); >> >> >>What I would like to do is also check if the file on disk is different (because someone has >>checked >>in a file) >>I try to use CommandCentral.getInstance().hasLocalFileChanged, but the second argument is a >>directory, and I could not find any way to have it from NodeInfo. I could not find any way of >>getting the default archive path locally with guiconf (getDefaultWorkingDirectory answers null) >> >>Thanks for any help >> >>Robert MacGrogan wrote: >> >> >>>Hi, Riccardo. >>> >>>I think your problem is that you need to call setOut() on SimpleInterface before you do >> >>anything >> >>>else. This is a dumb requirement, I know. There should be a default value, but this is how it >>>works now. >>> >>>For a pretty good example of some code that uses SimpleInterface, take a look at the code for >>>sj-eclipse. You can get it from here: >>> >>>http://sourceforge.net/project/showfiles.php?group_id=89891&package_id=145383 >>> >>>(The code packaged in the release file.) >>> >>>As for linking the SJ compiled classes up with the source files for easier debugging, you >> >>don't >> >>>have to use ant. Just download the source release and use jar to jar un-jar the sj-server.jar >> >>file >> >>>and then re-jar it with the source files. >>> >>>Good luck. >>> >>>--Rob >>> >>>--- Riccardo Cohen <rc...@ar...> wrote: >>> >> >>-- >>Riccardo Cohen >> >>Articque >>Les Roches >>37230 Fondettes >>France >>web = http://www.articque.com >>tel: +33 02 47 49 90 49 >>fax: +33 02 47 49 91 49 >> >> >> >> >>------------------------------------------------------- >>SF.Net email is Sponsored by the Better Software Conference & EXPO September >>19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >>_______________________________________________ >>SourceJammer-users mailing list >>Sou...@li... >>https://lists.sourceforge.net/lists/listinfo/sourcejammer-users >> > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- Riccardo Cohen Articque Les Roches 37230 Fondettes France web = http://www.articque.com tel: +33 02 47 49 90 49 fax: +33 02 47 49 91 49 |