}
@Override
protected List<AnAction> createActions() {
return Arrays.<AnAction>asList(
new AnAction("Add Collaborator Variable", "", icon("/general/add.png")) {
public void actionPerformed(AnActionEvent anActionEvent) {
String email = Messages.showInputDialog(getProject(), "Collaborator Heroku email:", "Add Collaborator", Messages.getQuestionIcon());
if (email!=null && !email.isEmpty()) return;
herokuProjectService.addCollaborator(email);
HerokuCollaboratorsWindow.this.doUpdate();
}
},
new AnAction("Remove Config Variable", "", icon("/general/remove.png")) {
public void actionPerformed(AnActionEvent anActionEvent) {
final Collaborator collaborator = tableModel.getCollaborator(selectedRow.get());
if (collaborator==null) return;
if (Messages.showYesNoDialog("Remove the Collaborator: "+collaborator.getEmail(),"Remove Collaborator",Messages.getQuestionIcon())!=Messages.YES) return;
herokuProjectService.removeCollaborator(collaborator.getEmail());
HerokuCollaboratorsWindow.this.doUpdate();
}
},
new AnAction("Update", "", icon("/actions/sync.png")) {
public void actionPerformed(AnActionEvent anActionEvent) {
HerokuCollaboratorsWindow.this.doUpdate();
}
}
);