Customizing the Eclipse IDE's miscellaneous articles

Source: Internet
Author: User

Review above: Customizing the Eclipse IDE Plug-in chapter (II)

This article will tell you about the complications of developing the Eclipse plug-in process. Do not talk about function, only say illness.

Preface, which Eclipse is the basis for customization? I would suggest that you use eclipse as the basis for the customization, because your plugin is developed on this, and there is no need for a dependency plugin to be missing. If you feel that some plugins do not need to, also delete themselves. One, the plugin exists cache phenomenonIn the development of plug-ins, sometimes there is a cache of the last run plug-in results. WORKAROUND: 1. In the eclipse application of run configurations, tick clear "workspace" and tick "clear before request confirmation". second, the plug-in Plugin_customization.ini has not been effectivePlugin_customization.ini inside is some of the global configuration for Eclipse. It is possible that you will specify your own Plugin_customization.ini in the perspective plugin, but you will find that it is always not effective. The configuration is as follows:
<extensionID= "Bingotouch" Point= "Org.eclipse.core.runtime.products">     <ProductApplication= "Org.eclipse.ui.ide.workbench"name= "%name">          < Propertyname= "Preferencecustomization"value= "Plugin_customization.ini" />          < Propertyname= "AppName"value= "Bingotouch" />          < Propertyname= "Windowimages"value= "Icons/eclipse16.png,icons/eclipse32.png" />          < Propertyname= "Abouttext"value= "%abouttext" />     </Product></extension>
Reason: In fact this is depending on your eclipse.exe under the Eclipse.ini specify what product is running, open this file we will see:
-productorg.eclipse.epp.package.rcp.product
The only Plugin_customization.ini solution that comes into effect is this product: There are two solutions, one is to specify product, point to its own plug-in (the name is its own plug-in name + product name). For example:
-productcom.bingo.ide.perspective.bingotouch

The other is to cover the plugin_customization.ini that you want to take effect eclipse\plugins\org.eclipse.epp.package.rcp_4.4.2.20150219-0708 The Plugin_customization.ini in the catalogue (I use this method).

third, the IDE's theme settings have been invalidThis is similar to the second one, where the theme you set in the plugin has been invalidated, for example:
< Property       name = "Csstheme"       value= "Com.appcelerator.titanium.rcp.theme.dashboard"></  Property>
Cause resolution: Or the reason for the product to be effective: Plugin.xml in the specified product, change the Csstheme attribute value to the subject ID you want. Iv. The exported plugin is garbled in Chinese.Plug-in Display Chinese time garbled, you may be lazy in the plugin to write Chinese directly (the normal should be written in the properties file configuration, Chinese with Unicode encoding). Cause resolution: If there is Chinese in the plugin, you do not specify the compilation code. Workaround: Directly in the Build.properties editor's "build.properties" edit page, add the following at the end of the file (remember that two points must not be less):
Javacdefaultencoding. = UTF-8

Five, plug-in console output on the MAC display garbled

The plug-in console output is normal in window, and the display is garbled on the Mac. Workaround: On Mac Eclipse.ini Plus:
-dfile.encoding=utf-8 
Six, the second time you open Eclipse, the toolbar's own new icon is shifted to the rightWhen you first open eclipse, your new icon is still displayed, and when you open eclipse for the second time, the icon is shifted to the right. Cause resolution: This may have a different cause, but my situation is because of the use of the theme. I used the Aptana theme, but in the theme of the style file there are
{     handle-image: url (chrome://drag-handle?height=22&background-color= #cccccc &embossed= true);}

The URL inside the handle-image cannot be accessed, causing the problem.

Workaround: The inside of the icon down to the local, the relative path is normal.
{     handle-image: url (./draghandle.png);}
Seven, directly run plug-in effective, export put to new eclipse no effectIt was a deadly problem, and it took me two days to check it out (although a lot of attempts were ineffective, but eventually they were on the right path). I tried to check the problem with the OSGi console (because of the length issue I wrote in another article): The Eclipse OSGi debugging process found that my plugin was not loaded at all, let alone a mistake. Reason analysis: In the baffled solution, suddenly think of a problem, eclipse is not itself recognize plug-ins, whether there is a place to configure these plug-in information. And then I finally found out, Eclipse/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info.
All the startup plugins are defined here, and that's what I need to put my plugin here. Workaround: For example:
Com.bingo.ide.perspective,1.0.0,dropins/eclipse/plugins/com.bingo.ide.perspective_1.0.0.jar,4,false
I put my plugin information here, and sure enough it came into effect. Related issues: This is another problem, because my eclipse plugin has more than 90 (don't ask me why so many), I can not be a piece of information to define, generate bundles.info information, so stupid. So a simple Java program was compiled to generate. The code is as follows:
ImportJava.io.File;/*** After plugin generation, generate bundles.info*@authorLufeng*/ Public classBuildinfo {Final StaticString Exportpluginpath = "f:\\source\\bingo-touch\\ide\\release\\window_64\\eclipse\\dropins\\eclipse\\plugins\\ "; Final StaticString Pluginpath = "dropins/eclipse/plugins/";  Public Static voidMain (string[] args) {File Direct=NewFile (Exportpluginpath); file[] Files=Direct.listfiles ();  for(File f:files) {String s=F.getname (); intp = S.lastindexof ("_"); if(p = =-1)                      Continue; String name= s.substring (0, p); String version= S.substring (p+1); if(Version! =NULL&& "". Equals (version) version= version.substring (0, Version.lastindexof ("."))); //. Jar directly stitching, folder form behind add "/"                 if(F.isdirectory ()) s= s+ "/"; SYSTEM.OUT.PRINTLN (Name+ "," +version+ "," +pluginpath +s+ ", 4,false"); }         }    } 
Six articles about my eclipse customization this month, I hope to help people. 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/4694757.html

Customizing the Eclipse IDE's miscellaneous articles

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.