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>