blob: bca4a96266582615edba683d3b7bbd3abbbdefa6 [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">
<link href="../../book.css" rel="stylesheet" type="text/css">
<title>Launchers</title>
<style type="text/css">
<!--
.style1 {
font-size: 18px;
font-weight: bold;
}
.style3 {
font-size: 12pt;
font-weight: bold;
}
-->
</style>
</head>
<body>
<p class="style1">Launchers</p>
<p>Testing an Eclipse plug-in is very easy. Just save your file and launch a second instance of Eclipse. No packaging or deployment steps are necessary. </p>
<p>PDE makes it all possible by extending the &quot;Debug&quot; framework and providing three different launch configuration types that cover different testing domains: </p>
<ul>
<li><a href="eclipse_application_launcher.htm">Eclipse Application</a></li>
<li><a href="equinox_launcher.htm">OSGi Framework</a></li>
<li><a href="junit_launcher.htm">JUnit Plug-in Test</a></li>
</ul>
<p>&nbsp;</p>
<p>PDE launch configurations are centrally managed within the <strong>Launch Configuration Dialog</strong> along with other launch configurations in the SDK. PDE launch configurations can be invoked via <strong>Run &gt; Run...</strong> or <strong>Debug &gt; Debug...</strong> from the top level menu. </p>
<p><img src="../../images/launchers/launcher_outline.png" alt="launchers outline" hspace="30"></p>
<p>&nbsp;</p>
<p class="style3">Save and Launch </p>
<p>As you develop your plug-in in the workspace, the Java source code gets incrementally compiled and the generated class files are placed in output folders. When you launch a runtime Eclipse application, PDE launches the application in <strong><em>dev</em></strong> mode and customizes the runtime classpath. PDE customizes the runtime classpath by putting the freshly generated class files on your plug-in classpath; thus, making them readily available to get picked up by the runtime classloader. This mechanism allows you to test your code without the need to package it in a JAR first.</p>
<p>PDE gives you even more control over the runtime classpath of your plug-in by providing a <strong>Runtime Classpath</strong> property page for each plug-in project. Within this property page, you can specify which classes to exclude or include at the output folder level when testing. The <strong>Runtime Classpath</strong> property page can be invoked via <strong>Properties &gt; Plug-in Development &gt; Runtime Classpath</strong> from the context menu of plug-in projects. </p>
<p>&nbsp;</p>
<p><img src="../../images/launchers/runtime_classpath.PNG" alt="Runtime Classpath" hspace="30"> </p>
<p>A specific example of when you might want to exclude output folders from a launch is when you are testing Ant tasks. The reason for this is that Ant expects your code to be in a JAR according to the Ant contract. Therefore, it is recommended to package Ant code in a JAR within your plug-in project and exclude the output folder containing the compiled Ant task source from the launch. </p>
<br>
<br>
<br>
</body>
</html>