carymrobbins / intellij-haskforce

Haskell plugin for IntelliJ IDEA
http://carymrobbins.github.io/intellij-haskforce/
Apache License 2.0
486 stars 39 forks source link

Cabal syntax highlighter encounters IllegalStateException #389

Open carymrobbins opened 5 years ago

carymrobbins commented 5 years ago
java.lang.IllegalStateException: TextAttributeKey(name:'CABAL_COLON', fallbackAttributeKey:'DEFAULT_BRACES')  was already registered with the other fallback attribute key: DEFAULT_OPERATION_SIGN
    at com.intellij.openapi.editor.colors.TextAttributesKey.mergeKeys(TextAttributesKey.java:215)
    at com.intellij.openapi.editor.colors.TextAttributesKey.lambda$getOrCreate$4(TextAttributesKey.java:201)
    at java.util.concurrent.ConcurrentHashMap.compute(ConcurrentHashMap.java:1877)
    at com.intellij.openapi.editor.colors.TextAttributesKey.getOrCreate(TextAttributesKey.java:201)
    at com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey(TextAttributesKey.java:188)
    at com.haskforce.cabal.highlighting.CabalSyntaxHighlighter.<clinit>(CabalSyntaxHighlighter.java:32)
    at com.haskforce.cabal.highlighting.CabalSyntaxHighlighterFactory.getSyntaxHighlighter(CabalSyntaxHighlighterFactory.java:14)
    at com.intellij.openapi.fileTypes.SyntaxHighlighterFactory.getSyntaxHighlighter(SyntaxHighlighterFactory.java:39)
    at com.intellij.openapi.fileTypes.LanguageFileTypeHighlighterProvider.create(LanguageFileTypeHighlighterProvider.java:31)
    at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.openapi.util.KeyedExtensionFactory.getByKey(KeyedExtensionFactory.java:91)
    at com.intellij.openapi.util.KeyedExtensionFactory.access$000(KeyedExtensionFactory.java:22)
    at com.intellij.openapi.util.KeyedExtensionFactory$1.invoke(KeyedExtensionFactory.java:45)
    at com.sun.proxy.$Proxy111.create(Unknown Source)
    at com.intellij.openapi.fileTypes.SyntaxHighlighterFactory.getSyntaxHighlighter(SyntaxHighlighterFactory.java:54)
    at com.intellij.openapi.fileTypes.FileTypeEditorHighlighterProviders$1.getEditorHighlighter(FileTypeEditorHighlighterProviders.java:51)
    at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:78)
    at com.intellij.openapi.editor.highlighter.EditorHighlighterFactoryImpl.createEditorHighlighter(EditorHighlighterFactoryImpl.java:107)
    at com.intellij.ide.highlighter.HighlighterFactory.createHighlighter(HighlighterFactory.java:42)
    at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:166)
    at com.intellij.psi.impl.cache.impl.id.PlatformIdTableBuilding$TokenSetTodoIndexer.map(PlatformIdTableBuilding.java:144)
    at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:103)
    at com.intellij.psi.impl.cache.impl.todo.TodoIndex$4.map(TodoIndex.java:95)
    at com.intellij.util.indexing.SnapshotInputMappings.readPersistentDataOrMap(SnapshotInputMappings.java:147)
    at com.intellij.util.indexing.VfsAwareMapReduceIndex.calculateUpdateData(VfsAwareMapReduceIndex.java:78)
    at com.intellij.util.indexing.impl.MapReduceIndex.update(MapReduceIndex.java:212)
    at com.intellij.util.indexing.FileBasedIndexImpl.updateSingleIndex(FileBasedIndexImpl.java:1673)
    at com.intellij.util.indexing.FileBasedIndexImpl.lambda$doIndexFileContent$27(FileBasedIndexImpl.java:1601)
    at com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl.freezeFileTypeTemporarilyIn(FileTypeManagerImpl.java:522)
    at com.intellij.util.indexing.FileBasedIndexImpl.doIndexFileContent(FileBasedIndexImpl.java:1560)
    at com.intellij.util.indexing.FileBasedIndexImpl.indexFileContent(FileBasedIndexImpl.java:1547)
    at com.intellij.util.indexing.FileBasedIndexImpl.processRefreshedFile(FileBasedIndexImpl.java:1526)
    at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1691)
    at com.intellij.util.indexing.FileBasedIndexImpl$VirtualFileUpdateTask.doProcess(FileBasedIndexImpl.java:1688)
    at com.intellij.util.indexing.UpdateTask.process(UpdateTask.java:76)
    at com.intellij.util.indexing.UpdateTask.processAll(UpdateTask.java:46)
    at com.intellij.util.indexing.FileBasedIndexImpl.forceUpdate(FileBasedIndexImpl.java:1710)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:743)
    at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:709)
    at com.intellij.psi.stubs.StubIndexImpl.doProcessStubs(StubIndexImpl.java:305)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:281)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:121)
    at com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:109)
    at org.jetbrains.kotlin.idea.stubindex.KotlinFileFacadeFqNameIndex.get(KotlinFileFacadeFqNameIndex.kt:30)
    at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport$findFilesForFacade$1.invoke(IDEKotlinAsJavaSupport.kt:232)
    at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport$findFilesForFacade$1.invoke(IDEKotlinAsJavaSupport.kt:37)
    at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt$sam$com_intellij_openapi_util_Computable$0.compute(ApplicationUtils.kt)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:956)
    at org.jetbrains.kotlin.idea.util.application.ApplicationUtilsKt.runReadAction(ApplicationUtils.kt:27)
    at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport.findFilesForFacade(IDEKotlinAsJavaSupport.kt:231)
    at org.jetbrains.kotlin.idea.caches.resolve.IDEKotlinAsJavaSupport.getFacadeClasses(IDEKotlinAsJavaSupport.kt:159)
    at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findClasses(JavaElementFinder.kt:58)
    at org.jetbrains.kotlin.asJava.finder.JavaElementFinder.findClass(JavaElementFinder.kt:46)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:116)
    at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:93)
    at com.intellij.cdi.utils.CdiCommonUtils.isCdiInstalled(CdiCommonUtils.java:221)
    at com.intellij.cdi.view.CdiViewFrameworkProvider.isAvailable(CdiViewFrameworkProvider.java:24)
    at com.intellij.javaee.toolwindow.view.JavaeeLibrarySearcher.isLibraryExists(JavaeeLibrarySearcher.java:16)
    at com.intellij.openapi.wm.impl.LibraryDependentToolWindowManager.lambda$null$2(LibraryDependentToolWindowManager.java:68)
    at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$0(DumbService.java:100)
    at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$1(DumbService.java:145)
    at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:974)
    at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
    at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:138)
    at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:100)
    at com.intellij.openapi.wm.impl.LibraryDependentToolWindowManager.lambda$doCheckToolWindowStatuses$3(LibraryDependentToolWindowManager.java:66)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.lambda$runWithWriteActionPriority$1(ProgressIndicatorUtils.java:121)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:586)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:86)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runWithWriteActionPriority(ProgressIndicatorUtils.java:110)
    at com.intellij.openapi.wm.impl.LibraryDependentToolWindowManager.doCheckToolWindowStatuses(LibraryDependentToolWindowManager.java:72)
    at com.intellij.openapi.wm.impl.LibraryDependentToolWindowManager.lambda$checkToolWindowStatuses$0(LibraryDependentToolWindowManager.java:55)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:220)
    at com.intellij.util.concurrency.BoundedTaskExecutor.access$100(BoundedTaskExecutor.java:26)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.lambda$run$0(BoundedTaskExecutor.java:198)
    at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:224)
    at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:194)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)