Screen controllers are not visible in Jmix tool window

Hello Everyone

I have the exact same situation and only see my screen controllers, listeners and services in the Project view. In the Jmix view I must right click on the screen-xml files and explicitly select “Go to controller” to edit the screen controller. I have the Kotlin plug-in that is bundled with IntelliJ, version 213-1.5.10-release-949-IJ5744.223 and never installed a higher version.

Here is the rest of my configuration information:

Jmix version: 1.1.1
Jmix Studio plugin version: 1.1.4-213
IntelliJ IDEA 2021.3 CE - Build #IC-213.5744.223, built on November 27, 2021Operating System: macOS 12.0.1 (21A559)
File System: Case-Sensitive Journaled HFS+ (APFS)
Datebase: PostgreSQL 13

I hope this helps.

Best regards
Chris

Hi Chris

Looks like your problem is different. The incompatibility with the Kotlin plugin caused the the screens to not be moved at all.
Could you attach an example of a screen which is shown in Project but absent in Jmix tool window? A few lines from the top of the XML will be enough. Also, what package it’s located and what is the base package of the app?

Regards,
Konstantin

Hi Konstantin

Thank you for your message and assistance. Below you will find an excerpt from a screen-xml and its controller. The base package is “com.company.notefall”.

I downloaded the Jmix petclinic example in the meantime and have the same behavior there; please see the two attached petclinic images.

Thanks again & Best regards
Chris

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
  ~ Copyright (c) 2021 Christopher Beaham. All rights reserved.
  -->

<window xmlns="http://jmix.io/schema/ui/window" xmlns:dynattr="http://jmix.io/schema/dynattr/ui"
        xmlns:cuba="http://schemas.haulmont.com/cuba/screen/compatibility"
        caption="msg://ambitionEdit.caption"
        focusComponent="form"
>
    <data>
        <instance id="ambitionDc"
                  class="com.company.notefall.entity.interest.Ambition"
                  fetchPlan="ambition-edit-view">
            <loader/>
        </instance>
    </data>
/*
 * Copyright (c) 2021 Christopher Beaham. All rights reserved.
 */

package com.company.notefall.web.screens.ambition;

import com.company.notefall.entity.interest.AmbitionType;
import com.haulmont.cuba.gui.screen.*;
import com.company.notefall.entity.interest.Ambition;
import io.jmix.ui.component.HasValue;
import io.jmix.ui.component.TextField;
import io.jmix.ui.model.InstanceContainer;
import io.jmix.ui.screen.EditedEntityContainer;
import io.jmix.ui.screen.StandardEditor;
import io.jmix.ui.screen.Subscribe;
import io.jmix.ui.screen.UiController;
import io.jmix.ui.screen.UiDescriptor;

import javax.inject.Inject;

@UiController("notefall_Ambition.edit")
@UiDescriptor("ambition-edit.xml")
@EditedEntityContainer("ambitionDc")
public class AmbitionEdit extends StandardEditor<Ambition> {

JmixStudio_1.1.4-213_Jmix_view
JmixStudio_1.1.4-213_Project_view

Perhaps there is some misunderstanding. The Jmix tool window contains only the most prominent elements of the project that are important for newbies and have dedicated designers. They can be used as “entry points” to the rest of the project, so use the navigation actions to go to adjacent elements:

  • “Go to controller” action

  • “Controller” and “Entity” buttons:
    image

  • "Select opened file: action:
    image

Hi Konstantin

Thank you for the feedback. I am aware of the functionality shown in your two images and I have already used it many times. However, for someone like me who is refactoring their CUBA code for Jmix, I am spending 90% of my time working on the controller code and need quick access to them. It’s inefficient for me to constantly have to select the screen-xml to then navigate to its controller. I have about 50 controllers to migrate. That’s why I thought that there may be something wrong with the plug-in. I believe that developers spend more time in their controllers than in the XMLs and that that should be the starting point, or both should be immediately available like in CUBA. But that’s just my opinion; I cannot prove it.

Best regards
Chris

1 Like

Hi Chris
Thank you for the feedback.
We’ll think how it may look like: https://youtrack.jmix.io/issue/JST-2461

Regards,
Konstantin

1 Like

Hi Konstantin,
please consider in your implementation that we can have also just a screen controller without a xml (e.g. when the screen is created completely programmatically), so a sub-structure may not work in this case.
Just my 2ct.
Regards,
Stefan

Sure. Maybe it should be the other way round.
I just hesitate to show classes in this structure, because people will immediately expect to see not only controllers, but all other nearby classes like helpers and beans, and this will turn into a replica of the Project tree.