Author Topic: BlackDoc documentation plugin  (Read 18546 times)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12321
    • Travis build status
Re: BlackDoc documentation plugin
« Reply #30 on: April 24, 2012, 08:29:31 am »
You should use #include <sdk.h>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: BlackDoc documentation plugin
« Reply #31 on: April 25, 2012, 12:48:52 am »
You should use #include <sdk.h>
Right you are.  (Teach me not to pay attention when utilizing copy/paste...)

@marked: I believe the following patch has been green-lighted as an acceptable Windows build file.
Code: [Select]
diff -r e8000aa19e1c BlackDoc-win.cbp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/BlackDoc-win.cbp Mon Apr 23 20:39:43 2012 -0400
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<CodeBlocks_project_file>
+ <FileVersion major="1" minor="6" />
+ <Project>
+ <Option title="BlackDoc" />
+ <Option pch_mode="2" />
+ <Option compiler="gcc" />
+ <Build>
+ <Target title="default">
+ <Option output="blackdoc" prefix_auto="1" extension_auto="1" />
+ <Option object_output="objs" />
+ <Option type="3" />
+ <Option compiler="gcc" />
+ <Option parameters="--debug-log --multiple-instance -na -ns -nd" />
+ <Option host_application="$(#cb)\devel\codeblocks.exe" />
+ <Option run_host_application_in_terminal="0" />
+ <Compiler>
+ <Add option="-g" />
+ <Add option="-pipe" />
+ <Add option="-mthreads" />
+ <Add option="-fmessage-length=0" />
+ <Add option="-fexceptions" />
+ <Add option="-Winvalid-pch" />
+ <Add option="-DBUILDING_PLUGIN" />
+ <Add option="-DHAVE_W32API_H" />
+ <Add option="-D__WXMSW__" />
+ <Add option="-DWXUSINGDLL" />
+ <Add option="-DcbDEBUG" />
+ <Add option="-DCB_PRECOMP" />
+ <Add option="-DWX_PRECOMP" />
+ <Add option="-DwxUSE_UNICODE" />
+ <Add directory="$(#cb)\include" />
+ <Add directory="$(#cb)\sdk\wxscintilla\include" />
+ <Add directory="$(#WX.include)" />
+ <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)\msw$(WX_SUFFIX)" />
+ </Compiler>
+ <Linker>
+ <Add option="-Wl,--enable-auto-import" />
+ <Add option="-mthreads" />
+ <Add library="wxmsw28$(WX_SUFFIX)" />
+ <Add library="codeblocks" />
+ <Add directory="$(#cb)\devel" />
+ <Add directory="$(#WX.lib)\gcc_dll$(WX_CFG)" />
+ </Linker>
+ <ExtraCommands>
+ <Add after="zip -j9 blackdoc.zip manifest.xml styles.css" />
+ <Add after="zip -j9 blackdoc.cbplugin blackdoc.dll blackdoc.zip" />
+ <Mode after="always" />
+ </ExtraCommands>
+ </Target>
+ <Environment>
+ <Variable name="WX_CFG" value="" />
+ <Variable name="WX_SUFFIX" value="u" />
+ </Environment>
+ </Build>
+ <VirtualTargets>
+ <Add alias="All" targets="default;" />
+ </VirtualTargets>
+ <Compiler>
+ <Add option="-Wall" />
+ </Compiler>
+ <Unit filename="Directory.cpp" />
+ <Unit filename="Directory.h" />
+ <Unit filename="ErrorMessage.cpp" />
+ <Unit filename="ErrorMessage.h" />
+ <Unit filename="FileCreationDialog.cpp" />
+ <Unit filename="FileCreationDialog.h" />
+ <Unit filename="FileSignature.cpp" />
+ <Unit filename="FileSignature.h" />
+ <Unit filename="FilesHandler.cpp" />
+ <Unit filename="FilesHandler.h" />
+ <Unit filename="HTMLActiveFileExporter.cpp" />
+ <Unit filename="HTMLActiveFileExporter.h" />
+ <Unit filename="HTMLActiveProjectExporter.cpp" />
+ <Unit filename="HTMLActiveProjectExporter.h" />
+ <Unit filename="HTMLBranchIndexBuilder.cpp" />
+ <Unit filename="HTMLBranchIndexBuilder.h" />
+ <Unit filename="HTMLContent.cpp" />
+ <Unit filename="HTMLContent.h" />
+ <Unit filename="HTMLDocument.cpp" />
+ <Unit filename="HTMLDocument.h" />
+ <Unit filename="HTMLExporter.cpp" />
+ <Unit filename="HTMLExporter.h" />
+ <Unit filename="HTMLFilesCreator.cpp" />
+ <Unit filename="HTMLFilesCreator.h" />
+ <Unit filename="HTMLFooter.h" />
+ <Unit filename="HTMLHeader.cpp" />
+ <Unit filename="HTMLHeader.h" />
+ <Unit filename="HTMLInnerParser.cpp" />
+ <Unit filename="HTMLInnerParser.h" />
+ <Unit filename="HTMLList.cpp" />
+ <Unit filename="HTMLList.h" />
+ <Unit filename="HTMLMainIndexBuilder.cpp" />
+ <Unit filename="HTMLMainIndexBuilder.h" />
+ <Unit filename="HTMLMenu.cpp" />
+ <Unit filename="HTMLMenu.h" />
+ <Unit filename="HTMLPageBuilder.cpp" />
+ <Unit filename="HTMLPageBuilder.h" />
+ <Unit filename="HTMLRemovePreviousFiles.cpp" />
+ <Unit filename="HTMLRemovePreviousFiles.h" />
+ <Unit filename="HTMLSourceCode.cpp" />
+ <Unit filename="HTMLSourceCode.h" />
+ <Unit filename="HTMLTable.cpp" />
+ <Unit filename="HTMLTable.h" />
+ <Unit filename="HTMLTags.cpp" />
+ <Unit filename="HTMLTags.h" />
+ <Unit filename="IFileData.h" />
+ <Unit filename="ProgressDialog.cpp" />
+ <Unit filename="ProgressDialog.h" />
+ <Unit filename="Project.cpp" />
+ <Unit filename="Project.h" />
+ <Unit filename="ProjectInfo.cpp" />
+ <Unit filename="ProjectInfo.h" />
+ <Unit filename="QuestionMessage.cpp" />
+ <Unit filename="QuestionMessage.h" />
+ <Unit filename="ReplacementDialog.cpp" />
+ <Unit filename="ReplacementDialog.h" />
+ <Unit filename="StringPreparator.cpp" />
+ <Unit filename="StringPreparator.h" />
+ <Unit filename="Text.cpp" />
+ <Unit filename="Text.h" />
+ <Unit filename="WarningMessage.cpp" />
+ <Unit filename="WarningMessage.h" />
+ <Unit filename="blackdoc.cpp" />
+ <Unit filename="blackdoc.h" />
+ <Unit filename="description-en.txt" />
+ <Unit filename="description-ru.txt" />
+ <Unit filename="documentation\html\help\description-en.html" />
+ <Unit filename="documentation\html\help\description-ru.html" />
+ <Unit filename="documentation\html\help\index.html" />
+ <Unit filename="documentation\html\help\styles.css" />
+ <Unit filename="documentation\html\index.html" />
+ <Unit filename="documentation\html\styles.css" />
+ <Unit filename="gpl-license.txt" />
+ <Unit filename="manifest.xml" />
+ <Unit filename="styles.css" />
+ <Extensions>
+ <code_completion />
+ <envvars />
+ <debugger />
+ </Extensions>
+ </Project>
+</CodeBlocks_project_file>
diff -r e8000aa19e1c HTMLExporter.cpp
--- a/HTMLExporter.cpp Sun Apr 22 14:29:08 2012 +0400
+++ b/HTMLExporter.cpp Mon Apr 23 20:39:43 2012 -0400
@@ -18,10 +18,15 @@
  * along with BlackDoc. If not, see <http://www.gnu.org/licenses/>.
  *
  */
