package com.versionone.integration.idea;

import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.PersistentStateComponent;


@State(name = "V1PluginSettings", storages = {
        @Storage(id = "other",
                file = "$WORKSPACE_FILE$"
        )})
public class WorkspaceSettings implements PersistentStateComponent<WorkspaceSettings> {
    public String v1Path = "http://jsdksrv01/VersionOne/";
    public String user = "admin";
    public String passwd = "admin";
    public String projectName = "V1EclipseTestPrj";
    public boolean isShowAllTask = true;

    private static WorkspaceSettings setting = new WorkspaceSettings();

    // singelton
    private WorkspaceSettings() {
    }

    public WorkspaceSettings getState() {
        return this;
    }

    public void loadState(WorkspaceSettings state) {
        user = state.user;
        passwd = state.passwd;
        v1Path = state.v1Path;
        projectName = state.projectName;
        isShowAllTask = state.isShowAllTask;
    }

    public static WorkspaceSettings getInstance() {
        return setting;
    }

}

@@ -41,172 +41,10 @@
 %0D%0A%0D%0A
-import com.intellij.openapi.components.State;%0D%0Aimport com.intellij.openapi.components.Storage;%0D%0Aimport com.intellij.openapi.components.PersistentStateComponent;%0D%0A%0D%0A
+/*
 %0D%0A@S
@@ -177,16 +177,20 @@
    )%7D)%0D%0A
+*/%0D%0A
 public c
@@ -212,16 +212,19 @@
 ettings 
+%7B//
 implemen
@@ -1041,13 +1041,11 @@
 %0A    %7D%0D%0A
-%0D%0A
 %7D%0D%0A

build fix