/[debian]/libjpf-java/trunk/jdocs/ide-netbeans.jxp
ViewVC logotype

Contents of /libjpf-java/trunk/jdocs/ide-netbeans.jxp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1601 - (show annotations)
Sat Feb 28 23:28:19 2009 UTC (12 years, 5 months ago) by gregoa
File size: 5620 byte(s)
[svn-inject] Forking libjpf-java source to Trunk
1 <%
2 // Java Plug-in Framework (JPF)
3 // Copyright (C) 2004 - 2006 Dmitry Olshansky
4 // $Id$
5 %>
6 <%
7 include("/functions.ijxp");
8
9 printHeader("Java IDE Configuration - Netbeans IDE");
10 printMenu("ide");
11 %>
12 <div class="content">
13 <h1>JPF-Demo as Project in Netbeans IDE</h1>
14 <p><em>Note:</em> for simplicity and concreteness, instructions prepared for JPF-Demo project but applicable to any JPF based application.</p>
15 <h3>Preface</h3>
16 <p><a href="http://sourceforge.net/project/showfiles.php?group_id=110394&package_id=121489">Download</a> ZIP archive with JPF-Demo source code and unpack it into some location. This location will be the project "root" folder. Following instructions are created for <a href="http://www.netbeans.org" target="_new">Netbeans IDE</a> version 5.0 but similar steps applicable to earlier versions also.</p>
17 <p><em>Note:</em> JPF-Demo source distribution package already contains project files for Netbeans IDE - <code>nbproject</code> folder. You have to remove this folder if you want to go through steps in this tutorial. But for quick start with JPF-Demo source code simply open provided project in Netbeans IDE.</p>
18 <h3>Creating Project</h3>
19 <p>Before creating project in Netbeans IDE you should already get somewhere the Ant build script for your project. For the beginning, this might be quite rudimentary script file without any useful targets defined, but it is needed as starting point for Netbeans <strong>free-form</strong> project. Later you will be able to improve it adding more targets. JPF-Demo project already contains such build script so you don't need to worry about it.</p>
20 <p>Open Netbeans <strong>New Project</strong> dialogue and select <strong>General</strong> category and <strong>Java Project with Existing Ant Script</strong> project type in the wizard.</p>
21 <p><img src="resources/images/ide-netbeans-01.png" width="729" height="494" border="0" alt="Netbeans IDE" /></p>
22 <p>On the next step you have to select project location. This should be folder that contains project <strong>build script</strong> - <code>build.xml</code> file.</p>
23 <p><img src="resources/images/ide-netbeans-02.png" width="729" height="494" border="0" alt="Netbeans IDE" /></p>
24 <p>On the next step you have to map targets from <code>build.xml</code> file to IDE actions. For JPF-Demo project no changes required, Netbeans maps most found targets to standard IDE actions automatically.</p>
25 <p><img src="resources/images/ide-netbeans-03.png" width="729" height="494" border="0" alt="Netbeans IDE" /></p>
26 <p>Next step in wizard is quite important - you have to tell Netbeans about all source folders in your project. For JPF based application usually every plug-in has it's own separate source folder. You should provide them all here.</p>
27 <p><img src="resources/images/ide-netbeans-04.png" width="728" height="493" border="0" alt="Netbeans IDE" /></p>
28 <p>Now press <strong>Finish</strong> button.</p>
29 <p><img src="resources/images/ide-netbeans-05.png" width="729" height="494" border="0" alt="Netbeans IDE" /></p>
30 <p>The first phase of project configuring is done. You'll see newly created project in the IDE. Before continue, you need to build project. This makes all necessary class folders that we later will use when informing IDE about our project classpath.</p>
31 <p><img src="resources/images/ide-netbeans-06.png" width="387" height="477" border="0" alt="Netbeans IDE" /></p>
32 <p>Now open project <strong>properties</strong> dialog window. On the first category <strong>Java Sources</strong> it is recommended to provide meaningful labels for plug-in sources. Plug-in ID is good candidate for such label.</p>
33 <p><img src="resources/images/ide-netbeans-07.png" width="758" height="526" border="0" alt="Netbeans IDE" /></p>
34 <p>On the <strong>Java Sources Classpath</strong> category you have to provide classpath entries for every source folder. Note that these classpath entires will be used by IDE code completion and refactoring tools but not for classes compiling and running.</p>
35 <p><img src="resources/images/ide-netbeans-08.png" width="758" height="526" border="0" alt="Netbeans IDE" /></p>
36 <p>On the <strong>Output</strong> category you have to provide outputs for for every source folder. This info will be used by debugger and by IDE for inter-project dependencies.</p>
37 <p><img src="resources/images/ide-netbeans-09.png" width="758" height="526" border="0" alt="Netbeans IDE" /></p>
38 <p>The last <strong>Build and Run</strong> category allow you to configure mappings between Ant build script targets and IDE actions. Here you may provide additional actions configuration.</p>
39 <p><img src="resources/images/ide-netbeans-10.png" width="758" height="526" border="0" alt="Netbeans IDE" /></p>
40 <p>Now you are ready to work with project in Netbeans IDE.</p>
41 <h3>Run/Debug Configuration</h3>
42 <p>Running configured project in Netbeans IDE is very simple. All magic done in project Ant build script. Simply press <strong>Run</strong> button that will call mapped Ant target.</p>
43 <p>Debugging is also very easy task. Press <strong>Debug</strong> button. In the first time IDE suggest you create corresponding Ant target and map it to the <strong>debug</strong> action. Answer <strong>yes</strong> to all questions. Netbeans IDE will generate target automatically basing on the <strong>run</strong> target. No manual modifications usually required.</p>
44 <p>Here the result.</p>
45 <p><img src="resources/images/ide-netbeans-11.png" width="1036" height="752" border="0" alt="Netbeans IDE" /></p>
46 </div>
47 <%
48 printFooter();
49 %>

  ViewVC Help
Powered by ViewVC 1.1.26