Skip to content
cbDiff is a plugin for Code::Blocks IDE from http://forums.codeblocks.org/index.php/topic,12829.0.html
C++ C
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dtl-1.12
images
src
wxsmith
.gitignore
COPYING
README
cbDiff-src.cbp
cbDiff-unix.cbp
cbDiff.cbp
manifest.xml

README

==================
Summary
==================

cbDiff is a plugin for Code::Blocks IDE, 
which can show visually the difference
between two files. 

==================
License
==================

Please read the COPYING.

==================
How to build
==================

You need to have Code::Blocks IDE installed and the Code::Blocks IDE SDK.
Open cbDiff.cbp, hit build and install the cbDiff.cbplugin.
Now you can use it through the menubar (File -> Diff Files...), the projecttree
or the editor context menu.
This should work on every plattform.

==================
Notes for other Developers
==================

With a little trick cbDiff can be used by other plugins:

#include <wx/dynlib.h>

// First check if cbDiff is installed
if(Manager::Get()->GetPluginManager()->FindPluginByName(_T("cbDiff")) != NULL)
{
	PluginElement* element = Manager::Get()->GetPluginManager()->FindElementByName(_T("cbDiff"));
	// is library loaded
	if(element->library->IsLoaded())
	{
	    typedef void (*cbDiffFunc) (const wxString&, const wxString&, int mode,  const wxString&);

	    cbDiffFunc difffunc = (cbDiffFunc)element->library->GetSymbol(_("DiffFiles"));
	    if(difffunc != NULL)
		{
			// Call the function with the two files, 
			// the viewing mode (TABLE, UNIFIED or SIDEBYSIDE) and the Highlightlanguage
			difffunc(firstfile, secondfile, viewmode, hlang);
	    }
	}
}
        

You can’t perform that action at this time.