Closed maciejmatuszak closed 1 year ago
Hi @maciejmatuszak, First, thank you for the insights, it should make the CLion part of the ROS-CMake integration much faster to fully implement.
To be fair, right now even with plugin registration working correctly, nothing would work properly as the "plugin invariant" CMake adapters do not implement their CLion counterparts. Issue #76 is all about that
I think the proposed tag is a good idea, as I would want to add C++ specific integrations (for example, jumping to message definitions from C++ code using a gutter icon).
I also think the method you proposed is better than the current approach since its more robust to class name changes and deprecations.
However, the big issue with the how most of the plugin components in CMakeExtensions.xml
and in CMakeClasses.addHomeDependencies()
is that they need to be applied when there is no CLion, hence why they need to be outside the depend tag. It would be very nice if there was a "depend unless" sort of tag, but to my knowledge, there is nothing of the sort.
Cheers!
Got your branch working in latest CLion, I did not check backward versions though... https://github.com/Noam-Dori/ros-integrate/pull/83
Describe the bug First, this relate the work in progress "f-cmake" branch and CMake language implementation
Trying to use it with latest Clion is failing with:
This is caused by failure in CMakeClasses.checkCLion(), that relies on finding the "com.jetbrains.cmake.CMakeLanguage" class. That class is now part of plugin and loaded after
ros.integrate
plugin hence it can not find it. see the discussion hereThe suggested solution is to use optional dependency in plugin.xml:
with runtime check for the plugin like this:
The way to introduce optional dependency without
config-file
has changed as well See here: The proposed solution:<depends optional="true" config-file="">com.intellij.clion</depends>
will no longer works. I think it needs dummy config-file or omit the param all together:<depends optional="true" >com.intellij.clion</depends>
This will be red in IntelliJ as theconfig-file
arg is mandatory, but it works at runtime. Maybe the entireCMakeExtensions.xml
can be included that way?Testing it bit more I notice that just by adding the dependency on the plugin causes it to be loaded early and the
com.jetbrains.cmake.CMakeLanguage
class can be found again. So the runtime check can stay the same.Hope this helps.