CND69Doxygen

(Difference between revisions)
(Overview)
(User View)
Line 20: Line 20:
===User View===
===User View===
 +
====Project Logical View====
 +
No changes.
 +
 +
====Project Physical View====
 +
Default output to project ''dist'' folder
 +
 +
Project
 +
  dist
 +
    Debug
 +
      GNU-MacOS
 +
        doxygen
 +
          html
 +
          man
 +
          richtext
 +
          xml
 +
          latex
 +
 
 +
====Actions====
 +
Managed projects will be have a new action called ''Generate Doxygen''. It will run doxygen on the project files with the specified parameter and generate the output files in the "idts" folder.
 +
 +
 +
Questions:
 +
# ...
 +
 +
====CppUnit Wizard====
 +
A simple file wizard that creates working CppUnit stubs. It creates a C++ header file and a C++ source file similar to the ones below and place them in the ''Unit Test Files'' logical folder.
 +
 +
Source file:
 +
#include "NewClass.h"
 +
 +
CPPUNIT_TEST_SUITE_REGISTRATION(NewClass);
 +
 +
NewClass::NewClass() {
 +
}
 +
 +
NewClass::~NewClass() {
 +
}
 +
 +
void NewClass::setUp() {
 +
    this->example = new int(1);
 +
}
 +
 +
void NewClass::tearDown() {
 +
    delete this->example;
 +
}
 +
 +
void NewClass::testMethod() {
 +
    CPPUNIT_ASSERT(*example == 1);
 +
}
 +
 +
void NewClass::testFailedMethod() {
 +
    CPPUNIT_ASSERT(++*example == 1);
 +
}
 +
 +
Header file:
 +
#ifndef _NEWCLASS_H
 +
#define _NEWCLASS_H
 +
 +
#include <cppunit/extensions/HelperMacros.h>
 +
 +
class NewClass : public CPPUNIT_NS::TestFixture {
 +
    CPPUNIT_TEST_SUITE(NewClass);
 +
    CPPUNIT_TEST(testMethod);
 +
    CPPUNIT_TEST(testFailedMethod);
 +
    CPPUNIT_TEST_SUITE_END();
 +
 
 +
public:
 +
    NewClass();
 +
    virtual ~NewClass();
 +
    void setUp();
 +
    void tearDown();
 +
 +
private:
 +
    int *example;
 +
    void testMethod();
 +
    void testFailedMethod();
 +
};
 +
 +
 +
Questions:
 +
# Should we have advanced choices as '''Create setUp()''' and '''Create tearDown()''' in wizard? Subclass? Other choices?
 +
# Files should not be added to the normal project build but they should be added to code model? Will  this raise any problems?
 +
 +
====Test Progress and Result Visualizer====
 +
Something very similar to what NetBeans has for JUnit:
 +
[[File:unittestprogress.jpg]]
 +
 +
====Typical workflow====
 +
# User creates a managed project.
 +
# User right-clicks ''Unit Test Files'' logical folder and selects ''CppUnit Test'' wizard (New->C++->CppUnit Test) and create templates (header+source file) for a CppUnit test. Project compiles, link, runs, debugs as usual. No change here except for files are added to code model (?).
 +
# User edits the unit test and 'fills in the blanks'.
 +
# To run all tests: select ''Test'' action in project context menu
 +
# To run an individual test: select ''Test File'' action in files context menu.
 +
# To run a group (not all) tests: select ''Test'' action from the logical test folder. It will run all tests in the folder and it's subfolder.
 +
 +
 +
Questions:
 +
 +
1) Should we support 6? Java doesn't!
===Doxygen GUI frontend (Mac)===
===Doxygen GUI frontend (Mac)===

Revision as of 00:49, 16 January 2010

Contents

CND 69 Doxygen

Doxygen is a tool to convert your C++ comments into publishable HTML. It works by extracting commentary directly from the source with the help of a special Doxygen syntax.

Team

  • Dev: Thomas Preisler
  • Lead: Vladimir Voskresensky

