*/
@Override
public void run(IAction action) {
boolean cancelled = false;
// Get endpoint info
ConfigDialog dialog = new ConfigDialog(window.getShell(),false);
dialog.create();
if (dialog.open() == Window.OK) {
EclipsePropertiesManager.saveThreadFixInfo(dialog.getUrl(), dialog.getApiKey());
System.out.println("Saved ThreadFix information successfully.");
// Get application info
ApplicationsMap threadFixApplicationMap = ThreadFixService.getApplications();
while (threadFixApplicationMap.getTeams().isEmpty()){
dialog = new ConfigDialog(window.getShell(), true);
dialog.create();
if (dialog.open() == Window.OK) {
EclipsePropertiesManager.saveThreadFixInfo(dialog.getUrl(), dialog.getApiKey());
System.out.println("Saved ThreadFix information successfully.");
threadFixApplicationMap = ThreadFixService.getApplications();
} else {
System.out.println("Cancel was pressed.");
cancelled = true;