Closed Noam-Dori closed 3 years ago
I tested this PR in CLion/Linux. It doesn't seem to help with the problem described in #39. Steps I did:
I have a single project open when opening/closing CLion. Hatchery is disabled.
How can I help debugging this issue?
From what I understand, the issue comes from the module system. Thus, any info you have on the modules is useful for debugging. Information about modules is stored in the .idea folder in modules.xml amd in each *.iml file. Information about libraries is also stored, but in the libraries folder. In that project, what do those have in them?
Also, since this fix changed the module/library model, projects from version 0.1.5 might have a harder time with the update. Did you use a new project or an old project that used 0.1.5 before? (Old projects be fixed but I want to be sure this solution works first before trying to update old projects)
Now I'm confused.
I succeeded building the plugin using gradle now. I still get the ambiguous Module errors. I had to substitute all instances of Module
with com.intellij.openapi.module.Module
to be able to build the plugin. Maybe a difference in the JDK distributions? My system Javac is /usr/lib/jvm/java-11-openjdk-amd64/bin/javac
.
However, if I install the plugin built by me, it doesn't seem to work. .msg file coloring and go to definition work, but package.xml completion shows nothing. Also, the project root project view doesn't have the "dot" marking a module.
If I install the version you provided (overwriting the custom-built version), I get startup error
Unknown Module Type Cannot determine module type ("WORKSPACE_MODULE_TYPE") for the following module:"workspace" The module will be treated as a Unknown module. But the package.xml completion and .msg coloring work. Did you use another module type in the published zip?
modules.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/robot_self_filter.iml" filepath="$PROJECT_DIR$/.idea/robot_self_filter.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/workspace.iml" filepath="$PROJECT_DIR$/.idea/workspace.iml" />
</modules>
</component>
</project>
robot_self_filter.iml:
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
workspace.iml:
<?xml version="1.0" encoding="UTF-8"?>
<module type="WORKSPACE_MODULE_TYPE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="workspace" level="project" />
<orderEntry type="library" name="ROS" level="project" />
</component>
</module>
I'll try with a clean project.
This happens because this fix creates a new module type, "WORKSPACE_MODULE_TYPE".
In regards to the issue with your current project, it seems there is a bad library there thats causing trouble, the "workspace" library which workspace.iml depends on for some reason. It is also the reason why the coloring still works. With that in mind, what do you have in the libraries folder in .idea?
With regards to building from source, I use Java 8. Java 11 introduced special modules which is probably what causes the ambiguity.
I would like to see a screenshot of the project view after you built it, specifically the package folders. Did they become blue with dots?
I think I may have distributed the wrong version in the zip because the fix is supposed to recognize the new module type. I updated a the zip with the version I checked against so it should be able to recognize the new module type.
I did tests with clean projects (deleting .idea).
And yeah, I also concluded the distributed zip is wrong. Nevertheless, here are my findings (I'll update them with the newly provided zip).
The first start after updating the plugin with .idea deleted ended up without ROS in External libraries
(it was there for a few seconds, but once indexing started, it disappeared):
Second start added even the ROS entry to External libraries
:
Then I changed plugin settings, removed all "additional workspace paths" and set the "workspace path":
The workspace entries are indeed displayed as modules, even robot_body_filter
, which is the current project:
However, package.xml completion in <depend>
still doesn't work.
Surprisingly, after a while clicking around, I probably got the plugin working (sorry, no screenshot). It displayed red underline for <author>
tags without email and completion in package.xml started working.
After I restarted CLion, all of it was lost. Moreover, robot_body_filter
is no longer recognized as a module:
First, the issue with the red
Here is a reference of how things are on my tests for reference:
You mean you open the whole workspace as the CLion project? That would work when using the standard catkin, which makes CMakeLists.txt around, but e.g. catkin tools do not make any additional CMakeLists.txt outside the projects. I use this type of build, and thus I can't open the whole workspace as a project.
Anyways, the CMake issue is gone using this branch. But at least a part of the plugin doesn't work, so I can't tell if it's because the bug is fixed or because the plugin doesn't do anything...
I think I managed to replicate your scenario. From what it seems both from the .idea folder and from a functional point is that the only problem with the CMake module is that the project view does not properly show it (which might be because the ROS module ws/catkin_ws is a parent of the CMake directory). Were you unable to use any feature of the plugin or of CLion save for that visual bug? From my tests everything worked including proper file icons, package.xml completion, and general package completion.
As I wrote in my observations above, package.xml completion does not work for me with the updated plugin. Or - it worked once and then "got lost" after a restart.
I replicated your problem. What stood out to me was that in your screenshot, all the other packages were recognized correctly. In my replicated scenario, I opened a new workspace and in it I put two packages, one which I opened as a project and which I didn't. The thing is, I first opened the workspace as a project. As a result, the path to the project directory contained two .idea folders. For some reason, when you have nesting .ideas, it messes things up. Deleting the top level .idea folder (the one in the workspace folder) fixed the issue. I then went ahead and tested my theory again with the other package and created a project there. As a result, since the workspace still had its .idea and both my packages also contained .idea folders, neither package was recognized as a package. Deleting the top level .idea immediately allowed both packages to be recognized by the plugin. This is great because it means you can open multiple projects in the same workspace and they will not disturb each other. Another option is to instead of using the packages as projects, to use the workspace directory as the .idea holder. Of course, deleting all package .idea folders works, but opening the workspace as your project will not require you to delete the package .idea folders at all.
Basically you have 3 options to solve the "nesting projects" issue:
Sadly I don't think there is a way to be able to both keep all .idea folders and open a package as a directory because the ROS workspace module requires knowing about the workspace directory's contents.
This also explains why this bug only happened when you re-opened CLion since it is caused by loading the wrong .idea folder which only happens when you open a project.
In short, you probably have two conflicting .idea folders in your package, robot_body_filter
, and your workspace, ws
. Deleting one of those folders should fix the issue.
Let me know if this solved your issue or if there are still problems
I'm sorry, I don't have any nested .idea folders, yet the problem is still there:
$ pwd
/media/data/subt/thirdparty/ws/src/robot_state_publisher
$ find ../../../ -name .idea
../../../ws/src/nimbro_network/tf_throttle/.idea
../../../ws/src/nimbro_network/nimbro_service_transport/.idea
../../../ws/src/nimbro_network/nimbro_topic_transport/.idea
../../../ws/src/gazebo_noisy_depth_camera/.idea
../../../ws/src/static_transform_mux/.idea
../../../ws/src/gazebo_custom_sensor_preloader/.idea
../../../ws/src/dynamic_robot_state_publisher/.idea
../../../ws/src/tensorflow_ros_cpp/.idea
../../../ws/src/nav_utils/.idea
../../../ws/src/robot_state_publisher/.idea
../../../ws/src/mikrotik_swos_tools/.idea
../../../ws/src/multilayer_laser_scan/.idea
../../../ws/src/realsense_gazebo_plugin/.idea
../../../ws/src/ubnt_airos_tools/.idea
../../../ws/src/gazebo_rotating_lidar/.idea
../../../ws/src/robot_body_filter/.idea
../../../ws/src/lms1xx/.idea
../../../ws/src/tf2_server/.idea
the latest commits to this branch fixed the model. This was tested on:
However, there is a weird bug where if you change a library item, indexing for packages crashes. This will be worked on in the next version since this version waited long enough. The issue ticket for it is #46
I'm sorry, I tested the 0.1.6b2 release and not much improvement there. I tried even with a completely "clean" package (no .idea folder) in a workspace with other packages, which "depends" on other workspaces (or extends/overlays them, in other terminology). But no recursive .idea folders. All I got were the previously seen errors - cpp files reported as not belonging to the project, ROS and workspace items disappearing from header search paths after reloading CMake project, package.xml all or mostly red. No matter if I restarted CLion in between.
In the console, I saw an abundance of exceptions, e.g.:
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - CLion 2020.2 Build #CL-202.6397.106
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - OS: Linux
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - Plugin to blame: ROS Support version: 0.1.6
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - Last Action: GotoDeclaration
2020-08-25 18:11:07,091 [ 81391] ERROR - aemon.impl.PassExecutorService - null
java.lang.NullPointerException
at ros.integrate.pkg.xml.PackageXmlReferenceContributor$1.getReferencesByElement(PackageXmlReferenceContributor.java:37)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:202)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:165)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:145)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:40)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:153)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:39)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.getReferencesImpl(XmlTagDelegate.java:165)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.lambda$getDefaultReferences$0(XmlTagDelegate.java:126)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:153)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.getDefaultReferences(XmlTagDelegate.java:126)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:95)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:85)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection.checkRefs(XmlPathReferenceInspection.java:58)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection.access$000(XmlPathReferenceInspection.java:35)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection$1.visitXmlTag(XmlPathReferenceInspection.java:52)
at com.intellij.psi.impl.source.xml.XmlTagImpl.accept(XmlTagImpl.java:300)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:294)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:263)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:262)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:262)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
or
2020-08-25 18:05:30,763 [ 409489] ERROR - aemon.impl.PassExecutorService - CLion 2020.2 Build #CL-202.6397.106
2020-08-25 18:05:30,763 [ 409489] ERROR - aemon.impl.PassExecutorService - JDK: 11.0.7; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-08-25 18:05:30,763 [ 409489] ERROR - aemon.impl.PassExecutorService - OS: Linux
2020-08-25 18:05:30,764 [ 409490] ERROR - aemon.impl.PassExecutorService - Plugin to blame: ROS Support version: 0.1.6
2020-08-25 18:05:30,764 [ 409490] ERROR - aemon.impl.PassExecutorService - Last Action: CMake.ReloadCMakeProject
2020-08-25 18:05:30,764 [ 409490] ERROR - aemon.impl.PassExecutorService - null
java.lang.NullPointerException
at ros.integrate.pkg.xml.PackageXmlReferenceContributor$1.getReferencesByElement(PackageXmlReferenceContributor.java:37)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getReferences(ReferenceProvidersRegistryImpl.java:202)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.mapNotEmptyReferencesFromProviders(ReferenceProvidersRegistryImpl.java:165)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:145)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:40)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:153)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:39)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.getReferencesImpl(XmlTagDelegate.java:165)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.lambda$getDefaultReferences$0(XmlTagDelegate.java:126)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:153)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:112)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:71)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:76)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:150)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:120)
at com.intellij.psi.impl.source.xml.XmlTagDelegate.getDefaultReferences(XmlTagDelegate.java:126)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:95)
at com.intellij.psi.impl.source.xml.XmlTagImpl.getReferences(XmlTagImpl.java:85)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection.checkRefs(XmlPathReferenceInspection.java:58)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection.access$000(XmlPathReferenceInspection.java:35)
at com.intellij.codeInsight.daemon.impl.analysis.XmlPathReferenceInspection$1.visitXmlTag(XmlPathReferenceInspection.java:52)
at com.intellij.psi.impl.source.xml.XmlTagImpl.accept(XmlTagImpl.java:300)
at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:294)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$3(LocalInspectionsPass.java:263)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:155)
at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:147)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:262)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:126)
at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:115)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:262)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:162)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1105)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:105)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:117)
at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:96)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:96)
at com.intellij.concurrency.JobLauncherImpl.invokeConcurrentlyUnderProgress(JobLauncherImpl.java:57)
at com.intellij.concurrency.JobLauncher.invokeConcurrentlyUnderProgress(JobLauncher.java:49)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.visitPriorityElementsAndInit(LocalInspectionsPass.java:266)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.inspect(LocalInspectionsPass.java:191)
at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.collectInformationWithProgress(LocalInspectionsPass.java:113)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:80)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:399)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:392)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Once CLion even disabled the plugin saying that it was unable to save its settings (but I haven't been running that CLion instance from console, so I don't know exactly what went wrong).
I also tried running clion with or without the ROS environment sourced, but that didn't change anything.
This PR makes sure the project model is not destroyed every time the IDE is opened, and that ROS works independently of the IDE functionality.
This is done by creating a new module type for the ROS model, and making sure the core library and the new module are not destroyed every time the project is opened.