+
+#include <sdk.h>
+
+#ifndef CB_PRECOMP
+    #include <projectmanager.h>
+    #include <editormanager.h>
+    #include <cbproject.h>
+#endif
 
-#include <projectmanager.h>
-#include <editormanager.h>
-#include <cbproject.h>
 #include "HTMLExporter.h"
 #include "QuestionMessage.h"
 #include "HTMLActiveFileExporter.h"


Offline marked

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: BlackDoc documentation plugin
« Reply #32 on: April 26, 2012, 09:14:06 pm »
@Alpha
Ok, I've added your patch. Hope, I will be able to try the plugin on Windows this weekend.

@all
I have a question: is there a way to open a file inside C::B editor, but not to show it to the user?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12321
    • Travis build status
Re: BlackDoc documentation plugin
« Reply #33 on: April 26, 2012, 09:29:23 pm »
marked: What do you want to achieve?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5229
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: BlackDoc documentation plugin
« Reply #34 on: April 27, 2012, 03:35:23 am »
I have a question: is there a way to open a file inside C::B editor, but not to show it to the user?
You can see one of examples in:
Code: [Select]
cb_trunk\src\plugins\codecompletion\coderefactoring.cpp
and the function:
Code: [Select]
size_t CodeRefactoring::SearchInFiles(const wxArrayString& files, const wxString& targetText)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.