diff --git a/jps/model-serialization/src/com/intellij/openapi/components/PathMacroMap.java b/jps/model-serialization/src/com/intellij/openapi/components/PathMacroMap.java index 0e2fec955543..781d0f9ebdaf 100644 --- a/jps/model-serialization/src/com/intellij/openapi/components/PathMacroMap.java +++ b/jps/model-serialization/src/com/intellij/openapi/components/PathMacroMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 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. @@ -76,11 +76,13 @@ public abstract class PathMacroMap { substitute(e, caseSensitive, recursively, null); } - public String substituteRecursively(String text, boolean caseSensitive) { + @NotNull + public String substituteRecursively(@NotNull String text, boolean caseSensitive) { return substitute(text, caseSensitive); } - protected static String quotePath(String path) { + @NotNull + protected static String quotePath(@NotNull String path) { return FileUtil.toSystemIndependentName(path); } diff --git a/platform/core-api/src/com/intellij/openapi/components/ComponentConfig.java b/platform/core-api/src/com/intellij/openapi/components/ComponentConfig.java index 053ef6fdf87e..3ddea986f3d4 100644 --- a/platform/core-api/src/com/intellij/openapi/components/ComponentConfig.java +++ b/platform/core-api/src/com/intellij/openapi/components/ComponentConfig.java @@ -101,4 +101,16 @@ public class ComponentConfig { public void setLoadForDefaultProject(boolean loadForDefaultProject) { this.loadForDefaultProject = loadForDefaultProject; } + + @Override + public String toString() { + return "ComponentConfig{" + + "implementationClass='" + implementationClass + '\'' + + ", interfaceClass='" + interfaceClass + '\'' + + ", headlessImplementationClass='" + headlessImplementationClass + '\'' + + ", loadForDefaultProject=" + loadForDefaultProject + + ", options=" + options + + ", pluginDescriptor=" + pluginDescriptor + + '}'; + } } diff --git a/platform/core-impl/src/com/intellij/openapi/components/impl/ComponentManagerConfigurator.java b/platform/core-impl/src/com/intellij/openapi/components/impl/ComponentManagerConfigurator.java index 8d54aff712d5..ebd8dfc0f1c3 100644 --- a/platform/core-impl/src/com/intellij/openapi/components/impl/ComponentManagerConfigurator.java +++ b/platform/core-impl/src/com/intellij/openapi/components/impl/ComponentManagerConfigurator.java @@ -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. @@ -18,32 +18,29 @@ package com.intellij.openapi.components.impl; import com.intellij.openapi.components.ComponentConfig; import com.intellij.openapi.extensions.PluginDescriptor; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; class ComponentManagerConfigurator { private final ComponentManagerImpl myComponentManager; - public ComponentManagerConfigurator(final ComponentManagerImpl componentManager) { + public ComponentManagerConfigurator(@NotNull ComponentManagerImpl componentManager) { myComponentManager = componentManager; } - private void loadConfiguration(@NotNull ComponentConfig[] configs, final boolean defaultProject, final PluginDescriptor descriptor) { - for (ComponentConfig config : configs) { - loadSingleConfig(defaultProject, config, descriptor); - } - } - - private void loadSingleConfig(final boolean defaultProject, @NotNull ComponentConfig config, final PluginDescriptor descriptor) { + private void loadSingleConfig(@NotNull ComponentConfig config, + @Nullable PluginDescriptor descriptor, + boolean defaultProject) { if (defaultProject && !config.isLoadForDefaultProject()) return; if (!myComponentManager.isComponentSuitable(config.options)) return; myComponentManager.registerComponent(config, descriptor); } - public void loadComponentsConfiguration(final ComponentConfig[] components, - final PluginDescriptor descriptor, - final boolean defaultProject) { - if (components == null) return; - - loadConfiguration(components, defaultProject, descriptor); + void loadComponentsConfiguration(@NotNull ComponentConfig[] components, + @Nullable PluginDescriptor descriptor, + final boolean defaultProject) { + for (ComponentConfig config : components) { + loadSingleConfig(config, descriptor, defaultProject); + } } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java index b3946d93be9e..be30aa155c0a 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java @@ -62,8 +62,8 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileAdapter; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.openapi.vfs.VirtualFilePropertyEvent; +import com.intellij.openapi.wm.StatusBar; import com.intellij.openapi.wm.WindowManager; -import com.intellij.openapi.wm.ex.StatusBarEx; import com.intellij.openapi.wm.impl.status.TogglePopupHintsPanel; import com.intellij.packageDependencies.DependencyValidationManager; import com.intellij.profile.Profile; @@ -140,8 +140,7 @@ public class DaemonListeners implements Disposable { @NotNull UndoManager undoManager, @NotNull ProjectLevelVcsManager projectLevelVcsManager, @NotNull VcsDirtyScopeManager vcsDirtyScopeManager, - @NotNull FileStatusManager fileStatusManager, - @NotNull EditorColorsManager colorsManager) { + @NotNull FileStatusManager fileStatusManager) { Disposer.register(project, this); myProject = project; myDaemonCodeAnalyzer = daemonCodeAnalyzer; @@ -285,7 +284,7 @@ public class DaemonListeners implements Disposable { } }); - colorsManager.addEditorColorsListener(new EditorColorsListener() { + editorColorsManager.addEditorColorsListener(new EditorColorsListener() { @Override public void globalSchemeChange(EditorColorsScheme scheme) { stopDaemonAndRestartAllFiles("Global color scheme changed"); @@ -534,7 +533,7 @@ public class DaemonListeners implements Disposable { @Override public void run() { if (myProject.isDisposed()) return; - StatusBarEx statusBar = (StatusBarEx)WindowManager.getInstance().getStatusBar(myProject); + StatusBar statusBar = WindowManager.getInstance().getStatusBar(myProject); myTogglePopupHintsPanel = new TogglePopupHintsPanel(myProject); statusBar.addWidget(myTogglePopupHintsPanel, myProject); updateStatusBar(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java index c88ac636243a..628de696a061 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditorTracker.java @@ -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. @@ -59,7 +59,7 @@ public class EditorTracker extends AbstractProjectComponent { private final EventDispatcher myDispatcher = EventDispatcher.create(EditorTrackerListener.class); private IdeFrameImpl myIdeFrame; - private Window myActiveWindow = null; + private Window myActiveWindow; public EditorTracker(Project project, final WindowManager windowManager, diff --git a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java index bb22d980c5ed..08f727ec0773 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/documentation/DocumentationComponent.java @@ -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. @@ -112,9 +112,9 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr }; private static class Context { - final SmartPsiElementPointer element; - final String text; - final Rectangle viewRect; + private final SmartPsiElementPointer element; + private final String text; + private final Rectangle viewRect; public Context(SmartPsiElementPointer element, String text, Rectangle viewRect) { this.element = element; @@ -253,7 +253,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr myScrollPane.setBorder(null); myScrollPane.putClientProperty(DataManager.CLIENT_PROPERTY_DATA_PROVIDER, helpDataProvider); - final MouseAdapter mouseAdapter = new MouseAdapter() { + final MouseListener mouseAdapter = new MouseAdapter() { @Override public void mousePressed(MouseEvent e) { myManager.requestFocus(); @@ -268,12 +268,12 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr } }); - final FocusAdapter focusAdapter = new FocusAdapter() { + final FocusListener focusAdapter = new FocusAdapter() { @Override public void focusLost(FocusEvent e) { Component previouslyFocused = WindowManagerEx.getInstanceEx().getFocusedComponent(manager.getProject(getElement())); - if (!(previouslyFocused == myEditorPane)) { + if (previouslyFocused != myEditorPane) { if (myHint != null && !myHint.isDisposed()) myHint.cancel(); } } @@ -670,7 +670,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr private class EditDocumentationSourceAction extends BaseNavigateToSourceAction { - EditDocumentationSourceAction() { + private EditDocumentationSourceAction() { super(true); getTemplatePresentation().setIcon(AllIcons.Actions.EditSource); getTemplatePresentation().setText("Edit Source"); @@ -698,7 +698,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr } private class ExternalDocAction extends AnAction implements HintManagerImpl.ActionToIgnore { - public ExternalDocAction() { + private ExternalDocAction() { super(CodeInsightBundle.message("javadoc.action.view.external"), null, AllIcons.Actions.Browser_externalJavaDoc); registerCustomShortcutSet(ActionManager.getInstance().getAction(IdeActions.ACTION_EXTERNAL_JAVADOC).getShortcutSet(), null); } @@ -867,16 +867,16 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr private class MyShowSettingsButton extends ActionButton { - MyShowSettingsButton() { + private MyShowSettingsButton() { this(new MyShowSettingsAction(), new Presentation(), ActionPlaces.JAVADOC_INPLACE_SETTINGS, ActionToolbar.DEFAULT_MINIMUM_BUTTON_SIZE); } - MyShowSettingsButton(AnAction action, Presentation presentation, String place, @NotNull Dimension minimumSize) { + private MyShowSettingsButton(AnAction action, Presentation presentation, String place, @NotNull Dimension minimumSize) { super(action, presentation, place, minimumSize); myPresentation.setIcon(AllIcons.General.SecondaryGroup); } - public void hideSettings() { + private void hideSettings() { if (!mySettingsPanel.isVisible()) { return; } @@ -906,7 +906,7 @@ public class DocumentationComponent extends JPanel implements Disposable, DataPr } } - private static abstract class MyDictionary extends Dictionary { + private abstract static class MyDictionary extends Dictionary { @Override public int size() { throw new UnsupportedOperationException(); diff --git a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ProjectWithModulesStoreImpl.java b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ProjectWithModulesStoreImpl.java index 2f15cd946c53..811027b1709c 100644 --- a/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ProjectWithModulesStoreImpl.java +++ b/platform/lang-impl/src/com/intellij/openapi/components/impl/stores/ProjectWithModulesStoreImpl.java @@ -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. @@ -50,6 +50,7 @@ public class ProjectWithModulesStoreImpl extends ProjectStoreImpl { return true; } + @NotNull @Override public TrackingPathMacroSubstitutor[] getSubstitutors() { List result = new SmartList(); diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java index 20b1a84023a0..d17c672fe9f8 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/IProjectStore.java @@ -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. @@ -39,6 +39,7 @@ public interface IProjectStore extends IComponentStore.Reloadable { @NotNull String getProjectName(); + @NotNull TrackingPathMacroSubstitutor[] getSubstitutors(); @NotNull diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java index 3725767e27b4..685af00fd37f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStateStorageManager.java @@ -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. @@ -28,7 +28,7 @@ class ProjectStateStorageManager extends StateStorageManagerImpl { protected final ProjectImpl myProject; @NonNls protected static final String ROOT_TAG_NAME = "project"; - public ProjectStateStorageManager(final TrackingPathMacroSubstitutor macroSubstitutor, ProjectImpl project) { + public ProjectStateStorageManager(@NotNull TrackingPathMacroSubstitutor macroSubstitutor, @NotNull ProjectImpl project) { super(macroSubstitutor, ROOT_TAG_NAME, project, project.getPicoContainer()); myProject = project; } diff --git a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java index a33f222855cc..3fb7d2c15d80 100644 --- a/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/components/impl/stores/ProjectStoreImpl.java @@ -133,6 +133,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject .project(myProject).is(); } + @NotNull @Override public TrackingPathMacroSubstitutor[] getSubstitutors() { return new TrackingPathMacroSubstitutor[] {getStateStorageManager().getMacroSubstitutor()}; @@ -154,7 +155,22 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject final LocalFileSystem fs = LocalFileSystem.getInstance(); final File file = new File(filePath); - if (!isIprPath(file)) { + if (isIprPath(file)) { + myScheme = StorageScheme.DEFAULT; + + stateStorageManager.addMacro(StoragePathMacros.PROJECT_FILE, filePath); + + final String workspacePath = composeWsPath(filePath); + stateStorageManager.addMacro(StoragePathMacros.WORKSPACE_FILE, workspacePath); + + ApplicationManager.getApplication().invokeAndWait(new Runnable() { + @Override + public void run() { + VfsUtil.markDirtyAndRefresh(false, true, false, fs.refreshAndFindFileByPath(filePath), fs.refreshAndFindFileByPath(workspacePath)); + } + }, ModalityState.defaultModalityState()); + } + else { myScheme = StorageScheme.DIRECTORY_BASED; final File dirStore = file.isDirectory() ? new File(file, Project.DIRECTORY_STORE_FOLDER) @@ -176,21 +192,6 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject } }, ModalityState.defaultModalityState()); } - else { - myScheme = StorageScheme.DEFAULT; - - stateStorageManager.addMacro(StoragePathMacros.PROJECT_FILE, filePath); - - final String workspacePath = composeWsPath(filePath); - stateStorageManager.addMacro(StoragePathMacros.WORKSPACE_FILE, workspacePath); - - ApplicationManager.getApplication().invokeAndWait(new Runnable() { - @Override - public void run() { - VfsUtil.markDirtyAndRefresh(false, true, false, fs.refreshAndFindFileByPath(filePath), fs.refreshAndFindFileByPath(workspacePath)); - } - }, ModalityState.defaultModalityState()); - } myPresentableUrl = null; } @@ -200,7 +201,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject } private static String composeWsPath(String filePath) { - final int lastDot = filePath.lastIndexOf("."); + final int lastDot = filePath.lastIndexOf('.'); final String filePathWithoutExt = lastDot > 0 ? filePath.substring(0, lastDot) : filePath; return filePathWithoutExt + WorkspaceFileType.DOT_DEFAULT_EXTENSION; } @@ -284,7 +285,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject BufferedReader in = new BufferedReader(new InputStreamReader(nameFile.getInputStream(), CharsetToolkit.UTF8_CHARSET)); try { final String name = in.readLine(); - if (name != null && name.length() > 0) { + if (name != null && !name.isEmpty()) { return name.trim(); } } @@ -405,7 +406,7 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject super(rootElementName, project); } - WsStorageData(final WsStorageData storageData) { + private WsStorageData(final WsStorageData storageData) { super(storageData); } @@ -480,21 +481,19 @@ class ProjectStoreImpl extends BaseFileConfigurableStoreImpl implements IProject dropUnableToSaveProjectNotification(myProject, status.getReadonlyFiles()); throw new SaveCancelledException(); } - else { - List> oldList = new ArrayList>(readonlyFiles); - readonlyFiles.clear(); - for (Pair entry : oldList) { - errors = executeSave(entry.first, readonlyFiles, errors); - } + List> oldList = new ArrayList>(readonlyFiles); + readonlyFiles.clear(); + for (Pair entry : oldList) { + errors = executeSave(entry.first, readonlyFiles, errors); + } - if (errors != null) { - CompoundRuntimeException.doThrow(errors); - } + if (errors != null) { + CompoundRuntimeException.doThrow(errors); + } - if (!readonlyFiles.isEmpty()) { - dropUnableToSaveProjectNotification(myProject, getFilesList(readonlyFiles)); - throw new SaveCancelledException(); - } + if (!readonlyFiles.isEmpty()) { + dropUnableToSaveProjectNotification(myProject, getFilesList(readonlyFiles)); + throw new SaveCancelledException(); } return errors; diff --git a/platform/platform-resources/src/componentSets/Lang.xml b/platform/platform-resources/src/componentSets/Lang.xml index d7fe240d0430..e22fb3a9df56 100644 --- a/platform/platform-resources/src/componentSets/Lang.xml +++ b/platform/platform-resources/src/componentSets/Lang.xml @@ -115,7 +115,6 @@ com.intellij.codeInsight.daemon.impl.DaemonListeners com.intellij.codeInsight.daemon.impl.EditorTracker diff --git a/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosCollector.java b/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosCollector.java index b327280fe6d2..bdc097b6d5f9 100644 --- a/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosCollector.java +++ b/platform/projectModel-impl/src/com/intellij/application/options/PathMacrosCollector.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 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. @@ -72,8 +72,9 @@ public class PathMacrosCollector extends PathMacroMap { return result; } + @NotNull @Override - public String substituteRecursively(String text, boolean caseSensitive) { + public String substituteRecursively(@NotNull String text, boolean caseSensitive) { if (StringUtil.isEmpty(text)) { return text; } diff --git a/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java b/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java index 10acdbe28fb3..c9fd47320cf7 100644 --- a/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java +++ b/platform/projectModel-impl/src/com/intellij/application/options/ReplacePathToMacroMap.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 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. @@ -112,6 +112,7 @@ public class ReplacePathToMacroMap extends PathMacroMap { return myMacroMap.get(path) + text.substring(endOfOccurrence); } + @NotNull @Override public String substituteRecursively(@NotNull String text, final boolean caseSensitive) { for (final String path : getPathIndex()) { diff --git a/platform/projectModel-impl/src/com/intellij/openapi/components/PathMacroManager.java b/platform/projectModel-impl/src/com/intellij/openapi/components/PathMacroManager.java index 046da9d799e6..504ed28af3d0 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/components/PathMacroManager.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/components/PathMacroManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 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. @@ -29,5 +29,6 @@ public abstract class PathMacroManager implements PathMacroSubstitutor { public abstract String collapsePathsRecursively(@NotNull String text); + @NotNull public abstract TrackingPathMacroSubstitutor createTrackingSubstitutor(); } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/components/impl/BasePathMacroManager.java b/platform/projectModel-impl/src/com/intellij/openapi/components/impl/BasePathMacroManager.java index 98a639664623..300f0c519bb0 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/components/impl/BasePathMacroManager.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/components/impl/BasePathMacroManager.java @@ -115,6 +115,7 @@ public class BasePathMacroManager extends PathMacroManager { return result; } + @NotNull @Override public TrackingPathMacroSubstitutor createTrackingSubstitutor() { return new MyTrackingPathMacroSubstitutor(); diff --git a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java index 6d8d9ec5d931..402871046209 100644 --- a/platform/testFramework/src/com/intellij/mock/MockProjectStore.java +++ b/platform/testFramework/src/com/intellij/mock/MockProjectStore.java @@ -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. @@ -63,6 +63,7 @@ public class MockProjectStore implements IProjectStore { throw new UnsupportedOperationException("Method isReloadPossible is not yet implemented in " + getClass().getName()); } + @NotNull @Override public TrackingPathMacroSubstitutor[] getSubstitutors() { return new TrackingPathMacroSubstitutor[0]; diff --git a/platform/util/src/com/intellij/util/pico/DefaultPicoContainer.java b/platform/util/src/com/intellij/util/pico/DefaultPicoContainer.java index a875a76521fd..23fe1d7362c9 100644 --- a/platform/util/src/com/intellij/util/pico/DefaultPicoContainer.java +++ b/platform/util/src/com/intellij/util/pico/DefaultPicoContainer.java @@ -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. @@ -408,4 +408,9 @@ public class DefaultPicoContainer implements AreaPicoContainer, Serializable { return res; } } + + @Override + public String toString() { + return "DefaultPicoContainer" + (getParent() == null ? " (root)" : " (parent="+getParent()+")"); + } } \ No newline at end of file