3
votes

I am looking for information on how to import existing Worklight code into a Worklight-enabled Eclipse environment.

In addition to importing a project, it seems that it is also possible to import an app and an adapter. What subcomponents would an app and an adapter have to consist of to make them importable and re-usable? Are there any examples of such importable components on the web?

I am aware of this discussion on the IBM support page but am looking for more detail.

1
In all fairness I don't think the down votes were necessary here. The Getting Started material at www-01.ibm.com/software/mobile-solutions/worklight/library does not include instructions on how to import a Worklight project. Importing is a very common issue for Eclipse beginners, compounded when working with a platform like Worklight.joey_g216
@JoeGoble, we've updated the training modules (well, one of them) to contain this).Idan Adar
@Lennart, if your question is answer, could you please mark it as such?Idan Adar

1 Answers

2
votes

The below will export and import both apps and adapters belonging to the same project.

Export - In Eclipse, right-click a project and choose Export... choose to export the project as a zip file. Import - In Eclipse, right-click the Project Explorer view and choose Import... choose to import an existing project (your zip file).

An app is contained in the appName folder within the apps folder. And adapter is contained in the adapterName folder within the adapters folder.

There are no mechanisms to export and import the CODE of an adapter or application. You will need to copy-paste the files/folders manually and likely change many references in your files as many locations have different values based on the project name you've used.

Such an approach is highly not recommend by Worklight.


Starting Worklight 6.1, the training modules also contain a portion about how to import projects.