Eclipse with Quickstart Problem

Hi, tried the quickstart tutorial, which works fine except when trying the IDE integration with Eclipse. When I try to bring up Eclipse, nothing happens. Btw when I generate the project files, still seems to be creating IDEA project files though I marked Eclipse as the IDE. I followed the instructions in Developer’s manual. Please help. Thanks.

Hi,
It is hard to guess what is wrong until you bring more details. Which OS and Version of the Eclipse IDE are you using?

The Eclipse integration should work after the following steps:

  1. Make sure you are using the correct version of the Eclipse IDE (greater than 4.3).
  2. Install the Cuba plugin (as described here https://doc.cuba-platform.com/manual-6.2/ide_integration.html). Do not forget to restart the IDE. And check the installation: open Help->Install new software->What is already installed?
  3. Enable the eclipse integration for the project (switch it on in the project properties).
    As a result, new menu items should appear:
    Build->Create or update Eclipse project files
    Build->Remove Eclipse project files
  4. Launch the Create or update Eclipse project files.
    After that, required files should appear in the root folder of your project.
  5. If both IDEs (Eclipse and IDEA) are installed, exit them.
  6. Launch only the Eclipse IDE.
  7. Click the “IDE” Button in the studio.
    After the actions, the project should be opened in Eclipse, and Package Explorer should display the project tree.

Regards.

Hi, I am using Windows 10 Pro on a Dell Venue 11 Pro tablet and my Eclipse is Mars.1 Release (4.5.1). Did follow the manual, restarted and checked that CUBA Plugin is already installed. Switched the properties from IntelliJ to Eclipse, checkboxes, but the menu still has create or update IDEA project files … And I don’t have IntelliJ installed. So the open source Studio should be OK?

And which version of the CUBA Studio are you using?
Could you please do the following

  1. Enable the Eclipse checkbox in the project properties.
  2. Find the project in the filesystem. Path to it you can find in the left-hand panel on the ‘project properties’ tab.
  3. Copy the build.gradle file from the root directory of the project. And share it here (as an attachment to message).

Hi, the Studio version loaded from the website is v2.2.2. Have attached build.txt which is build.gradle renamed because I had error of bad file type for attaching. Thanks.

build.txt (5.5K)

The selected IDE is stored in the build.gradle configuration file by the following properties:


apply(plugin: 'idea')
apply(plugin: 'eclipse')

Studio writes them to the file at the time project properties are applied (OK or Apply button is pressed])
As I see in your build.gradle, only the IDEA is switched on.


def servletApi = 'org.apache.tomcat:tomcat-servlet-api:8.0.26'

apply(plugin: 'idea')
apply(plugin: 'cuba')
...
configure([globalModule, coreModule, guiModule, webModule]) {
    apply(plugin: 'java')
    apply(plugin: 'maven')
    apply(plugin: 'idea')
    apply(plugin: 'cuba')
...

It is very strange, that you have problems with adjusting project properties. For further testing:

  1. Make sure you have correctly enabled the Eclipse integration in the Studio UI and check if the corresponding property added to build.gradle.
  2. Try to select a new Platform v. 6.2.2 in the project properties and look how it is applied to the build.gradle.
buildscript {
    ext.cubaVersion = '6.2.2'
  1. Try to create another empty project in another directory and switch the Eclipse integration in it.

Regards.

Hi, great, thanks so much, got the Eclipse working. Am using it to complete the QuickStart video 4. Doing the calculation of the total amount in the order. However, unlike the video, I am typing in the Java manually in Eclipse, but missing the imports so trying to resolve the @Inject and so forth …