Menu

[r181]: / trunk / Src / CodeSnip.todo  Maximize  Restore  History

Download this file

158 lines (144 with data), 8.9 kB

{TODO 3 -oSelf -cImprovement : Change LoadLibrary in UHTMLHelp to SafeLoadLibrary}
{TODO -oSelf -cRefactor :
Move Yes, No and OK resourcestrings in UMessageBox to interface and add string for Cancel.
Change UCodeImportMgr to use cancel and FmViewExtraDlg to use OK.}
{TODO -oSelf -cRefactor : Pull out some common code used in arrangement and alignment of controls on forms into support unit.}
{TODO -oSelf -cRefactor : Add enumerator to TNews and change loop in UUpdateMgr accordingly.}
{TODO -oSelf -cRefactor : Refactor TQuery to use enumerators and use class var for instance}
{TODO -oSelf -cProposal :
Add a Garbage collector:
+ global singleton version that maintains lifetimes for life of program - maintains a list of objects / resources and frees when unit goes out of scope
+ local version that can be created and have multiple objects added to it (resource, object etc).
Store wrapper objects in list, each of which can release a certain resource type, e.g. objects, DCs, handles, etc. Given and add method for each type and generate wrapper object on fly.
Obvious close link to UAutoFree}
{TODO -oSelf -cProposal :
Change the Snippets Editor moving code for each pane into separate frame that can
(1) validate entered data
(2) calculate required size for controls}
{TODO -oSelf -cImprovement : Make selecting list item in check list box toggle the check mark}
{TODO -oSelf -cBug : 
Selecting a new printer in print dialog and clicking properties can give an exception or properties dialog has wrong title.
Selecting some printers in print dialog and clicking OK can give an exception.}
{DONE -oSelf -cFeature :
Add facility to Snippets Editor to display check, render and display REML text (button on extra tab?)
+ add button to test display if any <a> tags are present to test and display URLs.}
{TODO -oSelf -cObservation : Update date for UNulFormAligner in unit for v1.1 is wrong: it reads 26 Jul 2007 and should be 26 Sep 2007.}
{TODO -oSelf -cRefactor : Rename identifiers that refer to "routine" with "snippet".}
{TODO -oSelf -cProposal :
UView
  - completely overhaul this unit (careful of assignements tho - check if this
    actually happens between different types (may need wrapper for various
    IView implementations?)}
{TODO -oSelf -cRefactor :Make UOverviewTreeBuilder
.TOverviewSnipKindTreeBuilder.Build better - use Kind to index section list rather than description:
Uses
    Sections.Add(
      TSnippetKindInfoList.Instance[Snippet.Kind].Description,
      Snippet
    );}
{TODO -oSelf -cRefactor :
FmSelectionSearchDlg.pas
  - Rename a lot of methods etc}
{TODO -oSelf -cProposal :
USourceGen
  - Consider separating TConstAndTypeFormatter into two classes
  - Add new format class to format header comments}
{TODO -oSelf -cRefactor : Extract common resource strings re comment style from FrSourcePrefs and USaveSourceDlg}
{TODO -oSelf -cRefactor : Merge common code in UCommandBars and UWBPoupMenus
+ Add detail frame IDs to IFrameMgrs.pas}
{TODO -oSelf -cImprovement : Remove database detection code from IniDataReader and XML IO classes - make them know they read / wrtie main and user databases respectively}
{TODO -oSelf -cRefactor : Get rid of TDataIOFactories and make ini, xml and nul data readers and writers be used directly insetad of via factories.}
{TODO -oSelf -cRefactor : Consider moving syntax highlighting setting (CSS builder) down into FrInfo from FrDetailView since comp check tab no longer uses highlighting}
{TODO -oSelf -cFeature :
Changes preferences dialog sytem so that dialog box code presents empty body and dynamically adds
tabs (or other UI code - may want abract base class and implementation class).

 + Register pages with a prefs page manager - if each page registers itself then we don't need to
change dialog manager code or dialog box when new tabs are added

+ Will need to subclass PageControl, create dynamically and insert tab sheets and frames from
following table

+ Expose a tab name from each pref frame, then we can create this dialog with just the specified tabs
rather than creating all then hiding some

+ ConfigForm override to create tabs and frames

 SOME SAMPLE CODE:

type
  TPrefsBaseFrameClass = class of TPrefsBaseFrame;

const
  cFrameClasses: array[TPreferencePage] of TPrefsBaseFrameClass = (
    TGeneralPrefsFrame,   // ppGeneral
    TSourcePrefsFrame,    // ppSourceCode
    THiliterPrefsFrame,   // ppSyntaxHighlighter
    TPrintingPrefsFrame   // ppPrinting
  );

  cFrameTabs: array[TPreferencePage] of record
    Caption: string;
    FrameName: string;   // todo: use help key here instead of frame name
    FrameClass: TPrefsBaseFrameClass;
  end = (
    (
      Caption: 'General';
      FrameName: 'frmGeneralPrefs';
      FrameClass: TGeneralPrefsFrame;
    ),
    (
      Caption: 'Source Code';
      FrameName: 'frmSourceCodePrefs';
      FrameClass: TSourcePrefsFrame;
    ),
    (
      Caption: 'Syntax Highlighter';
      FrameName: 'frmHiliterPrefs';
      FrameClass: THiliterPrefsFrame;
    ),
    (
      Caption: 'Printing';
      FrameName: 'frmPrintingPrefs';
      FrameClass: TPrintingPrefsFrame
    )
  );
}
{TODO -oSelf -cProposal : New TSingleton class that prevents an object from being freed (descendants should permit this). 
To ease freeing when necessary (implementation section, garbage collector etc) make destructors check for support for a do nothing interface (ISingletonDestroy) and only free normally if supported, then support in implementations and not in interface of unit. Eg.
TMySingleton = class(TInterfacedObject)
...
end;

TMySingletonImpl = class(TMySingleton, ISingletonDestroyable)
...
end;

TMySingleton.Destroy;
begin
  if Supports(Self, ISingletonDestroy) then
   // prermit destruction
 else
  // don't permit destruction
 end;

Could have base class TSingleton = class(TInterfacedObject) that provides default destruction and virtual method called to do tidy up only if can destroy.}
{TODO -oSelf -cFeature : Institute user defined categories}
{TODO -oSelf -cProposal : Share email and user name persistence used by code submission to bug reports, mailing list etc.}
{TODO -oSelf -cRefactor : Pull out Find Text dlg's history list into separate local class.}
{TODO -oSelf -cImprovement : Make margins set in preview controls either configurable or in constant}
{TODO -oSelf -cProposal : Move Compile, View compile errors and configure compilers menu options to a new Compile menu?}
{TODO -oSelf -cRefactor : See if we can pull out common HTML and REML code into SGML unit}
{TODO -oSelf -cRefactor : Create StringToOrd and OrdToString dictionaries and use to create two way char entity object to replace one in UTaggedTextLexer and UREMLDataIO etc. Also use for tag lookup in TTaggedTextLexer}
{TODO -oSelf -cRefactor : Re-implement MakeSafeHTML in terms of a char entity class like that for REML? Use common base class with entities class in UREMLDataIO?}
{TODO -oSelf -cProposal : Consider making TDateTime a record that can use =, < etc and to use TRange in when comparing file differences}
{TODO -oSelf -cProposal : Add update date to each routine object}
{TODO -oSelf -cRefactor : Pull out common code from USaveDialogEx and UOpenDialogEx}
{TODO -oSelf -cImprovement : Make custom colours persistent in colour dialog box on preferences menu.}
{TODO -oSelf -cRefactor : Merge the IO and UI manager code into WBController}
{TODO -oSelf -cBug : Try to enable all custom printer properties set in Doc Properties dialog to be passed to printer - e.g. number of copies per page in PDF writer}
{TODO  -oSelf -cRefactor : Try to decouple UPageSetup, UPrintMgr and source code manager objects from associated dialog boxes}
{TODO -cProposal -oSelf :Terminate application when unexpected (non-CodeSnip) error trapped.}
{TODO -oSelf -cFeature : Add code to THilitePasParser to detect location of directives and decide if they should be classed as reserved words or not}
{TODO -oSelf -cFeature : Add parsing for standard user routine. Must start with procedure or function. Need to
parse. Grammar is:
  <proc_proto> ::= "procedure" <ident> [<param_list>] ";" [<directives>]
  <fn_proto> ::= "function" <ident> [<param_list>] ":" <ident> ";" [<directives>]
  <param_list> ::= "(" <param_def> (*repeat ";" <param_def> *) ")"
  <param_def> ::= <ident> [ ":" <ident> ]
  <ident> ::= valid Pascal identifier
  <directives> ::= <directive> (*repeat ";" <directive> *)
  <directive> ::= "register" | "pascal" | "cdecl" | "stdcall" | "safecall" | "overload"

Parsing for consts and types for our purpose is simple:

  <type-def> ::= "type" <definitions>
  <const-def> ::= "const" <definitions>}
{TODO -oSelf -cImprovement : Make treeview appear in Vista style on Vista.}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.