Open main menu

CDOT Wiki β

Changes

Teams Winter 2011/team4/lab2

955 bytes added, 20:15, 16 February 2011
Create the Service Interface
==Create the Service Interface==
===Define the service interface===
*Right click src->New->Interface:First download Eclipse Classic from [[Imagehttp: T4L2_1//www.png]eclipse.org/downloads/ here]====Create the Interface Bundle====*Then We now need to create a new plugin project, to do so do the following:[[Image: T4L2_2.png]]File->New->Plug-in Project*Fill After selecting Plug-in package and Project from the options, give the Project a name according to the lab structure defined in the previous tutorial (cs.ecl.lab.<namehere>* After doing so, click Finish:[[Image: T4L2_3next, where you will be presented with a screen that provides you with the project ID, version, name, ect.png]]*Code There will be an options section at least one methodthe bottom of the window, be sure to unclick generate an activator, Save as it is not needed for the lab as the bundel is just interfaces and itis not run* You will now be presented with a screen that looks like the following:===Create =Creating the bundle with the interfaceInterface====*Right click We will now add a package to the src->New->Class:[[Image: T4L2_4folder of our project. Once you have done this you will add a class TimeZones and an Interface name Times to your package.png]]*Then fill Enter code in package both TimeZones and name, click finish:[[ImageTimes according to the following: T4L2_5.png]]*Code If we want to use our package, we must export it in the interface bundle. First select MANIFEST.MF, then click on the method body of sayHelloruntime tab, and select "Add", then select your package. (Refer to Image below)* Congratulations! You have successfully exported your package and we are ready to move onto step 2, save it:[[Image: T4L2_6implementing the Service Provider.png]]
==Implement the Service Provider==
1
edit