CUBA Studio 7 plugin & CUBA old plugin

It seems that I cannot use both plugins in IntellijIDEA simultaneously. Are they incompatible?
I have several projects based on 6.x platform version and don’t plan to migrate them to 7. And I want to start new CUBA 7 projects. Should I use two separate IDEAs?

1 Like

Hello @evgenypopov

Yes, you cannot use old and new plugins at the same time.

I suggest you to download our bundled version of IJ IDEA and use it for projects based on CUBA 7.

image

Regards,
Daniil

Thank you Daniil but unfortunately your bundled version is based on the IDEA сommunity edition though my projects usually include custom js-components and JavaScript is poorly supported by IDEA CE.
Probably I’ll try to use two different versions of IDEA Ultimate.

1 Like

Yes, you’re right. We plan to support UE according to our roadmap (YouTrack), but I cannot give you any details now.

Actually, the new CUBA plugin includes all functionality of the old one, so you should be able to use it for all your projects. Just open the old projects in the old way - by generating idea project files and opening *.ipr. It will even be integrated with the old Studio.

Yes, I found where to switch on the old plugin functionality support and I can use a single IDEA instance now, thanks.

Maybe it’s a CUBA v7 IDEA plugin bug: I have a CUBA 6.x project in one IDEA window and when I open a CUBA 7 project from “File - Open recent” there are no CUBA functionality at all - neither the main menu CUBA item nor the CUBA project structure and form designers.

Moreover, after that IDEA doesn’t recognize the CUBA 7 project anymore and re-import of build.gradle is required.

Hello @evgenypopov

I’ve checked your case and cannot reproduce the problem - CUBA 7 based project is imported and plugin functionality becomes available.

Could you clarify conditions - which version of Intellij IDEA is used? Which version of CUBA is used in old project? CUBA Studio plugin is installed in IJ IDEA (not bundled version is used), am I right?

Hi,
IDEA 2018.3.4 + CUBA plugin v7.2-183
Old project - CUBA Platform 6.3.4
The old project was opened in CUBA Studio server 6.10.2 + Chrome browser + IDEA when I tried to open (not import) a CUBA 7 project by “File - Open recent” menu item.

Unfortunately I still cannot reproduce the problem.

Could you try to reproduce the problem with nightly Studio plugin build? You can find instructions here:

CUBA Studio 7 Nightly Builds Available

Ok, look at my screenshots.
That’s CUBA 7 project IDEA window and it’s all right:
idea-p7prj

Then I closed the window and there’s CUBA 6.3.4 project IDEA window only remained:
3prj

Let’s open CUBA 7 project again:
idea-p7open

And I have no CUBA functionality:
idea-p7nocuba

The same window view I get after closing all IDEA windows and starting the IDEA again.
What’s wrong?

I installed the latest nightly build (from 20.02.19) ang got the same result. It’s strange that CUBA menu item was visible during project loading and had disappeared when load was finished.

Okay, thank you for detailed example, I’ll try again to reproduce the problem.

I wanted to ask same question. In modern plugin “Deploy file to tomcat” is missing from context menus of files/tabs.
Though this action is left in settings (I thought because I’ve set project-specific hotkey for it but no, in any case)
image
Also searching for CUBA doesn’t give result
In old cuba project/IPR during indexing CUBA context menu is available but grayedout
image
Then disappears once indexing is done
So I have to use EAP IDEA ULTIMATE + old plugin
And stable IDEA ULTIMATE + new plugin
Old cuba plugin had file context menu with deploy vommant but wasn’t presented in main IDEA’s menu…
image
new with connection enabled doesn’t

Also question to author about his problem. Why don’t you have such IDEA run config
image
?
But instead you have gradle icon and “test-platform7”
image
Maybe that’s (a part of the) problem?
Also I want to note that probably in EAP builds of IDEA you’ll get stacktraces/exceptions that are skipped/hidden in non-EAP(i.e. stable) IDEA builds. stacktraces about CUBA plugin as well. But I don’t have time currently to test it. I seemed to have stacktrace of this issue saying smthg. like "can’t initialize window " when xml was opened previously and reopened on session restore (i.e project reopen / workspace restore)

I upgraded CUBA plugin to v8.0.NIGHTLY21-183 and my work is totally paralyzed now. I cannot:

  1. change database type from hsql to postgresql in project properties window - the connection parameters are not being remembered
  2. generate database scripts - get the error: “java.lang.IllegalArgumentException: Property cuba.dbmsType is not found. Check app.properties file.” This is lie. The same error occurs when I try to start application server.
  3. even connect to my local hsqlDB - the plugin requires a password for “sa” user

test-platform7.zip (141.0 KB)

idea.log (468.7 KB)

This happens when I renamed an entity field: name -> nameDirect. Plugin proceeded global search-and-replace action in all project files (java & xml) and all occurences “name” were replaced to “nameDirect”, you may guess about consequences.
I performed the reverse replace and my project is executable now.

Hello @evgenypopov

I had no luck to reproduce the problem with your case, but i’ve managed to accidentally met the issue today.

An issue is created related to the problem: YouTrack

Regards,
Daniil

Hi, @evgenypopov

As I see in the log file provided, the test-platform7.ipr project was opened. For CUBA related functionality to be available, the project should be opened as Gradle project.
Seems that IDEA stored *.ipr project file in the recent projects list.
You can check it in File > Open Recent > Manage Projects… If the project path is *.ipr file - then CUBA functionality won’t be available.

For platform 7+ projects *.ipr doesn’t make sense. It is recommended to run gradlew cleanIdea to remove it.

1 Like