Eclipseplugins
CompileBranchHandler.java
1 package com.proalpha.pds.gitutils.checks;
2 
3 import org.eclipse.core.commands.AbstractHandler;
4 import org.eclipse.core.commands.ExecutionEvent;
5 import org.eclipse.core.commands.ExecutionException;
6 import org.eclipse.core.runtime.jobs.Job;
7 
8 public class CompileBranchHandler extends AbstractHandler {
9 
10  @Override
11  public Object execute(ExecutionEvent event) throws ExecutionException {
12 
13  RepositoryTools repositoryTools = new RepositoryTools(event);
14 
15  // set the name for the input file
16  String relativeCompFile = String.format("%s_branchfiles.inp", repositoryTools.getBranch());
17 
18  CompileOptions options = new CompileOptions();
19  options.type = CompileType.BRANCH;
20  options.compilerInputFileName = relativeCompFile;
21 
22  Job compileJob = new CompileJob("Collect branch dependency files", repositoryTools, options);
23  compileJob.setUser(true);
24 
25  compileJob.schedule();
26 
27  return null;
28  }
29 
30 }