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">
<hiddenMenuItem id = "org.eclipse.ui.file.export" />
<hiddenToolBarItem id = "org.eclipse.mylyn.tasks.ui.command.openTask" />
</ perspectiveExtension>
</ extension>
Resolution:
hiddenMenuItem: hide the menu bar hiddenToolBarItem: hide the toolbar
1. The two tags are written in the extension point, and the targetID indicates the perspective to which the perspective takes effect.
There is a key point here, which is the acquisition of the id. What is the id corresponding to the options of the menu bar and toolbar is very critical.
2. I collected the commonly used Ids of Eclipse. Also for space reasons, I collected him in another article: Eclipse Extension Point Constant ID
3. Some people may find that the above constant ID may not be enough, and some of the ones we want to hide are not in it. There are always ways, as long as you look for it.
I used a stupid but can solve the problem, also because of space reasons, I wrote him in another article: Eclipse to find the lost ID
(4). Delete perspectives Some perspectives are also undesirable. For example, the following perspectives do not want to appear in the customized IDE.
The perspective view is also implemented by the plug-in, so we only need to delete the corresponding plug-in,
For example, we want to delete the Git perspective and search for the git keyword in the eclipse \ plugins directory.
Delete these two packages and open the IDE again, you will find that the perspective of Git is gone.
So please remember, deleting the perspective is to delete the plug-in.
(5). View definition
The view definition can be seen in three parts,
The left is the project management view, the upper right is the editing view, and the lower right is the console view
The definition of this view can be defined in xml or code.
The suggestion is to use code, because this degree of 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);
projectLayout.setCloseable (false);
projectLayout.setMoveable (false);
Analysis: In fact, the code is relatively easy to understand, do not use xml configuration, write in the code, you can add a folder to contain multiple windows.
(6). Delete the startup welcome page
It is possible that you do not need to display the welcome page when you first open it, you can delete it this way.
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-Customize the interface of Eclipse IDE