Eclipse Install VE Plugin

Source: Internet
Author: User

Transferred from http://www.cnblogs.com/duncannjm/articles/1342133.html

Recently on the Internet to find on the installation of VE Plug-ins article, looking for a long time to find this article is very good, according to what it said can be installed successfully.

Special reminder: Please read the red words carefully.

Preparation:
1, download jdk (1_5_0_09),
2, download Eclipse (3.2.1) (I prefer the latest version of ^-^)
3, download the corresponding EMF (2.2.1), GEF (3.2.1), VE (1.2.1);

Start Installation:
1, install JDK;
    This is easier, standard Windows Installer, next, then next, the installation is complete, do not need to reboot.

2, install eclipse;
    Eclipse is green software that requires no installation, only decompression, and then run.
    to illustrate the convenience, I unzipped it to the C-packing directory, get C:/eclipse directory, run C:/eclipse/eclipse.exe can.
    Note: The following installation requires you to close the Eclipse program first.

3, installing EMF, GEF, VE,
    for Eclipse, these are its plug-ins, so the installation method is the same.    
    A, under the C:/eclipse directory, create four subdirectories: C:/ECLIPSE/EMF, C:/ECLIPSE/GEF, C:/eclipse/ve, C :/eclipse/links
    B, unzip the downloaded EMF, GEF, ve to the corresponding directory, namely: Extract the EMF compression package into the C:/ECLIPSE/EMF, get c:/eclipse/ Emf/eclipse directory, and so on, the completion of GEF, ve decompression;
    C, in the C:/eclipse/links directory, a new text file, the name can be arbitrarily taken, such as: Link.txt.
    then in the Link.txt file, add the following three lines of text:
    path=emf
    path=gef
    Path=ve

Or

Path=c://eclipse//emf
Path=c://eclipse//gef
Path=c://eclipse//ve (more than one slash is escaped with, the Earth people know, please follow. )

Note: Here is a relative path, you can also the EMF, GEF, ve decompression to other places, and then the absolute path can be.

4. After installation, run Eclipse again, it will automatically find all the text files under the links directory and load all the plugins in which path points, of course, ve.
A, if you are unsure if it has already been loaded, you can select menu Help->software updates->manage Configuration, open the Product Configuration form, and in the tree bar on its left, You can see the plug-ins that have been loaded.
B, if the load is not successful, you can try Eclipse-clear to run the program.

Note: If you do not appear in Manage configuartion, you can try to reset the path in the Link.txt file, add one line at a time, then start Eclipse, add a row, and then start eclipse again, Until you can see all of the plug-ins in the configuration, this is Eclipse bug, sometimes can not load all the plug-ins, you can try a few more times may be good.

Write a hello with ve:
1, a new project;
File->new->project ..., select "Java Project", then next, enter a project name: Hello, all other defaults, the last carriage return, or click Finish.

2, set SWT Library;
A, select Item Hello, right-click menu, Open Properties dialog box.
B, select the Java build Path in the left tree, in its Settings page, select Libraries page, click "Add Library ...";
C, in the Open Add Library dialog box, select Standard Widget Toolkit (SWT), Next;
D, in the Open SWT Library Options dialog box, tick "Include support for JFace Library", finish.
E, back to the Properties dialog box, OK.

3, new Hellworld.java file;
A, select items Hello, right-click menu, New->other ... (or click on the toolbar to create a new icon), open the Select a wizard dialog box, select Java/visual class,next;
B, in the Open Java Visual Class dialog box,
In package, enter: Com.cnblogs.pan;
In name, enter: Helloworld;
In style, choose Swt/shell;
Check the public static void main (string[] args);
Final finish.

4, to this step, you should be able to see the form, those controls are in the palette, point open can be seen.
A, right click on the form, select Set Layout, and then select Null (here is the personal habit)
B, from the palette, select a button, and in any position in the form to draw a button, in the Properties window below, set its text to ClickMe;
C, select the button, right-click to select Events->add Event, in the Open dialog box, select the Widgetselected,finish on the left.
D, at this point, the cursor will automatically navigate to the appropriate location of the program, we add the following statement in the program: public void widgetselected (Org.eclipse.swt.events.SelectionEvent e) {
System.out.println ("widgetselected ()");

Messagedialog.openinformation (null, "Hello", "Hello world!"); Add this statement
}

E, Save the program, click the menu Run->run As->java application, hehe, say hello to the world.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.