cleanup (get rid of ServiceManager.get)
authorVladimir Krivosheev <vladimir.krivosheev@jetbrains.com>
Fri, 16 Oct 2020 10:05:45 +0000 (12:05 +0200)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Fri, 16 Oct 2020 11:34:52 +0000 (11:34 +0000)
GitOrigin-RevId: 7f6a905353889c9795e5d40a8aa60f6251000f05

467 files changed:
images/src/org/intellij/images/editor/actions/BackgroundImageDialog.java
images/src/org/intellij/images/fileTypes/ImageFileTypeManager.java
images/src/org/intellij/images/options/OptionsManager.java
java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java
java/compiler/impl/src/com/intellij/packaging/impl/artifacts/InvalidArtifactType.java
java/compiler/openapi/src/com/intellij/openapi/deployment/DeploymentUtil.java
java/compiler/openapi/src/com/intellij/packaging/artifacts/ArtifactPointerManager.java
java/compiler/openapi/src/com/intellij/packaging/elements/PackagingElementFactory.java
java/debugger/impl/src/com/intellij/debugger/settings/DebuggerSettings.java
java/debugger/impl/src/com/intellij/debugger/settings/NodeRendererSettings.java
java/debugger/impl/src/com/intellij/debugger/settings/ThreadsViewSettings.java
java/debugger/impl/src/com/intellij/debugger/settings/TraceSettings.java
java/debugger/impl/src/com/intellij/debugger/settings/ViewsGeneralSettings.java
java/debugger/openapi/src/com/intellij/debugger/engine/DebuggerUtils.java
java/execution/openapi/src/com/intellij/execution/runners/ProcessProxyFactory.java
java/idea-ui/src/com/intellij/framework/library/DownloadableLibraryService.java
java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateSettings.java
java/idea-ui/src/com/intellij/openapi/externalSystem/service/project/wizard/AbstractExternalProjectImportBuilder.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/LibraryPresentationManager.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/daemon/ProjectStructureProblemsSettings.java
java/java-analysis-api/src/com/intellij/codeInsight/intention/QuickFixFactory.java
java/java-analysis-api/src/com/intellij/codeInspection/BatchSuppressManager.java
java/java-analysis-api/src/com/intellij/codeInspection/SuppressManager.java
java/java-analysis-api/src/com/intellij/codeInspection/reference/RefJavaUtil.java
java/java-analysis-impl/src/org/jetbrains/java/generate/GenerateToStringContext.java
java/java-analysis-impl/src/org/jetbrains/java/generate/inspection/GenerateToStringQuickFix.java
java/java-impl/src/com/intellij/codeInsight/generation/EqualsHashCodeTemplatesManager.java
java/java-impl/src/com/intellij/codeInsight/generation/GetterTemplatesManager.java
java/java-impl/src/com/intellij/codeInsight/generation/SetterTemplatesManager.java
java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGeneratorFactory.java
java/java-impl/src/com/intellij/openapi/projectRoots/impl/JavaAwareProjectJdkTableImpl.java
java/java-impl/src/com/intellij/openapi/roots/impl/LanguageLevelProjectExtensionImpl.java
java/java-impl/src/com/intellij/pom/java/AcceptedLanguageLevelsSettings.java
java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java
java/java-impl/src/com/intellij/refactoring/JavaRefactoringSettings.java
java/java-psi-api/src/com/intellij/codeInsight/TestFrameworks.java
java/java-psi-api/src/com/intellij/codeInsight/folding/JavaCodeFoldingSettings.java
java/java-psi-api/src/com/intellij/openapi/projectRoots/JavaVersionService.java
java/java-psi-api/src/com/intellij/openapi/roots/LanguageLevelProjectExtension.java
java/java-psi-api/src/com/intellij/psi/JavaDirectoryService.java
java/java-psi-api/src/com/intellij/psi/PsiSubstitutorFactory.java
java/java-psi-api/src/com/intellij/psi/util/JavaClassSupers.java
java/java-psi-impl/src/com/intellij/codeInsight/generation/OverrideImplementExploreUtil.java
java/java-psi-impl/src/com/intellij/psi/CommonReferenceProviderTypes.java
java/java-psi-impl/src/com/intellij/psi/impl/file/PsiPackageImplementationHelper.java
java/java-psi-impl/src/com/intellij/psi/impl/source/tree/JavaASTFactory.java
java/manifest/src/org/jetbrains/lang/manifest/header/HeaderParserRepository.java
java/manifest/src/org/jetbrains/lang/manifest/parser/ManifestParser.java
java/manifest/src/org/jetbrains/lang/manifest/psi/impl/HeaderValuePartImpl.java
java/openapi/src/com/intellij/facet/ui/FacetEditorsFactory.java
java/openapi/src/com/intellij/ide/util/projectWizard/ProjectWizardStepFactory.java
java/openapi/src/com/intellij/openapi/roots/libraries/LibrariesHelper.java
java/openapi/src/com/intellij/openapi/roots/ui/OrderEntryAppearanceService.java
java/openapi/src/com/intellij/openapi/roots/ui/configuration/DefaultModuleConfigurationEditorFactory.java
java/openapi/src/com/intellij/refactoring/JavaRefactoringActionHandlerFactory.java
java/openapi/src/com/intellij/util/descriptors/ConfigFileFactory.java
java/openapi/src/com/intellij/util/xml/converters/values/ClassArrayConverter.java
java/openapi/src/com/intellij/util/xml/converters/values/ClassValueConverter.java
java/remote-servers/api/src/com/intellij/remoteServer/configuration/deployment/JavaDeploymentSourceUtil.java
json/src/com/intellij/json/editor/JsonEditorOptions.java
platform/analysis-api/src/com/intellij/codeInsight/completion/CompletionService.java
platform/analysis-api/src/com/intellij/codeInsight/editorActions/TabOutScopesTracker.java
platform/analysis-api/src/com/intellij/codeInsight/intention/IntentionManager.java
platform/analysis-api/src/com/intellij/codeInsight/template/TemplateBuilderFactory.java
platform/analysis-api/src/com/intellij/codeStyle/CodeStyleFacade.java
platform/analysis-api/src/com/intellij/openapi/fileEditor/FileNavigator.java
platform/analysis-api/src/com/intellij/openapi/vfs/newvfs/ManagingFS.java
platform/analysis-api/src/com/intellij/psi/search/scope/packageSet/PackageSetFactory.java
platform/analysis-impl/src/com/intellij/codeHighlighting/TextEditorHighlightingPassRegistrar.java
platform/analysis-impl/src/com/intellij/codeInsight/completion/CompletionFinalSorter.java
platform/analysis-impl/src/com/intellij/codeInsight/daemon/DaemonCodeAnalyzerSettings.java
platform/analysis-impl/src/com/intellij/featureStatistics/FeatureUsageTracker.java
platform/analysis-impl/src/com/intellij/find/FindSettings.java
platform/analysis-impl/src/com/intellij/find/impl/FindSettingsImpl.java
platform/analysis-impl/src/com/intellij/profile/codeInspection/InspectionProfileManager.java
platform/analysis-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileInfoManager.java
platform/analysis-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReferenceCompletion.java
platform/analysis-impl/src/com/intellij/psi/search/PredefinedSearchScopeProvider.java
platform/built-in-server/src/org/jetbrains/builtInWebServer/BuiltInServerOptions.java
platform/built-in-server/src/org/jetbrains/io/jsonRpc/JsonRpcDomainBean.java
platform/code-style-api/src/com/intellij/formatting/Formatter.java
platform/code-style-api/src/com/intellij/psi/codeStyle/ProjectCodeStyleSettingsManager.java
platform/core-api/src/com/intellij/codeInsight/FileModificationService.java
platform/core-api/src/com/intellij/codeInsight/documentation/DocumentationManagerUtil.java
platform/core-api/src/com/intellij/codeInsight/folding/CodeFoldingSettings.java
platform/core-api/src/com/intellij/codeWithMe/ClientIdService.kt
platform/core-api/src/com/intellij/concurrency/AsyncFutureFactory.java
platform/core-api/src/com/intellij/diagnostic/PluginProblemReporter.java
platform/core-api/src/com/intellij/ide/TypePresentationService.java
platform/core-api/src/com/intellij/ide/util/PropertiesComponent.java
platform/core-api/src/com/intellij/ide/util/PsiNavigationSupport.java
platform/core-api/src/com/intellij/lang/PsiBuilderFactory.java
platform/core-api/src/com/intellij/model/presentation/SymbolPresentationService.java
platform/core-api/src/com/intellij/model/psi/PsiSymbolReferenceService.java
platform/core-api/src/com/intellij/model/psi/PsiSymbolService.java
platform/core-api/src/com/intellij/navigation/SymbolNavigationService.java
platform/core-api/src/com/intellij/openapi/application/TransactionGuard.java
platform/core-api/src/com/intellij/openapi/components/ServiceBean.java
platform/core-api/src/com/intellij/openapi/components/ServiceManager.java
platform/core-api/src/com/intellij/openapi/editor/colors/TextAttributesKey.java
platform/core-api/src/com/intellij/openapi/project/DefaultProjectFactory.java
platform/core-api/src/com/intellij/openapi/roots/impl/PushedFilePropertiesRetriever.java
platform/core-api/src/com/intellij/patterns/compiler/PatternCompilerFactory.java
platform/core-api/src/com/intellij/psi/PsiReferenceService.java
platform/core-api/src/com/intellij/psi/impl/source/codeStyle/IndentHelper.java
platform/core-api/src/com/intellij/psi/meta/MetaDataRegistrar.java
platform/core-api/src/com/intellij/psi/util/PsiModificationTracker.java
platform/core-api/src/com/intellij/util/Queries.java
platform/core-api/src/com/intellij/util/graph/GraphAlgorithms.java
platform/core-impl/src/com/intellij/concurrency/JobLauncher.java
platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java
platform/core-impl/src/com/intellij/psi/stubs/StubTreeLoader.java
platform/core-ui/src/ide/UiActivityMonitor.java
platform/core-ui/src/ui/TreeUIHelper.java
platform/diff-api/src/com/intellij/diff/DiffApplicationSettings.java
platform/diff-api/src/com/intellij/diff/DiffContentFactory.java
platform/diff-api/src/com/intellij/diff/DiffManager.java
platform/diff-api/src/com/intellij/diff/DiffManagerEx.java
platform/diff-api/src/com/intellij/diff/DiffRequestFactory.java
platform/diff-api/src/com/intellij/diff/comparison/ComparisonManager.java
platform/diff-api/src/com/intellij/diff/vcs/DiffVcsFacade.java
platform/diff-api/src/com/intellij/openapi/diff/DiffManager.java
platform/diff-api/src/com/intellij/openapi/diff/DiffRequestFactory.java
platform/duplicates-analysis/src/com/intellij/dupLocator/DuplocatorSettings.java
platform/duplicates-analysis/src/com/intellij/dupLocator/MultilanguageDuplocatorSettings.java
platform/editor-ui-api/src/com/intellij/ide/lightEdit/LightEditService.java
platform/editor-ui-api/src/com/intellij/ide/util/treeView/TreeAnchorizer.java
platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorColorPaletteFactory.java
platform/editor-ui-api/src/com/intellij/openapi/editor/colors/EditorFontCache.java
platform/editor-ui-api/src/com/intellij/openapi/ide/CopyPasteManager.java
platform/editor-ui-api/src/com/intellij/openapi/vcs/FileStatusFactory.java
platform/editor-ui-api/src/com/intellij/psi/util/PsiEditorUtil.java
platform/editor-ui-ex/src/com/intellij/ide/todo/TodoConfiguration.java
platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/ex/DefaultColorSchemesManager.java
platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/AppEditorFontOptions.java
platform/execution-impl/src/com/intellij/execution/ui/layout/impl/RunnerLayoutSettings.java
platform/execution-impl/src/com/intellij/ide/macro/MacroManager.java
platform/extensions/src/com/intellij/openapi/extensions/PluginDescriptor.java
platform/external-system-api/src/com/intellij/openapi/externalSystem/importing/ImportSpecBuilder.java
platform/external-system-api/src/com/intellij/openapi/externalSystem/service/project/ExternalLibraryPathTypeMapper.java
platform/external-system-api/src/com/intellij/openapi/externalSystem/service/project/ProjectDataManager.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/IgnoreExternalProjectAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/action/RefreshAllExternalProjectsAction.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/execution/ExternalSystemJdkProvider.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/AbstractExternalSystemTask.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemExecuteTaskTask.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemResolveProjectTask.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/notification/ExternalSystemProgressNotificationManager.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/ProjectRenameAware.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/autoimport/ProjectAware.kt
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ProjectDataManagerImpl.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/ui/ExternalProjectDataSelectorDialog.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/util/ExternalSystemUtil.java
platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/service/ExternalSystemFacadeManagerTest.kt
platform/external-system-impl/testSrc/com/intellij/openapi/externalSystem/test/ExternalSystemImportingTestCase.java
platform/indexing-api/src/com/intellij/find/TextSearchService.java
platform/indexing-api/src/com/intellij/lang/cacheBuilder/CacheBuilderRegistry.java
platform/indexing-api/src/com/intellij/model/search/SearchService.java
platform/indexing-api/src/com/intellij/psi/search/IndexPatternOptimizer.java
platform/indexing-impl/src/com/intellij/util/indexing/IndexableSetContributorModificationTracker.java
platform/lang-api/src/com/intellij/codeInsight/daemon/LineMarkerSettings.java
platform/lang-api/src/com/intellij/codeInsight/hints/settings/ParameterNameHintsSettings.kt
platform/lang-api/src/com/intellij/execution/ExecutorRegistry.java
platform/lang-api/src/com/intellij/execution/RunnerRegistry.java
platform/lang-api/src/com/intellij/execution/filters/HyperlinkInfoFactory.java
platform/lang-api/src/com/intellij/execution/target/java/JavaLanguageRuntimeType.kt
platform/lang-api/src/com/intellij/ide/PsiActionSupportFactory.java
platform/lang-api/src/com/intellij/lang/IdeLanguageCustomization.java
platform/lang-api/src/com/intellij/navigation/ChooseByNameRegistry.java
platform/lang-api/src/com/intellij/openapi/paths/PathReferenceManager.java
platform/lang-api/src/com/intellij/openapi/roots/ModifiableModelsProvider.java
platform/lang-api/src/com/intellij/refactoring/RefactoringActionHandlerFactory.java
platform/lang-api/src/com/intellij/util/download/DownloadableFileService.java
platform/lang-impl/src/com/intellij/ConfigurableFactory.kt
platform/lang-impl/src/com/intellij/application/options/codeStyle/CodeStyleSchemesUIConfiguration.java
platform/lang-impl/src/com/intellij/codeEditor/printing/PrintSettings.java
platform/lang-impl/src/com/intellij/codeInsight/TargetElementUtil.java
platform/lang-impl/src/com/intellij/codeInsight/actions/FormatChangedTextUtil.java
platform/lang-impl/src/com/intellij/codeInsight/actions/VcsFacade.java
platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/ParameterHintsPresentationManager.java
platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateSettings.java
platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplateStorage.java
platform/lang-impl/src/com/intellij/codeInsight/template/postfix/settings/PostfixTemplatesSettings.java
platform/lang-impl/src/com/intellij/codeInspection/actions/CleanupInspectionUtil.java
platform/lang-impl/src/com/intellij/codeInspection/ex/AppInspectionProfilesVisibleTreeState.java
platform/lang-impl/src/com/intellij/execution/console/ConsoleFoldingSettings.java
platform/lang-impl/src/com/intellij/find/impl/FindInProjectExecutor.kt
platform/lang-impl/src/com/intellij/find/impl/FindPopupScopeUIProvider.java
platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectorRegistry.java
platform/lang-impl/src/com/intellij/ide/PsiCopyPasteManager.java
platform/lang-impl/src/com/intellij/ide/actions/searcheverywhere/SearchEverywhereManager.java
platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarModelBuilder.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/FileNestingBuilder.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewFileNestingService.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/ProjectViewSharedSettings.kt
platform/lang-impl/src/com/intellij/openapi/editor/EditorMouseHoverPopupManager.java
platform/lang-impl/src/com/intellij/openapi/editor/richcopy/settings/RichCopySettings.java
platform/lang-impl/src/com/intellij/openapi/fileTypes/impl/associate/OSFileAssociationPreferences.java
platform/lang-impl/src/com/intellij/openapi/roots/libraries/LibraryDetectionManager.java
platform/lang-impl/src/com/intellij/openapi/roots/libraries/LibraryTypeService.java
platform/lang-impl/src/com/intellij/packageDependencies/DependencyUISettings.java
platform/lang-impl/src/com/intellij/psi/codeStyle/arrangement/engine/ArrangementEngine.java
platform/lang-impl/src/com/intellij/psi/templateLanguages/TemplateDataLanguagePatterns.java
platform/lang-impl/src/com/intellij/refactoring/RefactoringSettings.java
platform/lang-impl/src/com/intellij/refactoring/rename/RenameHandlerRegistry.java
platform/lang-impl/src/com/intellij/tools/ToolManager.java
platform/lang-impl/src/com/intellij/ui/debugger/extensions/PlaybackDebugger.java
platform/lvcs-api/src/com/intellij/history/LocalHistory.java
platform/platform-api/src/com/intellij/codeInsight/hint/HintManager.java
platform/platform-api/src/com/intellij/codeWithMe/ClientIdServiceImpl.kt
platform/platform-api/src/com/intellij/execution/process/OSProcessManager.java
platform/platform-api/src/com/intellij/execution/process/ProcessHandlerFactory.java
platform/platform-api/src/com/intellij/ide/RecentProjectsManager.java
platform/platform-api/src/com/intellij/ide/RemoteDesktopService.java
platform/platform-api/src/com/intellij/ide/XmlRpcServer.java
platform/platform-api/src/com/intellij/ide/actions/ActionsCollector.java
platform/platform-api/src/com/intellij/ide/browsers/BrowserLauncher.kt
platform/platform-api/src/com/intellij/ide/browsers/WebBrowserService.java
platform/platform-api/src/com/intellij/ide/passwordSafe/PasswordSafe.kt
platform/platform-api/src/com/intellij/ide/plugins/PluginFeatureService.kt
platform/platform-api/src/com/intellij/ide/plugins/PluginManagerConfigurableService.java
platform/platform-api/src/com/intellij/ide/ui/ProductIcons.java
platform/platform-api/src/com/intellij/internal/statistic/eventLog/FeatureUsageUiEvents.kt
platform/platform-api/src/com/intellij/openapi/actionSystem/AbbreviationManager.java
platform/platform-api/src/com/intellij/openapi/actionSystem/JBAwtEventQueue.java
platform/platform-api/src/com/intellij/openapi/editor/EditorCopyPasteHelper.java
platform/platform-api/src/com/intellij/openapi/editor/actionSystem/EditorActionManager.java
platform/platform-api/src/com/intellij/openapi/editor/actionSystem/LatencyRecorder.java
platform/platform-api/src/com/intellij/openapi/fileChooser/FileSystemTreeFactory.java
platform/platform-api/src/com/intellij/openapi/fileEditor/UniqueVFilePathBuilder.java
platform/platform-api/src/com/intellij/openapi/help/HelpManager.java
platform/platform-api/src/com/intellij/openapi/keymap/KeymapGroupFactory.java
platform/platform-api/src/com/intellij/openapi/keymap/NationalKeyboardSupport.java
platform/platform-api/src/com/intellij/openapi/options/colors/ColorSettingsPages.java
platform/platform-api/src/com/intellij/openapi/roots/ui/FileAppearanceService.java
platform/platform-api/src/com/intellij/openapi/roots/ui/SdkAppearanceService.java
platform/platform-api/src/com/intellij/openapi/ui/DialogWrapperPeerFactory.java
platform/platform-api/src/com/intellij/openapi/ui/popup/JBPopupFactory.java
platform/platform-api/src/com/intellij/openapi/ui/popup/StackingPopupDispatcher.java
platform/platform-api/src/com/intellij/openapi/util/DimensionService.java
platform/platform-api/src/com/intellij/openapi/util/WindowStateService.java
platform/platform-api/src/com/intellij/psi/statistics/StatisticsManager.java
platform/platform-api/src/com/intellij/reporting/FreezeLogger.java
platform/platform-api/src/com/intellij/ui/ColorChooserService.java
platform/platform-api/src/com/intellij/ui/ExpandableItemsHandlerFactory.java
platform/platform-api/src/com/intellij/ui/content/ContentFactory.java
platform/platform-api/src/com/intellij/ui/errorView/ErrorViewFactory.java
platform/platform-api/src/com/intellij/ui/tabs/impl/tabsLayout/TabsLayoutSettingsManager.java
platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java
platform/platform-api/src/com/intellij/util/text/DateTimeFormatManager.java
platform/platform-impl/src/com/intellij/codeInsight/hint/HintManagerImpl.java
platform/platform-impl/src/com/intellij/diagnostic/GcPauseWatcher.kt
platform/platform-impl/src/com/intellij/diagnostic/PerformanceWatcher.java
platform/platform-impl/src/com/intellij/execution/wsl/WSLDistributionService.java
platform/platform-impl/src/com/intellij/ide/IdeEventQueue.java
platform/platform-impl/src/com/intellij/ide/browsers/WebBrowserManager.java
platform/platform-impl/src/com/intellij/ide/plugins/CustomPluginRepositoryService.java
platform/platform-impl/src/com/intellij/ide/plugins/InstalledPluginsState.java
platform/platform-impl/src/com/intellij/ide/ui/customization/CustomActionsSchema.java
platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/ToolWindowCollector.java
platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/AbbreviationManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/MouseGestureManager.java
platform/platform-impl/src/com/intellij/openapi/editor/SpellCheckingEditorCustomizationProvider.java
platform/platform-impl/src/com/intellij/openapi/editor/ex/EditorInlayFoldingMapper.java
platform/platform-impl/src/com/intellij/openapi/editor/ex/EditorSettingsExternalizable.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorLastActionTracker.java
platform/platform-impl/src/com/intellij/openapi/fileEditor/ex/FileEditorProviderManager.java
platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/FileOffsetsManager.java
platform/platform-impl/src/com/intellij/openapi/keymap/impl/ActionShortcutRestrictions.java
platform/platform-impl/src/com/intellij/openapi/updateSettings/UpdateStrategyCustomization.java
platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateSettings.java
platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/UpdateStrategy.kt
platform/platform-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileManager.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowHeadlessManagerImpl.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/status/widget/StatusBarWidgetUsagesCollector.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/status/widget/StatusBarWidgetsActionGroup.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/status/widget/StatusBarWidgetsManager.java
platform/platform-impl/src/com/intellij/remote/VagrantSupport.java
platform/platform-impl/src/com/intellij/remote/ext/CredentialsManager.java
platform/platform-impl/src/com/intellij/ui/EditorTextFieldProvider.java
platform/platform-impl/src/com/intellij/ui/SystemNotifications.java
platform/platform-impl/src/com/intellij/ui/WinFocusStealer.java
platform/platform-impl/src/com/intellij/ui/content/impl/ContentManagerImpl.java
platform/platform-resources/src/META-INF/PlatformExtensions.xml
platform/platform-tests/testSrc/com/intellij/ide/fileTemplates/impl/LightFileTemplatesTest.java
platform/platform-tests/testSrc/com/intellij/ide/plugins/DynamicPluginsTest.kt
platform/projectModel-api/src/com/intellij/openapi/project/ExternalStorageConfigurationManager.java
platform/projectModel-api/src/com/intellij/openapi/project/ProjectUtilCore.kt
platform/projectModel-api/src/com/intellij/openapi/roots/ExternalProjectSystemRegistry.java
platform/projectModel-impl/src/com/intellij/openapi/module/impl/UnloadedModulesListStorage.java
platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/ApplicationLibraryTable.java
platform/projectModel-impl/src/com/intellij/project/model/JpsSdkManager.java
platform/remote-servers/api/src/com/intellij/remoteServer/agent/RemoteAgentManager.java
platform/remote-servers/api/src/com/intellij/remoteServer/configuration/RemoteServersManager.java
platform/remote-servers/api/src/com/intellij/remoteServer/runtime/ServerConnectionManager.java
platform/remote-servers/api/src/com/intellij/remoteServer/runtime/clientLibrary/ClientLibraryManager.java
platform/remote-servers/api/src/com/intellij/remoteServer/runtime/deployment/debug/JavaDebuggerLauncher.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/configuration/deployment/DeployToServerRunConfigurationExtensionsManager.java
platform/remote-servers/impl/src/com/intellij/remoteServer/impl/runtime/log/CloudTerminalProvider.java
platform/statistics/src/com/intellij/internal/statistic/updater/StatisticsJobsScheduler.java
platform/statistics/src/com/intellij/internal/statistic/utils/PluginInfoDetector.kt
platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/ConfigurationManager.java
platform/usageView/src/com/intellij/usageView/UsageTreeColorsScheme.java
platform/usageView/src/com/intellij/usages/ShowUsagesSettings.kt
platform/usageView/src/com/intellij/usages/UsageViewSettings.kt
platform/usageView/src/com/intellij/usages/impl/ImportFilteringUsageViewSetting.java
platform/vcs-api/src/com/intellij/openapi/vcs/VcsApplicationSettings.java
platform/vcs-api/src/com/intellij/openapi/vcs/impl/CheckinHandlersManager.java
platform/vcs-api/src/com/intellij/vfs/AsyncVfsEventsPostProcessor.java
platform/vcs-api/vcs-api-core/src/com/intellij/lifecycle/PeriodicalTasksCloser.java
platform/vcs-impl/src/com/intellij/codeInsight/actions/VcsFacadeImpl.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/AnnotationsSettings.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/TabbedShowHistoryAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/TabbedShowHistoryForRevisionAction.java
platform/vcs-log/impl/src/com/intellij/vcs/log/data/index/VcsLogBigRepositoriesList.java
platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/WorkspaceModel.kt
platform/workspaceModel/ide/src/com/intellij/workspaceModel/ide/WorkspaceModelTopics.kt
platform/xdebugger-api/src/com/intellij/xdebugger/XDebuggerUtil.java
platform/xdebugger-api/src/com/intellij/xdebugger/settings/XDebuggerSettingsManager.java
platform/xdebugger-impl/src/com/intellij/xdebugger/memory/component/MemoryViewManager.java
plugins/IntelliLang/src/org/intellij/plugins/intelliLang/Configuration.java
plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/config/JspSupportProxy.java
plugins/IntelliLang/xml-support/org/intellij/plugins/intelliLang/inject/config/XPathSupportProxy.java
plugins/ant/src/com/intellij/lang/ant/AntDisposable.java
plugins/completion-ml-ranking/src/com/intellij/completion/ml/settings/CompletionMLRankingSettings.java
plugins/copyright/src/com/maddyhome/idea/copyright/util/FileTypeUtil.java
plugins/devkit/devkit-core/src/themes/metadata/UIThemeMetadataService.java
plugins/editorconfig/src/org/editorconfig/language/services/EditorConfigOptionDescriptorManager.kt
plugins/editorconfig/src/org/editorconfig/plugincomponents/EditorConfigNotifier.java
plugins/generate-tostring/src/org/jetbrains/java/generate/template/toString/ToStringTemplatesManager.java
plugins/git4idea/src/git4idea/DialogManager.java
plugins/git4idea/src/git4idea/commands/Git.java
plugins/git4idea/src/git4idea/commands/GitHandlerAuthenticationManager.java
plugins/git4idea/src/git4idea/config/GitExecutableManager.java
plugins/git4idea/src/git4idea/config/GitVcsApplicationSettings.java
plugins/git4idea/src/git4idea/config/SSHConnectionSettings.java
plugins/git4idea/src/git4idea/light/LightGitTracker.kt
plugins/git4idea/src/git4idea/log/GitShowExternalLogAction.kt
plugins/git4idea/src/git4idea/rebase/GitRebaseEditorService.java
plugins/git4idea/src/git4idea/remote/GitRememberedInputs.java
plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java
plugins/github/src/org/jetbrains/plugins/github/util/GithubSettings.java
plugins/google-app-engine/source/com/intellij/appengine/facet/AppEngineWebIntegration.java
plugins/google-app-engine/source/com/intellij/appengine/sdk/AppEngineSdkManager.java
plugins/gradle-dsl/src/com/android/tools/idea/gradle/dsl/api/BuildModelErrorReporter.java
plugins/gradle/java/src/config/GradleLibraryPresentationProvider.java
plugins/gradle/java/src/service/project/data/BuildClasspathModuleGradleDataService.java
plugins/gradle/java/src/service/project/wizard/GradleProjectImportBuilder.java
plugins/gradle/java/testSources/execution/build/GradleApplicationEnvironmentProviderTest.java
plugins/gradle/src/org/jetbrains/plugins/gradle/GradleIdeManager.java
plugins/gradle/src/org/jetbrains/plugins/gradle/GradleManager.java
plugins/gradle/src/org/jetbrains/plugins/gradle/service/GradleInstallationManager.java
plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/open/GradleProjectImportUtil.kt
plugins/gradle/src/org/jetbrains/plugins/gradle/settings/GradleSystemSettings.java
plugins/gradle/testSources/org/jetbrains/plugins/gradle/importing/GradleDependenciesImportingTest.java
plugins/gradle/testSources/org/jetbrains/plugins/gradle/importing/GradleEnvironmentTest.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/codeInspection/GroovyQuickFixFactory.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/dsl/DslActivationStatus.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/dsl/DslErrorReporter.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/settings/GroovyApplicationSettings.java
plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcRunTargetHistoryService.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/GroovyRefactoringSettings.java
plugins/hg4idea/src/org/zmlx/hg4idea/HgExecutableManager.java
plugins/hg4idea/src/org/zmlx/hg4idea/HgRememberedInputs.java
plugins/hg4idea/src/org/zmlx/hg4idea/ui/HgCloneDialog.java
plugins/java-i18n/src/com/intellij/lang/properties/PropertiesFoldingSettings.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/JavaFxSettings.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokBuilderAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokConstructorAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokDataAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokDelegateAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokEqualsAndHashCodeAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokEverythingAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokFieldNameConstantsAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokGetterAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokLoggerAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokSetterAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokSuperBuilderAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokToStringAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokUtilityClassAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokValueAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/delombok/DelombokWitherAction.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/action/lombok/LombokLoggerHandler.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/inspection/LombokInspection.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigDiscovery.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/LombokProcessorManager.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/DataProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/EqualsAndHashCodeProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/GetterProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/SetterProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/ToStringProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/ValueProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/WitherProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/BuilderClassProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/BuilderPreDefinedInnerClassFieldProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/BuilderPreDefinedInnerClassMethodProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/BuilderProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/SuperBuilderClassProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/SuperBuilderPreDefinedInnerClassFieldProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/SuperBuilderPreDefinedInnerClassMethodProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/builder/SuperBuilderProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/clazz/fieldnameconstants/FieldNameConstantsOldProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/field/DelegateFieldProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/field/WitherFieldProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/handler/BuilderHandler.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/method/BuilderClassMethodProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/method/BuilderMethodProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/method/DelegateMethodProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/processor/modifier/FieldDefaultsModifierProcessor.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/provider/LombokAugmentProvider.java
plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/settings/LombokSettings.java
plugins/markdown/src/org/intellij/plugins/markdown/settings/MarkdownApplicationSettings.java
plugins/markdown/src/org/intellij/plugins/markdown/ui/preview/html/MarkdownCodeFencePluginCache.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/MavenDomConvertersRegistry.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/converters/repositories/MavenRepositoriesProvider.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/indices/MavenIndicesManager.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/navigator/MavenProjectsNavigator.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/project/MavenProjectsManager.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenServerManager.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenWrapperSupport.kt
plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesQuickFixFactory.java
plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/refactoring/PropertiesRefactoringSettings.java
plugins/space/src/main/kotlin/com/intellij/space/settings/SpaceSettings.kt
plugins/stats-collector/src/com/intellij/stats/completion/tracker/CompletionLogger.kt
plugins/svn4idea/src/org/jetbrains/idea/svn/SvnApplicationSettings.java
plugins/svn4idea/src/org/jetbrains/idea/svn/branchConfig/SvnBranchMapperManager.java
plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/CacheLoader.java
plugins/tasks/tasks-api/src/com/intellij/tasks/config/TaskSettings.java
plugins/tasks/tasks-core/src/com/intellij/tasks/config/RecentTaskRepositories.java
plugins/terminal/src/org/jetbrains/plugins/terminal/TerminalOptionsProvider.kt
plugins/textmate/src/org/jetbrains/plugins/textmate/TextMateService.java
plugins/ui-designer/src/com/intellij/uiDesigner/Properties.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/XsltConfig.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/psi/XsltElementFactory.java
plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/XPathAppComponent.java
plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/support/XPathSupport.java
plugins/yaml/src/org/jetbrains/yaml/smart/YAMLEditorOptions.java
python/ide/impl/src/com/jetbrains/python/newProject/welcome/PyWelcomeSettings.kt
python/openapi/src/com/jetbrains/python/PyDisposable.java
python/openapi/src/com/jetbrains/python/module/PyModuleService.java
python/openapi/src/com/jetbrains/python/run/PyRunConfigurationFactory.java
python/python-psi-impl/src/com/jetbrains/python/PythonCodeStyleService.java
python/python-psi-impl/src/com/jetbrains/python/PythonRuntimeService.java
python/python-psi-impl/src/com/jetbrains/python/PythonUiService.java
python/python-psi-impl/src/com/jetbrains/python/codeInsight/PyCodeInsightSettings.java
python/python-psi-impl/src/com/jetbrains/python/documentation/PythonDocumentationMap.java
python/python-sdk/src/com/jetbrains/python/packaging/PyCondaPackageService.java
python/rest/src/com/jetbrains/rest/editor/RestSettings.java
python/src/com/jetbrains/python/PythonFoldingSettings.java
python/src/com/jetbrains/python/codeInsight/typing/PyStubPackagesAdvertiser.kt
python/src/com/jetbrains/python/codeInsight/typing/PyStubPackagesLoader.kt
python/src/com/jetbrains/python/packaging/PyPackageService.java
python/src/com/jetbrains/python/run/PyCommonOptionsFormFactory.java
python/src/com/jetbrains/python/sdk/PySdkSettings.kt
python/src/com/jetbrains/python/testing/PyTestFrameworkService.java
spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
xml/dom-impl/src/com/intellij/util/xml/impl/DomApplicationComponent.java
xml/dom-impl/src/com/intellij/util/xml/impl/DomManagerImpl.java
xml/dom-openapi/src/com/intellij/util/xml/DomService.java
xml/dom-openapi/src/com/intellij/util/xml/ui/DomUIFactory.java
xml/impl/src/com/intellij/application/options/XmlSettings.java
xml/impl/src/com/intellij/application/options/emmet/EmmetOptions.java
xml/xml-analysis-api/src/com/intellij/codeInspection/XmlQuickFixFactory.java
xml/xml-psi-impl/src/com/intellij/application/options/editor/XmlFoldingSettings.java
xml/xml-psi-impl/src/com/intellij/xml/Html5SchemaProvider.java
xml/xml-psi-impl/src/com/intellij/xml/impl/NamedReferenceProviders.java

