Studio 13 BETA published

Hello everyone,
We have just published the 13.0.BETA version of the CUBA Studio.

Notable changes of the release 13 include:

Rearranged Screen Designer layout

We have rearranged Screen Designer layout targeting the following goals:

  • Efficient usage of the IDE window space;
  • Convenient switching between XML descriptor source code and layout preview;
  • Allow experienced developers to use Designer capabilities when viewing and editing the XML code.

The following changes were made:

1. Designer panels became independent IDE tool windows.

Component Hierarchy is left in the up-right corner of the IDE, as it was before.
Component Palette is displayed in the bottom-right corner.
Component Inspector is displayed in the bottom-left corner and contains Properties and Handlers tabs.

These tool windows appear automatically when you open screen descriptor in the editor. When you switch active screen descriptor file in the editor, the content of the tool windows is updated. Sometimes when you open other IDE tool windows (such as Gradle, Persistence etc.), Designer’s panels become hidden, and you can re-open them by clicking the corresponding buttons in the left and right sides of the IDE window.

We have kept the ability to display Component Inspector in the bottom-right corner for those users who prefer the old layout. In order to move this panel to the right side, click the “Move to Right Bottom” button located in the panel’s title.

2. Layout preview panel now shares editor space with the source code of the screen descriptor.

The tabsheet with “Text” and “Designer” tabs has gone. On the right side of the top panel of the screen descriptor there are four buttons that switch preview display mode:

  • Editor only - only source code is displayed in the editor;
  • Editor and Preview - editor space is split to contain both source code and preview;
  • Preview only - only preview is displayed in the editor (similar to the old Screen Designer layout);
  • Preview in Window - source code is displayed in the editor, while preview is displayed in the separate window which can be moved to another display.

3. Designer panels are active when editing XML code and interact with the editor.

Experienced developers who navigate and modify screen descriptors by editing the XML source code can now benefit from the editing capabilities of the screen designer:

  • When the editor caret is moved from one XML tag to another, corresponding component is selected in the Component Hierarchy and Component Inspector panels;
  • Clicking element in the Hierarchy panel moves the caret to the corresponding XML tag in the source code;
  • You can drag new components from the Palette to the Hierarchy, reorder components and edit component properties in the Inspector panel when only source code is displayed in the editor. The source code immediately reflects all changes.

Screen Designer - displaying table columns and actions in the hierarchy

Table (and DataGrid) columns and actions are now displayed as first-class elements in the Screen Designer’s Component Hierarchy tree.

After implementing that we were able to get rid of several modal dialogs - now you can view and edit column and action properties and event handlers right in the Component Inspector panel.

Adding a new table column or action also became easier. When a table, one of table columns or actions is selected, the Component Inspector displays the “+ Add” button. By pressing it, you can add one or more columns or actions to the table.

Screen Designer - component creation wizard dialogs

Adding components, data containers, actions to the screen has become much more pleasant than it was before. Wizard dialogs were introduced for the following screen elements:

  • Data containers;
  • Tables and grids;
  • Table column;
  • Table action;
  • Form field.

When you add one of mentioned components to the screen, a dialog appears that allows you to specify the most important component properties. For example, when adding a DataGrid to the screen, you are able to choose existing or create new data container, specify component id and select a set of standard actions and buttons to be added to the table.

Project Wizard improvements

The CUBA project wizard has been extended. We have rearranged fields between steps and added more fields to the wizard:

  • Module prefix;
  • Supported programming languages;
  • Locales;
  • Main data store properties.

JVM options and Environment variables for the CUBA Run Configuration

Two additional settings were added to the “CUBA Application” run configuration: command line arguments and environment variables. These settings are applied to the tomcat process running the CUBA application in debug mode. For example, by specifying command line arguments you can set non-default timezone: “-Duser.timezone=Europe/London” or increase memory settings: “-Xmx1500m” for the application server.

Kotlin Support (CUBA 7.2)

Studio 13 fully supports Kotlin as a programming language. You can select Kotlin as a project’s programming language in the project creation wizard. All elements of the CUBA project: entities, screens, services can be generated using Kotlin. Studio visual designers, smart auto completions, inspections and hot deploy support Kotlin language as well.

This feature will be available for projects based on CUBA 7.2 (beta will be published soon).

New Login Screen template (CUBA 7.2)

New template for the login screen with updated layout and design has been added. Examples of how the new login screen looks like can be found here: https://github.com/cuba-platform/cuba/issues/2455

In order to add new login screen to your project, choose “Login screen with branding image” template in the New -> Screen wizard.

New login screen template is available for projects based on CUBA 7.2 (beta will be published soon).

Beta Testing

We are now in the process of testing the new Studio version.
We will greatly appreciate if you try to use the beta version with your environment/project and let us know about any issues.

The 13.0.BETA release has been published to the separate plugins channel in the JetBrains plugins repository.
In order to try the beta version, you need to do the following:

  • Open the IDEA Settings -> Plugins dialog.
  • Click to the :gear: icon and select Manage Plugin Repositories.
  • Click “+” (“Add”) and enter the following in the Repository URL field:
    https://plugins.jetbrains.com/plugins/beta/list
  • Switch to the Marketplace tab. You should immediately see that CUBA plugin requests for update to 13.0.BETA version.
  • Click Update.

If (when) you need to return back to stable plugin version, do the following:

  • Open the IDEA Settings -> Plugins dialog.
  • Uninstall CUBA plugin
  • Click to the :gear: icon and select Manage Plugin Repositories.
  • Remove “beta” repository from the list
  • Install CUBA plugin again, it will come from the stable plugins channel.

