Retrieving OTAP configuration in version 2.5

5
In Mendix version 2.5rc the OTAP configuration administration has changed in the modeler, as well in the Mendix framework (Java). The Java class com.mendix.core.Core.Mode is no longer available. The OTAP can no longer be retrieved by the following code: if (Core.getMode() == Mode.DEVELOPMENT || Core.getMode() == Mode.TESTING) What is the alternative for resolving the OTAP in version 2.5r2
asked
3 answers
4

You can use: com.mendix.core.Core.getMode().toString()

Comparing with the enum is not possible anymore, since it is obfuscated. I think that is a bug, so if that is a problem, you might file a bug report.

the new code:

if ("DEVELOPMENT".equals(Core.getMode().toString()) || "TESTING".equals(Core.getMode().toString()))
answered
1

AFAIK you should still be able to use this API, what's the problem exactly? Do you have trouble compiling?

answered
1

Yes, I have trouble compiling since the package com.mendix.core.Core.Mode does not exists anymore in version 2.5

answered