index 2f386a87e6cbb54b4d2475828ab28a0a92dfdc7e..561491c77ec56008bcd15dd6ff1a094d058f93d5 100644 (file)
@@ -8,7 +8,7 @@ import com.intellij.ide.IdeBundle;
 import com.intellij.ide.util.PropertiesComponent;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.actionSystem.*;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.editor.colors.EditorColorsManager;
 import com.intellij.openapi.editor.colors.EditorColorsScheme;
 import com.intellij.openapi.fileChooser.FileChooserDescriptor;
@@ -150,7 +150,7 @@ public class BackgroundImageDialog extends DialogWrapper {
 
   @NotNull
   private static JComponent createFramePreview() {
-    EditorEmptyTextPainter painter = ServiceManager.getService(EditorEmptyTextPainter.class);
+    EditorEmptyTextPainter painter = ApplicationManager.getApplication().getService(EditorEmptyTextPainter.class);
     JBPanelWithEmptyText panel = new JBPanelWithEmptyText() {
       @Override
       protected void paintComponent(Graphics g) {
index bb5bf468362ddfebcec7db66b55b184654bbe2d3..3623ddbbe9bd98bd6ab5ccfc26612752f2c5e9e0 100644 (file)
  */
 package org.intellij.images.fileTypes;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class ImageFileTypeManager {
   public static ImageFileTypeManager getInstance() {
-    return ServiceManager.getService(ImageFileTypeManager.class);
+    return ApplicationManager.getApplication().getService(ImageFileTypeManager.class);
   }
 
   public abstract boolean isImage(@NotNull VirtualFile file);
index 3232bd47461d703850bca35366a43eec3106cc5e..ee273fce246d03fd7c71660ae56a46bc6aa92942 100644 (file)
@@ -15,7 +15,7 @@
  */
 package org.intellij.images.options;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 /**
  * Options manager.
@@ -31,6 +31,6 @@ public abstract class OptionsManager {
     public abstract Options getOptions();
 
     public static OptionsManager getInstance() {
-        return ServiceManager.getService(OptionsManager.class);
+      return ApplicationManager.getApplication().getService(OptionsManager.class);
     }
 }
index 1a7761a740a22c35342edc142c720fcf87c970fa..2dc3b641b441263f2731112629f8cf8902aa661d 100644 (file)
@@ -25,7 +25,6 @@ import com.intellij.openapi.Disposable;
 import com.intellij.openapi.actionSystem.CommonDataKeys;
 import com.intellij.openapi.application.*;
 import com.intellij.openapi.compiler.*;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.event.DocumentEvent;
@@ -390,7 +389,7 @@ public final class BuildManager implements Disposable {
   }
 
   public static BuildManager getInstance() {
-    return ServiceManager.getService(BuildManager.class);
+    return ApplicationManager.getApplication().getService(BuildManager.class);
   }
 
   public void notifyFilesChanged(final Collection<? extends File> paths) {
index 2f421cb868831963489b05d40df5b4f51c8df1e5..40ba22358b4cbce015404bab3183b56bd12487be 100644 (file)
@@ -1,23 +1,9 @@
-/*
- * Copyright 2000-2010 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.packaging.impl.artifacts;
 
 import com.intellij.icons.AllIcons;
 import com.intellij.ide.IdeBundle;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.packaging.artifacts.ArtifactType;
 import com.intellij.packaging.elements.CompositePackagingElement;
 import com.intellij.packaging.elements.PackagingElementFactory;
@@ -29,7 +15,7 @@ import javax.swing.*;
 public class InvalidArtifactType extends ArtifactType {
 
   public static InvalidArtifactType getInstance() {
-    return ServiceManager.getService(InvalidArtifactType.class);
+    return ApplicationManager.getApplication().getService(InvalidArtifactType.class);
   }
 
   public InvalidArtifactType() {
index 44ad9e0334b53e90d451a5f060d83f992f2c943b..52fcfb70b82287e01bd9b0364e19bdffd1074977 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.deployment;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.util.descriptors.ConfigFile;
 import org.jetbrains.annotations.Nls;
@@ -26,7 +12,7 @@ import java.io.File;
 
 public abstract class DeploymentUtil {
   public static DeploymentUtil getInstance() {
-    return ServiceManager.getService(DeploymentUtil.class);
+    return ApplicationManager.getApplication().getService(DeploymentUtil.class);
   }
 
   public static String trimForwardSlashes(@NotNull String path) {
index 073c36ce1001452dae6547b913214d8ae5895f27..f1666befed8553ae40c3fbe712142d430480ebaf 100644 (file)
@@ -1,28 +1,13 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.packaging.artifacts;
 
 import com.intellij.openapi.project.Project;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.util.NlsSafe;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class ArtifactPointerManager {
   public static ArtifactPointerManager getInstance(@NotNull Project project) {
-    return ServiceManager.getService(project, ArtifactPointerManager.class);
+    return project.getService(ArtifactPointerManager.class);
   }
 
   public abstract ArtifactPointer createPointer(@NotNull @NlsSafe String name);
index 011bc3e796013de499a78dac8c4b184e27bb96d6..967e124d14bf1a51c37d0bef60d2d108040f9bc3 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.packaging.elements;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.libraries.Library;
@@ -31,7 +17,7 @@ import java.util.List;
 public abstract class PackagingElementFactory {
 
   public static PackagingElementFactory getInstance() {
-    return ServiceManager.getService(PackagingElementFactory.class);
+    return ApplicationManager.getApplication().getService(PackagingElementFactory.class);
   }
 
   @NotNull
@@ -83,10 +69,10 @@ public abstract class PackagingElementFactory {
   @NotNull
   public abstract PackagingElement<?> createFileCopyWithParentDirectories(@NotNull @NonNls String filePath, @NotNull @NonNls String relativeOutputPath,
                                                                           @Nullable @NonNls String outputFileName);
-  
+
   @NotNull
   public abstract PackagingElement<?> createFileCopyWithParentDirectories(@NotNull @NonNls String filePath, @NotNull @NonNls String relativeOutputPath);
-  
+
 
   @NotNull
   public abstract CompositePackagingElement<?> getOrCreateDirectory(@NotNull CompositePackagingElement<?> parent, @NotNull @NonNls String relativePath);
index 842c395b7e122553532b4456c7e6bd61886099e6..063e0e53e97eb20bebfef6fca1fac3ba001060fb 100644 (file)
@@ -6,7 +6,6 @@ import com.intellij.debugger.impl.DebuggerUtilsEx;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.openapi.diagnostic.Logger;
@@ -112,7 +111,7 @@ public class DebuggerSettings implements Cloneable, PersistentStateComponent<Ele
   }
 
   public static DebuggerSettings getInstance() {
-    return ServiceManager.getService(DebuggerSettings.class);
+    return ApplicationManager.getApplication().getService(DebuggerSettings.class);
   }
 
   public void setSteppingFilters(ClassFilter[] steppingFilters) {
index 90b3e900b75861727b1904f93b2e207f8ca94f53..145fa71577b47a7b6a061ec9120de787dbc5b4f7 100644 (file)
@@ -18,9 +18,9 @@ import com.intellij.debugger.ui.tree.ValueDescriptor;
 import com.intellij.debugger.ui.tree.render.*;
 import com.intellij.ide.highlighter.JavaFileType;
 import com.intellij.openapi.Disposable;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ReadAction;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.openapi.diagnostic.Logger;
@@ -99,7 +99,7 @@ public class NodeRendererSettings implements PersistentStateComponent<Element> {
   }
 
   public static NodeRendererSettings getInstance() {
-    return ServiceManager.getService(NodeRendererSettings.class);
+    return ApplicationManager.getApplication().getService(NodeRendererSettings.class);
   }
 
   public void setAlternateCollectionViewsEnabled(boolean enabled) {
index 5350d6591de393597a5b886820b696c2f01cf94e..991fe200815e73ddabba30cb420631d9717d2714 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.debugger.settings;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -20,8 +20,8 @@ public final class ThreadsViewSettings implements PersistentStateComponent<Threa
   public boolean SHOW_ARGUMENTS_TYPES = false;
 
   public static ThreadsViewSettings getInstance() {
-    return ServiceManager.getService(ThreadsViewSettings.class);
- }
+    return ApplicationManager.getApplication().getService(ThreadsViewSettings.class);
 }
 
   @Override
   public ThreadsViewSettings getState() {
index bb163005be1a55baab4ea24cf52d97766cf13161..8c5ea1d6976c5084a070ec5472e23e774747312a 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.debugger.settings;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.ui.classFilter.ClassFilter;
@@ -46,7 +46,7 @@ public class TraceSettings implements PersistentStateComponent<TraceSettings> {
   }
 
   public static TraceSettings getInstance() {
-    return ServiceManager.getService(TraceSettings.class);
+    return ApplicationManager.getApplication().getService(TraceSettings.class);
   }
 
   @Override
index 1eb50ad726dc75b5ef64d6bd3c9c46ad8e63cb86..94f65ecccd530292bef4daa084e7e23faf2d8ef0 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.debugger.settings;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -17,7 +17,7 @@ public final class ViewsGeneralSettings implements PersistentStateComponent<View
   public boolean POPULATE_THROWABLE_STACKTRACE = true;
 
   public static ViewsGeneralSettings getInstance() {
-    return ServiceManager.getService(ViewsGeneralSettings.class);
+    return ApplicationManager.getApplication().getService(ViewsGeneralSettings.class);
   }
 
   @Override
index f3e93397254e50dd05c17adc6009a7dfb321df71..b7604b238fab40c3062d06a35d6e70ce6cb62492 100644 (file)
@@ -10,7 +10,6 @@ import com.intellij.debugger.engine.evaluation.TextWithImports;
 import com.intellij.execution.ExecutionException;
 import com.intellij.openapi.actionSystem.DataContext;
 import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.fileTypes.LanguageFileType;
@@ -593,7 +592,7 @@ public abstract class DebuggerUtils {
   }
 
   public static DebuggerUtils getInstance() {
-    return ServiceManager.getService(DebuggerUtils.class);
+    return ApplicationManager.getApplication().getService(DebuggerUtils.class);
   }
 
   public abstract PsiExpression substituteThis(PsiExpression expressionWithThis, PsiExpression howToEvaluateThis, Value howToEvaluateThisValue, StackFrameContext context) throws EvaluateException;
index 0b57d6278b84927c9040825b4ebc54c5e902b0a9..13d57339a2d11944cf55b9db4882da505a334d78 100644 (file)
@@ -1,29 +1,15 @@
-/*
- * Copyright 2000-2016 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.execution.runners;
 
 import com.intellij.execution.ExecutionException;
 import com.intellij.execution.configurations.JavaCommandLine;
 import com.intellij.execution.process.ProcessHandler;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.Nullable;
 
 public abstract class ProcessProxyFactory {
   public static ProcessProxyFactory getInstance() {
-    return ServiceManager.getService(ProcessProxyFactory.class);
+    return ApplicationManager.getApplication().getService(ProcessProxyFactory.class);
   }
 
   @Nullable
index ad0f4ba441dc86eb928c0cdada8f8809fe995e39..105c440506963b19e52cb23c6b841dc4d0575faf 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2011 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.framework.library;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.roots.libraries.ui.LibraryEditorComponent;
 import com.intellij.openapi.roots.libraries.ui.LibraryPropertiesEditor;
 import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription;
@@ -25,7 +11,7 @@ import java.net.URL;
 
 public abstract class DownloadableLibraryService {
   public static DownloadableLibraryService getInstance() {
-    return ServiceManager.getService(DownloadableLibraryService.class);
+    return ApplicationManager.getApplication().getService(DownloadableLibraryService.class);
   }
 
   @NotNull
index 5406d91c2407c0df023dbbeedc06885db2f732df..2e51d1a3da9bb773253b6483097d685d2313d5b7 100644 (file)
@@ -1,6 +1,7 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide.util.newProjectWizard;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.*;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -17,7 +18,7 @@ public class SelectTemplateSettings implements PersistentStateComponent<SelectTe
   public String LAST_TEMPLATE = null;
 
   public static SelectTemplateSettings getInstance() {
-    return ServiceManager.getService(SelectTemplateSettings.class);
+    return ApplicationManager.getApplication().getService(SelectTemplateSettings.class);
   }
 
   @Nullable
index f92aba9ff15a7abebbd8544126b4fd8f510dde02..d97c71b42e616f74da4b11428071177799120db5 100644 (file)
@@ -7,7 +7,6 @@ import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.application.PathManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.externalSystem.importing.ImportSpecBuilder;
 import com.intellij.openapi.externalSystem.model.DataNode;
@@ -261,7 +260,7 @@ public abstract class AbstractExternalProjectImportBuilder<C extends AbstractImp
         if (externalProject == null) {
           return;
         }
-        ServiceManager.getService(ProjectDataManager.class).importData(externalProject, project, false);
+        ApplicationManager.getApplication().getService(ProjectDataManager.class).importData(externalProject, project, false);
       }
     };
   }
index 72c268fb9387850ea9638d1433931547249194d4..d41ad72fe040db535e9a28d6365babeffde5278d 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2012 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.ui.configuration.libraries;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.libraries.Library;
 import com.intellij.openapi.roots.libraries.LibraryKind;
@@ -33,7 +19,7 @@ import java.util.Set;
 
 public abstract class LibraryPresentationManager {
   public static LibraryPresentationManager getInstance() {
-    return ServiceManager.getService(LibraryPresentationManager.class);
+    return ApplicationManager.getApplication().getService(LibraryPresentationManager.class);
   }
 
   @NotNull
index 534bff07ce0fd5e449aa55ec254c08914a63598f..395fd259f3fa3c59bdcd39686d5c5e51b521480e 100644 (file)
@@ -1,20 +1,7 @@
-/*
- * Copyright 2000-2011 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.ui.configuration.projectRoot.daemon;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NotNull;
@@ -25,7 +12,7 @@ public abstract class ProjectStructureProblemsSettings {
   }
 
   public static ProjectStructureProblemsSettings getGlobalInstance() {
-    return ServiceManager.getService(ProjectStructureProblemsSettings.class);
+    return ApplicationManager.getApplication().getService(ProjectStructureProblemsSettings.class);
   }
 
   public abstract boolean isIgnored(@NotNull ProjectStructureProblemDescription description);
index 6ab57c0349d39612414df7c0a7bde91a8ea44b02..156d723e10510809d725a67a49f2da254b25559b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.intention;
 
 import com.intellij.codeInsight.daemon.QuickFixActionRegistrar;
@@ -6,7 +6,7 @@ import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.LocalQuickFixAndIntentionActionOnPsiElement;
 import com.intellij.codeInspection.LocalQuickFixOnPsiElement;
 import com.intellij.lang.jvm.actions.JvmElementActionsFactory;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.pom.java.LanguageLevel;
@@ -24,7 +24,7 @@ import java.util.Set;
 
 public abstract class QuickFixFactory {
   public static QuickFixFactory getInstance() {
-    return ServiceManager.getService(QuickFixFactory.class);
+    return ApplicationManager.getApplication().getService(QuickFixFactory.class);
   }
 
   /**
index 04f5d9affc9c21589d31aa9b4293586a3296477d..2f12821edb2abad32b73f260b195f427705798e2 100644 (file)
@@ -2,7 +2,7 @@
 package com.intellij.codeInspection;
 
 import com.intellij.codeInsight.daemon.HighlightDisplayKey;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiDocCommentOwner;
 import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.NotNull;
@@ -13,7 +13,7 @@ public interface BatchSuppressManager {
 
   final class SERVICE {
     public static BatchSuppressManager getInstance() {
-      return ServiceManager.getService(BatchSuppressManager.class);
+      return ApplicationManager.getApplication().getService(BatchSuppressManager.class);
     }
   }
   SuppressQuickFix @NotNull [] createBatchSuppressActions(@NotNull HighlightDisplayKey key);
index 0b2daa4acc21a3ea7c8dc9e9a699158f9a780f48..a9cfb7a6d1d0030f15776b1fc1724c8c6a75ff63 100644 (file)
@@ -1,23 +1,9 @@
-/*
- * Copyright 2000-2014 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.codeInspection;
 
 import com.intellij.codeInsight.daemon.HighlightDisplayKey;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.*;
 import com.intellij.psi.util.PsiTreeUtil;
 import org.jetbrains.annotations.NotNull;
@@ -25,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
 public abstract class SuppressManager implements BatchSuppressManager, InspectionSuppressor {
 
   public static SuppressManager getInstance() {
-    return ServiceManager.getService(SuppressManager.class);
+    return ApplicationManager.getApplication().getService(SuppressManager.class);
   }
 
   public static boolean isSuppressedInspectionName(PsiLiteralExpression expression) {
index b50965b633aeb2a8d6a6c215416095a5dcbdace7..d50743c4d41294eb64c3e6a26f4470ec6eb6569a 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.codeInspection.reference;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.*;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -68,7 +68,7 @@ public abstract class RefJavaUtil {
   }
 
   public static RefJavaUtil getInstance() {
-    return ServiceManager.getService(RefJavaUtil.class);
+    return ApplicationManager.getApplication().getService(RefJavaUtil.class);
   }
 
   public boolean isCallToSuperMethod(UExpression expression, UMethod method) {
index b8271e383726cc63143bfaafe920350f3a8f3e97..baff64dcb109a4993b585ad9b0b9eb4b1a23caad 100644 (file)
@@ -15,8 +15,8 @@
  */
 package org.jetbrains.java.generate;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import org.jetbrains.annotations.NotNull;
@@ -28,7 +28,7 @@ import org.jetbrains.java.generate.config.Config;
 @State(name = "ToStringSettings", storages = @Storage("other.xml"))
 public class GenerateToStringContext implements PersistentStateComponent<Config> {
     public static GenerateToStringContext getInstance() {
-        return ServiceManager.getService(GenerateToStringContext.class);
+      return ApplicationManager.getApplication().getService(GenerateToStringContext.class);
     }
 
     private Config config = new Config();
index 5143e2de79b3bc32f30b342bc8babe72ed6ff62a..662b934976b1229e460f0199486a9e3fb823ce63 100644 (file)
@@ -17,7 +17,7 @@ package org.jetbrains.java.generate.inspection;
 
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ProblemDescriptor;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.util.PsiTreeUtil;
@@ -56,7 +56,7 @@ public final class GenerateToStringQuickFix implements LocalQuickFix {
     if (clazz == null) {
       return; // no class to fix
     }
-    GenerateToStringActionHandler handler = ServiceManager.getService(GenerateToStringActionHandler.class);
+    GenerateToStringActionHandler handler = ApplicationManager.getApplication().getService(GenerateToStringActionHandler.class);
     handler.executeActionQuickFix(project, clazz);
   }
 
index 599f55339466311b3818853177c596a2f6b78071..16130893fa933f0f706cf9868d5870f230cebfb2 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.generation;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.openapi.util.Couple;
@@ -50,7 +50,7 @@ public final class EqualsHashCodeTemplatesManager extends TemplatesManager {
 
 
   public static EqualsHashCodeTemplatesManager getInstance() {
-    return ServiceManager.getService(EqualsHashCodeTemplatesManager.class);
+    return ApplicationManager.getApplication().getService(EqualsHashCodeTemplatesManager.class);
   }
 
   @Override
index e002e9a70ff4901081f3165875d422f8661d81b1..c83a47f7d476775a80238ed3b3dcb020506a75cb 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.generation;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import org.jetbrains.annotations.NotNull;
@@ -18,7 +18,7 @@ public final class GetterTemplatesManager extends TemplatesManager {
   private static final String DEFAULT = "defaultGetter.vm";
 
   public static GetterTemplatesManager getInstance() {
-    return ServiceManager.getService(GetterTemplatesManager.class);
+    return ApplicationManager.getApplication().getService(GetterTemplatesManager.class);
   }
 
   @Override
index d1369dac7ddcdb73bea4b10eff8bc57a32122900..0a8c87dbd9c6d9171d1a002ac13f6ce9fadaa23b 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.generation;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import org.jetbrains.annotations.NotNull;
@@ -19,7 +19,7 @@ public final class SetterTemplatesManager extends TemplatesManager {
   private static final String BUILDER = "builderSetter.vm";
 
   public static TemplatesManager getInstance() {
-    return ServiceManager.getService(SetterTemplatesManager.class);
+    return ApplicationManager.getApplication().getService(SetterTemplatesManager.class);
   }
 
   @Override
index cd4df67b181559cc87b171045cd89537114d82f5..7ab6f4b1aa0bc792cf8939f5c69a009ff3413fa5 100644 (file)
@@ -1,28 +1,14 @@
-/*
- * Copyright 2000-2016 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.javadoc;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.NotNull;
 
 public class JavaDocInfoGeneratorFactory {
   public static JavaDocInfoGeneratorFactory getInstance() {
-    return ServiceManager.getService(JavaDocInfoGeneratorFactory.class);
+    return ApplicationManager.getApplication().getService(JavaDocInfoGeneratorFactory.class);
   }
 
   protected JavaDocInfoGenerator createImpl(Project project, PsiElement element) {
index c4f75527104ea6d5d6d920213132e322f921e421..dd49769df58ab8e678bf139fefe24df7f2d640ca 100644 (file)
@@ -1,10 +1,9 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.projectRoots.impl;
 
 import com.intellij.ide.util.PropertiesComponent;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.WriteAction;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.projectRoots.*;
 import com.intellij.util.SystemProperties;
 import com.intellij.util.lang.JavaVersion;
@@ -20,7 +19,7 @@ public final class JavaAwareProjectJdkTableImpl extends ProjectJdkTableImpl {
   private static final String DEFAULT_JDK_CONFIGURED = "defaultJdkConfigured";
 
   public static JavaAwareProjectJdkTableImpl getInstanceEx() {
-    return (JavaAwareProjectJdkTableImpl)ServiceManager.getService(ProjectJdkTable.class);
+    return (JavaAwareProjectJdkTableImpl)ApplicationManager.getApplication().getService(ProjectJdkTable.class);
   }
 
   private Sdk myInternalJdk;
@@ -36,7 +35,7 @@ public final class JavaAwareProjectJdkTableImpl extends ProjectJdkTableImpl {
     JavaSdk javaSdk = JavaSdk.getInstance();
     List<Sdk> jdks = getSdksOfType(javaSdk);
     if (jdks.isEmpty()) {
-      String homePath = ServiceManager.getService(DefaultJdkConfigurator.class).guessJavaHome(); 
+      String homePath = ApplicationManager.getApplication().getService(DefaultJdkConfigurator.class).guessJavaHome();
       if (homePath != null && javaSdk.isValidSdkHome(homePath)) {
         String suggestedName = JdkUtil.suggestJdkName(javaSdk.getVersionString(homePath));
         if (suggestedName != null) {
index 06a5b9394f59ecd8c419c4d390587a5e574900fa..31ebe54bfc5d5d33267e8e8e2f7bb73446916445 100644 (file)
@@ -1,18 +1,4 @@
-/*
- * Copyright 2000-2017 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.impl;
 
 import com.intellij.openapi.project.Project;
@@ -134,10 +120,10 @@ public class LanguageLevelProjectExtensionImpl extends LanguageLevelProjectExten
     setDefault(null);
   }
 
-  public static class MyProjectExtension extends ProjectExtension {
+  static final class MyProjectExtension extends ProjectExtension {
     private final LanguageLevelProjectExtensionImpl myInstance;
 
-    public MyProjectExtension(final Project project) {
+    MyProjectExtension(@NotNull Project project) {
       myInstance = ((LanguageLevelProjectExtensionImpl)getInstance(project));
     }
 
index ebf9fa32e24801963a78ec726bd001cab3838d3d..91220b88df5f0e2ad5439f4ab60107d7ce69a465 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.pom.java;
 
 import com.intellij.ide.IdeBundle;
@@ -10,7 +10,6 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.WriteAction;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.openapi.module.Module;
@@ -163,7 +162,7 @@ public class AcceptedLanguageLevelsSettings implements PersistentStateComponent<
   }
 
   private static AcceptedLanguageLevelsSettings getSettings() {
-    return ServiceManager.getService(AcceptedLanguageLevelsSettings.class);
+    return ApplicationManager.getApplication().getService(AcceptedLanguageLevelsSettings.class);
   }
 
   @Nullable
index 2e711395f7dd987c62a5a75621b70e4d95ebc9cb..64345be453bcb2b34551daf175134282a0b6bbc5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.impl;
 
 import com.intellij.application.options.CodeStyle;
@@ -7,7 +7,7 @@ import com.intellij.ide.fileTemplates.FileTemplateManager;
 import com.intellij.ide.fileTemplates.JavaTemplateUtil;
 import com.intellij.lang.ASTNode;
 import com.intellij.lang.java.JavaLanguage;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.fileTypes.FileTypeRegistry;
 import com.intellij.openapi.fileTypes.StdFileTypes;
@@ -248,7 +248,7 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper
   @Override
   public PsiElement getDefaultMemberAnchor(@NotNull PsiClass aClass, @NotNull PsiMember member) {
     CodeStyleSettings settings = CodeStyle.getSettings(aClass.getContainingFile());
-    MemberOrderService service = ServiceManager.getService(MemberOrderService.class);
+    MemberOrderService service = ApplicationManager.getApplication().getService(MemberOrderService.class);
     PsiElement anchor = service.getAnchor(member, settings.getCommonSettings(JavaLanguage.INSTANCE), aClass);
 
     PsiElement newAnchor = skipWhitespaces(aClass, anchor);
index 875f9d2517509373d8ff0a3e4ce93656e8f320ed..27624bf8e27ecdb328be493234d72893e1e77784 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.refactoring;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -86,7 +86,7 @@ public class JavaRefactoringSettings implements PersistentStateComponent<JavaRef
   @SuppressWarnings({"WeakerAccess"}) public boolean RENAME_OVERLOADS = true;
 
   public static JavaRefactoringSettings getInstance() {
-    return ServiceManager.getService(JavaRefactoringSettings.class);
+    return ApplicationManager.getApplication().getService(JavaRefactoringSettings.class);
   }
 
   public boolean isToRenameInheritors() {
index 0905958d11bdc727f3a864ab96760fe7d92ccd94..f39d0f8293d77f93791a00e0bd0cdd4aaabd3ab3 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.PsiMethod;
 import com.intellij.psi.util.CachedValueProvider;
@@ -19,7 +19,7 @@ import java.util.Set;
  */
 public abstract class TestFrameworks {
   public static TestFrameworks getInstance() {
-    return ServiceManager.getService(TestFrameworks.class);
+    return ApplicationManager.getApplication().getService(TestFrameworks.class);
   }
 
   public abstract boolean isTestClass(PsiClass psiClass);
index 48cb43b9bad650de5023d8fdc6c8cd3284d9f7c9..bcbfa5ce6a07c95a9fe9cf3514f7fe79ab687553 100644 (file)
@@ -1,27 +1,13 @@
-/*
- * Copyright 2000-2017 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.codeInsight.folding;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 public abstract class JavaCodeFoldingSettings {
 
   public static JavaCodeFoldingSettings getInstance() {
-    return ServiceManager.getService(JavaCodeFoldingSettings.class);
+    return ApplicationManager.getApplication().getService(JavaCodeFoldingSettings.class);
   }
 
   public abstract boolean isCollapseImports();
index dfb68085c234efb3d821cc0628300b358065a41e..8ec1a8fa0af89f0c547e51ba419c1ad2b60e40dc 100644 (file)
@@ -1,25 +1,11 @@
-/*
- * Copyright 2000-2012 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 /*
  * @author max
  */
 package com.intellij.openapi.projectRoots;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.util.PsiUtil;
 import org.jetbrains.annotations.NotNull;
@@ -27,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
 
 public class JavaVersionService {
   public static JavaVersionService getInstance() {
-    return ServiceManager.getService(JavaVersionService.class);
+    return ApplicationManager.getApplication().getService(JavaVersionService.class);
   }
 
   public boolean isAtLeast(@NotNull PsiElement element, @NotNull JavaSdkVersion version) {
index c3ebf4d079932272c40e485fb6f267b0e76f8e4c..efd660b5301718696720308be782a863872156f4 100644 (file)
@@ -1,21 +1,6 @@
-/*
- * Copyright 2000-2017 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots;
 
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.pom.java.LanguageLevel;
 import org.jetbrains.annotations.NotNull;
@@ -26,7 +11,7 @@ import org.jetbrains.annotations.Nullable;
  */
 public abstract class LanguageLevelProjectExtension {
   public static LanguageLevelProjectExtension getInstance(Project project) {
-    return ServiceManager.getService(project, LanguageLevelProjectExtension.class);
+    return project.getService(LanguageLevelProjectExtension.class);
   }
 
   @NotNull
index ccb97707f3f78a6d093720bf8d0d87957be992d5..3264504845103346b89859f5ea2741246b49481f 100644 (file)
@@ -1,25 +1,11 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 /*
  * @author max
  */
 package com.intellij.psi;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.pom.java.LanguageLevel;
 import com.intellij.util.IncorrectOperationException;
 import org.jetbrains.annotations.NotNull;
@@ -29,7 +15,7 @@ import java.util.Map;
 
 public abstract class JavaDirectoryService {
   public static JavaDirectoryService getInstance() {
-    return ServiceManager.getService(JavaDirectoryService.class);
+    return ApplicationManager.getApplication().getService(JavaDirectoryService.class);
   }
 
   /**
index d6dfd884603b7f57c12207cf281c74f041428d82..701f478da9e5e964d7e02a041548643b30c6d3df 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
 
@@ -16,6 +16,6 @@ public abstract class PsiSubstitutorFactory {
   protected abstract @NotNull PsiSubstitutor createSubstitutor(@NotNull Map<? extends PsiTypeParameter, ? extends PsiType> map);
 
   static PsiSubstitutorFactory getInstance() {
-    return ServiceManager.getService(PsiSubstitutorFactory.class);
+    return ApplicationManager.getApplication().getService(PsiSubstitutorFactory.class);
   }
 }
index a36854c800af66864467dd3bae405696919515fc..98dcf195bf6482169f6a87d5fde7d9c7cf4d5307 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.util;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiClass;
 import com.intellij.psi.PsiSubstitutor;
 import com.intellij.psi.search.GlobalSearchScope;
@@ -28,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
 public abstract class JavaClassSupers {
 
   public static JavaClassSupers getInstance() {
-    return ServiceManager.getService(JavaClassSupers.class);
+    return ApplicationManager.getApplication().getService(JavaClassSupers.class);
   }
 
   /**
index 4a529930eec5d80f757cea9c0bd6c3eb9979f4ac..4c8a5badf8c5e726d8f5bf867393cff5aeaaeb00 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.generation;
 
 import com.intellij.codeInsight.MemberImplementorExplorer;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.NullableLazyValue;
 import com.intellij.openapi.util.VolatileNullableLazyValue;
 import com.intellij.openapi.util.text.StringUtil;
@@ -128,7 +128,7 @@ public class OverrideImplementExploreUtil {
   private static final NullableLazyValue<MemberImplementorExplorersProvider> ourExplorersProvider = new VolatileNullableLazyValue<MemberImplementorExplorersProvider>() {
     @Override
     protected MemberImplementorExplorersProvider compute() {
-      return ServiceManager.getService(MemberImplementorExplorersProvider.class);
+      return ApplicationManager.getApplication().getService(MemberImplementorExplorersProvider.class);
     }
   };
 
index 8603b26f8888509814820fafc03332e400e208aa..6e8c6914a2b78d6cd652b6cb989e1974f7b5ae90 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 /**
  * @author peter
@@ -9,7 +9,7 @@ import com.intellij.openapi.components.ServiceManager;
 public abstract class CommonReferenceProviderTypes {
 
   public static CommonReferenceProviderTypes getInstance() {
-    return ServiceManager.getService(CommonReferenceProviderTypes.class);
+    return ApplicationManager.getApplication().getService(CommonReferenceProviderTypes.class);
   }
 
   public static final ReferenceProviderType PROPERTIES_FILE_KEY_PROVIDER = new ReferenceProviderType("Properties File Key Provider");
index 911e724c8327b4c97c4c306b52332755fd35fa78..8fb284ec4c3aa5bda6c528bfd5849827c90cdfa3 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2014 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.impl.file;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiPackage;
 import com.intellij.psi.search.GlobalSearchScope;
@@ -39,6 +25,6 @@ public abstract class PsiPackageImplementationHelper {
   public abstract Object @NotNull [] getDirectoryCachedValueDependencies(@NotNull PsiPackage cachedValueProvider);
 
   public static PsiPackageImplementationHelper getInstance() {
-    return ServiceManager.getService(PsiPackageImplementationHelper.class);
+    return ApplicationManager.getApplication().getService(PsiPackageImplementationHelper.class);
   }
 }
index 8e1eeb75ac279314691df6669332f7b17783da3e..78dc99dcb8d47ed75f25ebe2fe17cd5fcf1c6b85 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.impl.source.tree;
 
 import com.intellij.lang.ASTFactory;
 import com.intellij.lang.DefaultASTFactory;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.JavaTokenType;
 import com.intellij.psi.impl.source.javadoc.PsiDocTagValueImpl;
 import com.intellij.psi.impl.source.javadoc.PsiDocTokenImpl;
@@ -19,7 +19,7 @@ import org.jetbrains.annotations.NotNull;
  * @author yole
  */
 public class JavaASTFactory extends ASTFactory {
-  private final DefaultASTFactory myDefaultASTFactory = ServiceManager.getService(DefaultASTFactory.class);
+  private final DefaultASTFactory myDefaultASTFactory = ApplicationManager.getApplication().getService(DefaultASTFactory.class);
 
   @Override
   public LeafElement createLeaf(@NotNull IElementType type, @NotNull CharSequence text) {
index 2eb3ca927ad3371d1ee9b21e10c1f47dd86f71f5..e23cfc34e98acfab5c8970b17dd7d7a7325b2deb 100644 (file)
@@ -24,7 +24,7 @@
  */
 package org.jetbrains.lang.manifest.header;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.ClearableLazyValue;
 import com.intellij.psi.PsiReference;
 import com.intellij.psi.util.PsiTreeUtil;
@@ -43,7 +43,7 @@ import java.util.Set;
  */
 public final class HeaderParserRepository {
   public static HeaderParserRepository getInstance() {
-    return ServiceManager.getService(HeaderParserRepository.class);
+    return ApplicationManager.getApplication().getService(HeaderParserRepository.class);
   }
 
   private final ClearableLazyValue<Map<String, HeaderParser>> myParsers = new ClearableLazyValue<>() {
index 7b555f51594a3fd7cdfc8125039af63956eeb561..8884aa74c7f293ae4742be6a8948257d53fd5fb6 100644 (file)
@@ -28,7 +28,6 @@ import com.intellij.lang.ASTNode;
 import com.intellij.lang.PsiBuilder;
 import com.intellij.lang.PsiParser;
 import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.psi.tree.IElementType;
 import com.intellij.psi.tree.TokenSet;
 import org.jetbrains.annotations.NotNull;
@@ -51,7 +50,7 @@ public class ManifestParser implements PsiParser {
   private final HeaderParserRepository myRepository;
 
   public ManifestParser() {
-    myRepository = ServiceManager.getService(HeaderParserRepository.class);
+    myRepository = ApplicationManager.getApplication().getService(HeaderParserRepository.class);
   }
 
   @NotNull
index 33c0e68ce425b9966002974d091b37a06f68fcff..46e4bcc76e9ba52bf238a0cfabafe130febfdc8a 100644 (file)
@@ -26,7 +26,7 @@ package org.jetbrains.lang.manifest.psi.impl;
 
 import com.intellij.extapi.psi.ASTWrapperPsiElement;
 import com.intellij.lang.ASTNode;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.TextRange;
 import com.intellij.psi.PsiElement;
 import com.intellij.psi.PsiReference;
@@ -47,7 +47,7 @@ public class HeaderValuePartImpl extends ASTWrapperPsiElement implements HeaderV
 
   public HeaderValuePartImpl(ASTNode node) {
     super(node);
-    myRepository = ServiceManager.getService(HeaderParserRepository.class);
+    myRepository = ApplicationManager.getApplication().getService(HeaderParserRepository.class);
   }
 
   @Override
index f6c6485c13a86c162728a73904af8915e4e8d955..b1badf7ea3a728b022763ed36ed486cbf1646251 100644 (file)
@@ -1,29 +1,15 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.facet.ui;
 
 import com.intellij.facet.ui.libraries.*;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class FacetEditorsFactory {
   public static FacetEditorsFactory getInstance() {
-    return ServiceManager.getService(FacetEditorsFactory.class);
+    return ApplicationManager.getApplication().getService(FacetEditorsFactory.class);
   }
 
 
@@ -36,7 +22,7 @@ public abstract class FacetEditorsFactory {
                                                                    @NotNull final Module module,
                                                                    @NotNull final String libraryName);
 
-  public abstract LibrariesValidationComponent createLibrariesValidationComponent(LibraryInfo[] libraryInfos, Module module, 
+  public abstract LibrariesValidationComponent createLibrariesValidationComponent(LibraryInfo[] libraryInfos, Module module,
                                                                          String defaultLibraryName);
 
   public abstract MultipleFacetEditorHelper createMultipleFacetEditorHelper();
index 993bedfc8d0059b8d62987158080f4577cf4af81..b9b0a2e973326634c4e56fd026440ba8c4cf7d42 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide.util.projectWizard;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.projectRoots.SdkType;
 import com.intellij.openapi.projectRoots.SdkTypeId;
 import com.intellij.openapi.util.Computable;
@@ -31,7 +17,7 @@ import javax.swing.*;
 public abstract class ProjectWizardStepFactory {
 
   public static ProjectWizardStepFactory getInstance() {
-    return ServiceManager.getService(ProjectWizardStepFactory.class);
+    return ApplicationManager.getApplication().getService(ProjectWizardStepFactory.class);
   }
 
   public abstract ModuleWizardStep createNameAndLocationStep(WizardContext wizardContext);
index 13ddb67cb948f40185b93ad674d850a128d5a3ff..e0f56a537bfa00256d4c352f6ae893d128bec1cd 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.libraries;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -28,7 +14,7 @@ import java.util.List;
  */
 public abstract class LibrariesHelper {
   public static LibrariesHelper getInstance(){
-    return ServiceManager.getService(LibrariesHelper.class);
+    return ApplicationManager.getApplication().getService(LibrariesHelper.class);
   }
 
   public abstract boolean isClassAvailableInLibrary(final Library library, @NonNls final String fqn);
index 85cb7d3598215e29636b65057288723f2d74ddd4..8187167970231ae00d8ade0535f893695ae7457f 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2011 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.ui;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.projectRoots.Sdk;
@@ -27,7 +13,7 @@ import org.jetbrains.annotations.Nullable;
 
 public abstract class OrderEntryAppearanceService {
   public static OrderEntryAppearanceService getInstance() {
-    return ServiceManager.getService(OrderEntryAppearanceService.class);
+    return ApplicationManager.getApplication().getService(OrderEntryAppearanceService.class);
   }
 
   @NotNull
index 64343e3e170ecf3ab20b46f62592734f0a914faf..aea1de3298467bb7abf018cd6868964ee12c0b8f 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.ui.configuration;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.ModuleConfigurationEditor;
 
 public abstract class DefaultModuleConfigurationEditorFactory {
@@ -29,7 +15,7 @@ public abstract class DefaultModuleConfigurationEditorFactory {
   public abstract String getOutputEditorDisplayName();
 
   public static DefaultModuleConfigurationEditorFactory getInstance() {
-    return ServiceManager.getService(DefaultModuleConfigurationEditorFactory.class);
+    return ApplicationManager.getApplication().getService(DefaultModuleConfigurationEditorFactory.class);
   }
 
 }
index be96b8126226e403f48d29674b3b0c4143c95ff4..c0bf3d78046ba0cc958464c413f5492b603b51d7 100644 (file)
@@ -1,25 +1,11 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.refactoring;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 public abstract class JavaRefactoringActionHandlerFactory {
   public static JavaRefactoringActionHandlerFactory getInstance() {
-    return ServiceManager.getService(JavaRefactoringActionHandlerFactory.class);
+    return ApplicationManager.getApplication().getService(JavaRefactoringActionHandlerFactory.class);
   }
 
   /**
index 5232081769e85ddb5ff9c3f261e8f0342a226e39..3c1fa4a82e6f0cc81c29a925b5d6eb8e5ada5d4e 100644 (file)
@@ -1,29 +1,15 @@
-/*
- * 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.util.descriptors;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.Nullable;
 
 public abstract class ConfigFileFactory {
   public static ConfigFileFactory getInstance() {
-    return ServiceManager.getService(ConfigFileFactory.class);
+    return ApplicationManager.getApplication().getService(ConfigFileFactory.class);
   }
 
   public abstract ConfigFileMetaDataProvider createMetaDataProvider(ConfigFileMetaData... metaData);
index 123ff41f3ac619a92a6f69738c424080ce47731b..e9ace069f35729061c09ee601948a4c414940d40 100644 (file)
@@ -1,26 +1,12 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.util.xml.converters.values;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 public abstract class ClassArrayConverter extends ClassValueConverter {
 
    public static ClassArrayConverter getClassArrayConverter() {
-    return ServiceManager.getService(ClassArrayConverter.class);
-  }
+     return ApplicationManager.getApplication().getService(ClassArrayConverter.class);
+   }
 }
\ No newline at end of file
index 80c879258f093b1a61b58db10959f097d5019631..5a3b2e363c05d47538e540115376127679ebb837 100644 (file)
@@ -1,22 +1,8 @@
-/*
- * Copyright 2000-2016 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.util.xml.converters.values;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.TestSourcesFilter;
@@ -35,7 +21,7 @@ import org.jetbrains.annotations.Nullable;
 public abstract class ClassValueConverter extends Converter<PsiClass> implements CustomReferenceConverter {
 
   public static ClassValueConverter getClassValueConverter() {
-    return ServiceManager.getService(ClassValueConverter.class);
+    return ApplicationManager.getApplication().getService(ClassValueConverter.class);
   }
 
   @Override
index 08943375e84b69899a33a008be525e0801da34f5..3d258536439e5cc4f1b4ea037901500711998d1d 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2013 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.remoteServer.configuration.deployment;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.packaging.artifacts.Artifact;
 import com.intellij.packaging.artifacts.ArtifactPointer;
@@ -27,7 +13,7 @@ import java.util.List;
 
 public abstract class JavaDeploymentSourceUtil {
   public static JavaDeploymentSourceUtil getInstance() {
-    return ServiceManager.getService(JavaDeploymentSourceUtil.class);
+    return ApplicationManager.getApplication().getService(JavaDeploymentSourceUtil.class);
   }
 
   @NotNull
index 65e698c88b848625813278dec4ff65fe3cf1c6d1..654412c6330d7b29c8f0b9c9257fb1924658ac5d 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.json.editor;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -35,6 +35,6 @@ public class JsonEditorOptions implements PersistentStateComponent<JsonEditorOpt
   }
 
   public static JsonEditorOptions getInstance() {
-    return ServiceManager.getService(JsonEditorOptions.class);
+    return ApplicationManager.getApplication().getService(JsonEditorOptions.class);
   }
 }
index 7f3656485736a7b6627a97412b2ee6cf33f7bdcc..9775052c94f6fd91d706837712746171efcda272 100644 (file)
@@ -4,7 +4,7 @@ package com.intellij.codeInsight.completion;
 import com.intellij.codeInsight.lookup.AutoCompletionPolicy;
 import com.intellij.codeInsight.lookup.LookupElement;
 import com.intellij.codeInsight.lookup.WeighingContext;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.progress.ProgressManager;
 import com.intellij.openapi.util.Key;
 import com.intellij.openapi.util.NlsContexts;
@@ -33,7 +33,7 @@ public abstract class CompletionService {
   public static final Key<CompletionWeigher> RELEVANCE_KEY = Key.create("completion");
 
   public static CompletionService getCompletionService() {
-    return ServiceManager.getService(CompletionService.class);
+    return ApplicationManager.getApplication().getService(CompletionService.class);
   }
 
   /**
index 432720b1a1c260934ba8abce666362a335590daa..3ce9ca7941171be2f4c41b8f5576334e6258f45d 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.editorActions;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.editor.Editor;
 import org.jetbrains.annotations.NotNull;
 
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
  */
 public interface TabOutScopesTracker {
   static TabOutScopesTracker getInstance() {
-    return ServiceManager.getService(TabOutScopesTracker.class);
+    return ApplicationManager.getApplication().getService(TabOutScopesTracker.class);
   }
 
   /**
index 9b7202e5c2afdd3391590fe05efb8cc4ae059838..e605b426a2bda5cb6ba88cc72be5843b1b29fb11 100644 (file)
@@ -4,7 +4,7 @@ package com.intellij.codeInsight.intention;
 import com.intellij.codeInsight.daemon.HighlightDisplayKey;
 import com.intellij.codeInspection.LocalQuickFix;
 import com.intellij.codeInspection.ex.InspectionToolWrapper;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.Key;
 import com.intellij.openapi.util.UserDataHolder;
@@ -37,7 +37,7 @@ public abstract class IntentionManager  {
   }
 
   public static IntentionManager getInstance() {
-    return ServiceManager.getService(IntentionManager.class);
+    return ApplicationManager.getApplication().getService(IntentionManager.class);
   }
 
   /**
index 68e9504a0b2f66aa66724e45ef18737fb5be00b9..96e9c8101550cd96b1f266f9e053d14073879dd8 100644 (file)
@@ -2,7 +2,7 @@
 
 package com.intellij.codeInsight.template;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.NotNull;
 
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
  */
 public abstract class TemplateBuilderFactory {
   public static TemplateBuilderFactory getInstance() {
-    return ServiceManager.getService(TemplateBuilderFactory.class);
+    return ApplicationManager.getApplication().getService(TemplateBuilderFactory.class);
   }
 
   public abstract TemplateBuilder createTemplateBuilder(@NotNull PsiElement element);
index 6439191a1af8726c9dae41c3f7c7a8356927b35c..e745432c0845e0d3c76a4798499122abcd0dfa3a 100644 (file)
@@ -2,6 +2,7 @@
 package com.intellij.codeStyle;
 
 import com.intellij.lang.Language;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.Editor;
@@ -14,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
 
 public abstract class CodeStyleFacade {
   public static CodeStyleFacade getInstance() {
-    return ServiceManager.getService(CodeStyleFacade.class);
+    return ApplicationManager.getApplication().getService(CodeStyleFacade.class);
   }
 
   public static CodeStyleFacade getInstance(@Nullable Project project) {
index f583d2ffe9e97cbc6acc7e863492f03549fb00b2..7190df8d4877cccb8d5e4caae3c7a1bc682d0fa4 100644 (file)
@@ -1,14 +1,13 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.fileEditor;
 
-import com.intellij.openapi.components.ServiceManager;
-import com.intellij.openapi.project.Project;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.NotNull;
 
 public interface FileNavigator {
   static FileNavigator getInstance() {
-    return ServiceManager.getService(FileNavigator.class);
+    return ApplicationManager.getApplication().getService(FileNavigator.class);
   }
 
   default boolean canNavigate(@NotNull VirtualFile file) {
index 0d370a675160b487e37a3172b9116abf53b1d6c1..8d282ed8ad9f7748662f968ef498ab4429e7701b 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.vfs.newvfs;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
@@ -14,7 +14,7 @@ import java.util.function.Function;
 
 public abstract class ManagingFS implements FileSystemInterface {
   private static class ManagingFSHolder {
-    private static final ManagingFS ourInstance = ServiceManager.getService(ManagingFS.class);
+    private static final ManagingFS ourInstance = ApplicationManager.getApplication().getService(ManagingFS.class);
   }
 
   public static ManagingFS getInstance() {
index fd8a43ac6430099d53db82b4b0a6f5a90d4de4ee..fd04e185d98286dd7acfc108eeac2e00806b4c2d 100644 (file)
@@ -1,27 +1,13 @@
-/*
- * Copyright 2000-2009 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.search.scope.packageSet;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NonNls;
 
 public abstract class PackageSetFactory {
   public abstract PackageSet compile(@NonNls String text) throws ParsingException;
 
   public static PackageSetFactory getInstance() {
-    return ServiceManager.getService(PackageSetFactory.class);
+    return ApplicationManager.getApplication().getService(PackageSetFactory.class);
   }
 }
\ No newline at end of file
index f96626a19b7d5b382036103d0aece2372aea192f..adba2de1f2a9a7b8a80ea1ed3e6bcf56ff97e6fe 100644 (file)
@@ -1,22 +1,7 @@
-/*
- * Copyright 2000-2019 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.codeHighlighting;
 
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -27,7 +12,7 @@ public abstract class TextEditorHighlightingPassRegistrar {
   }
 
   public static TextEditorHighlightingPassRegistrar getInstance(Project project) {
-    return ServiceManager.getService(project, TextEditorHighlightingPassRegistrar.class);
+    return project.getService(TextEditorHighlightingPassRegistrar.class);
   }
 
   /**
index 410b494e0871f9464697dadb701fcfbf57cad6a4..b7697acf4c7837da2165d25dfad136b76296de2b 100644 (file)
@@ -1,22 +1,8 @@
-/*
- * Copyright 2000-2019 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.completion;
 
 import com.intellij.codeInsight.lookup.LookupElement;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.Pair;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
@@ -53,7 +39,7 @@ public abstract class CompletionFinalSorter {
 
   @NotNull
   public static CompletionFinalSorter newSorter() {
-    Factory factory = ServiceManager.getService(Factory.class);
+    Factory factory = ApplicationManager.getApplication().getService(Factory.class);
     return factory != null ? factory.newSorter() : EMPTY_SORTER;
   }
 
index 96e1f8b11b6c8d8da4c255fced14df9f4de9c131..dedec7aac383c20e91bae1e955e9e622eb2e0b43 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.daemon;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.util.xmlb.annotations.OptionTag;
 import com.intellij.util.xmlb.annotations.Transient;
 import org.jetbrains.annotations.NonNls;
@@ -14,7 +14,7 @@ public class DaemonCodeAnalyzerSettings {
   private boolean mySuppressWarnings = true;
 
   public static DaemonCodeAnalyzerSettings getInstance() {
-    return ServiceManager.getService(DaemonCodeAnalyzerSettings.class);
+    return ApplicationManager.getApplication().getService(DaemonCodeAnalyzerSettings.class);
   }
 
   @OptionTag("NEXT_ERROR_ACTION_GOES_TO_ERRORS_FIRST")
index d8df6799b66293bd7e6e01de85acba2e074a9958..2caae0569ea92a9422300bcf11f327059e395581 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.featureStatistics;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
@@ -11,7 +11,7 @@ public abstract class FeatureUsageTracker {
   public boolean SHOW_IN_OTHER_PROGRESS = true;
 
   public static FeatureUsageTracker getInstance() {
-    return ServiceManager.getService(FeatureUsageTracker.class);
+    return ApplicationManager.getApplication().getService(FeatureUsageTracker.class);
   }
 
   public abstract void triggerFeatureUsed(@NonNls @NotNull String featureId);
index 9c3168c1403e843e575c2529084c1c244bb1b4e3..954b9e753ce18845320c0634503567d1024e6b79 100644 (file)
@@ -1,29 +1,15 @@
-/*
- * Copyright 2000-2019 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 
 package com.intellij.find;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.NlsSafe;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class FindSettings {
 
   public static FindSettings getInstance() {
-    return ServiceManager.getService(FindSettings.class);
+    return ApplicationManager.getApplication().getService(FindSettings.class);
   }
 
   public abstract boolean isSkipResultsWithOneUsage();
index dc6b5c8e40cd948311bcfc2db8da6870ca4f0832..decdf66282133d9f26e4dd9ccf1f1f0cc421f655 100644 (file)
@@ -4,6 +4,7 @@ package com.intellij.find.impl;
 import com.intellij.find.FindBundle;
 import com.intellij.find.FindModel;
 import com.intellij.find.FindSettings;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.*;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.util.ArrayUtilRt;
@@ -345,7 +346,7 @@ public class FindSettingsImpl extends FindSettings implements PersistentStateCom
   @State(name = "FindRecents", storages = @Storage(value = "find.recents.xml", roamingType = RoamingType.DISABLED))
   static final class FindRecents extends FindInProjectSettingsBase {
     public static FindRecents getInstance() {
-      return ServiceManager.getService(FindRecents.class);
+      return ApplicationManager.getApplication().getService(FindRecents.class);
     }
   }
 
index 9d54afab34ed46a7cf510df84080aebf7e3ab1b1..087c6808d7b2c3116354879ea1feb4c7ca2dfbbd 100644 (file)
@@ -3,7 +3,7 @@ package com.intellij.profile.codeInspection;
 
 import com.intellij.codeInsight.daemon.impl.SeverityRegistrar;
 import com.intellij.codeInspection.ex.InspectionProfileImpl;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.psi.search.scope.packageSet.NamedScopesHolder;
 import org.jetbrains.annotations.Contract;
@@ -23,7 +23,7 @@ public interface InspectionProfileManager {
   }
 
   static @NotNull InspectionProfileManager getInstance() {
-    return ServiceManager.getService(InspectionProfileManager.class);
+    return ApplicationManager.getApplication().getService(InspectionProfileManager.class);
   }
 
   static @NotNull InspectionProfileManager getInstance(@NotNull Project project) {
index 4211f70bc5decd1878c9fe081a37a74e52930f9b..d367a9537d4e43259a00dbbdd463bbe67b0ab3e9 100644 (file)
@@ -3,7 +3,7 @@
 package com.intellij.psi.impl.source.resolve.reference.impl.providers;
 
 import com.intellij.codeInsight.lookup.LookupElementBuilder;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.Pair;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
@@ -21,7 +21,7 @@ import javax.swing.*;
  */
 public final class FileInfoManager {
   public static FileInfoManager getFileInfoManager() {
-    return ServiceManager.getService(FileInfoManager.class);
+    return ApplicationManager.getApplication().getService(FileInfoManager.class);
   }
 
   public static Object getFileLookupItem(PsiElement psiElement) {
index 6df2c3d0130948134bc0725a7007abb4effbbca1..2200194fc4202b0b627b97411d47515906438b2a 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2013 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.impl.source.resolve.reference.impl.providers;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -23,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
  */
 public abstract class FileReferenceCompletion {
   public static FileReferenceCompletion getInstance() {
-    return ServiceManager.getService(FileReferenceCompletion.class);
+    return ApplicationManager.getApplication().getService(FileReferenceCompletion.class);
   }
 
   public abstract Object @NotNull [] getFileReferenceCompletionVariants(FileReference reference);
index d11a23740756771243da2bcddf4108affe993361..62e08bb23c200376f8d9729e7eebd0e3af65efe7 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.search;
 
 import com.intellij.openapi.actionSystem.DataContext;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -11,7 +11,7 @@ import java.util.List;
 
 public abstract class PredefinedSearchScopeProvider {
   public static PredefinedSearchScopeProvider getInstance() {
-    return ServiceManager.getService(PredefinedSearchScopeProvider.class);
+    return ApplicationManager.getApplication().getService(PredefinedSearchScopeProvider.class);
   }
 
   /**
index d959b0601db54e043063206b8b423b0ba79a6878..2165174df15b2b4157cae5f61c62fdb3af9cdda3 100644 (file)
@@ -1,7 +1,8 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package org.jetbrains.builtInWebServer;
 
 import com.intellij.notification.NotificationType;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ApplicationNamesInfo;
 import com.intellij.openapi.components.*;
 import com.intellij.openapi.options.Configurable;
@@ -39,7 +40,7 @@ public class BuiltInServerOptions implements PersistentStateComponent<BuiltInSer
   public boolean allowUnsignedRequests = false;
 
   public static BuiltInServerOptions getInstance() {
-    return ServiceManager.getService(BuiltInServerOptions.class);
+    return ApplicationManager.getApplication().getService(BuiltInServerOptions.class);
   }
 
   @Override
index f0698c27dbe3bf8e93d1f258dde1051dadd72ef3..7560756b9bf2d8bf32153b5b49662b2e445828c1 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package org.jetbrains.io.jsonRpc;
 
 import com.intellij.diagnostic.PluginException;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.ComponentManager;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.extensions.ExtensionPointName;
 import com.intellij.openapi.extensions.PluginDescriptor;
 import com.intellij.serviceContainer.BaseKeyedLazyInstance;
@@ -34,7 +34,7 @@ public final class JsonRpcDomainBean extends BaseKeyedLazyInstance<Object> {
     }
     else {
       try {
-        return ServiceManager.getService(Class.forName(service, true, pluginDescriptor.getPluginClassLoader()));
+        return ApplicationManager.getApplication().getService(Class.forName(service, true, pluginDescriptor.getPluginClassLoader()));
       }
       catch (Throwable e) {
         throw new PluginException(e, pluginDescriptor.getPluginId());
index 3c4d08d5769bdc932e0e4995682acc75db53cff0..b69b10abe0700570378c297cfedd8af14fdf24ec 100644 (file)
@@ -1,13 +1,13 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.formatting;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 public interface Formatter extends IndentFactory, WrapFactory, AlignmentFactory, SpacingFactory, FormattingModelFactory {
   static Formatter getInstance() {
     Formatter instance = Holder.INSTANCE;
     if (instance == null) {
-      instance = ServiceManager.getService(Formatter.class);
+      instance = ApplicationManager.getApplication().getService(Formatter.class);
       Holder.INSTANCE = instance;
     }
     return instance;
index 332ab410f83cbb1670544d8456f4cc42611bf45d..c61dc2b61542b480b30fd7e0d73da7d6624466c0 100644 (file)
@@ -3,7 +3,6 @@ package com.intellij.psi.codeStyle;
 
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.MainConfigurationStateSplitter;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.openapi.diagnostic.Logger;
@@ -50,7 +49,7 @@ public final class ProjectCodeStyleSettingsManager extends CodeStyleSettingsMana
   private void initProjectSettings(@NotNull Project project) {
     synchronized (myStateLock) {
       if (!myIsLoaded) {
-        LegacyCodeStyleSettingsManager legacySettingsManager = ServiceManager.getService(project, LegacyCodeStyleSettingsManager.class);
+        LegacyCodeStyleSettingsManager legacySettingsManager = project.getService(LegacyCodeStyleSettingsManager.class);
         if (legacySettingsManager != null && legacySettingsManager.getState() != null) {
           loadState(legacySettingsManager.getState());
           if (!project.isDefault() &&
index 6247a686d181255089e5996d07ed4c781bb9e1c2..fe26184ea4af574580ad4891c1892fb5b460efc3 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2013 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.psi.PsiElement;
@@ -28,7 +14,7 @@ import java.util.Collection;
 
 public abstract class FileModificationService {
   public static FileModificationService getInstance() {
-    return ServiceManager.getService(FileModificationService.class);
+    return ApplicationManager.getApplication().getService(FileModificationService.class);
   }
 
   public abstract boolean preparePsiElementsForWrite(@NotNull Collection<? extends PsiElement> elements);
index f6bd84f1cf17bbe0c569f6d673f63ba2c7166f62..d31fecb4ca2794bc1f07301598cb107d2d704bb2 100644 (file)
@@ -1,26 +1,12 @@
-/*
- * 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.documentation;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiElement;
 
 public class DocumentationManagerUtil {
   public static DocumentationManagerUtil getInstance() {
-    return ServiceManager.getService(DocumentationManagerUtil.class);
+    return ApplicationManager.getApplication().getService(DocumentationManagerUtil.class);
   }
 
   @SuppressWarnings({"HardCodedStringLiteral", "UnusedParameters"})
index 7c5c1d1299e90d0794c06ec97096dbb210300876..d330a8242813f2dc6195a40e658c3aa5c22861eb 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2017 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.codeInsight.folding;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 public class CodeFoldingSettings {
   public boolean COLLAPSE_IMPORTS = true;
@@ -25,6 +11,6 @@ public class CodeFoldingSettings {
   public boolean COLLAPSE_CUSTOM_FOLDING_REGIONS;
 
   public static CodeFoldingSettings getInstance() {
-    return ServiceManager.getService(CodeFoldingSettings.class);
+    return ApplicationManager.getApplication().getService(CodeFoldingSettings.class);
   }
 }
index 2ceafad39c0f219d9eba08d522671320c4e0f3f2..5ddec56fa01dcff48be7663616b891fb9dd99d68 100644 (file)
@@ -3,16 +3,18 @@ package com.intellij.codeWithMe
 
 import com.intellij.diagnostic.LoadingState
 import com.intellij.openapi.application.ApplicationManager
-import com.intellij.openapi.components.ServiceManager
 
 interface ClientIdService {
-    companion object {
-        fun tryGetInstance(): ClientIdService? {
-            if (!LoadingState.CONFIGURATION_STORE_INITIALIZED.isOccurred || ApplicationManager.getApplication().isDisposed) return null
-            return ServiceManager.getService(ClientIdService::class.java)
-        }
+  companion object {
+    fun tryGetInstance(): ClientIdService? {
+      if (!LoadingState.CONFIGURATION_STORE_INITIALIZED.isOccurred || ApplicationManager.getApplication().isDisposed) {
+        return null
+      }
+      return ApplicationManager.getApplication().getService(ClientIdService::class.java)
     }
-    var clientIdValue: String?
+  }
 
-    val checkLongActivity: Boolean
+  var clientIdValue: String?
+
+  val checkLongActivity: Boolean
 }
index 999e70be468f52a3bb1f96100837d0a0ba90593f..eac9d2637d0cfa57962475241b8b5d3892a213df 100644 (file)
@@ -1,21 +1,7 @@
-/*
- * Copyright 2000-2012 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.concurrency;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NotNull;
 
 /**
@@ -23,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
  */
 public abstract class AsyncFutureFactory {
   public static AsyncFutureFactory getInstance() {
-    return ServiceManager.getService(AsyncFutureFactory.class);
+    return ApplicationManager.getApplication().getService(AsyncFutureFactory.class);
   }
 
   @NotNull
index 38b58bccb6e92ea1757091a32e63e12418fbb604..7b404250225e0ae677bc627760a0534400b6283d 100644 (file)
@@ -1,8 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.diagnostic;
 
 import com.intellij.openapi.application.ApplicationManager;
-import com.intellij.openapi.components.ServiceManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -21,7 +20,7 @@ interface PluginProblemReporter {
       };
     }
 
-    return ServiceManager.getService(PluginProblemReporter.class);
+    return ApplicationManager.getApplication().getService(PluginProblemReporter.class);
   }
 
   @NotNull
index 68dd58c503b2cfe92ec0d715ece1d7e5330f37f3..d1e0aece54f2d830a37853490ad5972856d9f36b 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.util.NlsSafe;
 import com.intellij.openapi.util.text.StringUtil;
 import com.intellij.util.text.NameUtilCore;
@@ -17,7 +17,7 @@ import javax.swing.*;
 public abstract class TypePresentationService {
 
   public static TypePresentationService getService() {
-    return ServiceManager.getService(TypePresentationService.class);
+    return ApplicationManager.getApplication().getService(TypePresentationService.class);
   }
 
   @Nullable
index 74471561f7ad5f98721f30865d3b1c3d4c71538f..1a01e7e408402d156562d96e0eb2987ddc81054c 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide.util;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.NlsSafe;
 import com.intellij.openapi.util.SimpleModificationTracker;
@@ -77,7 +77,7 @@ public abstract class PropertiesComponent extends SimpleModificationTracker {
    * Returns the application-level instance.
    */
   public static PropertiesComponent getInstance() {
-    return ServiceManager.getService(PropertiesComponent.class);
+    return ApplicationManager.getApplication().getService(PropertiesComponent.class);
   }
 
   public final boolean isTrueValue(@NonNls String name) {
index a3abcb8d1328d66f8643068f06202062a8eb9ad3..9110405a719691a95c1e057544f25c1d38426e9b 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide.util;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.vfs.VirtualFile;
 import com.intellij.pom.Navigatable;
@@ -17,7 +17,7 @@ import java.io.File;
  */
 public abstract class PsiNavigationSupport {
   public static PsiNavigationSupport getInstance() {
-    return ServiceManager.getService(PsiNavigationSupport.class);
+    return ApplicationManager.getApplication().getService(PsiNavigationSupport.class);
   }
 
   @Nullable
index 992f9b906b869335828f5cee51d78c6b91b4b916..4c39bc3139ac66e6da50d44ac00dd46fddee86ea 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.lang;
 
 import com.intellij.lexer.Lexer;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.Nullable;
  */
 public abstract class PsiBuilderFactory {
   public static PsiBuilderFactory getInstance() {
-    return ServiceManager.getService(PsiBuilderFactory.class);
+    return ApplicationManager.getApplication().getService(PsiBuilderFactory.class);
   }
 
   @NotNull
index a11c7e8578629cfcc1bca8b7ab0c00764c74b25b..633cadca6531c16673aef08eb760bddd4261fb67 100644 (file)
@@ -2,8 +2,7 @@
 package com.intellij.model.presentation;
 
 import com.intellij.model.Symbol;
-import com.intellij.navigation.TargetPopupPresentation;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.Nls;
 import org.jetbrains.annotations.NotNull;
 
@@ -19,7 +18,7 @@ import static org.jetbrains.annotations.Nls.Capitalization.Sentence;
 public interface SymbolPresentationService {
 
   static @NotNull SymbolPresentationService getInstance() {
-    return ServiceManager.getService(SymbolPresentationService.class);
+    return ApplicationManager.getApplication().getService(SymbolPresentationService.class);
   }
 
   static @Nls(capitalization = Sentence) @NotNull String getLongDescription(@NotNull Symbol symbol) {
index 3b76bc14e7f89e19020988cbe5238efa5990bca1..7c5b5ff13c68b87391b56377492a29422b7cd46d 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.model.psi;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.NotNull;
 
@@ -14,7 +14,7 @@ public interface PsiSymbolReferenceService {
 
   @NotNull
   static PsiSymbolReferenceService getService() {
-    return ServiceManager.getService(PsiSymbolReferenceService.class);
+    return ApplicationManager.getApplication().getService(PsiSymbolReferenceService.class);
   }
 
   /**
index a984d3524355b1ad64107d3e348a7e5bdc6c5eb0..4bb60a0a74243a9e9c7f39c8c6399b79ec733d63 100644 (file)
@@ -2,7 +2,7 @@
 package com.intellij.model.psi;
 
 import com.intellij.model.Symbol;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.PsiElement;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.Contract;
@@ -14,7 +14,7 @@ public interface PsiSymbolService {
 
   @NotNull
   static PsiSymbolService getInstance() {
-    return ServiceManager.getService(PsiSymbolService.class);
+    return ApplicationManager.getApplication().getService(PsiSymbolService.class);
   }
 
   /**
index b640b2e511a176c5452736606e07a4a6a7c38e53..6e6c8f7f4f1955efff18c56bfecee2518471b2f9 100644 (file)
@@ -2,7 +2,7 @@
 package com.intellij.navigation;
 
 import com.intellij.model.Symbol;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.project.Project;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
@@ -21,7 +21,7 @@ public interface SymbolNavigationService {
 
   @NotNull
   static SymbolNavigationService getInstance() {
-    return ServiceManager.getService(SymbolNavigationService.class);
+    return ApplicationManager.getApplication().getService(SymbolNavigationService.class);
   }
 
   @NotNull
index c02561a9425ca5f55336d691cdd594220273564c..de55dd7faa852c205a92f9ac6067dd6896266f09 100644 (file)
@@ -1,22 +1,7 @@
-/*
- * Copyright 2000-2016 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.application;
 
 import com.intellij.openapi.Disposable;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.progress.ProcessCanceledException;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
@@ -67,7 +52,7 @@ public abstract class TransactionGuard {
   public static TransactionGuard getInstance() {
     TransactionGuard instance = ourInstance;
     if (instance == null) {
-      ourInstance = instance = ServiceManager.getService(TransactionGuard.class);
+      ourInstance = instance = ApplicationManager.getApplication().getService(TransactionGuard.class);
     }
     return instance;
   }
index c3b49f27ad3850e179c8ecd5f737aba8745fc8f6..5343cc513b8f720ce511933dd6d3c86c45723003 100644 (file)
@@ -1,6 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.components;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.extensions.ExtensionPointName;
 import com.intellij.openapi.extensions.PluginAware;
@@ -29,7 +30,7 @@ public final class ServiceBean implements PluginAware {
       }
       try {
         final Class<?> aClass = Class.forName(serviceClass, true, exportableBean.getPluginDescriptor().getPluginClassLoader());
-        final Object service = ServiceManager.getService(aClass);
+        final Object service = ApplicationManager.getApplication().getService(aClass);
         if (service == null) {
           LOG.error("Can't find service: " + serviceClass);
           continue;
index db7cfad246e6f72060af2289246675ab1eb3bdde..22516501cc2847ed5159ad06045b0185b94cfc38 100644 (file)
@@ -38,9 +38,8 @@ public final class ServiceManager {
    */
   @Deprecated
   public static @Nullable <T> T getServiceIfCreated(@NotNull Class<T> serviceClass) {
-    Application application = ApplicationManager.getApplication();
-    if (application == null) return null;
-    return application.getServiceIfCreated(serviceClass);
+    Application app = ApplicationManager.getApplication();
+    return app == null ? null : app.getServiceIfCreated(serviceClass);
   }
 
   /**
index fb634d5973bb8b516f20e91791e42274d84b5143..66f29b3f9536f20a7958911d20db9d3c732a6990 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.editor.colors;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.markup.TextAttributes;
 import com.intellij.openapi.util.*;
@@ -40,7 +40,7 @@ public final class TextAttributesKey implements Comparable<TextAttributesKey> {
       @Nullable
       @Override
       protected TextAttributeKeyDefaultsProvider compute() {
-        return ServiceManager.getService(TextAttributeKeyDefaultsProvider.class);
+        return ApplicationManager.getApplication().getService(TextAttributeKeyDefaultsProvider.class);
       }
     };
 
index 4819bf6477081f768b0d058f6b02de79cca324da..1810cbff5bfee3c471e3d4403c39643d5e7673e5 100644 (file)
@@ -1,28 +1,14 @@
-/*
- * Copyright 2000-2011 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.project;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 
 /**
  * @author yole
  */
 public abstract class DefaultProjectFactory {
   public static DefaultProjectFactory getInstance() {
-    return ServiceManager.getService(DefaultProjectFactory.class);
+    return ApplicationManager.getApplication().getService(DefaultProjectFactory.class);
   }
 
   public abstract Project getDefaultProject();
index f756ac15c7678bb8fcc15862d0aac7e9e87f1446..ba4d6df1a5fbfde2fe69e62bf7ec23e6346cd0ba 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.openapi.roots.impl;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.vfs.VirtualFile;
 import org.jetbrains.annotations.ApiStatus;
 import org.jetbrains.annotations.NotNull;
@@ -16,7 +16,7 @@ import java.util.List;
 public interface PushedFilePropertiesRetriever {
 
   static PushedFilePropertiesRetriever getInstance() {
-    return ServiceManager.getService(PushedFilePropertiesRetriever.class);
+    return ApplicationManager.getApplication().getService(PushedFilePropertiesRetriever.class);
   }
 
   @NotNull
index bf929a27e4cc9e165e5e4c5a3693887bc276e1a4..1cab2154dfed948730a9d92a67df838d78ec512a 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.patterns.compiler;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.Nullable;
  */
 public abstract class PatternCompilerFactory {
   public static PatternCompilerFactory getFactory() {
-    return ServiceManager.getService(PatternCompilerFactory.class);
+    return ApplicationManager.getApplication().getService(PatternCompilerFactory.class);
   }
 
   /**
index 549701caeb6a40ed68d1386fd66fa16f491e9795..20227f25398127f79b86d933818b4393274fd6cf 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
@@ -13,7 +13,7 @@ import java.util.List;
 public abstract class PsiReferenceService {
 
   public static PsiReferenceService getService() {
-    return ServiceManager.getService(PsiReferenceService.class);
+    return ApplicationManager.getApplication().getService(PsiReferenceService.class);
   }
 
   /**
index 4eb762b6abf225a1e67a0662e8688aabf2dc7681..e91aad18db9fef7002e5bd71556307a0f239cabc 100644 (file)
@@ -1,22 +1,8 @@
-/*
- * Copyright 2000-2011 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.impl.source.codeStyle;
 
 import com.intellij.lang.ASTNode;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.project.Project;
 import com.intellij.psi.PsiFile;
@@ -27,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
  */
 public abstract class IndentHelper {
   public static IndentHelper getInstance() {
-    return ServiceManager.getService(IndentHelper.class);
+    return ApplicationManager.getApplication().getService(IndentHelper.class);
   }
 
   /**
index e89f0d8222090e8f0466d9cf5de8ef4e2d750315..714f05170778f5b6d7e2af5634201eff85c80c74 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.meta;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.psi.filters.ElementFilter;
 
 /**
@@ -18,6 +18,6 @@ public abstract class MetaDataRegistrar {
 
 
   public static MetaDataRegistrar getInstance() {
-    return ServiceManager.getService(MetaDataRegistrar.class);
+    return ApplicationManager.getApplication().getService(MetaDataRegistrar.class);
   }
 }
index cb5596a6454ba60e9bad59b2bef72f0315c641ca..7c25ce275f5e41ced5cb6c37edf78c403cce0bdc 100644 (file)
@@ -2,7 +2,6 @@
 package com.intellij.psi.util;
 
 import com.intellij.lang.Language;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.Key;
 import com.intellij.openapi.util.ModificationTracker;
@@ -40,7 +39,7 @@ public interface PsiModificationTracker extends ModificationTracker {
      * @return The instance of {@link PsiModificationTracker} corresponding to the given project.
      */
     public static PsiModificationTracker getInstance(Project project) {
-      return ServiceManager.getService(project, PsiModificationTracker.class);
+      return project.getService(PsiModificationTracker.class);
     }
   }
 
index bcf0cf485086e310d2687b87d12d1b3ebf3850e5..67ccb79a6921a4b0532a38c423553b0a9b52c507 100644 (file)
@@ -1,7 +1,7 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.util;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import org.jetbrains.annotations.NotNull;
 
 import java.util.Collection;
@@ -14,7 +14,7 @@ abstract class Queries {
 
   @NotNull
   static Queries getInstance() {
-    return ServiceManager.getService(Queries.class);
+    return ApplicationManager.getApplication().getService(Queries.class);
   }
 
   @NotNull
index 226b0152ffe54471b79e87b94d04c0d832100dde..85b0e64a9a8707f8c91478d5e450dd4c79ec5334 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.util.graph;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.util.Chunk;
 import org.jetbrains.annotations.NotNull;
@@ -13,7 +13,7 @@ import java.util.Set;
 
 public abstract class GraphAlgorithms {
   public static GraphAlgorithms getInstance() {
-    return ServiceManager.getService(GraphAlgorithms.class);
+    return ApplicationManager.getApplication().getService(GraphAlgorithms.class);
   }
 
   /**
index b53cff831e3697a6079a3ed9ef8611a41ec3347d..179308fa417174ca44d241044aa4a9197d960d27 100644 (file)
@@ -1,9 +1,8 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.concurrency;
 
 import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ex.ApplicationEx;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.progress.ProcessCanceledException;
 import com.intellij.openapi.progress.ProgressIndicator;
 import com.intellij.util.Consumer;
@@ -22,7 +21,7 @@ import java.util.concurrent.Future;
  */
 public abstract class JobLauncher {
   public static JobLauncher getInstance() {
-    return ServiceManager.getService(JobLauncher.class);
+    return ApplicationManager.getApplication().getService(JobLauncher.class);
   }
 
   /**
index c654c85bfebdb391d31692b9c8506351b209c9b3..d4a3d7f541aba93112e26d51ba26a7642bdec8a8 100644 (file)
@@ -8,7 +8,6 @@ import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
 import com.intellij.openapi.application.ReadAction;
 import com.intellij.openapi.application.TransactionGuard;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.diagnostic.Logger;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.editor.ex.DocumentEx;
@@ -51,7 +50,7 @@ public final class DocumentCommitThread implements Disposable, DocumentCommitPro
   private volatile boolean isDisposed;
 
   static DocumentCommitThread getInstance() {
-    return (DocumentCommitThread)ServiceManager.getService(DocumentCommitProcessor.class);
+    return (DocumentCommitThread)ApplicationManager.getApplication().getService(DocumentCommitProcessor.class);
   }
 
   DocumentCommitThread() {
index bee8282c3cd55cdd116742a80111a66414144d98..a6e484ce954dd17dab6b22c99c308eae448756e7 100644 (file)
@@ -1,8 +1,8 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.psi.stubs;
 
 import com.intellij.lang.Language;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.diagnostic.Attachment;
 import com.intellij.openapi.diagnostic.RuntimeExceptionWithAttachments;
 import com.intellij.openapi.editor.Document;
@@ -29,7 +29,7 @@ import java.util.List;
 public abstract class StubTreeLoader {
 
   public static StubTreeLoader getInstance() {
-    return ServiceManager.getService(StubTreeLoader.class);
+    return ApplicationManager.getApplication().getService(StubTreeLoader.class);
   }
 
   @Nullable
index b0a720aee17aa822b58683605381e51821d368ab..891bf387d581e7a645e74570871714e9d7ff42bb 100644 (file)
@@ -1,15 +1,15 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ide;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.application.ModalityState;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.util.BusyObject;
 import org.jetbrains.annotations.NotNull;
 
 public abstract class UiActivityMonitor {
   public static UiActivityMonitor getInstance() {
-    return ServiceManager.getService(UiActivityMonitor.class);
+    return ApplicationManager.getApplication().getService(UiActivityMonitor.class);
   }
 
   @NotNull
index 3d62d8014a39d613684964b36f90cceaf368073f..bceaadb19ab77ee54432466c49b909f4cc96da55 100644 (file)
@@ -1,7 +1,7 @@
-// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.ui;
 
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.util.containers.Convertor;
 
 import javax.swing.*;
@@ -9,7 +9,7 @@ import javax.swing.tree.TreePath;
 
 public abstract class TreeUIHelper {
   public static TreeUIHelper getInstance() {
-    return ServiceManager.getService(TreeUIHelper.class);
+    return ApplicationManager.getApplication().getService(TreeUIHelper.class);
   }
 
   /**
index 8b5ecb9ed196be1b179b54dfb06f5a5f38431947..425e1620704c082f7653db8d3d60259fbccf7ac6 100644 (file)
@@ -1,8 +1,8 @@
 // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.diff;
 
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.components.PersistentStateComponent;
-import com.intellij.openapi.components.ServiceManager;
 import com.intellij.openapi.components.State;
 import com.intellij.openapi.components.Storage;
 import com.intellij.util.xmlb.XmlSerializerUtil;
@@ -17,7 +17,7 @@ public class DiffApplicationSettings implements PersistentStateComponent<DiffApp
   public boolean SHOW_LST_WORD_DIFFERENCES = true;
 
   public static DiffApplicationSettings getInstance() {
-    return ServiceManager.getService(DiffApplicationSettings.class);
+    return ApplicationManager.getApplication().getService(DiffApplicationSettings.class);
   }
 
   @Override
index 27984c60cd5cf0aa9ed33a5ebda98c0984792db1..0080c9b6e785c3b21f61fea8569849ff8badbe69 100644 (file)
@@ -1,25 +1,11 @@
-/*
- * 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.
- */
+// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
 package com.intellij.diff;
 
 import com.intellij.diff.contents.DiffContent;
 import com.intellij.diff.contents.DocumentContent;
 import com.intellij.diff.contents.EmptyContent;
 import com.intellij.diff.contents.FileContent;
-import com.intellij.openapi.components.ServiceManager;
+import com.intellij.openapi.application.ApplicationManager;
 import com.intellij.openapi.editor.Document;
 import com.intellij.openapi.fileTypes.FileType;
 import com.intellij.openapi.project.Project;
@@ -36,7 +22,7 @@ import java.io.IOException;
 public abstract class DiffContentFactory {
   @NotNull
   public static DiffContentFactory getInstance() {
-    return ServiceManager.getService(DiffContentFactory.class);
+    return ApplicationManager.getApplication().getSer