common project interface - part 2

This commit is contained in:
Basile Burg 2015-06-21 03:55:48 +02:00
parent 9139d8eef7
commit 3a28c54c26
12 changed files with 88 additions and 97 deletions

View File

@ -143,7 +143,6 @@
<Unit1> <Unit1>
<Filename Value="..\src\ce_common.pas"/> <Filename Value="..\src\ce_common.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ce_common"/>
</Unit1> </Unit1>
<Unit2> <Unit2>
<Filename Value="..\src\ce_d2syn.pas"/> <Filename Value="..\src\ce_d2syn.pas"/>
@ -176,7 +175,6 @@
<ComponentName Value="CEEditorWidget"/> <ComponentName Value="CEEditorWidget"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="ce_editor"/>
</Unit8> </Unit8>
<Unit9> <Unit9>
<Filename Value="..\src\ce_editoroptions.pas"/> <Filename Value="..\src\ce_editoroptions.pas"/>
@ -194,7 +192,6 @@
<Unit12> <Unit12>
<Filename Value="..\src\ce_libman.pas"/> <Filename Value="..\src\ce_libman.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ce_libman"/>
</Unit12> </Unit12>
<Unit13> <Unit13>
<Filename Value="..\src\ce_libmaneditor.pas"/> <Filename Value="..\src\ce_libmaneditor.pas"/>
@ -249,7 +246,6 @@
<ComponentName Value="CEProcInputWidget"/> <ComponentName Value="CEProcInputWidget"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="ce_procinput"/>
</Unit20> </Unit20>
<Unit21> <Unit21>
<Filename Value="..\src\ce_projconf.pas"/> <Filename Value="..\src\ce_projconf.pas"/>
@ -260,9 +256,9 @@
<UnitName Value="ce_projconf"/> <UnitName Value="ce_projconf"/>
</Unit21> </Unit21>
<Unit22> <Unit22>
<Filename Value="..\src\ce_project.pas"/> <Filename Value="..\src\ce_nativeproject.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ce_project"/> <UnitName Value="ce_nativeproject"/>
</Unit22> </Unit22>
<Unit23> <Unit23>
<Filename Value="..\src\ce_projinspect.pas"/> <Filename Value="..\src\ce_projinspect.pas"/>
@ -296,7 +292,6 @@
<ComponentName Value="CESymbolListWidget"/> <ComponentName Value="CESymbolListWidget"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="ce_symlist"/>
</Unit27> </Unit27>
<Unit28> <Unit28>
<Filename Value="..\src\ce_symstring.pas"/> <Filename Value="..\src\ce_symstring.pas"/>
@ -306,7 +301,6 @@
<Unit29> <Unit29>
<Filename Value="..\src\ce_synmemo.pas"/> <Filename Value="..\src\ce_synmemo.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ce_synmemo"/>
</Unit29> </Unit29>
<Unit30> <Unit30>
<Filename Value="..\src\ce_todolist.pas"/> <Filename Value="..\src\ce_todolist.pas"/>
@ -338,7 +332,6 @@
<Unit35> <Unit35>
<Filename Value="..\src\ce_sharedres.pas"/> <Filename Value="..\src\ce_sharedres.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="ce_sharedres"/>
</Unit35> </Unit35>
<Unit36> <Unit36>
<Filename Value="..\src\ce_widget.pas"/> <Filename Value="..\src\ce_widget.pas"/>

View File

