Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: wobien on January 07, 2008, 06:02:37 pm

Title: More flexability for classwizard
Post by: wobien on January 07, 2008, 06:02:37 pm
Hi,
I upgraded the class wizard a bit. I started this as an exersize. The class wizard is not to difficult, so I could easily change it.
I use it a lot, and I missed flexability, so I added some:
- I made the dialog sizable (nice if you want to add many constructor arguments)
- I added a checkbox Has destructor. If you disable it no constructor is added.
- I added a checkbox Header and Implementation in same folder. If you check it the folders for Header and Implementation are disabled.
- I added a textbox for the common folder and a button to browse for it. They are enabled when the checkbox is checked.
- I added a textbox Header include. It shows the way the header is included in the implementation file, and you can edit it.

Now I have them I use the new options a lot, shall I post it?

[attachment deleted by admin]
Title: Re: More flexability for classwizard
Post by: MortenMacFly on January 08, 2008, 08:51:58 am
Now I have them I use the new options a lot, shall I post it?
Sure... why not?! ;-)
I am also woirkign on another class wizard with even more flexibility in terms of templates for the files being generated... we'll see when it's ready...
Title: Re: More flexability for classwizard
Post by: wobien on January 08, 2008, 10:52:25 am
Do I post it here or on Berlios?
Title: Re: More flexability for classwizard
Post by: MortenMacFly on January 08, 2008, 10:57:56 am
Do I post it here or on Berlios?
If you have massive code changes post it over here (zipped project). If you can create a patch and it's not a huge one, post the patch here or at BerliOS. Thanks! :-)
Title: Re: More flexability for classwizard
Post by: wobien on January 08, 2008, 03:38:22 pm
Code
Index: plugins/classwizard/classwizarddlg.cpp
===================================================================
--- plugins/classwizard/classwizarddlg.cpp (revision 4787)
+++ plugins/classwizard/classwizarddlg.cpp (working copy)
@@ -23,7 +23,6 @@
 * $Id$
 * $HeadURL$
 */
-
 #include <sdk.h>
 #ifndef CB_PRECOMP
 #include <wx/arrstr.h>
@@ -73,6 +72,7 @@
     EVT_TEXT(XRCID("txtInheritance"), ClassWizardDlg::OnAncestorChange)
     EVT_BUTTON(XRCID("btnIncludeDir"), ClassWizardDlg::OnIncludeDirClick)
     EVT_BUTTON(XRCID("btnImplDir"), ClassWizardDlg::OnImplDirClick)
+    EVT_BUTTON(XRCID("btnCommonDir"), ClassWizardDlg::OnCommonDirClick)
 END_EVENT_TABLE()
 
 
@@ -85,15 +85,19 @@
     if (prj)
     {
        XRCCTRL(*this, "txtIncludeDir", wxTextCtrl)->SetValue(prj->GetCommonTopLevelPath() + _T("include"));
-      XRCCTRL(*this, "txtImplDir", wxTextCtrl)->SetValue(prj->GetCommonTopLevelPath() + _T("src"));\
+      XRCCTRL(*this, "txtImplDir", wxTextCtrl)->SetValue(prj->GetCommonTopLevelPath() + _T("src"));
+      XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->SetValue(prj->GetCommonTopLevelPath());
     }
     else
     {
        XRCCTRL(*this, "txtIncludeDir", wxTextCtrl)->SetValue(::wxGetCwd());
        XRCCTRL(*this, "txtImplDir", wxTextCtrl)->SetValue(::wxGetCwd());
+        XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->SetValue(::wxGetCwd());
+
     }
     XRCCTRL(*this, "txtInheritanceFilename", wxTextCtrl)->SetValue(_T("<>"));
     XRCCTRL(*this, "cmbInheritanceScope", wxComboBox)->SetSelection(0);
+    XRCCTRL(*this, "txtHeaderInclude", wxTextCtrl)->SetValue(_T("\"\""));
 }
 
 
@@ -126,6 +130,7 @@
         ;
     XRCCTRL(*this, "txtHeader", wxTextCtrl)->SetValue(name + _T(".h"));
     XRCCTRL(*this, "txtImplementation", wxTextCtrl)->SetValue(name + _T(".cpp"));
+    XRCCTRL(*this, "txtHeaderInclude", wxTextCtrl)->SetValue(_T("\"")+name + _T(".h\""));
     DoGuardBlock();
 }
 