Overview

  1. Support Doxygen at a similar level as JUnit is supported by Java projects.
  2. Implement as plugin module using only public project SPIs/APIs.
  3. User builds and installs Doxygen application seperately. Doxygen is not distributed with NetBeans/CND.
  4. Integrate Doxygen with C/C++ managed projects in a similar fashion JUnit is integrated with Java projects supporting a wizard to create tests, Run actions to run test(s).
  5. No direct support for Doxygen for unmanaged projects
  6. Test and verify with Doxygen 1.6.2 available here http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc


Questions:

  1. Is 2) possible?

User View

Project Logical View

No changes.

Project Physical View

Default output to project dist folder

Project
  dist
    Debug
      GNU-MacOS
        doxygen
          html
          man
          richtext
          xml
          latex
  

Actions

Managed projects will be have a new action called Generate Doxygen. It will run doxygen on the project files with the specified parameter and generate the output files in the "idts" folder.


Questions:

  1. ...

CppUnit Wizard

A simple file wizard that creates working CppUnit stubs. It creates a C++ header file and a C++ source file similar to the ones below and place them in the Unit Test Files logical folder.

Source file:

#include "NewClass.h"

CPPUNIT_TEST_SUITE_REGISTRATION(NewClass);

NewClass::NewClass() {
}

NewClass::~NewClass() {
}

void NewClass::setUp() {
   this->example = new int(1);
}

void NewClass::tearDown() {
   delete this->example;
}

void NewClass::testMethod() {
   CPPUNIT_ASSERT(*example == 1);
}

void NewClass::testFailedMethod() {
   CPPUNIT_ASSERT(++*example == 1);
}

Header file:

#ifndef _NEWCLASS_H
#define	_NEWCLASS_H

#include <cppunit/extensions/HelperMacros.h>

class NewClass : public CPPUNIT_NS::TestFixture {
   CPPUNIT_TEST_SUITE(NewClass);
   CPPUNIT_TEST(testMethod);
   CPPUNIT_TEST(testFailedMethod);
   CPPUNIT_TEST_SUITE_END();
 
public:
   NewClass();
   virtual ~NewClass();
   void setUp();
   void tearDown();

private:
   int *example;
   void testMethod();
   void testFailedMethod();
};


Questions:

  1. Should we have advanced choices as Create setUp() and Create tearDown() in wizard? Subclass? Other choices?
  2. Files should not be added to the normal project build but they should be added to code model? Will this raise any problems?

Test Progress and Result Visualizer

Something very similar to what NetBeans has for JUnit: File:unittestprogress.jpg

Typical workflow

  1. User creates a managed project.
  2. User right-clicks Unit Test Files logical folder and selects CppUnit Test wizard (New->C++->CppUnit Test) and create templates (header+source file) for a CppUnit test. Project compiles, link, runs, debugs as usual. No change here except for files are added to code model (?).
  3. User edits the unit test and 'fills in the blanks'.
  4. To run all tests: select Test action in project context menu
  5. To run an individual test: select Test File action in files context menu.
  6. To run a group (not all) tests: select Test action from the logical test folder. It will run all tests in the folder and it's subfolder.


Questions:

1) Should we support 6? Java doesn't!

Doxygen GUI frontend (Mac)

File:doxygen1.jpg File:doxygen2.jpg File:doxygen3.jpg File:doxygen4.jpg File:doxygen5.jpg File:doxygen6.jpg

Resources

IZ:

https://netbeans.org/bugzilla/show_bug.cgi?id=178882

Tutorial:

http://www.stack.nl/~dimitri/doxygen/starting.html

http://www-scf.usc.edu/~peterchd/doxygen/

http://class.ee.iastate.edu/cpre288/lectures_files/Doxygen%20Tutorial.pdf

Project:

http://sourceforge.net/projects/doxygen/

http://www.doxygen.org

http://www.stack.nl/~dimitri/doxygen/

Latest sources:

http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc

Schedule

Milestone Date Content
1 1/18/10 User View Ready
2 NB 6.9 M1 Release 2/24/10
3 3/05/10 Feature useful
4 NB 6.9 Feature Freeze 3/08/10 Feature complete
5 NB 6.9 Code Freeze 4/16/10 Done, all P1/2 bugs fixed.
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo