Customizing the Eclipse IDE's interface Chapter

Source: Internet
Author: User

Why would you want to customize the IDE?

At work, when the company has its own framework, open to its own personnel, or even can sell, we can make a product, and this product will include the framework itself, documents, tools, tutorials and so on.     The most important of these tools is the development tools (IDE) and debugging tools. What I do in the company is a hybrid framework, and a supporting IDE is more than necessary, mainly used to develop HTML5. This IDE can be regarded as the aggregation of the framework of things, can be online documents, engineering templates, packaging and debugging functions are combined in the IDE.     When we provide developers with something, we only need to provide an IDE, which already contains all the frames of things. It took me one months to do this IDE, based on Eclipse. The reason for using Eclipse without Dreamweaver, notepad++, and so on, is because these look unprofessional, and the things that can be broadened are limited.     Currently Apicloud or dcloud these hybrid frameworks are custom based on eclipse, but Dcloud are done more thoroughly. I'll tell you about my development experience this month. How do I customize the IDE?The reason we are able to customize the Eclipse IDE is not how much we write, but the eclipse itself, which is a platform that allows us to write plug-in extensions to the IDE that supports various language editors. There are many versions of Eclipse in the official eclipse download, which can be said to be assembled from different plugins. So our custom IDE, in fact, is to write the Eclipse plugin (Eclipse plug-in). what does the IDE customize? Here are the last one months to customize the final results, I will explain from the results, how this thing step by step (support Windows, Mac IDE). In addition inside appears Bingotouch name is I open frame, everybody can ignore.     Below you can see that we need to customize the menu bar, toolbar, view area. Here is a very key concept is perspective (perspective), perspective can be viewed as an edit view, we are familiar with the possible Java, Debug (can be toggled in the upper right corner of the perspective), everything can be set on the perspective, such as the Settings menu bar, the toolbar has what, What constitutes the view area. manually customizing the interface processNext I'll talk about some of the customization details of the interface, and note that the directories listed below are subject to your use of eclipse and may be different versions. (1). Start Page The start page is a façade where we can replace him with images that reflect our products. Replacement process: The corresponding directory eclipse\plugins\org.eclipse.platform_4.4.2.v20150204-1700\splash.bmp, only need to change this picture. (2). IDE Icon The dimensions of these icons are 16*16, 32*32, 48*48, 256*256, which are used to make app icons or IDE window icons, and we just need to replace the four-size icons to make the entire IDE a big difference. Replacement process: corresponding directory eclipse\plugins\org.eclipse.epp.package.rcp_4.4.2.20150219-0708 corresponding directory eclipse\plugins\ org.eclipse.platform_4.4.2.v20150204-1700 cover out the Eclipse16.png,eclipse32.png,eclipse48.png,eclipse256.png replacement. (3). Eclipse.exe icon When we want to change the icon more thoroughly, even the Eclipse.exe icon is changed. I find a lot of tools on the Internet, but I find that either not, or just replace a certain size. Finally find a tool iconworkshopshiyongban. Use Iconworkshopshiyongban to modify the exe icon, this is the most direct complete tool. Replacement procedure: 1. Using Iconworkshopshiyongban to open the Eclipse.exe, we see the following interface, we use the second step of the icon comes in handy (the size is identical). 2. Then use this tool to open the four different size icons, you will get the following interface. 3. Double-click any of the icons in the Eclipse.exe, and then use the copy-and-paste method to overwrite all size icons. 4. Save, you will find the EXE icon has been changed, in different sizes are displayed normal. PS: May appear the icon will not replace the appearance, then you can change the directory to see, it is normal, it is only the application icon is not refreshed. (4). Eclipse.icnsThis is the app icon for Eclipse on Mac, the path is as follows (we also want to output the IDE for Mac). Replacement process: In fact, the replacement process is the same as Eclipse.exe, but the size of the need for more than two 512* 512, 1024*1024. PS: If you find that the application icon in the taskbar is dimmed after discovering the launcher, you need to add 128*128 dimensions to the Icns file. plug-in custom interface processThe above is a manual replacement of the interface, and the next step is to introduce the plugin to change the interface of things. I recommend using Eclipse-rcp-and-rap-developers, the eclipse as an open plug-in IDE. : HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-RCP-AND-RAP-DEVELOPERS/LUNASR2 (1). Plug-in Hello World projectWhen you tell the plugin to change the interface, simply introduce the process of creating the plugin. Because the length is longer, so write in another article, please see: Eclipse plug-in Hello World (2). IDE TitleIn the first picture, we can see that the IDE title is, Bingotouch-welcome-bingotouch IDE, which is made up of three parts, the perspective name-Edit Area name-product name. The names of the perspective and edit areas are well understood, and the product names are defined in Eclipse\plugins\org.eclipse.epp.package.rcp_4.4.2.20150219-0708\plugin.xml. So the name of the IDE is not fixed, it's made up of these three parts, and we don't have to change them. (3). Hide the menu bar, toolbarsMost of the time, there are some feature icons on the menu bar or toolbar that we don't need, in order to make the IDE look more concise, we need to hide some menus and toolbar icons. As I said earlier, the IDE's entire interface is about perspective, and the menu bar, the toolbar is hidden just for a perspective, such as when you customize your own perspective, and other perspectives are not affected. Hide Code:
<extension Point= "Org.eclipse.ui.perspectiveExtensions" >    <perspectiveextensionTargetid= "Com.bingo.ide.perspective" >            <HiddenmenuitemID= "Org.eclipse.ui.file.export"/>            <HiddentoolbaritemID= "Org.eclipse.mylyn.tasks.ui.command.openTask"/>    </perspectiveextension></extension>
parsing:Hiddenmenuitem: Hide the menu bar Hiddentoolbaritem: Hide the toolbar 1. This two tag is written in the extension point (extension points), and Targetid is the indication of which perspective to take effect. There is a key place in this, is the ID of the acquisition, menu bar, toolbar options corresponding to the ID is what, this is very critical. 2. I have collected the IDs used by eclipse, and I have collected them in another article because of the length of the eclipse extension point constant ID3. Some people may find that the above constant ID may not be enough, some of the things we want to hide are not in the inside, what to do. The way is always there, as long as you look for. I used a stupid, but problem-solving approach, and I wrote him in another article because of the length of the story: Eclipse looking for lost ID (4). Delete a Perspective viewSome perspectives are not what we want, such as the following perspectives we do not want to appear in the custom IDE. Perspective is also a plug-in implementation, so we just need to delete the corresponding plugin on the line, for example, we want to delete the git perspective, in the Eclipse\plugins directory search git keyword. By deleting the two packages and opening the IDE again, you will find that the GIT perspective is missing. So keep in mind that deleting a perspective is a delete plugin. (5). View definitionThe view definition can be seen in three parts, the left side is the project management view, the top right is the edit view, and the bottom right is the console view the definition of the view is either XML-defined or code-ready. I suggest using code, because this freedom is higher.
 String editorarea = Layout.geteditorarea ();  //  add view  Layout.addview (Ipagelayout.id_project_explorer, Ipagelayout.left, 0.22f  =layout.createfolder (" Bottom ", Ipagelayout.bottom, 0.75f" Org.eclipse.ui.console.ConsoleView ");  // bottom.addview (ipagelayout.id_ Problem_view);  iviewlayout projectlayout  = false  );p rojectlayout.setmoveable ( false ); 
Parsing: In fact, the code is better understood, do not use XML configuration, in the code to write, you can add a folder containing multiple windows. (6). Delete Launch Welcome pageIt is possible that you do not need to show the Welcome page when you first open it, you can delete it like this. Eclipse\plugins\org.eclipse.epp.package.rcp_4.4.2.20150219-0708\plugin.xml Delete:
< extension       Point = "Org.eclipse.ui.intro" >    < introproductbinding          introid = "Org.eclipse.ui.intro.universal"           productId= "Org.eclipse.platform.ide">    </ introproductbinding > </ extension >

This article is too long, first introduced here, the next article continue to explain.

This article for the original article, reproduced please retain the original source, convenient traceability, if there is the wrong place, thank you correct.
This address: http://www.cnblogs.com/lovesong/p/4693467.html

Customizing the Eclipse IDE's interface Chapter

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.