Eclipse-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, to open its own personnel, or even to sell,

We can make a product, and this product will include the framework itself, documentation, tools, tutorials, and so on. The most important of these tools is the development tools (IDE) and debugging tools.

Currently Apicloud or dcloud these hybrid frameworks are custom based on eclipse, but Dcloud are done more thoroughly.

How do I customize the IDE?

We are able to customize the Eclipse IDE, not how much we write,

It is the eclipse itself, which is a platform that allows us to write plug-in extensions to the Ides that support 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 we're customizing the IDE, which is actually writing the Eclipse plugin (Eclipse plug-in)

Manually customizing the interface process

Note that the directories listed below are determined by 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,

All we need to do is replace the four size icons to make the entire IDE a big change.

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

Overwrite the inside of the eclipse16.png,eclipse32.png,eclipse48.png,eclipse256.png replacement can be.

(3). Eclipse.exe icon

When we want to change the icon more thoroughly, even the Eclipse.exe icon is changed.

Use Iconworkshopshiyongban to modify the exe icon, this is the most direct complete tool.

Replacement process:

1. Open the Eclipse.exe with Iconworkshopshiyongban, 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.icns

This 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 process

Here is a manual interface replacement, and then the next step is to introduce the plugin to change the interface of things

It is recommended to use the Eclipse-rcp-and-rap-developers eclipse as an open plugin IDE

: HTTP://WWW.ECLIPSE.ORG/DOWNLOADS/PACKAGES/ECLIPSE-RCP-AND-RAP-DEVELOPERS/LUNASR2

(1). Plug-in Hello World project

When you tell the plugin to change the interface, simply describe the process of creating a plugin, see: Eclipse Plug-in Hello World

(2). IDE Title

In the first picture, we can see that the IDE title is, Bingotouch-welcome-bingotouch IDE,

This title is made up of three parts, perspective name-Edit Area name-product name.

Where the names of the perspective and edit areas are well understood,

The product name is defined within the 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, toolbars

Most 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 a matter of perspective, the menu bar, the toolbar is hidden just for a perspective,

For example, if you customize your own perspective, other perspectives will not affect the view. Hide Code:

<extension    point= "org.eclipse.ui.perspectiveExtensions" >    <perspectiveextension        targetid= " Com.bingo.ide.perspective ">            

Analytical:

Hiddenmenuitem: Hide the menu bar Hiddentoolbaritem: Hide the toolbar

1. This two tag is written in the extension point (Extension points), Targetid is to indicate 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 for the same reason: Eclipse extension point constant ID

3. Some people may find that the above constant ID may not be enough, some of the things we want to hide are not 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 and search for the GIT keyword in the eclipse\plugins directory.

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 definition

The view definition can be seen in three parts,

On the left is the project management view, top right is the edit view, the bottom right is the console view

The definition of this view can be defined in XML or in code.

The recommendation is to use code because this freedom is higher.

String Editorarea = Layout.geteditorarea ();//Add View Layout.addview (Ipagelayout.id_project_explorer, IPageLayout.LEFT, 0.22f, Editorarea); Ifolderlayout bottom =layout.createfolder ("Bottom", Ipagelayout.bottom, 0.75f, Editorarea); Bottom.addview ("Org.eclipse.ui.console.ConsoleView"); Bottom.addview (Ipagelayout.id_problem_view); Iviewlayout projectlayout = Layout.getviewlayout (IPageLayout.ID_ Project_explorer);p rojectlayout.setcloseable (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 page

It 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>

Original:

"1"

"2" http://www.cnblogs.com/lovesong/p/4693467.html

Eclipse-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.