How can one edit java source code in data model section in Cuba studio
have tried to edit but one cannot edit the java code or how can one add IDE in the Cuba studio to
enable editing.
As I understand you use some old version of CUBA Studio (Standalone or Web). In this version, you cannot edit java in Studio, but you can open class source code in IDE by clicking the IDE button in the Data Model section.
First, you need to run IDEA and install and activate the CUBA Framework Integration plugin. After installing, open the plugin section and enable integration with CUBA Studio 6.x versions.
Return to the CUBA Studio. Please note that IDE: on port 48561 label has appeared in the bottom left corner of Studio.
Run the Create or update IDEA project files
command from the Build submenu, it creates project files for IntelliJ IDEA. The corresponding files will be created in the project directory. If the files exist, they are updated preserving manual changes.
Now the corresponding source code files will be opened in IDE when you click IDE buttons in the Studio.
I highly recommend you to use the latest version of Studio which is now based on the open-source IntelliJ Platform. You can download the latest version from here https://www.cuba-platform.com/tools/