@@ -151,10 +156,22 @@
     XRCCTRL(*this, "txtInheritanceFilename", wxTextCtrl)->Enable(inherits);
     XRCCTRL(*this, "cmbInheritanceScope", wxComboBox)->Enable(inherits);
 
+    bool hasdestructor = XRCCTRL(*this, "chkHasDestructor", wxCheckBox)->GetValue();
+    XRCCTRL(*this, "chkVirtualDestructor", wxCheckBox)->Enable(hasdestructor);
+
     bool genimpl = XRCCTRL(*this, "chkImplementation", wxCheckBox)->GetValue();
     XRCCTRL(*this, "txtImplementation", wxTextCtrl)->Enable(genimpl);
-    XRCCTRL(*this, "txtImplDir", wxTextCtrl)->Enable(genimpl);
+    XRCCTRL(*this, "txtHeaderInclude", wxTextCtrl)->Enable(genimpl);
 
+    bool commonDir = XRCCTRL(*this, "chkCommonDir", wxCheckBox)->GetValue();
+    XRCCTRL(*this, "txtImplDir", wxTextCtrl)->Enable(genimpl && !commonDir);
+    XRCCTRL(*this, "btnImplDir", wxButton)->Enable(genimpl && !commonDir);
+    XRCCTRL(*this, "txtIncludeDir", wxTextCtrl)->Enable(!commonDir);
+    XRCCTRL(*this, "btnIncludeDir", wxButton)->Enable(!commonDir);
+    XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->Enable(commonDir);
+    XRCCTRL(*this, "btnCommonDir", wxButton)->Enable(commonDir);
+
+
     bool genguard = XRCCTRL(*this, "chkGuardBlock", wxCheckBox)->GetValue();
     XRCCTRL(*this, "txtGuardBlock", wxTextCtrl)->Enable(genguard);
 }
@@ -177,12 +194,28 @@
         Name = tkz.GetNextToken();
     }
 
-    wxString includeDir = XRCCTRL(*this, "txtIncludeDir", wxTextCtrl)->GetValue();
-    wxString implDir = XRCCTRL(*this, "txtImplDir", wxTextCtrl)->GetValue();
+    wxString includeDir;
+    wxString implDir;
+
+    bool CommonDir=XRCCTRL(*this, "chkCommonDir", wxCheckBox)->GetValue();
+    if (CommonDir)
+    {
+        includeDir = XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->GetValue();
+        implDir = XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->GetValue();
+    }
+    else
+    {
+        includeDir = XRCCTRL(*this, "txtIncludeDir", wxTextCtrl)->GetValue();
+        implDir = XRCCTRL(*this, "txtImplDir", wxTextCtrl)->GetValue();
+    }
     //wxSetWorkingDirectory(baseDir);
-
     wxString Constructor = XRCCTRL(*this, "txtConstructor", wxTextCtrl)->GetValue();
     bool VirtualDestructor = XRCCTRL(*this, "chkVirtualDestructor", wxCheckBox)->GetValue();
+    bool HasDestructor = XRCCTRL(*this, "chkHasDestructor", wxCheckBox)->GetValue();
+    if (!HasDestructor)
+    {
+        VirtualDestructor = false;
+    }
 
     wxString Ancestor = XRCCTRL(*this, "txtInheritance", wxTextCtrl)->GetValue();
     wxString AncestorFilename = XRCCTRL(*this, "txtInheritanceFilename", wxTextCtrl)->GetValue();
@@ -191,6 +224,7 @@
 
     m_Header = XRCCTRL(*this, "txtHeader", wxTextCtrl)->GetValue();
     m_Implementation = XRCCTRL(*this, "txtImplementation", wxTextCtrl)->GetValue();
+    wxString headerInclude = XRCCTRL(*this, "txtHeaderInclude", wxTextCtrl)->GetValue();
     bool GenerateImplementation = XRCCTRL(*this, "chkImplementation", wxCheckBox)->GetValue();
     bool GuardBlock = XRCCTRL(*this, "chkGuardBlock", wxCheckBox)->GetValue();
     wxString GuardWord = XRCCTRL(*this, "txtGuardBlock", wxTextCtrl)->GetValue();
@@ -198,7 +232,6 @@
     {
         DoGuardBlock();
     }
-
     wxFileName headerFname(UnixFilename(m_Header));
     wxFileName implementationFname(UnixFilename(m_Implementation));
     headerFname.MakeAbsolute(includeDir);
