As part of a push to get the file manager and custom command functionality of my ShellExtensions plugin into the official Code::Block's contrib plugin repository, I've decided to split the plugin into two: FileManager, which as the name suggests has the file manager; and PowerShell, which handles customizable commands that will be offered to the user every time they right click on a file (whether it be in the editor, project manager or file manager) and the dockable console output window.
the new plugins are available in the branches folder of my repo:
PowerShell
svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/branches/PowerShell
FileManager
svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/branches/FileManager
note that both sets of source are supposed to be installed into plugins/contrib of your C::B source. I will make win32 binary builds of both plugins available shortly.
I will be committing new features to those plugins to those repositories. I am unlikely to continue to support the old ShellExtensions plugin (it will remain available in the cbilplugin repository).
The latest new feature is drag and drop support for editor tabs: drag a file tab to a directory in the file manager and you will be given a save as feature (be aware that C::B will update any projects associated with the file)
For linux users: if you want to build these plugins alongside the codeblocks source with makefiles, you will need to patch your codeblocks sources with the attached file (courtesy of jens)
[attachment deleted by admin]
Hi,
I think that changes in the IDE src may have broken these plug-ins over the last year. Neither will compile out of the box. I found the following:
-Instances of the path "..\..\..\include\wxscintilla\include" in both projects' build options need to be changed to "..\..\..\sdk\wxscintilla\include".
-In File Manager, "#include <iostream>" needs to be added to the includes at the top of FileExplorerUpdater.cpp, for me. You may have it declared somewhere else but, for me, line 17
std::cout<<"destructor file explorer updater"<<std::endl;
fails due to the lack of it.
Once compiled, I found that File Manager seemed to work OK, except that the SVN decorators only ever show a green flash, which looks like it means that the file is up-to-date, and that's often wrong. I presume that PowerShell is needed to provide the functionality. PowerShell itself runs and gives me the Extensions menu. Using that opens a new window entitled "Shells" but I can't make it do anything. It remains grey and there is no context menu and no indication of what it's meant to do. I can't find any docs anywhere, either.
Can you advise what's supposed to be happening and I'll have a play around with it some more?
Thanks.
This is a wxWidgets 2.8 without using 2.6 Compatible mode Patch to PowerShell Plugin
Index: PowerShell.cpp
===================================================================
--- PowerShell.cpp (revision 347)
+++ PowerShell.cpp (working copy)
@@ -200,7 +200,7 @@
#else
wild=_T("*");
#endif
- wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Target"),_T(""),_T(""),wild,wxOPEN|wxFILE_MUST_EXIST);
+ wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Target"),_T(""),_T(""),wild,wxFD_OPEN|wxFD_FILE_MUST_EXIST);
if(fd->ShowModal()==wxID_OK)
{
m_RunTarget=fd->GetPath();
@@ -218,7 +218,7 @@
#else
wild=_T("*");
#endif
- wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Targets"),_T(""),_T(""),wild,wxOPEN|wxFILE_MUST_EXIST|wxMULTIPLE);
+ wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Targets"),_T(""),_T(""),wild,wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE);
if(fd->ShowModal()==wxID_OK)
{
wxArrayString paths;
Patch needed to compile PowerShell plugin without using Pre-Compiled Headers(PCH) under Windows.
Tim S.
Index: se_globals.h
===================================================================
--- se_globals.h (revision 347)
+++ se_globals.h (working copy)
@@ -10,7 +10,18 @@
#endif
#include <sdk.h>
+#ifndef CB_PRECOMP
+ #include <wx/filename.h>
+ #include <logmanager.h>
+ #include <manager.h>
+ #include <editorbase.h>
+ #include <editormanager.h>
+ #include <macrosmanager.h>
+ #include <configmanager.h>
+ #include <cbproject.h>
+#endif
+
wxString GetParentDir(const wxString &path);
bool DirIsChildOf(const wxString &path, const wxString &child);
Index: shellproperties.cpp
===================================================================
--- shellproperties.cpp (revision 347)
+++ shellproperties.cpp (working copy)
@@ -1,5 +1,7 @@
#include "shellproperties.h"
+#include <configmanager.h>
+
#include <wx/arrimpl.cpp> // this is a magic incantation which must be done!
//WX_DEFINE_OBJARRAY(ShellCommandMenuVec);
WX_DEFINE_OBJARRAY(ShellCommandVec);
Index: PipedProcessCtrl.cpp
===================================================================
--- PipedProcessCtrl.cpp (revision 347)
+++ PipedProcessCtrl.cpp (working copy)
@@ -3,6 +3,7 @@
#include <wx/regex.h>
#include "PipedProcessCtrl.h"
#include <globals.h>
+#include <cbeditor.h>
////////////////////////////////////// PipedProcessCtrl /////////////////////////////////////////////
#define PP_ERROR_STYLE 1
Index: PipedProcessCtrl.h
===================================================================
--- PipedProcessCtrl.h (revision 347)
+++ PipedProcessCtrl.h (working copy)
@@ -15,6 +15,9 @@
#endif
#include <sdk.h>
+#ifndef CB_PRECOMP
+ #include <wx/wxscintilla.h>
+#endif
#include "ShellCtrlBase.h"
class PipedProcessCtrl;
Patch needed to compile FileManager plugin without using Pre-Compiled Headers(PCH) under Windows.
Tim S.
Index: FileExplorer.cpp
===================================================================
--- FileExplorer.cpp (revision 347)
+++ FileExplorer.cpp (working copy)
@@ -11,7 +11,15 @@
#include <sdk.h>
+#ifndef CB_PRECOMP
+ #include <wx/dnd.h>
+ #include <cbproject.h>
+ #include <configmanager.h>
+ #include <projectmanager.h>
+#endif
+
+#include <list>
#include <vector>
#include <iostream>
Index: FileManager.cpp
===================================================================
--- FileManager.cpp (revision 347)
+++ FileManager.cpp (working copy)
@@ -4,6 +4,11 @@
#include <wx/wxFlatNotebook/wxFlatNotebook.h>
#endif
#include <sdk.h> // Code::Blocks SDK
+#ifndef CB_PRECOMP
+ #include <cbauibook.h>
+ #include <cbproject.h>
+ #include <projectmanager.h>
+#endif
//#include <configurationpanel.h>
#include "FileManager.h"
Index: se_globals.h
===================================================================
--- se_globals.h (revision 347)
+++ se_globals.h (working copy)
@@ -8,7 +8,17 @@
#endif
#include <sdk.h>
+#ifndef CB_PRECOMP
+ #include <wx/dir.h>
+ #include <wx/filename.h>
+ #include <wx/txtstrm.h>
+ #include <editorbase.h>
+ #include <editormanager.h>
+ #include <logmanager.h>
+ #include <manager.h>
+#endif
+
wxString GetParentDir(const wxString &path);
bool DirIsChildOf(const wxString &path, const wxString &child);
***UPDATE***
I decided to rename PowerShell plugin ToolsPlus (because it offers the functionality of the "Tools" menu "Plus" a bit more). I've also tweaked the user interface to make it mimic behavior of the Tools menu a little more (with the option to replace the standard "Tools" menu with the "Tools Plus" menu).
ToolsPlus
svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/branches/ToolsPlus
FileManager
svn checkout http://svn.berlios.de/svnroot/repos/cbilplugin/branches/FileManager
note that both sets of source are supposed to be installed into plugins/contrib of your C::B source.
Patch to ToolsPlus Plugin for wxWidgets without 2.6 compatible mode
Index: ToolsPlus.cpp
===================================================================
--- ToolsPlus.cpp (revision 355)
+++ ToolsPlus.cpp (working copy)
@@ -230,7 +230,7 @@
#else
wild=_T("*");
#endif
- wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Targets"),_T(""),_T(""),wild,wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxMULTIPLE);
+ wxFileDialog *fd=new wxFileDialog(NULL,_T("Choose the Command Targets"),_T(""),_T(""),wild,wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE);
if(fd->ShowModal()==wxID_OK)
{
wxArrayString paths;
Note: To build with trunk I also had to patch this; not sure when this change was needed or if you should do it.
Index: ToolsPlus.cbp
===================================================================
--- ToolsPlus.cbp (revision 355)
+++ ToolsPlus.cbp (working copy)
@@ -37,7 +37,7 @@
<Linker>
<Add library="codeblocks" />
<Add library="wxmsw28$(WX_SUFFIX)" />
- <Add library="wxscintilla" />
+ <Add library="wxscintilla_cb" />
<Add directory="..\..\..\devel" />
<Add directory="$(#wx.lib)\gcc_dll$(WX_CFG)" />
</Linker>
Neither plugins needed NON-PCH patches under windows.
Tim S.