HeaderDoc not generating HTML Documentation - ios

I'm working on a re-usable API component for iOS apps. I have completed the API and documented it using headerdoc for future users.
Now I want to create HTML pages for those header files. So I executed the following command in terminal from my project directory
headerdoc2html -o ~/Desktop/My_Project_Documentation APIFolder/
But No documents are being created, instead I'm getting an error like:
Skipping. No HeaderDoc comments found.
No default encoding. Guessing. If date formats are wrong, try
specifying an appropriate value in the LANG environment variable.
...done
I tried various methods and ways, finally I narrow down the issue:
In the beginning of my project I have something like:
/**
* DarkPantherConstants.h
* Panther
* Created by Midhun on 05/11/14.
* Copyright (c) 2014 Midhun. All rights reserved.
* Panther Constants are defined in this header file
*/
So the issue was with this particular comment, actually this comment is auto-generated by XCode and I actually modified the name and comment format to headerdoc. Nothing with date or date-format. Even If I remove those comments, nothing works; getting same error. Can anybody please help me to solve this ?

I fixed it by changing my commenting format from:
/**
*
*/
to
/*!
*
*/
I made my header comment like:
/*!
* DarkPantherConstants.h
* Panther
* Created by Midhun on 05/11/14.
* Copyright (c) 2014 Midhun. All rights reserved.
* Panther Constants are defined in this header file
*/
And it solved the issue, but I don't know why the previous commenting format not working. (Both are valid for headerdoc)

