blob: 0196d734743970a3e32cd7a61715e76d29b680c9 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/javascript" src="PLUGINS_ROOT/org.eclipse.help/livehelp.js"></script>
<title>Plug-in Import</title>
<link href="../../book.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-weight: bold;
}
.style2 {
font-size: 12pt;
font-weight: bold;
}
-->
</style>
</head>
<body>
<p class="style1">Plug-in Import </p>
<p>PDE provides a <strong>Plug-in Import</strong> wizard to import plug-ins and fragments from the file system into the workspace. The wizard is available under <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.file.import(importWizardId=org.eclipse.pde.ui.PluginImportWizard)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png"><strong>File &gt; Import... &gt; Plug-in Development &gt; Plug-ins</strong></a> from the top level menu.</p>
<p><img src="../../images/import_wizards/plugin_import.png" alt="Plug-in Import" hspace="30"></p>
<p>&nbsp;</p>
<p class="style2">Import Location </p>
<p>By default, the location to import plug-ins from is the target platform as specified on the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.pde.ui.TargetPlatformPreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<strong>Window &gt; Preferences... &gt; Plug-in Development &gt; Target Platform</strong></a> preference page. </p>
<p>The <strong>Target Platform...</strong> button is a shortcut that opens the <strong>Target Platform</strong> preference page for inspection or modification.</p>
<p>If you choose to import plug-ins from an arbitrary location on the file system and you do not wish to change the location of the target platform in the preferences, uncheck <strong>The Target Platform (as specified in the Preferences)</strong> checkbox. Then, use the <strong>Browse...</strong> button to navigate and enter the directory of choice.</p>
<p>&nbsp;</p>
<p class="style2">JAR Source Attachments</p>
<p>When importing a plug-in, PDE searches for the plug-in source code in order to either attach it to the binary JAR or unzip it - depending on the type of import. Ideally, the source code is contained within the plug-in itself. If the source code is packaged in separate source plug-ins, as detailed on the <a href="../preference_pages/source_code_locations.htm">Source Code Locations</a> preference page, PDE searches these locations for plug-in source code to import. </p>
<p>The <strong>Source Code Locations...</strong> button opens the <strong>Target Platform</strong> preference page to allow you to inspect or augment the current list of source code locations. </p>
<p>&nbsp;</p>
<p class="style2">Path Variables</p>
<p>It is permissible to utilize environment variables within library paths on the classpath (e.g. <em>$ws$/swt.jar</em>). These variables are resolved by PDE as specified on the <em>Environment</em> tab of the <a class="command-link" href='javascript:executeCommand("org.eclipse.ui.window.preferences(preferencePageId=org.eclipse.pde.ui.TargetPlatformPreferencePage)")'>
<img src="PLUGINS_ROOT/org.eclipse.help/command_link.png">
<strong>Window &gt; Preferences... &gt; Plug-in Development &gt; Target Platform</strong></a> preference page.</p>
<p>The <strong>Environment Variables...</strong> button is a shortcut that opens the <strong>Environment</strong> preference page for inspection or modification. </p>
<p>&nbsp;</p>
<p class="style2">Plug-ins and Fragments to Import </p>
<p>The <strong>Select from all plug-ins and fragments found at the specified location</strong> option takes you to a second wizard page that lets you browse all plug-ins and choose a subset to import. </p>
<p><img src="../../images/import_wizards/import_from_all.PNG" alt="Import From All" hspace="30"></p>
<p>&nbsp;</p>
<p>The <strong>Import plug-ins and fragments required by existing plug-ins</strong> option is useful when you are importing all pre-requisites for a plug-in that is not part of the target platform. This option takes you to a second wizard page that is simpler; but, provides less overall control over what gets imported.</p>
<p><img src="../../images/import_wizards/plugin_import_for_existing.PNG" alt="Import For Existing" hspace="30"></p>
<p>&nbsp;</p>
<p class="style2">Import Format </p>
<p>When plug-ins are imported, a project is created in the workspace for each plug-in. The project has the same name as the ID of the plug-in being imported. </p>
<p>As for the content of each project, it varies by import format: </p>
<ol>
<li><strong>Binary projects</strong>: The plug-in content is copied into the project. The binary code remains intact in a JAR; while, the manifest files and other resources are extracted to the project root. The advantage of binary projects is that they allow you to browse the code without the overhead of compiling the source code. </li>
<li><strong>Binary projects with linked content</strong>: The plug-in content is not copied into the project. Instead, links are created in the project to map to the actual physical location of the JARs, files and folders on disk. The advantage of this type of import over a regular binary import is that it is faster to import; since, the operation only involves creating links. The disadvantage of this approach is that linked binary projects can become out of sync and have to be re-imported if the absolute path to these linked files are changed in the file system. </li>
<li><strong>Projects with source folders</strong>: The source code for the plug-ins being imported gets extracted and placed in source folders. The advantage of this type of import is that you will be able to modify the imported source code. The disadvantage of this approach is that the code gets compiled and results in an overhead whose magnitude is proportional to the number and size of plug-ins imported. </li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>