// Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
// Licensed under the Apache License, Version 2.0 (see LICENSE).
package com.twitter.intellij.pants.ui;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.twitter.intellij.pants.util.PantsUtil;
public class PantsProjectRefreshAction extends AnAction implements DumbAware{
@Override
public void actionPerformed(AnActionEvent e) {
Project project = e.getProject();
if (project == null) {
Messages.showInfoMessage("Project not found.", "Error");
return;
}
PantsUtil.refreshAllProjects(project);
}
}