Source code file content

Revision: 2

» Project Revision History

» Checkout URL

web-content / trunk / dev / reviews / opinions_108501.html

Size: 6658 bytes, 1 line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">
    <title>Discovery feature</title>
    <META NAME="AUTHOR" CONTENT="Alexander Simon">
<link rel="stylesheet" type="text/css" href="">
<h1>Open Solaris NetBeans Projects</h1>

<p>This is a prototype overview of Open Solaris Netbeans Projects for C/C++ Pack.

<p><h2><a name="gettingtoknowthesample"></a>Getting Open Solaris Sources.</h2>
<p>Goto link<a href="">
<FONT COLOR="#3333ff">OpenSolaris Download Center.</FONT></A></P>
<p>Download and unpack sources according to instructions on this page.
<p>As result you should have a following file structure:
<p><pre class="examplecode">
<p>Load NetBeans OpenSolaris projects and unpack it in folder <tt>testws</tt>. New Folder tree should be:
<p><pre class="examplecode">

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Command Projects.</h2>

<p>Open Solaris commands are located in the folder <tt>testws/usr/src/cmd</tt>.
<p>Netbeans commands projects are located in the folder <tt>testws/ss_projects/cmd</tt>.
<p>Protototype contains only 3 commands. Look at the component diagram.
<p><IMG SRC="108501/Commands.png" NAME="Commands Overview" ALIGN=BOTTOM BORDER=0><BR><BR>
<p>Open Solaris as project differs from ordinary C/C++ projects.
It has own system includes which are located in folder <tt>testws/proto</tt>.
Those files are separated to special NetBeans projects:
<p><li><tt>Include</tt> manages system includes from <tt>testws/proto/root_i386/usr/include</tt>.
<p><li><tt>Include.sfw</tt> manages system includes from <tt>testws/proto/root_i386/usr/sfw/include</tt>.
<p>Another Open Solaris specific is an implementation of libraries. You can see dependency on <tt>libc</tt>.

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Libraries Projects.</h2>

<p>Open Solaris libraries are located in the folder <tt>testws/usr/src/lib</tt>.
<p>Netbeans commands projects are located in the folder <tt>testws/ss_projects/lib</tt>.
<p>Protototype contains only 5 libraries. Look at the component diagram.
<p><IMG SRC="108501/Libraries.png" NAME="Libraries Overview" ALIGN=BOTTOM BORDER=0><BR><BR>
<p>As you can note libraries use shared system includes projects.
<p>Libraries use special common project that represents folder <tt>testws/usr/src/common</tt>.

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Kernel Projects.</h2>

<p>Open Solaris kernel is located in the folder <tt>testws/usr/src/uts</tt>.
<p>Netbeans kernel projects are located in the folder <tt>testws/ss_projects/uts</tt>.
<IMG SRC="108501/Kernel.png" NAME="Kernel Overview" ALIGN=BOTTOM BORDER=0><BR><BR>
<p>Kernel is divided on two projects:
<p><li>Common project that represents folder <tt>testws/usr/src/uts/common</tt>.
<p><li>Platform dependent project that represents other subfolders in the folder <tt>testws/usr/src/uts</tt>.

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Tools Project.</h2>

<p>Open Solaris tools are located in the folder <tt>testws/usr/src/tools</tt>.
<p>Netbeans commands projects are located in the folder <tt>testws/ss_projects/lib</tt>.
<p>Look at the component diagram.
<p><IMG SRC="108501/Tools.png" NAME="Tools Overview" ALIGN=BOTTOM BORDER=0><BR><BR>

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Ucb Projects.</h2>

<p><IMG SRC="108501/Ucb.png" NAME="Ucb Overview" ALIGN=BOTTOM BORDER=0><BR><BR>

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>All Projects.</h2>

<p><IMG SRC="108501/All.png" NAME="All Projects Overview" ALIGN=BOTTOM BORDER=0><BR><BR>

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>How it works?</h2>

<p>Look at echo project.
<p>Open project <tt>testws/ss_projects/cmd</tt>.
<p>Select checkbox "Open Required Projects".

<p><IMG SRC="108501/echo.png" NAME="Opened echo project" ALIGN=BOTTOM BORDER=0><BR><BR>

<p>The <tt>echo</tt> project and 3 required projects would be opened in the IDE.
<p>Class view of the <tt>echo</tt> project contains only <tt>main</tt> function because there is <tt>include</tt> project 
which takes care about system headers so classview is not overloaded. 
All declarations required by included files are located in the dependent <tt>include</tt> project.
If you open <tt>echo</tt> project without dependent projects all system declarations will be in the <tt>echo</tt>.
<p><tt>Include</tt> project is shared between all opened projects which have dependency on the <tt>include</tt> project.
Note that the <tt>include</tt> project contains only declarations used in the dependent projects. So there is no need in 
the parsing of all system includes.
This feature is controlled by special project flag <tt>parse-orphan-enablede</tt> (there is no UI for it yet).
<p><IMG SRC="108501/orphanflag.png" NAME="Do not parse headers" ALIGN=BOTTOM BORDER=0><BR><BR>
<p>Click the <tt>echo</tt> project properties. Project is make-based project. But it supports dependent projects.
<p><IMG SRC="108501/echoproperties.png" NAME="Echo Project Properties" ALIGN=BOTTOM BORDER=0><BR><BR>
<p><IMG SRC="108501/echodependencies.png" NAME="Dependencies of Echo Project" ALIGN=BOTTOM BORDER=0><BR><BR>
<p>Return to opened <tt>echo.c</tt>.
Try to hyperlink on the <tt>getenv</tt> method call. 
Link will be opened at the implementation of <tt>getenv</tt> method in the <tt>libc</tt> project.
<p>Try to hyperlink on the function definition of <tt>getenv</tt>. 
Link will be opened at the declaration of the <tt>getenv</tt> method in the <tt>include</tt> project.

<!-- ===================================================================================== -->

<p><h2><a name="gettingtoknowthesample"></a>Downloads</h2>
<p>Download <a href="108501/">Open Solaris NetBeans Projects</a>

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 233 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm