Eclipse Plug-in Development

Source: Internet
Author: User
Tags extend

Introduction: Menus are a prerequisite for a variety of software and development platforms, and Eclipse is no exception, providing a rich menu, including the main menu, the View/Editor menu (Viewpart/editor menu), and the context menu. In Eclipse, almost all of the Workbench part provides a user-friendly menu that greatly facilitates user action. So how to extend Eclipse's menu capabilities and implement menus that are specific to our own plug-ins is an important skill that plug-in developers must master, and Eclipse provides a rich extension point for developers to use. This article will begin by introducing the menus in Eclipse and then detailing how to extend them, and finally, as an example, guide the reader to an in-depth understanding of Eclipse's menu features.

Introduction

With its rich menu capabilities, Eclipse provides a good user experience for developers. Overall, the Eclipse menu categories include the View/editor menu, the main menu, the View/Editor menu (Viewpart/editorpart menu), and the context menu. Plug-in developers can provide users with a good experience by applying these menus flexibly. Because the View and editor menu features are similar, this article focuses on the View menu (View drop down menu and its toolbar menu), in addition to the main menu and context menu.

As shown in Figure 1, the menu for the Project Explorer view includes a view Drop-down menu and a toolbar menu (a collapsed tree node). Typically, the menus that appear on the View toolbar appear in the Drop-down menu of the view, which means that the more commonly used view menus are placed on the view's toolbar.

Figure 1. Menu for Project Explorer view

As shown in Figure 2, the context menu in Project Explorer view appears only when we right-click. Typically, a higher-frequency menu item appears in the menu. Context menu has a strong flexibility, it can be as we click on the object, pop-up menu will change accordingly.

Figure 2. Context menu in Project Explorer view

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.