cancel
Showing results for 
Search instead for 
Did you mean: 

Cano't import app from demo toolkit to eclipse

yes_sapteam
Participant
0 Kudos

Hi experts.

I"m trying to import an extract file of shopping cart project to eclipse download from SAPUI5 SDK - Demo Kit as existing project getting a message 'No projects are found to import'.

So I did some work around creating a new UI5 project with no view and than import the extract data as file system, When I"m trying to execute the index file nothing happand.

The code in the controllers seems familiar to me from the IDE and seems a little different from eclipse is there a different demo app's for eclipse what could be the problem?

Best regards.

Accepted Solutions (1)

Accepted Solutions (1)

saurabh_vakil
Active Contributor
0 Kudos

Hi,

I did the below and was able to run the Shopping Cart app downloaded from the demo kit into Eclipse Mars:

1. Download the Shopping Cart code from the page SAPUI5 SDK - Demo Kit

2. Extract the contents of the downloaded .zip file into a folder (ShoppingCart) on my local system.

3. Create a SAPUI5 application project in Eclipse (Mars); without creating an initial view.

4. Copy-paste the contents of the ShoppingCart folder from step 2 (containing the files from the downloaded .zip) into the WebContent folder of the

    SAPUI5 application project created in the previous step.

5. Change the reference to the UI5 core in the index.html file from src='../../../../../resources/sap-ui-core.js' to

    src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"

6. Run the project by right clicking on the project folder and select Run As -> Web App Preview

With this I was able to run the app as shown in the below screen shot:

Regards,

Saurabh

Answers (2)

Answers (2)

yes_sapteam
Participant
0 Kudos

Hi,

You're right! Now that I see your tree folders I understood that I made a mistake by entering the project files/folders under another folder. Now that I change it to under WebContent everything works fine thanks a lot.

yes_sapteam
Participant
0 Kudos

Hi,

Thanks for the replay.

I tried your steps in luna eclipse and still nothing happened. The version eclipse could be the problem?

nevertheless as I mentioned before the controller code as different from other programs in eclipse I did in the past and it familiar to me from the open IDE course is there possibility that sap change the code to fit only to IDE?

My past controolers:

The code download:

saurabh_vakil
Active Contributor
0 Kudos

Let me try in Eclipse Luna at my end.

Also the controller code follows the Asynchronous Module Definition (AMD), refer the link SAPUI5 SDK - Demo Kit for details. This is not Web IDE specific, but a general UI5 principle.

saurabh_vakil
Active Contributor
0 Kudos

I have copied the Shopping Cart app source code from the demo kit into a SAPUI5 application project in Eclipse Luna SR2, changed the reference to the SAPUI5 core from src='../../../../../resources/sap-ui-core.js' to src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' in the index.html and ran the project as Web App Preview. I am able to see the application output just fine as shown in the below snapshot: