Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] Framework + CheckoutOperation

Hello Marcos,

CheckoutOperation handles checkout of several projects, so the first
parameter contains mapping between required project names and URLs of
resources which should be checked out. Below you can find sample of code
which fills this mapping:

IRepositoryResource []resources = this.getSelectedRepositoryResources();

HashMap<String, IRepositoryResource> mapping = new HashMap<String,
IRepositoryResource>();

for (IRepositoryResource resource : resources) {
    String name = resource.getName();

    // override future project name here if required...
    //..........
    //..........

    mapping.put(name, resource);
}

this.runScheduled(new CheckoutOperation(
              mapping /*mapping between project names and repository
resources*/, 
              false /*do not respect hierarchy of repository folders
(relative to project root on repository)*/, 
              null /*use default workspace location*/, 
              true /*ignore externals*/));


Best regards,
Alexander Gurov
Subversive Team



-----Original Message-----
From: subversive-dev-bounces@xxxxxxxxxxx
[mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Marcos Del Puerto
Sent: Thursday, April 03, 2008 2:15 PM
To: subversive-dev@xxxxxxxxxxx
Subject: [subversive-dev] Framework + CheckoutOperation

Hi,

We use Subversive and we want to automate a couple of very common tasks. We
want to Check out and Check in directly from an action in a view we have
created in a plugin.

I have read "Subversive Architecture Overview" and the source code of
"org.polarion.team.svn.ui".

I'm trying to use CheckoutOperation and CommitOperation to do something like
this:

Code:
public class AutoChekoutAction extends
AbstractRepositoryModifyWorkspaceAction {
   public void runImpl(IAction action) {
      IActionOperation op = new CheckoutOperation(???, false, null, true);
      if (op != null) {
         this.runScheduled(op);
      }
   }
}


What is the Hashmap parameter "checkoutMap"? Could anybody give me a couple
of tips to implement it? Isn't there more advanced information than the
architecture overview document?

Best Regards

PS: Sorry that I wrote this question first in the old Subversive Forum (my
fault) _______________________________________________
subversive-dev mailing list
subversive-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/subversive-dev






Back to the top