Desktop program development using Eclipse RCP (iii): Views and perspectives

Source: Internet
Author: User

In Eclipse RCP development, the interface that interacts most with the user should be the view, and the perspective is the combination and layout of existing views, menus, toolbars, editors, and so on. After reading this section, we can create a program interface like the one below.

First, let's introduce the view, and it's really simple to build a view, as long as you inherit a class from Org.eclipse.ui.part.ViewPart and then configure the view in Plugin.xml. Where you add controls to the view, we can either hand-write or use the designer plug-in, and I recommend that you use the designer plug-in, which provides very powerful support for RCP, if you use the designer plug-in to develop the view, The Plugin.xml file does not need to be modified manually either.

For example, the first view in the previous figure is to inherit a class from Viewpart and then add a few SWT controls to it, which is very simple, and its configuration file is as follows:

1<extension
2     point="org.eclipse.ui.views">
3   <view
4      class="cn.blogjava.youxia.views.FirstView"
5      id="cn.blogjava.youxia.views.FirstView"
6      name="第一个View"/>
7</extension>

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.