@@ -225,7 +258,6 @@
     {
         eolstr = _T("\r\n");
     }
-
     // actual creation starts here
     // let's start with the header file
     if (GuardBlock)
@@ -258,13 +290,17 @@
     buffer << tabstr << _T("public:") << eolstr;
     buffer << tabstr << tabstr << Name << _T("(") << Constructor << _T(")");
     buffer << (!GenerateImplementation ? _T(" {}") : _T(";")) << eolstr;
-    buffer << tabstr << tabstr;
-    if (VirtualDestructor)
+
+    if (HasDestructor)
     {
-        buffer << _T("virtual ");
+        buffer << tabstr << tabstr;
+ if (VirtualDestructor)
+ {
+            buffer << _T("virtual ");
+ }
+        buffer << _T('~') << Name << _T("()");
+     buffer << (!GenerateImplementation ? _T(" {}") : _T(";")) << eolstr;
     }
-    buffer << _T('~') << Name << _T("()");
-    buffer << (!GenerateImplementation ? _T(" {}") : _T(";")) << eolstr;
     buffer << tabstr << _T("protected:") << eolstr;
     buffer << tabstr << _T("private:") << eolstr;
     buffer << _T("};") << eolstr;
@@ -300,12 +336,11 @@
         return;
     }
     // now the implementation file
-
     ForceDirectory(implementationFname);
     new_ed = Manager::Get()->GetEditorManager()->New(implementationFname.GetFullPath());
     buffer = new_ed->GetControl()->GetText();
 
-    buffer << _T("#include \"") << m_Header << _T("\"") << eolstr;
+    buffer << _T("#include ") << headerInclude << eolstr;
     buffer << eolstr;
     for (unsigned int i=0; i<NameSpaces.GetCount(); ++i)
     {
@@ -317,12 +352,16 @@
     buffer << _T("{") << eolstr;
     buffer << tabstr << _T("//ctor") << eolstr;
     buffer << _T("}") << eolstr;
-    buffer << eolstr;
-    buffer << Name << _T("::~") << Name << _T("()") << eolstr;
-    buffer << _T("{") << eolstr;
-    buffer << tabstr << _T("//dtor") << eolstr;
-    buffer << _T("}") << eolstr;
 
+    if (HasDestructor)
+    {
+        buffer << eolstr;
+        buffer << Name << _T("::~") << Name << _T("()") << eolstr;
+        buffer << _T("{") << eolstr;
+        buffer << tabstr << _T("//dtor") << eolstr;
+        buffer << _T("}") << eolstr;
+    }
+
     buffer << eolstr;
     for (int i=NameSpaces.GetCount(); i>0; --i)
     {
@@ -338,7 +377,6 @@
         cbMessageBox(msg, _("Error"), wxICON_ERROR);
         return;
     }
-
     m_Header= headerFname.GetFullPath();
     m_Implementation= implementationFname.GetFullPath();
 
@@ -368,6 +406,17 @@
     }
 }
 
