Download ve from the eclipse homepage. It contains the following packages:
Emf-sdo-runtime-2.2.0.zip
GEF-runtime-3.2.zip
VE-runtime-1.2.1.zip
VE-SDK-1.2.1.zip
Create a new folder under eclipse, extract emf-sdo-runtime-2.2.0.zip to F:/Eclipse/ve/EMF folder, GEF-runtime-3.2 to F:/Eclipse/ve/GEF, VE-runtime-1.2 to F:/Eclipse/ve/veruntime, VE-SDK-1.2 to F: /Eclipse/ve. create a ve in the links folder of eclipse (I am using F:/Eclipse/links. start text file, input content:
- Path = F: // eclipse // ve ///ve
- Path = F: // eclipse // ve // GEF
- Path = F: // eclipse // ve // EMF
- Path = F: // eclipse // ve // veruntime
Saved.
Eclipse 3.2 requires JDK or later, so you must install it first. JDK path setting will not be mentioned again... /bin,/lib,/jdk1.4.2 because the program running SWT uses a local library, you should import the native package of SWT and run the program to find it automatically. these problems have plagued me for a long time. now, F:/hongjun/eclipse.exe is started. eclipse can automatically recognize your JRE.
Practice! Start eclipse and look at myproject. it's good... the interface is charming! Create a Project File> New> project. In the Project Wizard, select Java project. -> next, enter the Project name: myproject. Eclipse automatically creates a workspace work folder for you. Your project exists here. F:/hongjun/Eclipse/workspace is clicked to finish. A new project is built. add SWT toolkit, choose Project> properties, select Java build path on the left, libraries tab on the right, click Add library, select Standard Widget Toolkit (SWT), and click Next, select include support for jface library. in this way, you can use the SWT jface control. select your project myproject. select the new icon button, the top left. select visual class and click Next. source folder is the default project folder. Set package to anywn and name to hello. Expand SWT on the left and select shell, check public static void main (string [] ARGs), constructors from superclass, inherited abstract methods. end.
Eclipse automatically starts ve .... look at those windows... familiar .. the visual editing window is displayed. move the cursor to the right palette (The vertical one) and place a label, a button, and a textarea on the shell. select the label and set it in the properties attribute bar on the lower side. Enter> text in the label field. Select the button and set it in the properties attribute bar on the lower side. Enter "Hello everone" in the text field. right-click the button and choose events> Add events. select mouse-> mousedoubleclick. the corresponding code is automatically generated. you can also set other styles, but not if the JDK version is incorrect.