@ -9,7 +9,7 @@ uses
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
windows, windows,
{$ENDIF} {$ENDIF}
ce_common, ce_writableComponent, ce_interfaces, ce_observer, ce_synmemo, ce_project; ce_common, ce_writableComponent, ce_interfaces, ce_observer, ce_synmemo, ce_nativeproject;
type type
(** (**
@ -114,9 +114,9 @@ end;
{$REGION ICEProjectObserver ----------------------------------------------------} {$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEDcdWrapper.projNew(aProject: ICECommonProject); procedure TCEDcdWrapper.projNew(aProject: ICECommonProject);
begin begin
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub:fProj := nil;
end; end;
end; end;
@ -160,9 +160,9 @@ end;
procedure TCEDcdWrapper.projFocused(aProject: ICECommonProject); procedure TCEDcdWrapper.projFocused(aProject: ICECommonProject);
begin begin
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub:fProj := nil;
end; end;
end; end;

View File

@ -11,15 +11,16 @@ uses
type type
// describes the project kind. Used as a hint to cast ICECommonProject.getProject() // describes the project kind. Used as a hint to cast ICECommonProject.getProject()
TCEProjectKind = (pkNative, pkDub); TCEProjectFormat = (pfNative, pfDub);
(** (**
* Common project interface * Common project interface
*) *)
ICECommonProject = interface ICECommonProject = interface
['ICECommonProject'] ['ICECommonProject']
function getKind: TCEProjectKind; // indicates the project format
// returns an untyped object that can be casted using getSpecialization() function getFormat: TCEProjectFormat;
// returns an untyped object that can be casted using getFormat()
function getProject: TObject; function getProject: TObject;
//// project file //// project file
@ -38,11 +39,6 @@ type
//function configurationCount: integer; //function configurationCount: integer;
//function configuration(index: integer): string; //function configuration(index: integer): string;
//function outputFilename: string; //function outputFilename: string;
//
//// common actions
//function compile: boolean;
end; end;
(** (**

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, ComCtrls, Buttons, ce_widget, ce_interfaces, ce_project, ce_dmdwrap, Menus, ComCtrls, Buttons, ce_widget, ce_interfaces, ce_nativeproject, ce_dmdwrap,
ce_common; ce_common;
type type
@ -96,36 +96,40 @@ procedure TCELibManEditorWidget.updateRegistrable;
begin begin
btnReg.Enabled := (fProj <> nil) and btnReg.Enabled := (fProj <> nil) and
(fProj.currentConfiguration.outputOptions.binaryKind = staticlib) and (fProj.currentConfiguration.outputOptions.binaryKind = staticlib) and
(FileExists(fProj.Filename)) (FileExists(fProj.Filename))
end; end;
procedure TCELibManEditorWidget.projNew(aProject: ICECommonProject); procedure TCELibManEditorWidget.projNew(aProject: ICECommonProject);
begin begin
if aProject.getKind <> pkNative then case aProject.getFormat of
exit; pfNative: fProj := TCENativeProject(aProject.getProject);
fProj := TCENativeProject(aProject.getProject); pfDub:fProj := nil;
end;
end; end;
procedure TCELibManEditorWidget.projChanged(aProject: ICECommonProject); procedure TCELibManEditorWidget.projChanged(aProject: ICECommonProject);
begin begin
if fProj = nil then exit; if fProj = nil then exit;
if fProj <> aProject.getProject then exit; if fProj <> aProject.getProject then
exit;
// //
updateRegistrable; updateRegistrable;
end; end;
procedure TCELibManEditorWidget.projClosing(aProject: ICECommonProject); procedure TCELibManEditorWidget.projClosing(aProject: ICECommonProject);
begin begin
if fProj <> aProject.getProject then exit; if fProj <> aProject.getProject then
exit;
fProj := nil; fProj := nil;
updateRegistrable; updateRegistrable;
end; end;
procedure TCELibManEditorWidget.projFocused(aProject: ICECommonProject); procedure TCELibManEditorWidget.projFocused(aProject: ICECommonProject);
begin begin
if aProject.getKind <> pkNative then case aProject.getFormat of
exit; pfNative: fProj := TCENativeProject(aProject.getProject);
fProj := TCENativeProject(aProject.getProject); pfDub:fProj := nil;
end;
updateRegistrable; updateRegistrable;
end; end;
@ -133,7 +137,6 @@ procedure TCELibManEditorWidget.projCompiling(aProject: ICECommonProject);
begin begin
end; end;
procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem; var AValue: string); procedure TCELibManEditorWidget.ListEdited(Sender: TObject; Item: TListItem; var AValue: string);
begin begin
gridToData; gridToData;

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms, StdCtrls, Classes, SysUtils, FileUtil, SynEditKeyCmds, SynHighlighterLFM, Forms, StdCtrls,
AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, Controls, Graphics, strutils, AnchorDocking, AnchorDockStorage, AnchorDockOptionsDlg, Controls, Graphics, strutils,
Dialogs, Menus, ActnList, ExtCtrls, process, XMLPropStorage, SynExportHTML, Dialogs, Menus, ActnList, ExtCtrls, process, XMLPropStorage, SynExportHTML,
ce_common, ce_dmdwrap, ce_project, ce_dcd, ce_synmemo, ce_writableComponent, ce_common, ce_dmdwrap, ce_nativeproject, ce_dcd, ce_synmemo, ce_writableComponent,
ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_projconf, ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_projconf,
ce_search, ce_miniexplorer, ce_libman, ce_libmaneditor, ce_todolist, ce_observer, ce_search, ce_miniexplorer, ce_libman, ce_libmaneditor, ce_todolist, ce_observer,
ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru; ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru;

View File

@ -7,7 +7,7 @@ interface
uses uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls, Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls,
lcltype, ce_widget, ActnList, Menus, clipbrd, AnchorDocking, TreeFilterEdit, lcltype, ce_widget, ActnList, Menus, clipbrd, AnchorDocking, TreeFilterEdit,
Buttons, math,ce_writableComponent, ce_common, ce_project, ce_synmemo, GraphType, Buttons, math,ce_writableComponent, ce_common, ce_nativeproject, ce_synmemo, GraphType,
ce_dlangutils, ce_interfaces, ce_observer; ce_dlangutils, ce_interfaces, ce_observer;
type type
@ -586,9 +586,9 @@ end;
{$REGION ICEProjectObserver ----------------------------------------------------} {$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEMessagesWidget.projNew(aProject: ICECommonProject); procedure TCEMessagesWidget.projNew(aProject: ICECommonProject);
begin begin
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub:fProj := nil;
end; end;
filterMessages(fCtxt); filterMessages(fCtxt);
end; end;
@ -606,9 +606,9 @@ end;
procedure TCEMessagesWidget.projFocused(aProject: ICECommonProject); procedure TCEMessagesWidget.projFocused(aProject: ICECommonProject);
begin begin
if fProj = aProject.getProject then exit; if fProj = aProject.getProject then exit;
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub:fProj := nil;
end; end;
filterMessages(fCtxt); filterMessages(fCtxt);
end; end;

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, ce_interfaces, ce_observer, Classes, SysUtils, ce_interfaces, ce_observer,
ce_project, ce_synmemo; ce_nativeproject, ce_synmemo;
type type
@ -212,7 +212,7 @@ procedure TCEMRUProjectList.projClosing(aProject: ICECommonProject);
var var
natProj: TCENativeProject; natProj: TCENativeProject;
begin begin
if aProject.getProject is TCENativeProject then if aProject.getFormat = pfNative then
begin begin
natProj := TCENativeProject(aProject.getProject); natProj := TCENativeProject(aProject.getProject);
if FileExists(natProj.fileName) then if FileExists(natProj.fileName) then

View File

@ -1,4 +1,4 @@
unit ce_project; unit ce_nativeproject;
{$I ce_defines.inc} {$I ce_defines.inc}
@ -32,7 +32,7 @@ type
fSrcs, fSrcsCop: TStringList; fSrcs, fSrcsCop: TStringList;
fConfIx: Integer; fConfIx: Integer;
fUpdateCount: NativeInt; fUpdateCount: NativeInt;
fProjectSubject: TCECustomSubject; fProjectSubject: TCEProjectSubject;
fRunner: TCheckedAsyncProcess; fRunner: TCheckedAsyncProcess;
fOutputFilename: string; fOutputFilename: string;
fCanBeRun: boolean; fCanBeRun: boolean;
@ -52,7 +52,7 @@ type
// passes compilation message as "to be guessed" // passes compilation message as "to be guessed"
procedure compProcOutput(proc: TProcess); procedure compProcOutput(proc: TProcess);
// //
function getKind: TCEProjectKind; function getFormat: TCEProjectFormat;
function getProject: TObject; function getProject: TObject;
protected protected
procedure beforeLoad; override; procedure beforeLoad; override;
@ -110,8 +110,8 @@ begin
// //
reset; reset;
addDefaults; addDefaults;
subjProjNew(TCEProjectSubject(fProjectSubject), self); subjProjNew(fProjectSubject, self);
subjProjChanged(TCEProjectSubject(fProjectSubject), self); subjProjChanged(fProjectSubject, self);
// //
{$IFDEF LINUX} {$IFDEF LINUX}
fBasePath := '/'; fBasePath := '/';
@ -122,7 +122,7 @@ end;
destructor TCENativeProject.destroy; destructor TCENativeProject.destroy;
begin begin
subjProjClosing(TCEProjectSubject(fProjectSubject), self); subjProjClosing(fProjectSubject, self);
fProjectSubject.Free; fProjectSubject.Free;
// //
fOnChange := nil; fOnChange := nil;
@ -134,9 +134,9 @@ begin
inherited; inherited;
end; end;
function TCENativeProject.getKind: TCEProjectKind; function TCENativeProject.getFormat: TCEProjectFormat;
begin begin
exit(pkNative); exit(pfNative);
end; end;
function TCENativeProject.getProject: TObject; function TCENativeProject.getProject: TObject;
@ -265,7 +265,7 @@ var
begin begin
fModified := true; fModified := true;
updateOutFilename; updateOutFilename;
subjProjChanged(TCEProjectSubject(fProjectSubject), self); subjProjChanged(fProjectSubject, self);
if assigned(fOnChange) then fOnChange(Self); if assigned(fOnChange) then fOnChange(Self);
{$IFDEF DEBUG} {$IFDEF DEBUG}
lst := TStringList.Create; lst := TStringList.Create;
@ -640,7 +640,7 @@ begin
end; end;
// //
msgs.clearByData(Self); msgs.clearByData(Self);
subjProjCompiling(TCEProjectSubject(fProjectSubject), Self); subjProjCompiling(fProjectSubject, Self);
// //
if not runPrePostProcess(config.preBuildProcess) then if not runPrePostProcess(config.preBuildProcess) then
msgs.message('project warning: the pre-compilation process has not been properly executed', msgs.message('project warning: the pre-compilation process has not been properly executed',

View File

@ -7,7 +7,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, RTTIGrids, RTTICtrls, Forms, Controls, Graphics, Classes, SysUtils, FileUtil, RTTIGrids, RTTICtrls, Forms, Controls, Graphics,
Dialogs, ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, rttiutils, typinfo, Dialogs, ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, rttiutils, typinfo,
PropEdits, ObjectInspector, ce_dmdwrap, ce_project, ce_widget, ce_interfaces, PropEdits, ObjectInspector, ce_dmdwrap, ce_nativeproject, ce_widget, ce_interfaces,
ce_observer; ce_observer;
type type
@ -103,20 +103,19 @@ begin
inherited; inherited;
if Visible then updateImperative; if Visible then updateImperative;
end; end;
{$ENDREGION --------------------------------------------------------------------} {$ENDREGION --------------------------------------------------------------------}
{$REGION ICEProjectObserver ----------------------------------------------------} {$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCEProjectConfigurationWidget.projNew(aProject: ICECommonProject); procedure TCEProjectConfigurationWidget.projNew(aProject: ICECommonProject);
begin begin
beginImperativeUpdate; fProj := nil;
case aProject.getKind of if aProject.getFormat <> pfNative then
pkNative: fProj := TCENativeProject(aProject.getProject); exit;
pkDub:fProj := nil; //
end; fProj := TCENativeProject(aProject.getProject);
if Visible then updateImperative; if Visible then updateImperative;
syncroMode := false; syncroMode := false;
pnlToolBar.Enabled:=true; pnlToolBar.Enabled :=true;
end; end;
procedure TCEProjectConfigurationWidget.projClosing(aProject: ICECommonProject); procedure TCEProjectConfigurationWidget.projClosing(aProject: ICECommonProject);
@ -125,7 +124,7 @@ begin
exit; exit;
inspector.TIObject := nil; inspector.TIObject := nil;
inspector.ItemIndex := -1; inspector.ItemIndex := -1;
self.selConf.Clear; selConf.Clear;
syncroMode := false; syncroMode := false;
pnlToolBar.Enabled:=false; pnlToolBar.Enabled:=false;
fProj := nil; fProj := nil;
@ -133,20 +132,18 @@ end;
procedure TCEProjectConfigurationWidget.projChanged(aProject: ICECommonProject); procedure TCEProjectConfigurationWidget.projChanged(aProject: ICECommonProject);
begin begin
if fProj <> aProject.getProject then exit; if fProj <> aProject.getProject then
case aProject.getKind of exit;
pkNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil;
end;
if Visible then updateImperative; if Visible then updateImperative;
end; end;
procedure TCEProjectConfigurationWidget.projFocused(aProject: ICECommonProject); procedure TCEProjectConfigurationWidget.projFocused(aProject: ICECommonProject);
begin begin
case aProject.getKind of fProj := nil;
pkNative: fProj := TCENativeProject(aProject.getProject); if aProject.getFormat <> pfNative then
pkDub: fProj := nil; exit;
end; //
fProj := TCENativeProject(aProject.getProject);
pnlToolBar.Enabled:=true; pnlToolBar.Enabled:=true;
if Visible then updateImperative; if Visible then updateImperative;
end; end;

View File

@ -6,7 +6,7 @@ interface
uses uses
Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics, actnlist, Classes, SysUtils, FileUtil, TreeFilterEdit, Forms, Controls, Graphics, actnlist,
Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, lcltype, ce_project, ce_interfaces, Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, lcltype, ce_nativeproject, ce_interfaces,
ce_common, ce_widget, ce_observer; ce_common, ce_widget, ce_observer;
type type
@ -148,11 +148,12 @@ end;
{$REGION ICEProjectMonitor -----------------------------------------------------} {$REGION ICEProjectMonitor -----------------------------------------------------}
procedure TCEProjectInspectWidget.projNew(aProject: ICECommonProject); procedure TCEProjectInspectWidget.projNew(aProject: ICECommonProject);
begin begin
case aProject.getKind of fProject := nil;
pkNative: fProject := TCENativeProject(aProject.getProject);
pkDub:fProject := nil;
end;
fLastFileOrFolder := ''; fLastFileOrFolder := '';
if aProject.getFormat <> pfNative then
exit;
//
fProject := TCENativeProject(aProject.getProject);
if Visible then updateImperative; if Visible then updateImperative;
end; end;
@ -167,16 +168,19 @@ end;
procedure TCEProjectInspectWidget.projFocused(aProject: ICECommonProject); procedure TCEProjectInspectWidget.projFocused(aProject: ICECommonProject);
begin begin
case aProject.getKind of fProject := nil;
pkNative: fProject := TCENativeProject(aProject.getProject); fLastFileOrFolder := '';
pkDub:fProject := nil; if aProject.getFormat <> pfNative then
end; exit;
//
fProject := TCENativeProject(aProject.getProject);
if Visible then beginDelayedUpdate; if Visible then beginDelayedUpdate;
end; end;
procedure TCEProjectInspectWidget.projChanged(aProject: ICECommonProject); procedure TCEProjectInspectWidget.projChanged(aProject: ICECommonProject);
begin begin
if fProject <> aProject.getProject then exit; if fProject <> aProject.getProject then
exit;
if Visible then beginDelayedUpdate; if Visible then beginDelayedUpdate;
end; end;

View File

@ -5,7 +5,7 @@ unit ce_symstring;
interface interface
uses uses
ce_observer, ce_interfaces, ce_project, ce_synmemo, ce_common; ce_observer, ce_interfaces, ce_nativeproject, ce_synmemo, ce_common;
type type
@ -64,15 +64,14 @@ begin
EntitiesConnector.removeObserver(self); EntitiesConnector.removeObserver(self);
inherited; inherited;
end; end;
{$ENDREGION} {$ENDREGION}
{$REGION ICEProjectObserver ----------------------------------------------------} {$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCESymbolExpander.projNew(aProject: ICECommonProject); procedure TCESymbolExpander.projNew(aProject: ICECommonProject);
begin begin
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub: fProj := nil;
end; end;
fNeedUpdate := true; fNeedUpdate := true;
end; end;
@ -87,9 +86,9 @@ end;
procedure TCESymbolExpander.projFocused(aProject: ICECommonProject); procedure TCESymbolExpander.projFocused(aProject: ICECommonProject);
begin begin
case aProject.getKind of case aProject.getFormat of
pkNative: fProj := TCENativeProject(aProject.getProject); pfNative: fProj := TCENativeProject(aProject.getProject);
pkDub:fProj := nil; pfDub: fProj := nil;
end; end;
fNeedUpdate := true; fNeedUpdate := true;
end; end;
@ -104,7 +103,6 @@ end;
procedure TCESymbolExpander.projCompiling(aProject: ICECommonProject); procedure TCESymbolExpander.projCompiling(aProject: ICECommonProject);
begin begin
end; end;
{$ENDREGION} {$ENDREGION}
{$REGION ICEMultiDocObserver ---------------------------------------------------} {$REGION ICEMultiDocObserver ---------------------------------------------------}

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls,
strutils, Graphics, Dialogs, ExtCtrls, Menus, Buttons, ComCtrls, strutils, Graphics, Dialogs, ExtCtrls, Menus, Buttons, ComCtrls,
ce_widget, process, ce_common, ce_interfaces, ce_synmemo, ce_widget, process, ce_common, ce_interfaces, ce_synmemo,
ce_project, ce_symstring, ce_writableComponent, ce_observer; ce_nativeproject, ce_symstring, ce_writableComponent, ce_observer;
type type
@ -340,7 +340,8 @@ end;
{$REGION ICEProjectObserver ----------------------------------------------------} {$REGION ICEProjectObserver ----------------------------------------------------}
procedure TCETodoListWidget.projNew(aProject: ICECommonProject); procedure TCETodoListWidget.projNew(aProject: ICECommonProject);
begin begin
if aProject.getKind <> pkNative then fProj := nil;
if aProject.getFormat <> pfNative then
exit; exit;
fProj := TCENativeProject(aProject.getProject); fProj := TCENativeProject(aProject.getProject);
end; end;
@ -366,10 +367,10 @@ procedure TCETodoListWidget.projFocused(aProject: ICECommonProject);
begin begin
if aProject.getProject = fProj then if aProject.getProject = fProj then
exit; exit;
if aProject.getKind <> pkNative then fProj := nil;
if aProject.getFormat <> pfNative then
exit; exit;
fProj := TCENativeProject(aProject.getProject); fProj := TCENativeProject(aProject.getProject);
if Visible and fAutoRefresh then if Visible and fAutoRefresh then
callToolProcess; callToolProcess;
end; end;
@ -377,7 +378,6 @@ end;
procedure TCETodoListWidget.projCompiling(aProject: ICECommonProject); procedure TCETodoListWidget.projCompiling(aProject: ICECommonProject);
begin begin
end; end;
{$ENDREGION} {$ENDREGION}
{$REGION Todo list things ------------------------------------------------------} {$REGION Todo list things ------------------------------------------------------}