コード例 #1
0
  // get gitRepository
  // check for existing git repo
  // check available repos and privateRepo access (net)
  // Show dialog (window)
  // create GitHub repo (net)
  // create local git repo (if not exist)
  // add GitHub as a remote host
  // make first commit
  // push everything (net)
  @Override
  public void actionPerformed(final AnActionEvent e) {
    final Project project = e.getData(CommonDataKeys.PROJECT);
    final VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE);

    if (project == null || project.isDisposed() || !GithubUtil.testGitExecutable(project)) {
      return;
    }

    shareProjectOnGithub(project, file);
  }
コード例 #2
0
 public void update(AnActionEvent e) {
   final Project project = e.getData(CommonDataKeys.PROJECT);
   if (project == null || project.isDefault()) {
     setVisibleEnabled(e, false, false);
     return;
   }
   setVisibleEnabled(e, true, true);
 }