+void ClassWizardDlg::OnCommonDirClick(wxCommandEvent& WXUNUSED(event))
+{
+    wxString path = XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->GetValue();
+    wxDirDialog dlg (this, _T("Choose a directory"), path);
+    if (dlg.ShowModal()==wxID_OK)
+    {
+        path = dlg.GetPath();
+        XRCCTRL(*this, "txtCommonDir", wxTextCtrl)->SetValue(path);
+    }
+}
+
 void ClassWizardDlg::OnCancelClick(wxCommandEvent& WXUNUSED(event))
 {
     EndModal(wxID_CANCEL);
Index: plugins/classwizard/classwizarddlg.h
===================================================================
--- plugins/classwizard/classwizarddlg.h (revision 4787)
+++ plugins/classwizard/classwizarddlg.h (working copy)
@@ -22,6 +22,7 @@
         void OnAncestorChange(wxCommandEvent& event);
         void OnIncludeDirClick(wxCommandEvent& event);
         void OnImplDirClick(wxCommandEvent& event);
+        void OnCommonDirClick(wxCommandEvent& event);
         void DoGuardBlock();
 
         wxString m_Header;
Index: plugins/classwizard/resources/new_class.xrc
===================================================================
--- plugins/classwizard/resources/new_class.xrc (revision 4787)
+++ plugins/classwizard/resources/new_class.xrc (working copy)
@@ -2,6 +2,7 @@
  <object class="wxDialog" name="dlgNewClass">
  <title>Create new class</title>
  <centered>1</centered>
+ <style>wxRESIZE_BORDER|wxSTATIC_BORDER</style>
  <object class="wxBoxSizer">
  <orient>wxVERTICAL</orient>
  <object class="sizeritem">
@@ -14,7 +15,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT1">
  <label>Class name:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -25,7 +26,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT2">
  <label>Constructor arguments:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -37,11 +38,23 @@
  <size>0,0</size>
  </object>
  <object class="sizeritem">
+ <object class="wxCheckBox" name="chkHasDestructor">
+ <label>Has destructor</label>
+ <checked>1</checked>
+ </object>
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ </object>
+ <object class="spacer">
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <size>0,0</size>
+ </object>
+ <object class="sizeritem">
  <object class="wxCheckBox" name="chkVirtualDestructor">
  <label>Virtual destructor</label>
  <checked>1</checked>
  </object>
  <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>5</border>
  </object>
  </object>
  <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
@@ -71,7 +84,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT3">
  <label>Ancestor:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -82,7 +95,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT4">
  <label>Ancestor&apos;s include filename:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -93,7 +106,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT5">
  <label>Scope:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -118,6 +131,58 @@
  </object>
  <object class="sizeritem">
  <object class="wxStaticBoxSizer">
+ <label>File policy</label>
+ <orient>wxVERTICAL</orient>
+ <object class="sizeritem">
+ <object class="wxCheckBox" name="chkCommonDir">
+ <label>Header and Implementation in same folder</label>
+ </object>
+ <flag>wxTOP|wxLEFT|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxFlexGridSizer">
+ <cols>2</cols>
+ <growablecols>1</growablecols>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="ID_STATICTEXT11">
+ <label>Folder:</label>
+ </object>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxBoxSizer">
+ <object class="sizeritem">
+ <object class="wxTextCtrl" name="txtCommonDir">
+ <value>Text</value>
+ </object>
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxButton" name="btnCommonDir">
+ <label>...</label>
+ <size>23,24</size>
+ </object>
+ <flag>wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>5</border>
+ </object>
+ </object>
+ <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ </object>
+ </object>
+ <flag>wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>5</border>
+ <option>1</option>
+ </object>
+ </object>
+ <flag>wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>5</border>
+ </object>
+ <object class="sizeritem">
+ <object class="wxStaticBoxSizer">
  <label>Header file</label>
  <orient>wxVERTICAL</orient>
  <object class="sizeritem">
@@ -130,14 +195,14 @@
  <object class="wxStaticText" name="ID_STATICTEXT9">
  <label>Folder:</label>
  </object>
- <flag>wxALL|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
  </object>
  <object class="sizeritem">
  <object class="wxBoxSizer">
  <object class="sizeritem">
  <object class="wxTextCtrl" name="txtIncludeDir">
  <value>Text</value>
- <size>115,23</size>
  </object>
  <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <option>1</option>
@@ -156,7 +221,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT6">
  <label>Filename:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -178,7 +243,7 @@
  <object class="wxStaticText" name="ID_STATICTEXT8">
  <label>Guard block:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
@@ -216,7 +281,8 @@
  <object class="wxStaticText" name="ID_STATICTEXT29">
  <label>Folder:</label>
  </object>
- <flag>wxALL|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
  </object>
  <object class="sizeritem">
  <object class="wxBoxSizer">
@@ -242,13 +308,28 @@
  <object class="wxStaticText" name="ID_STATICTEXT7">
  <label>Filename:</label>
  </object>
- <flag>wxTOP|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
  <border>4</border>
  </object>
  <object class="sizeritem">
  <object class="wxTextCtrl" name="txtImplementation" />
  <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
  </object>
+ <object class="sizeritem">
+ <object class="wxStaticText" name="ID_STATICTEXT10">
+ <label>Header include:</label>
+ </object>
+ <flag>wxTOP|wxRIGHT|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <border>4</border>
+ <option>1</option>
+ </object>
+ <object class="sizeritem">
+ <object class="wxTextCtrl" name="txtHeaderInclude">
+ <value>&quot;&quot;</value>
+ </object>
+ <flag>wxEXPAND|wxALIGN_LEFT|wxALIGN_TOP</flag>
+ <option>1</option>
+ </object>
  </object>
  <flag>wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL</flag>
  <border>5</border>
OK, this is my patch.
I must say I like the structure of C::B, that allows you to change small things in the plugins or creating new ones, using easy interfaces to the rest of the code. You really don't have to care about how the rest is implemented! :D
Wobien

edit: I can only test it for Windows XP. I don't expect it will be very different on other platforms, but you never know...
Title: Re: More flexability for classwizard
Post by: polygon7 on January 21, 2008, 08:39:28 pm
Yet Another Small Feature ;)