Add the -j options when executing headerdoc2html to also process java style comments ( /** )

Related

Codestyling-localization Wordpress plugin can't detect my theme

I use codestyling-localization plugin in my wordpress theme to edit the locale files. In my theme I tried all of the following:
functions.php:
<?php
/**
* Text Domain: my_locale
* Domain Path: /languages
*/
function my_theme_setup() {
var_dump(load_theme_textdomain('my_locale', TEMPLATEPATH . '/languages'));
}
add_action('after_setup_theme', 'my_theme_setup');
style.css:
/*
Textdomain: my_locale
Domain Path: /languages
*/
I created files under languages/: cs_CZ.mo and en_US.mo.
But the plugin still can't find the languages. However, the var_dump method in my_theme_setup returns true. I have no idea what is wrong.
Thanks!
I digged into the plugin and found out that it won't process themes marked as "with errors". A feature, which is probably not desired.

Delphi Pas2Dox + Doxygen

I am using Delphi and I need to prepare some documentation. One of possible solutions to that is to use Doxygen with Pas2Dox filter.
I am currently using pas2dox-0.50rc1.exe filter and Doxygen wizard 1.8.3.1. I am struggling to setup Doxygen properly to display my comments in Delphi but the thing is that I am not sure anymore what is the proper comment format in Delphi. I searched interenet but I can't find any tutorial or example on how to succesfully generate html documentation with delphi.
Is there maybe somebody who can share me some tips how to achieve that?
My current comments are as:
{*------------------------------------------------------------------------------
test
#param AGraphicsOwner ParameterDescription
#param ASettingsPath ParameterDescription
#param AEngineType ParameterDescription
#return ResultDescription
------------------------------------------------------------------------------*}
constructor TBaseEngine.Create(AGraphicsOwner: HWND;
ASettingsPath: PAnsiChar;
AEngineType: byte);
THANKS!!
I succeeded in creating a nice doxygen documentation with comments formated exactly like yours on my delphi code!
Here is how:
Replace all not-doxygen comments with // :
instead of
(* comment *) or { comment }
have
// comment
Why? According to this blog entry for the pas2dox filter it is crucial not to use (* and *) for commentaries in your delphi file. Furthermore simple one-line commentaries embraced by { and } seem to destroy the doxygen documentation as well.
Put the methods you want to see documented in doxygen into the INTERFACE section:
Only the methods "declared" in the INTERFACE section will be visible in doxygen (I have not quite figured out why, yet)
I tested it with a file that had all types of delphi comment-styles. I replaced the comment-idicators with notepad++'s replace-all function in the following order (I am completely sure there is a more elegant way to do that, but for me it was handy):
replace { with //
replace //$ with {$
replace (* with //
after that, all methods (in the INTERFACE section) appeared in doxygen and I started to comment using the doxygen style from above. I left away the ---, but I don't think this should be an issue =)

Using CKFinder in an Orchard CMS module

In trying to integrate the CKsource CKFinder control into Orchards CMS. I've already done this with a plain non orchard project, but am having difficulty with the orchard CMS project.
When popuing up the The finder control I get the following javascript error:
It was not possible to properly load the XML response from the web server.
Raw response from the server:
<%# Page Language="c#" Inherits="CKFinder.Connector.Connector" Trace="false"
AutoEventWireup="false" %><%# Assembly Name="AAA.CMS"%> <%# Register
Src="../../../config.ascx" TagName="Config" TagPrefix="CKFinder" %> <%-- * CKFinder *
======== * http://cksource.com/ckfinder * Copyright (C) 2007-2013, CKSource - Frederico
Knabben. All rights reserved. * * The software, this file and its contents are subject
to the CKFinder * License. Please read the license.txt file before using, installing,
copying, * modifying or distribute this file or part of its contents. The contents of
* this file is part of the Source Code of CKFinder. * * --- * This is the ASP.NET
connector for CKFinder. * * You must copy the CKFinder.Connector.dll file to your "bin"
directory or * make a reference to it in your Visual Studio project. --%>
I've verified my Config.ascx is correct. I'm able to access the js file. Is it even possible to integrate ckfinder into a Orchard Module?

Use h5bp / ant-build-script to remove debug output

In the ant-build-script docs, it says I can mark my scripts with comments to state which Javascript files to minify & concat.
<-- scripts concatenated and minified via build script -->
<script src="js/plugins.js"></script> <cript
src="js/main.js"></script> <-- end scripts -->
Is there a way I can use a similar approach to disable debug output, or remove specific lines in any files (Javascript, PHP, etc.)
An example of what I'm trying to accomplish:
<!-- Remove these lines --> console.log("Starting test");
console.log("Test 2"); <-- end remove these lines -->
Also, using that same example, if it could replace a line. An example of that is if I wanted it to change a variable from a local test directory to a remote production directory.
I hope that make sense and I appreciate any help.
Thanks!
If you are trying to remove lines of Javascript using the h5bp default Google Closure Compiler I suggest looking at #define JSDoc Tag
/** #define {boolean} */
var DEBUG = true;
Then, in your project.properties file look for: # Closure Compiler Options and set: tool.closure.opts = --define DEBUG=false
Finally, wrap any code you want ignored, in production, in a conditional:
if (!DEBUG) {
console.log("Starting test");
console.log("Test 2");
}
The #define JSDoc Tag will help with your second question also.
/**
* #define {string}
*/
var AJAX_URL = 'http://localhost/';
console.log(AJAX_URL);
with the compilations options: --compilation_level ADVANCED_OPTIMIZATIONS --define AJAX_URL=\'http://example.com/\' (Note: you made need to fiddle with the quote escaping, depending on your platform) the resulting code is:
console.log("http://example.com/");
There are many ways to go about this of course, see:
http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
http://dailyjs.com/2012/02/02/console/
https://developers.google.com/closure/compiler/docs/js-for-compiler?hl=en

QMake: how to let UIC generate BOTH header and source files?

in the .pro file, I defined both UI_HEADERS_DIR = ./uic/include UI_SOURCES_DIR = ./uic/src
but after compiling, I only get the ui_x.h files, which contain both declarations and implementations.
Is this mean QMake can't produce a simple header file containing only the minimal declarations and put all the implementation details into source file?
This is a sample generated .h file, you can find both declarations and implementations are placed within the .h file:
/********************************************************************************
** Form generated from reading UI file 'DemoDialog.ui'
**
** Created: Thu 21. Jul 16:08:58 2011
** by: Qt User Interface Compiler version 4.7.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
QT_BEGIN_NAMESPACE
class Ui_DemoDialog
{
public:
void setupUi(QDialog *DemoDialog)
{
if (DemoDialog->objectName().isEmpty())
DemoDialog->setObjectName(QString::fromUtf8("DemoDialog"));
DemoDialog->resize(400, 300);
retranslateUi(DemoDialog);
QMetaObject::connectSlotsByName(DemoDialog);
} // setupUi
void retranslateUi(QDialog *DemoDialog)
{
DemoDialog->setWindowTitle(QApplication::translate("DemoDialog", "Dialog", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class DemoDialog: public Ui_DemoDialog {};
} // namespace Ui
QT_END_NAMESPACE
The program that reads a .ui file and converts it to code is 'uic', the User Interface Compiler.
It doesn't write out source files: it only writes headers.
See its documentation.
So the mystery is why the qmake variable reference page bothers to say that UI_SOURCES_DIR exists?
There may be some undocumented uic option that now, or previously, made qmake make uic write out a .cpp file. But even if there is, I would not recommend using it, for fear that it might disappear in future.

Resources