Problems with enumerations

In recent days talking about this problem that is driving me a headache and makes me rethink the use of CUBA in my projects.
The solution was used inefficiently table to store the values and descriptions of enumerations, but I really need to use them can not simply let the tool away or simply ignore what I need.
Reviewing the Log of CUBA Studio I find this simply informs that there is no enumeration


2016-07-09 15:41:12,118 WARN  [com.haulmont.studio.backend.d.d.k] View has the property 'roundType' that doesn't exist in entity iis$UnitConversion
2016-07-09 15:41:12,133 WARN  [com.haulmont.studio.backend.d.d.k] View has the property 'paymentType' that doesn't exist in entity iis$PaymMode

In the picture it looks that are there and use their respective entities.
Any suggestions to resolve the error?

I thank you in advance, as it already has me a little frustrated.

Nelson F.

Enum1

Enum2

Enum3

Enum4

Hi Nelson,
Do you use Dropbox synchronization for your project folder? If so, could you move the project outside of Dropbox and try to reproduce the issue.

The project was moved to drive C. But yet still the same problem.


2016-07-11 03:29:10,576 INFO  [com.haulmont.studio.backend.w] Opening Project{name='SmartBMS'}
2016-07-11 03:29:10,600 INFO  [com.haulmont.studio.backend.d.c.e] There is no Oracle driver oracle.jdbc.OracleDriver on CLASSPATH
2016-07-11 03:29:10,600 INFO  [com.haulmont.studio.backend.d.c.e] There is no MySQL driver com.mysql.jdbc.Driver on CLASSPATH
2016-07-11 03:29:10,836 DEBUG [org.gradle.tooling.GradleConnector] Connecting from tooling API consumer version 2.6
2016-07-11 03:29:15,370 WARN  [com.haulmont.studio.backend.d.d.k] View has the property 'roundType' that doesn't exist in entity iis$UnitConversion
2016-07-11 03:29:15,377 WARN  [com.haulmont.studio.backend.d.d.k] View has the property 'paymentType' that doesn't exist in entity iis$PaymMode
2016-07-11 03:29:15,388 DEBUG [org.gradle.tooling.GradleConnector] Connecting from tooling API consumer version 2.6

Enum4

Enum5

Enum6

Unfortunately, we could not reproduce the problem on our test projects, even running SVN operations.
We will be happy to help you if you send us a project along with reproduction scenario that demonstrates the issue. You can use our email address: info@cuba-platform.com

Thanks Konstantin, as did the mail.

Hello,
Thank you for reporting the issue. It will be fixed in the Studio version 2.2.3.
The problem is that in your code you use the

import com.haulmont.chile.core.datatypes.impl.*

instead of

import com.haulmont.chile.core.datatypes.impl.EnumClass;

And that is why the Studio could not recognize the enumerator source.
Presumably, during the VCS commit the ‘Optimize import’ option was enabled, and the source code was automatically changed by IDE.

As a workaround, bring back ‘import com.haulmont.chile.core.datatypes.impl.EnumClass;’, and the enumerations should appear in the Studio. It may be in comment as well:


package com.iis.smartbms.entity.enums.common;
import com.haulmont.chile.core.datatypes.impl.*;
/*import com.haulmont.chile.core.datatypes.impl.EnumClass;*/
import javax.annotation.Nullable;

public enum NewEnum implements EnumClass<Integer> {
    NORMAL(5),
    UP(10),
    DOWN(15);
   .......

Regards

Rostislav, is correct. Works correctly.
Thank you very much.

The problem is fixed in the Studio version 2.2.3