{"id":472,"date":"2015-10-28T16:03:09","date_gmt":"2015-10-28T16:03:09","guid":{"rendered":"http:\/\/mlapshin.com\/?p=472"},"modified":"2015-11-05T10:02:50","modified_gmt":"2015-11-05T10:02:50","slug":"surviving-thousand-of-plugins-in-eclipse","status":"publish","type":"post","link":"https:\/\/mlapshin.com\/index.php\/2015\/10\/28\/surviving-thousand-of-plugins-in-eclipse\/","title":{"rendered":"Surviving a thousand of plugins in Eclipse workspace"},"content":{"rendered":"<p>Hi guys!<\/p>\n<p>Today I would like to share my experience on how to survive the situation when you are developing under Eclipse and have a LOT of plugins. For example, in my current project we have more than 1000\u00a0plugins. We use &#8220;Build Automatically&#8221; Eclipse feature\u00a0and if the workspace is not configured well, sometimes you\u00a0have to wait\u00a0a half of an hour just for importing a new class.<\/p>\n<p>Fortunately, there are several tricks that could significantly speed up the development process. The most important one is <a href=\"http:\/\/help.eclipse.org\/mars\/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fconcepts%2Ftarget.htm\" target=\"_blank\">Target Platform<\/a> Eclipse feature.<\/p>\n<h2>Target Platform<\/h2>\n<p><strong>Target Platform<\/strong> is just a set of plugins\u00a0which your workspace will be built and run against. These plugins are not shown in the plugin\u00a0tree and do not participate in the automatic build process.\u00a0And\u00a0it makes all the difference!<\/p>\n<p>As\u00a0the default Target Platform Eclipse uses\u00a0all plugins located in the eclipse folder.\u00a0If your product has a big part that is rarely changed like &#8220;core&#8221; functionality, it is worth to build the core plugins separately and add them to\u00a0the Target Platform.\u00a0In our case it reduces build time from 30 minutes to several tens of seconds (a hundred times faster).<\/p>\n<div id=\"attachment_548\" style=\"width: 198px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Default_Eclipse_Target_Platform.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-548\" class=\"wp-image-548\" title=\"Default Eclipse Target Platform\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Default_Eclipse_Target_Platform-300x250.jpg\" alt=\"Default Eclipse Target Platform\" width=\"188\" height=\"156\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Default_Eclipse_Target_Platform-300x250.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Default_Eclipse_Target_Platform.jpg 986w\" sizes=\"auto, (max-width: 188px) 100vw, 188px\" \/><\/a><p id=\"caption-attachment-548\" class=\"wp-caption-text\">Default Eclipse Target Platform<\/p><\/div>\n<div id=\"attachment_600\" style=\"width: 192px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Core_Plugins_Moved_Into_Target_Platform3.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-600\" class=\"wp-image-600 \" title=\"Core plugins moved into the Target Platform\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Core_Plugins_Moved_Into_Target_Platform3-300x257.jpg\" alt=\"Core plugins moved into the Target Platform\" width=\"182\" height=\"156\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Core_Plugins_Moved_Into_Target_Platform3-300x257.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Core_Plugins_Moved_Into_Target_Platform3.jpg 984w\" sizes=\"auto, (max-width: 182px) 100vw, 182px\" \/><\/a><p id=\"caption-attachment-600\" class=\"wp-caption-text\">Core plugins moved into the Target Platform<\/p><\/div>\n<div id=\"attachment_589\" style=\"width: 219px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/1338_plugins.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-589\" class=\"wp-image-589 \" title=\"1338 plugins in an Eclipse workspace\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/1338_plugins.jpg\" alt=\"1338 plugins in an Eclipse workspace\" width=\"209\" height=\"128\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/1338_plugins.jpg 318w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/1338_plugins-300x184.jpg 300w\" sizes=\"auto, (max-width: 209px) 100vw, 209px\" \/><\/a><p id=\"caption-attachment-589\" class=\"wp-caption-text\">1338 plugins in an Eclipse workspace<\/p><\/div>\n<div id=\"attachment_590\" style=\"width: 228px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/106_plugins_after_using_SDK.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-590\" class=\"wp-image-590\" title=\"106 packages after using SDK\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/106_plugins_after_using_SDK.jpg\" alt=\"106 packages after using SDK\" width=\"218\" height=\"128\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/106_plugins_after_using_SDK.jpg 330w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/106_plugins_after_using_SDK-300x176.jpg 300w\" sizes=\"auto, (max-width: 218px) 100vw, 218px\" \/><\/a><p id=\"caption-attachment-590\" class=\"wp-caption-text\">106 packages after using SDK<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h2>Target Definitions<\/h2>\n<p><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/PIM-Target-Platform1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-593 \" title=\"PIM Target Definitions\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/PIM-Target-Platform1-300x207.jpg\" alt=\"\" width=\"243\" height=\"168\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/PIM-Target-Platform1-300x207.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/PIM-Target-Platform1-1024x708.jpg 1024w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/PIM-Target-Platform1.jpg 1046w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/a>Eclipse allows to have several pre-configured Target Platforms and to switch between them. Such configurations are named <strong>Target Definitions<\/strong>. The active Target Definition is the Target Platform.<\/p>\n<p>Target Definitions\u00a0are very useful when you have several different sets of plugins\u00a0for different environments\u00a0like\u00a0x32 and x64. Look at\u00a0a screen shot how Target Platforms look like in the PIM project when the core plugins are under development:<\/p>\n<p>&nbsp;<\/p>\n<h4><\/h4>\n<h4 style=\"text-align: left;\">Managing Target Definitions<\/h4>\n<p><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/New_Target_Definition.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-485\" title=\"New Target Definition\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/New_Target_Definition-300x121.jpg\" alt=\"New Target Definition\" width=\"273\" height=\"110\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/New_Target_Definition-300x121.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/New_Target_Definition.jpg 706w\" sizes=\"auto, (max-width: 273px) 100vw, 273px\" \/><\/a>It is possible to save a Target Definition as a file and include into a project. It is allowed\u00a0to have as many Target Definition files as necessary. Then, when a new workspace is created, the project could be imported together with the saved pre-configured Target Definitions.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_596\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-596\" class=\"wp-image-596 size-medium\" title=\"Plugins in a Feature\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1-300x178.jpg\" alt=\"Plugins in a Feature\" width=\"300\" height=\"178\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1-300x178.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1-1024x609.jpg 1024w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1-1170x696.jpg 1170w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Feature_plugins1.jpg 1221w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-596\" class=\"wp-caption-text\">Plugins in a Feature<\/p><\/div>\n<h2>Features<\/h2>\n<p>Another great thing for structuring workspace and keeping run configurations in shape is <a href=\"http:\/\/help.eclipse.org\/mars\/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fconcepts%2Ffeature.htm\" target=\"_blank\">Features<\/a>.\u00a0A <strong>Feature<\/strong> is used to package a group of plug-ins together into a single unit. Then it is much easier to manage, for example, 5 features instead of 100 plugins.<\/p>\n<p>Take a look at a typical feature configuration. It consists of many plugins. When\u00a0configuration is finished, the feature could be used as a single unit.<\/p>\n<p>I saw an\u00a0Eclipse project containing about 1000 plugins that did not use features. It was a nightmare for developers to manually\u00a0set up hundreds of plugin dependencies just to run the application.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_598\" style=\"width: 310px\" class=\"wp-caption alignright\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-598\" class=\"wp-image-598 size-medium\" title=\"Plugins in debug configuration\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1-300x205.jpg\" alt=\"Plugins in debug configuration\" width=\"300\" height=\"205\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1-300x205.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1-1024x699.jpg 1024w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1-1170x799.jpg 1170w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Plugins_in_debug_configuration1.jpg 1277w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-598\" class=\"wp-caption-text\">Plugins in debug configuration<\/p><\/div>\n<div id=\"attachment_597\" style=\"width: 310px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-597\" class=\"wp-image-597 size-medium\" title=\"Features in debug configuration\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1-300x205.jpg\" alt=\"Features in debug configuration\" width=\"300\" height=\"205\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1-300x205.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1-1024x699.jpg 1024w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1-1170x799.jpg 1170w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/Features_in_debug_configuration1.jpg 1277w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><p id=\"caption-attachment-597\" class=\"wp-caption-text\">Features in debug configuration<\/p><\/div>\n<p>Take a look at our PIM Server debug configuration. Note, there are just several pre-configured features selected.<\/p>\n<p>Then take a look at the same configuration that consists just of plugins without features. Note, there 220 plugins instead of just 7\u00a0features.<\/p>\n<p>Remember the Target Platform is the\u00a0constant part of the debug configuration, so it is not necessary to include it explicitly.<\/p>\n<p>If your project consists of several hundreds of plugins, try to configure the\u00a0<strong>Target Platform<\/strong> and use <strong>Features<\/strong>. Maybe you will love\u00a0Eclipse after this.\u00a0\ud83d\ude09<\/p>\n<p>Bye!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-580 size-medium\" src=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/paper-garland-1-300x201.jpg\" alt=\"paper girland\" width=\"300\" height=\"201\" srcset=\"https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/paper-garland-1-300x201.jpg 300w, https:\/\/mlapshin.com\/wp-content\/uploads\/2015\/10\/paper-garland-1.jpg 570w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi guys! Today I would like to share my experience on how to survive the situation when you are developing under Eclipse and have a LOT of plugins. For example, in my current project we have more than 1000\u00a0plugins. We&hellip; <br \/><a class=\"read-more-button\" href=\"https:\/\/mlapshin.com\/index.php\/2015\/10\/28\/surviving-thousand-of-plugins-in-eclipse\/\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":579,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,3],"tags":[28,18],"class_list":["post-472","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-eclipse","category-programming","tag-eclipse","tag-programming"],"_links":{"self":[{"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/posts\/472","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/comments?post=472"}],"version-history":[{"count":56,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/posts\/472\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/posts\/472\/revisions\/601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/media\/579"}],"wp:attachment":[{"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/media?parent=472"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/categories?post=472"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mlapshin.com\/index.php\/wp-json\/wp\/v2\/tags?post=472"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}