~piastucki/bzr-eclipse/history-view-enhancements

« back to all changes in this revision

Viewing changes to org.vcs.bazaar.eclipse.ui/src/org/vcs/bazaar/eclipse/ui/team/ActionView.java

  • Committer: Guillermo Gonzalez
  • Date: 2007-03-14 12:15:50 UTC
  • Revision ID: guillo.gonzo@gmail.com-20070314121550-tltk3b6f3zblf0dh
Initial commit with the new code layout.
Now starts the real work

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * org.vcs.bazaar.eclipse (c) Vectrace Jan 31, 2006
 
3
 * Created by zingo
 
4
 */
 
5
package org.vcs.bazaar.eclipse.ui.team;
 
6
 
 
7
import org.eclipse.core.resources.IProject;
 
8
import org.eclipse.jface.action.IAction;
 
9
import org.eclipse.ui.IWorkbenchWindow;
 
10
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
 
11
 
 
12
 
 
13
/**
 
14
 * @author zingo
 
15
 * TODO: no existe este comando en hg (ni en bzr)
 
16
 */
 
17
@Deprecated
 
18
public class ActionView extends BzrAction {
 
19
 
 
20
//    private IWorkbenchPart targetPart;
 
21
    
 
22
        public ActionView() {
 
23
                super();
 
24
        }
 
25
 
 
26
        /**
 
27
         * We will cache window object in order to
 
28
         * be able to provide parent shell for the message dialog.
 
29
         * @see IWorkbenchWindowActionDelegate#init
 
30
         */
 
31
        public void init(IWorkbenchWindow window) {
 
32
//              System.out.println("ActionView:init(window)");
 
33
//              this.window = window;
 
34
        }
 
35
 
 
36
        /**
 
37
         * The action has been activated. The argument of the
 
38
         * method represents the 'real' action sitting
 
39
         * in the workbench UI.
 
40
         * @see IWorkbenchWindowActionDelegate#run
 
41
         */
 
42
        
 
43
 
 
44
        public void run(IAction action) {
 
45
                IProject proj;
 
46
                String Repository;
 
47
                proj=BazaarUtilities.getProject(selection);
 
48
                Repository=BazaarUtilities.getRepositoryPath(proj);
 
49
                if(Repository==null)
 
50
                {
 
51
                        Repository="."; //never leave this empty add a . to point to current path
 
52
                }
 
53
                //Setup and run command
 
54
//          System.out.println("hg --cwd " + Repository + " status");
 
55
                String launchCmd[] = { BazaarUtilities.getBzrExecutable(),"--cwd", Repository ,"view" };
 
56
                BazaarUtilities.ExecuteCommand(launchCmd,true);
 
57
        }
 
58
 
 
59
}