|Re: Installing Nebula widgets in palette manager [message #1239871 is a reply to message #1197230]
||Wed, 05 February 2014 08:38
| Baruch Youssin
Registered: April 2013
I have succeeded in adding Nebula CDateTime to the Palette recently.|
Here is what I have done, in a simplified way (dropping all my wrong steps) and according to my (human) memory.
You may try adding similarly other Nebula widgets.
If you find any trouble, post it and I would try to help.
1. Find the libraries that contain the widgets you need. Go to the place you installed your eclipse (I did it on my Ubuntu in /opt/eclipse/), go to subdirectory plugins/ and look for the appropriate jars. I guess their names should start with org.eclipse.nebula but I would not be responsible for that. I opened org.eclipse.nebula.widgets.cdatetime.source_0.14.0.201401291008.jar and found that it contained the source of CDateTime. I concluded that org.eclipse.nebula.widgets.cdatetime_0.14.0.201401291008.jar contained the class file.
2. Add these libraries to the class path of your Eclipse project. Right-click the project name in the Package Explorer, choose Properties, select Java Build Path in the list on the left, select Libraries tab on the top, press Add External JARs. My Eclipse opened the plugins directory from Step 1; if yours does not, you need to direct it to this directory. I chose org.eclipse.nebula.widgets.cdatetime_0.14.0.201401291008.jar and pressed OK. This library appeared in the list of libraries. I pressed the triangle |> in the left end of the line containing this jar (it is to the left of the jar picture) and a list of four items appeared. The first item was Source attachment: I pressed it and then pressed the Edit button on the right. A new form opened up; I selected External location, pressed External File and chose org.eclipse.nebula.widgets.cdatetime.source_0.14.0.201401291008.jar. I pressed OK, and my Source attachment appeared in the list. I pressed OK.
3. Then you need to find which libraries you are still missing. I did the following. I went to the Design tab and added a SWT widget to my project using WindowBuilder (I did DateTime but I guess any widget would work). I then switched to the source and changed the type of this new widget to CDateTime. I made sure the project compiled; for this purpose I had to satisfy all other complaints of the compiler such as changing the constructor call to that of CDateTime. I tried to run the project; at this point Eclipse complained that it was missing another class BaseCombo which was referenced indirectly (it was the superclass of CDateTime). It was contained in another library, org.eclipse.nebula.widgets.cwt_0.9.0.201401291008.jar (I think Eclipse gave me enough info in its message to find this library). I added this jar to the Build path as above, added its source and after that my application successfully ran.
4. I think at this point CDateTime appeared in Nebula Widgets category in the Palette. If it does not, you can add it yourself (this is what I did as I did not notice its appearance): right-click on the Palette (any place) --> Add component, enter its name (CDateTime), press Choose for the class name, fill the package name in the top field as org.eclipse.nebula.widgets.cdatetime, select CDateTime in the list of Matching items below, press OK, select the Palette category Nebula and press OK. It should be there!
Powered by FUDForum
. Page generated in 0.02427 seconds