This commit is contained in:
Alexey Kudravtsev
2015-04-01 12:31:07 +03:00
parent 0928c8922a
commit 31fffab71b
6 changed files with 26 additions and 4 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ class IdeaProjectStoreImpl extends ProjectWithModulesStoreImpl {
@Override
protected StateStorageManager createStateStorageManager() {
return new ProjectStateStorageManager(myPathMacroManager.createTrackingSubstitutor(), myProject) {
@NotNull
@Override
public StorageData createIprStorageData(@NotNull String filePath) {
return new IdeaIprStorageData(ROOT_TAG_NAME, myProject, filePath);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,6 +38,7 @@ class ModuleStateStorageManager extends StateStorageManagerImpl {
myModule = module;
}
@NotNull
@Override
protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) {
return new ModuleStoreImpl.ModuleFileData(ROOT_TAG_NAME, myModule);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -51,6 +51,7 @@ class ApplicationStoreImpl extends ComponentStoreImpl implements IApplicationSto
myStateStorageManager = new StateStorageManagerImpl(pathMacroManager.createTrackingSubstitutor(), ROOT_ELEMENT_NAME, application, application.getPicoContainer()) {
private boolean myConfigDirectoryRefreshed;
@NotNull
@Override
protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) {
return new StorageData(ROOT_ELEMENT_NAME);
@@ -33,6 +33,7 @@ class ProjectStateStorageManager extends StateStorageManagerImpl {
myProject = project;
}
@NotNull
@Override
protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) {
if (fileSpec.equals(StoragePathMacros.PROJECT_FILE)) {
@@ -46,6 +47,7 @@ class ProjectStateStorageManager extends StateStorageManagerImpl {
}
}
@NotNull
protected StorageData createIprStorageData(@NotNull String filePath) {
return new ProjectStoreImpl.IprStorageData(ROOT_TAG_NAME, myProject);
}
@@ -1,3 +1,18 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.openapi.components.impl;
import com.intellij.application.options.PathMacrosImpl;
@@ -175,6 +190,7 @@ public class ApplicationStoreTest extends LightPlatformLangTestCase {
MyComponentStore(@NotNull final String testAppConfigPath) {
TrackingPathMacroSubstitutor macroSubstitutor = new ApplicationPathMacroManager().createTrackingSubstitutor();
stateStorageManager = new StateStorageManagerImpl(macroSubstitutor, "application", this, ApplicationManager.getApplication().getPicoContainer()) {
@NotNull
@Override
protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) {
return new StorageData("application");
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@ public class StateStorageManagerImplTest extends LightPlatformLangTestCase {
public final void setUp() throws Exception {
super.setUp();
myStateStorageManager = new StateStorageManagerImpl(null, "foo", null, ApplicationManager.getApplication().getPicoContainer()) {
@NotNull
@Override
protected StorageData createStorageData(@NotNull String fileSpec, @NotNull String filePath) {
throw new UnsupportedOperationException("Method createStorageData not implemented in " + getClass());