From: Patrick W. <pat...@ny...> - 2008-07-31 21:13:52
|
Okay. External projects that are somewhere down the repository tree are auto-associating. I make a call to GitStatus to determine their eligibility. But our commands aren't working because of the way we use IResource and javagit requires absolute paths. I'll try and take a look at it. Are we going to stick with only a project status cache? I feel like we need two classes. GitStatusAdapter and GitStatusAdapterResponse. We should construct the adapter on a project, which will handle absolute/relative problems with projects and accept IResources; and then the adapter response should spit back only project relative IResources. If you wanted a full project cache you should do something like: status = new GitStatusAdapter(IProject project); status.getProjectStatus() and have this available as well. status.getStatus(IResource); We're going to run into problems, like what I'm seeing in commit now unless we provide adapters for all javagit commands to seamlessly handle externally resolved projects and files. We can hack it for now, but it requires a lot of annoyance. The short term option is employing some utility to extract absolute java.io.File from all IResources and using this exclusively. On Thu, 2008-07-31 at 16:17 -0400, Paul Munson Bethe wrote: > Hmmm.... probably true. > > Have a look then and try to improve it! > > > ----- Original Message ----- > From: Patrick Winters <pat...@ny...> > Date: Thursday, July 31, 2008 4:11 pm > Subject: Re: [Gitclipse-devel] Modifying GitStatusAdapter > To: Paul Munson Bethe <pm...@ny...> > Cc: git...@li... > > > > Ok cool, sorry I missed that. But this still isn't dealing with > > external projects right? > > > > On Thu, 2008-07-31 at 16:07 -0400, Paul Munson Bethe wrote: > > > Already done... > > > > > > look at GitStatusAdapter.getStatus > > > > > > -PB > > > > > > ----- Original Message ----- > > > From: Patrick Winters <pat...@ny...> > > > Date: Thursday, July 31, 2008 4:00 pm > > > Subject: [Gitclipse-devel] Modifying GitStatusAdapter > > > To: git...@li... > > > > > > > > > > Hey everyone, > > > > I think it a good idea to modify GitStatusAdapter a bit. We > > need to > > > > be able to get the status of files and directories individually. > > We > > > > should have GitStatusAdapter instantiate a GitStatus object on > > > > construction, and have methods to get IProject/IFile/IFolder status. > > > > When we import external projects into Eclipse (which I started testing > > > > but haven't committed), the IResource paths are relative to the project > > > > root. To get the absolute file, we have to do some magic. Having > > a > > > > GitStatusAdapter automatically translate from relative to absolute > > is > > > > a > > > > big time saver. > > > > Is everyone game or should I branch and do a code review? > > > > -- > > > > Patrick > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > > challenge > > > > Build the coolest Linux based applications with Moblin SDK & win > > great > > > > prizes > > > > Grand prize is a trip for two to an Open Source event anywhere in > > the > > > > world > > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > > _______________________________________________ > > > > Gitclipse-devel mailing list > > > > Git...@li... > > > > https://lists.sourceforge.net/lists/listinfo/gitclipse-devel > > |