Code
Index: src/plugins/classwizard/classwizarddlg.cpp
===================================================================
--- src/plugins/classwizard/classwizarddlg.cpp (wersja 4836)
+++ src/plugins/classwizard/classwizarddlg.cpp (kopia robocza)
@@ -211,6 +211,8 @@
     ForceDirectory(headerFname);
     cbEditor * new_ed = Manager::Get()->GetEditorManager()->New(headerFname.GetFullPath());
     wxString buffer = new_ed->GetControl()->GetText();
+    Manager::Get()->GetMacrosManager()->ReplaceMacros(buffer);
+
     wxString tabstr = usestabs ? wxString(_T("\t")) : wxString(_T(' '),tabsize);
     wxString eolstr;
     if(eolmode == 2)
@@ -304,6 +306,7 @@
     ForceDirectory(implementationFname);
     new_ed = Manager::Get()->GetEditorManager()->New(implementationFname.GetFullPath());
     buffer = new_ed->GetControl()->GetText();
+    Manager::Get()->GetMacrosManager()->ReplaceMacros(buffer);
 
     buffer << _T("#include \"") << m_Header << _T("\"") << eolstr;
     buffer << eolstr;
Title: Re: More flexability for classwizard
Post by: wobien on January 24, 2008, 11:19:36 am
Yet Another Small Feature ;)
Maybe my ignorance, but can you explain what this feature does?
regards,
Wobien
Title: Re: More flexability for classwizard
Post by: MortenMacFly on January 24, 2008, 11:25:58 am
Maybe my ignorance, but can you explain what this feature does?
It allows using C::B macros in the template file. Those macros will be replaced when the class file(s) are being created. Quite an interesting feature - I have both patches applied for testing for some time now... looks good! :-)
Title: Re: More flexability for classwizard
Post by: polygon7 on January 24, 2008, 05:54:42 pm
Yet Another Small Feature ;)
Maybe my ignorance, but can you explain what this feature does?
regards,
Wobien

For example, in Editor->Default code you have:
Code
/**
 * Project : $PROJECT_NAME
 * Author : $AUTHOR
 * File : $ACTIVE_EDITOR_STEM.$ACTIVE_EDITOR_EXT
 * Date : $TODAY
 *
 * Version : $$Id: $$
 *
 * Copyrights (c) $YEAR $AUTHOR
 *
 */

after creating file by Class Wizard (with this patch) you will have:

Code
/**
 * Project : Some project
 * Author : Your name
 * File : main.cpp
 * Date : 2008-01-24
 *
 * Version : $Id: $
 *
 * Copyrights (c) 2008 Your name
 *
 */

P.S. $AUTHOR should be created in Environment settings->Environment variables
      (Just go there and click "Add", then write AUTHOR as key and your name as value).

:)
Title: Re: More flexability for classwizard
Post by: wobien on January 25, 2008, 01:28:33 am
Thanks for your explanation. That's a nice feature.
Title: Re: More flexability for classwizard
Post by: MortenMacFly on January 30, 2008, 10:29:20 am
OK, this is my patch.
Yet Another Small Feature ;)
Both are applied in SVN ("slightly" modified). Thanks! :-)
Title: Re: More flexability for classwizard
Post by: polygon7 on January 30, 2008, 10:34:18 am
OK, this is my patch.
Yet Another Small Feature ;)
Both are applied in SVN ("slightly" modified). Thanks! :-)
Cool, thanks! :D
Title: Re: More flexability for classwizard
Post by: MortenMacFly on January 30, 2008, 10:40:15 am
Cool, thanks! :D
...what's missing is surely a non-PCH build fix. I hope stahta01 will help here...
Title: Re: More flexability for classwizard
Post by: wobien on January 30, 2008, 02:55:04 pm
looks fine!
Only in my copy I made the gui sizeble, to be able to add many constructor arguments, and to see the whole path if it is long.