| package org.jetbrains.plugins.gradle.settings; |
| |
| import com.intellij.openapi.components.*; |
| import com.intellij.openapi.externalSystem.service.project.PlatformFacade; |
| import com.intellij.openapi.externalSystem.settings.AbstractExternalSystemLocalSettings; |
| import com.intellij.openapi.project.Project; |
| import org.jetbrains.annotations.NotNull; |
| import org.jetbrains.annotations.Nullable; |
| import org.jetbrains.plugins.gradle.util.GradleConstants; |
| |
| /** |
| * @author Denis Zhdanov |
| * @since 5/3/12 6:16 PM |
| */ |
| @State(name = "GradleLocalSettings", storages = {@Storage(file = StoragePathMacros.WORKSPACE_FILE)} ) |
| public class GradleLocalSettings extends AbstractExternalSystemLocalSettings |
| implements PersistentStateComponent<AbstractExternalSystemLocalSettings.State> |
| { |
| |
| public GradleLocalSettings(@NotNull Project project, @NotNull PlatformFacade facade) { |
| super(GradleConstants.SYSTEM_ID, project, facade); |
| } |
| |
| @NotNull |
| public static GradleLocalSettings getInstance(@NotNull Project project) { |
| return ServiceManager.getService(project, GradleLocalSettings.class); |
| } |
| |
| @Nullable |
| @Override |
| public State getState() { |
| State state = new State(); |
| fillState(state); |
| return state; |
| } |
| |
| @Override |
| public void loadState(@NotNull State state) { |
| super.loadState(state); |
| } |
| } |