We are looking forward to your feedback!

6 Likes

Will 7.2 support accessing the session info (the user details, for example) directly on the screens? This has been missing in action for quite some time.

Thanks for releasing the beta version. I have started using it today.
I was expecting screen template (project template) can be generated and maintained for platform 7.x in this version of Studio. Is it still in plan?

Hi,
Yes, it is in plan, just had not enough time yet for this feature. It may be implemented in Studio release 14 or 15.

little bit far!

I got this exception in this BETA version:

com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
at com.intellij.openapi.project.IndexNotReadyException.create(IndexNotReadyException.java:77)
at com.intellij.util.indexing.FileBasedIndexImpl.handleDumbMode(FileBasedIndexImpl.java:777)
at com.intellij.util.indexing.FileBasedIndexImpl.ensureUpToDate(FileBasedIndexImpl.java:726)
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 com.intellij.psi.impl.java.stubs.index.JavaFullClassNameIndex.get(JavaFullClassNameIndex.java:47)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.doFindClasses(JavaFileManagerImpl.java:88)
at com.intellij.psi.impl.file.impl.JavaFileManagerImpl.findClass(JavaFileManagerImpl.java:123)
at com.intellij.psi.impl.PsiElementFinderImpl.findClass(PsiElementFinderImpl.java:38)
at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:116)
at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:93)
at com.haulmont.studio.backend.util.MetadataUtil.getPsiClass(MetadataUtil.java:1379)
at com.haulmont.studio.backend.util.MetadataUtil.lambda$isDeepInheritor$29(MetadataUtil.java:692)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:956)
at com.haulmont.studio.backend.util.MetadataUtil.ra(MetadataUtil.java:950)
at com.haulmont.studio.backend.util.MetadataUtil.isDeepInheritor(MetadataUtil.java:687)
at com.haulmont.studio.backend.util.MetadataUtil.isDeepInheritor(MetadataUtil.java:679)
at com.haulmont.studio.backend.model.Screen.lambda$getType$3(Screen.java:155)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:956)
at com.haulmont.studio.backend.util.MetadataUtil.ra(MetadataUtil.java:950)
at com.haulmont.studio.backend.model.Screen.getType(Screen.java:152)
at com.haulmont.studio.intellij.ui.sd.designer.TabularPropertiesEditor.doNotShowOnPropertiesTab(TabularPropertiesEditor.java:490)
at com.haulmont.studio.intellij.ui.sd.designer.TabularPropertiesEditor.lambda$initPropertyItems$5(TabularPropertiesEditor.java:237)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at one.util.streamex.AbstractStreamEx.forEach(AbstractStreamEx.java:314)
at com.haulmont.studio.intellij.ui.sd.designer.TabularPropertiesEditor.initPropertyItems(TabularPropertiesEditor.java:238)
at com.haulmont.studio.intellij.ui.sd.designer.TabularPropertiesEditor.refresh(TabularPropertiesEditor.java:193)
at com.haulmont.studio.intellij.ui.sd.designer.TabularPropertiesEditor.setComponent(TabularPropertiesEditor.java:183)
at com.haulmont.studio.intellij.ui.sd.designer.ObjectInspector$ComponentHierarchyChangeListener.lambda$valueChanged$1(ObjectInspector.java:570)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:435)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:419)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:403)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:729)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:678)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:373)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

To my point of view, the previous location was better than this BETA version: looking at the same area of the screen (less eye movement) to switching to component inspector after selecting the component in hierarchy was easier. Can one still drag the location to as indicated in the image below (like v12)?

image

It seems that the lookup annotation is not properly translated when switching from the Designer to the code. Annotation parameters are deleted.

I’ve been using the beta for about two days. I really like the preview as a separate screen. I keep previews on my second monitor. It really makes quick edits much easier. One thing to report:

If I close a screen definition XML file, the corresponding preview screen remains open. However, if I open the XML file for the same screen again, a second preview window opens.

I believe the interface would be much more intuitive if the preview closes and opens in conjunction with the XML file. This would match the side by side view style functionality.

The window closes when I toggle between modes (from ‘floating preview window mode’ to ‘inline preview mode’ to ‘side by side mode’ to ‘inline text mode’) as expected. Perhaps the floating preview window simply needs the same close event that the mode switching sends when switching between modes?

I’ve been editing a bunch of screen definition files and over time, I have many “ghost” preview windows after closing the corresponding XML files. I just close them when I notice without incident. But they are blank (white background only) windows by the time I start closing them.

Thanks, I’ve posted a ticket to our bug tracker.

Thanks, it looks like this bug: https://youtrack.cuba-platform.com/issue/STUDIO-7604
which was fixed the next day after beta release.

Thanks, it looks like a bug. I’ve created a ticket to change behavior.

When I deleted an Entity, It didn’t search usage and deleted. After I deleted browser and Editor xml files, in V12 the controller files used to be deleted with giving option but in this version it neither deleted not prompted for choosing option to delete.

2nd level composition fields are not available as Table Column for selection in the designer.

image

Hi,
I have checked with version Studio 12.3, the behavior was the same.
This is how IntelliJ IDEA works. It’s necessary to check “Safe delete (with usage search)” if one wants the associated usages to be processed.

Hi,
Attributes shown in the “Add column” dialog are restricted by the data container’s view. Can you check that desired attributes are included into the view?
In the future we plan to improve this dialog to make things more obvious.

Did you get exact same options when deleted?

Yes, the view used includes the 2nd composition but it’s not available for selection, it is available in v12 though.