// Path: tmc-plugin-intellij/src/main/java/fi/helsinki/cs/tmc/intellij/holders/TmcSettingsManager.java
// public final class TmcSettingsManager {
// 
//     private static final Logger logger = LoggerFactory.getLogger(TmcSettingsManager.class);
//     private static final PersistentTmcSettings persistentSettings =
//             ServiceManager.getService(PersistentTmcSettings.class);
// 
//     private TmcSettingsManager() {}
// 
//     public static synchronized SettingsTmc get() {
//         logger.info("Get SettingsTmc. @TmcSettingsManager.");
//         if (persistentSettings.getSettingsTmc() == null) {
//             persistentSettings.setSettingsTmc(new SettingsTmc());
//         }
//         return persistentSettings.getSettingsTmc();
//     }
// 
//     public static synchronized void setup() {
//         logger.info("Setup SettingsTmc. @TmcSettingsManager.");
//         if (persistentSettings.getSettingsTmc() == null) {
//             persistentSettings.setSettingsTmc(new SettingsTmc());
//         }
//     }
// }


import fi.helsinki.cs.tmc.intellij.holders.TmcSettingsManager;
import fi.helsinki.cs.tmc.intellij.ui.login.LoginDialog;
import fi.helsinki.cs.tmc.intellij.ui.settings.SettingsWindow;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
package fi.helsinki.cs.tmc.intellij.actions.buttonactions;




/**
 * Opens the settings window. Defined in plugin.xml on line &lt;action id="Settings"
 * class="fi.helsinki.cs.tmc.intellij .actions.buttonactions.TmcSettingsAction"&gt;
 */
public class TmcSettingsAction extends AnAction {

    private static final Logger logger = LoggerFactory.getLogger(TmcSettingsAction.class);
    private SettingsWindow window;

    @Override
    public void actionPerformed(AnActionEvent anActionEvent) {
        logger.info("Performing TmcSettingsAction. @TmcSettingsAction");
        showSettings();
    }

    public void showSettings() {
        logger.info("Opening TMC setting window. @TmcSettingsAction");
// Path: tmc-plugin-intellij/src/main/java/fi/helsinki/cs/tmc/intellij/holders/TmcSettingsManager.java
// public final class TmcSettingsManager {
// 
//     private static final Logger logger = LoggerFactory.getLogger(TmcSettingsManager.class);
//     private static final PersistentTmcSettings persistentSettings =
//             ServiceManager.getService(PersistentTmcSettings.class);
// 
//     private TmcSettingsManager() {}
// 
//     public static synchronized SettingsTmc get() {
//         logger.info("Get SettingsTmc. @TmcSettingsManager.");
//         if (persistentSettings.getSettingsTmc() == null) {
//             persistentSettings.setSettingsTmc(new SettingsTmc());
//         }
//         return persistentSettings.getSettingsTmc();
//     }
// 
//     public static synchronized void setup() {
//         logger.info("Setup SettingsTmc. @TmcSettingsManager.");
//         if (persistentSettings.getSettingsTmc() == null) {
//             persistentSettings.setSettingsTmc(new SettingsTmc());
//         }
//     }
// }


// Path: tmc-plugin-intellij/src/main/java/fi/helsinki/cs/tmc/intellij/actions/buttonactions/TmcSettingsAction.java
import fi.helsinki.cs.tmc.intellij.holders.TmcSettingsManager;
import fi.helsinki.cs.tmc.intellij.ui.login.LoginDialog;
import fi.helsinki.cs.tmc.intellij.ui.settings.SettingsWindow;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

package fi.helsinki.cs.tmc.intellij.actions.buttonactions;




/**
 * Opens the settings window. Defined in plugin.xml on line &lt;action id="Settings"
 * class="fi.helsinki.cs.tmc.intellij .actions.buttonactions.TmcSettingsAction"&gt;
 */
public class TmcSettingsAction extends AnAction {

    private static final Logger logger = LoggerFactory.getLogger(TmcSettingsAction.class);
    private SettingsWindow window;

    @Override
    public void actionPerformed(AnActionEvent anActionEvent) {
        logger.info("Performing TmcSettingsAction. @TmcSettingsAction");
        showSettings();
    }

    public void showSettings() {
        logger.info("Opening TMC setting window. @TmcSettingsAction");
        if (TmcSettingsManager.get().getToken().isPresent()) {