Skip to content

Improve compatibility with recent IntelliJ IDEA release #159

Closed
@snicoll

Description

@snicoll

With this plugin in IJ 2019.3 I get the following in the logs constantly:

2019-12-20 22:44:56,135 [23900685]  ERROR - r.PlatformComponentManagerImpl - com.intellij.psi.codeStyle.CodeStyleManager requested as a service, but it is a component - convert it to a service or change call to project.getComponent() 
com.intellij.diagnostic.PluginException: com.intellij.psi.codeStyle.CodeStyleManager requested as a service, but it is a component - convert it to a service or change call to project.getComponent()
	at com.intellij.ide.plugins.PluginManagerCore.createPluginException(PluginManagerCore.java:405)
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:12)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:58)
	at com.intellij.diagnostic.PluginException.logPluginError(PluginException.java:75)
	at com.intellij.serviceContainer.PlatformComponentManagerImpl.getService(PlatformComponentManagerImpl.kt:308)
	at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:22)
	at com.intellij.psi.codeStyle.CodeStyleManager.getInstance(CodeStyleManager.java:40)
	at com.intellij.psi.impl.DiffLog.doActualPsiChange(DiffLog.java:255)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$doCommit$8(DocumentCommitThread.java:704)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitToExistingPsi(PsiDocumentManagerBase.java:416)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$finishCommitInWriteAction$4(PsiDocumentManagerBase.java:388)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:585)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:531)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeNonCancelableSection(CoreProgressManager.java:191)
	at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommitInWriteAction(PsiDocumentManagerBase.java:383)
	at com.intellij.psi.impl.PsiDocumentManagerImpl.finishCommitInWriteAction(PsiDocumentManagerImpl.java:130)
	at com.intellij.psi.impl.PsiDocumentManagerBase$1.run(PsiDocumentManagerBase.java:344)
	at com.intellij.psi.impl.PsiDocumentManagerBase.finishCommit(PsiDocumentManagerBase.java:348)
	at com.intellij.psi.impl.DocumentCommitThread.lambda$createFinishCommitInEDTRunnable$5(DocumentCommitThread.java:490)
	at com.intellij.psi.impl.DocumentCommitThread.commitSynchronously(DocumentCommitThread.java:363)
	at com.intellij.psi.impl.PsiDocumentManagerBase.lambda$doCommit$5(PsiDocumentManagerBase.java:477)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:885)
	at com.intellij.psi.impl.PsiDocumentManagerBase.doCommit(PsiDocumentManagerBase.java:485)
	at com.intellij.psi.impl.PsiDocumentManagerBase.commitDocument(PsiDocumentManagerBase.java:324)
	at com.intellij.codeInsight.template.impl.ShortenFQNamesProcessor.processText(ShortenFQNamesProcessor.java:24)
	at com.intellij.codeInsight.template.impl.TemplateState.reformat(TemplateState.java:1275)
	at com.intellij.codeInsight.template.impl.TemplateState.lambda$doReformat$2(TemplateState.java:481)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:885)
	at com.intellij.codeInsight.template.impl.TemplateState.doReformat(TemplateState.java:485)
	at com.intellij.codeInsight.template.impl.TemplateState.lambda$processAllExpressions$1(TemplateState.java:444)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:885)
	at com.intellij.codeInsight.template.impl.TemplateState.processAllExpressions(TemplateState.java:428)
	at com.intellij.codeInsight.template.impl.TemplateState.start(TemplateState.java:399)
	at com.intellij.codeInsight.template.impl.TemplateManagerImpl.lambda$startTemplate$2(TemplateManagerImpl.java:178)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:212)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154)
	at com.intellij.codeInsight.template.impl.TemplateManagerImpl.startTemplate(TemplateManagerImpl.java:182)
	at com.intellij.codeInsight.template.impl.TemplateManagerImpl.startTemplate(TemplateManagerImpl.java:199)
	at com.intellij.codeInsight.completion.XmlTagInsertHandler.insertIncompleteTag(XmlTagInsertHandler.java:144)
	at com.intellij.codeInsight.completion.XmlTagInsertHandler.handleInsert(XmlTagInsertHandler.java:85)
	at com.intellij.codeInsight.lookup.LookupElementBuilder.handleInsert(LookupElementBuilder.java:456)
	at com.intellij.codeInsight.lookup.LookupElementDecorator.handleInsert(LookupElementDecorator.java:54)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$insertItem$11(CodeCompletionHandlerBase.java:593)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:885)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.insertItem(CodeCompletionHandlerBase.java:577)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$insertItemHonorBlockSelection$8(CodeCompletionHandlerBase.java:493)
	at com.intellij.openapi.editor.impl.CaretModelImpl.lambda$runForEachCaret$3(CaretModelImpl.java:355)
	at com.intellij.openapi.editor.impl.CaretModelImpl.doWithCaretMerging(CaretModelImpl.java:457)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:347)
	at com.intellij.openapi.editor.impl.CaretModelImpl.runForEachCaret(CaretModelImpl.java:337)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.insertItemHonorBlockSelection(CodeCompletionHandlerBase.java:484)
	at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lookupItemSelected(CodeCompletionHandlerBase.java:459)
	at com.intellij.codeInsight.completion.CompletionProgressIndicator.itemSelected(CompletionProgressIndicator.java:172)
	at com.intellij.codeInsight.completion.CompletionLookupArrangerImpl.itemSelected(CompletionLookupArrangerImpl.java:171)
	at com.intellij.codeInsight.lookup.impl.LookupImpl.fireItemSelected(LookupImpl.java:995)
	at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookupInWritableFile(LookupImpl.java:606)
	at com.intellij.codeInsight.lookup.impl.LookupImpl.lambda$finishLookup$13(LookupImpl.java:558)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:212)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:168)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:154)
	at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:558)
	at com.intellij.codeInsight.lookup.impl.LookupImpl.finishLookup(LookupImpl.java:543)
	at com.intellij.codeInsight.lookup.impl.actions.ChooseItemAction$Handler.execute(ChooseItemAction.java:70)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doExecute(EditorActionHandler.java:178)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.lambda$execute$4(EditorActionHandler.java:216)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doIfEnabled(EditorActionHandler.java:103)
	at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:215)
	at com.intellij.openapi.editor.actionSystem.EditorAction.lambda$actionPerformed$0(EditorAction.java:97)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:220)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:178)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:106)
	at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:81)
	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:298)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:315)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$1.performAction(IdeKeyEventDispatcher.java:604)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.lambda$processAction$3(IdeKeyEventDispatcher.java:657)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:193)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:656)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.java:517)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:472)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:221)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.java:830)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:775)
	at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:424)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:698)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

I can't say for sure this plugin is the culprit but SpringFormatComponentis a component and not a service so this might be related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions