fix, new DUB project considered modified + rename units related to CE prj format

+ move compiler selection for DUB projects to DUB options + cleanup options
This commit is contained in:
Basile Burg 2016-10-16 18:06:43 +02:00
parent cc08f18696
commit 82693baa1d
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
19 changed files with 101 additions and 136 deletions

View File

@ -349,14 +349,14 @@
<ResourceBaseClass Value="Form"/>
</Unit20>
<Unit21>
<Filename Value="..\src\ce_projconf.pas"/>
<Filename Value="..\src\ce_ceprojeditor.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="CEProjectConfigurationWidget"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit21>
<Unit22>
<Filename Value="..\src\ce_nativeproject.pas"/>
<Filename Value="..\src\ce_ceproject.pas"/>
<IsPartOfProject Value="True"/>
</Unit22>
<Unit23>

View File

@ -1,4 +1,4 @@
unit ce_nativeproject;
unit ce_ceproject;
{$I ce_defines.inc}
@ -132,8 +132,8 @@ type
// native project have no ext constraint, this function tells if filename is project
function isValidNativeProject(const filename: string): boolean;
function getNativeProjectCompiler: TCECompiler;
procedure setNativeProjectCompiler(value: TCECompiler);
function getCEProjectCompiler: TCECompiler;
procedure setCEProjectCompiler(value: TCECompiler);
implementation
@ -141,8 +141,8 @@ uses
controls, dialogs, ce_libman, ce_dcd;
var
NativeProjectCompilerFilename: string = 'dmd';
NativeProjectCompiler: TCECompiler;
CEProjectCompilerFilename: string = 'dmd';
CEProjectCompiler: TCECompiler;
constructor TCENativeProject.create(aOwner: TComponent);
begin
@ -203,7 +203,7 @@ end;
function TCENativeProject.getFormat: TCEProjectFormat;
begin
exit(pfNative);
exit(pfCE);
end;
function TCENativeProject.getProject: TObject;
@ -471,12 +471,12 @@ begin
begin
conf.getOpts(list, fBaseConfig);
conf.otherOptions.getCompilerSpecificOpts(list, fBaseConfig.otherOptions,
NativeProjectCompiler);
CEProjectCompiler);
end
else
begin
conf.getOpts(list);
conf.otherOptions.getCompilerSpecificOpts(list, nil, NativeProjectCompiler);
conf.otherOptions.getCompilerSpecificOpts(list, nil, CEProjectCompiler);
end;
finally
exc.Free;
@ -783,14 +783,14 @@ begin
// this doesn't work under linux, so the previous ChDir.
if prjpath.dirExists then
fCompilProc.CurrentDirectory := prjpath;
fCompilProc.Executable := NativeProjectCompilerFilename;
fCompilProc.Executable := CEProjectCompilerFilename;
fCompilProc.Options := fCompilProc.Options + [poStderrToOutPut, poUsePipes];
fCompilProc.ShowWindow := swoHIDE;
fCompilProc.OnReadData:= @compProcOutput;
fCompilProc.OnTerminate:= @compProcTerminated;
getOpts(fCompilProc.Parameters);
//getUpToDateObjects(fCompilProc.Parameters);
if NativeProjectCompiler = gdc then
if CEProjectCompiler = gdc then
fCompilProc.Parameters.Add('-gdc=gdc');
fCompilProc.Execute;
end;
@ -1016,7 +1016,7 @@ var
begin
str := TStringList.Create;
try
str.Add(NativeProjectCompilerFilename.extractFileName);
str.Add(CEProjectCompilerFilename.extractFileName);
getOpts(str);
result := str.Text;
finally
@ -1076,28 +1076,28 @@ begin
end;
end;
function getNativeProjectCompiler: TCECompiler;
function getCEProjectCompiler: TCECompiler;
begin
exit(NativeProjectCompiler);
exit(CEProjectCompiler);
end;
procedure setNativeProjectCompiler(value: TCECompiler);
procedure setCEProjectCompiler(value: TCECompiler);
begin
case value of
dmd: NativeProjectCompilerFilename := exeFullName('dmd' + exeExt);
gdc: NativeProjectCompilerFilename := exeFullName('gdmd' + exeExt);
ldc: NativeProjectCompilerFilename := exeFullName('ldmd2' + exeExt);
dmd: CEProjectCompilerFilename := exeFullName('dmd' + exeExt);
gdc: CEProjectCompilerFilename := exeFullName('gdmd' + exeExt);
ldc: CEProjectCompilerFilename := exeFullName('ldmd2' + exeExt);
end;
if (not NativeProjectCompilerFilename.fileExists)
or NativeProjectCompilerFilename.isEmpty then
if (not CEProjectCompilerFilename.fileExists)
or CEProjectCompilerFilename.isEmpty then
begin
value := dmd;
NativeProjectCompilerFilename:= 'dmd' + exeExt;
CEProjectCompilerFilename:= 'dmd' + exeExt;
end;
NativeProjectCompiler := value;
CEProjectCompiler := value;
end;
initialization
setNativeProjectCompiler(dmd);
setCEProjectCompiler(dmd);
RegisterClasses([TCENativeProject]);
end.

View File

@ -3,7 +3,7 @@ inherited CEProjectConfigurationWidget: TCEProjectConfigurationWidget
Height = 273
Top = 349
Width = 445
Caption = 'Native project configuration'
Caption = ' CE project editor'
ClientHeight = 273
ClientWidth = 445
inherited Back: TPanel

View File

@ -1,4 +1,4 @@
unit ce_projconf;
unit ce_ceprojeditor;
{$I ce_defines.inc}
@ -7,7 +7,7 @@ interface
uses
Classes, SysUtils, FileUtil, RTTIGrids, RTTICtrls, Forms, Controls, Graphics,
Dialogs, ExtCtrls, ComCtrls, StdCtrls, Menus, Buttons, rttiutils, typinfo,
PropEdits, ObjectInspector, ce_dmdwrap, ce_nativeproject, ce_widget,
PropEdits, ObjectInspector, ce_dmdwrap, ce_ceproject, ce_widget,
ce_interfaces, ce_observer, ce_sharedres, ce_common, ce_dsgncontrols;
type
@ -96,7 +96,7 @@ procedure TCEProjectConfigurationWidget.projNew(project: ICECommonProject);
begin
fProj := nil;
enabled := false;
if project.getFormat <> pfNative then
if project.getFormat <> pfCE then
exit;
enabled := true;
//
@ -130,7 +130,7 @@ procedure TCEProjectConfigurationWidget.projFocused(project: ICECommonProject);
begin
fProj := nil;
enabled := false;
if project.getFormat <> pfNative then
if project.getFormat <> pfCE then
exit;
enabled := true;
//

View File

@ -27,8 +27,12 @@ type
fCombined: boolean;
fDepCheck: TDubDependencyCheck;
fOther: string;
fCompiler: TCECompiler;
procedure setLinkMode(value: TDubLinkMode);
procedure setCompiler(value: TCECompiler);
function getCompiler: TCECompiler;
published
property compiler: TCECOmpiler read getCompiler write setCompiler;
property parallel: boolean read fParallel write fParallel;
property forceRebuild: boolean read fForceRebuild write fForceRebuild;
property linkMode: TDubLinkMode read fLinkMode write setLinkMode;
@ -184,6 +188,17 @@ begin
fLinkMode:=value;
end;
procedure TCEDubBuildOptionsBase.setCompiler(value: TCECompiler);
begin
fCompiler := value;
setDubCompiler(fCompiler);
end;
function TCEDubBuildOptionsBase.getCompiler: TCECompiler;
begin
result := fCompiler;
end;
procedure TCEDubBuildOptionsBase.assign(source: TPersistent);
var
opts: TCEDubBuildOptionsBase;
@ -197,6 +212,7 @@ begin
linkMode:=opts.linkMode;
other:=opts.other;
dependenciesCheck:=opts.dependenciesCheck;
compiler:=opts.compiler;
end
else inherited;
end;
@ -289,8 +305,11 @@ begin
fConfigs.Duplicates:=TDuplicates.dupIgnore;
fBuildTypes.Duplicates:=TDuplicates.dupIgnore;
//
json.Add('name', '');
endModification;
subjProjNew(fProjectSubject, self);
subjProjChanged(fProjectSubject, self);
doModified;
fModified:=false;
end;
destructor TCEDubProject.destroy;
@ -327,7 +346,7 @@ end;
function TCEDubProject.getFormat: TCEProjectFormat;
begin
exit(pfDub);
exit(pfDUB);
end;
function TCEDubProject.getProject: TObject;

View File

@ -3,7 +3,7 @@ inherited CEDubProjectEditorWidget: TCEDubProjectEditorWidget
Height = 424
Top = 245
Width = 402
Caption = 'Dub project editor'
Caption = 'DUB project editor'
ClientHeight = 424
ClientWidth = 402
inherited Back: TPanel

View File

@ -251,7 +251,7 @@ procedure TCEDubProjectEditorWidget.projNew(project: ICECommonProject);
begin
fProj := nil;
enabled := false;
if project.getFormat <> pfDub then
if project.getFormat <> pfDUB then
exit;
enabled := true;
fProj := TCEDubProject(project.getProject);
@ -285,7 +285,7 @@ procedure TCEDubProjectEditorWidget.projFocused(project: ICECommonProject);
begin
fProj := nil;
enabled := false;
if project.getFormat <> pfDub then
if project.getFormat <> pfDUB then
begin
updateEditor;
exit;

View File

@ -493,7 +493,7 @@ begin
fDoc.loadFromFile(fname);
if assigned(fProj) and (fProj.filename = fDoc.fileName) then
begin
if fProj.getFormat = pfNative then
if fProj.getFormat = pfCE then
fDoc.Highlighter := LfmSyn
else
fDoc.Highlighter := JsSyn;

View File

@ -11,7 +11,7 @@ uses
type
// describes the project kind. Used as a hint to cast ICECommonProject.getProject()
TCEProjectFormat = (pfNative, pfDub);
TCEProjectFormat = (pfCE, pfDUB);
// describes the binary kind produces when compiling a project
TProjectBinaryKind = (executable, staticlib, sharedlib, obj);

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, Controls, ComCtrls,
ce_common, ce_nativeproject, ce_dubproject, ce_interfaces,
ce_common, ce_ceproject, ce_dubproject, ce_interfaces,
ce_dialogs, ce_projutils;
type

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Menus, ComCtrls, Buttons, LazFileUtils, strutils, fphttpclient, StdCtrls,
xfpjson, xjsonparser,
ce_widget, ce_interfaces, ce_nativeproject, ce_dmdwrap, ce_common, ce_dialogs,
ce_widget, ce_interfaces, ce_ceproject, ce_dmdwrap, ce_common, ce_dialogs,
ce_sharedres, process, ce_dubproject, ce_observer, ce_dlang, ce_libman,
ce_projutils, ce_dsgncontrols;

View File

@ -10,8 +10,8 @@ uses
Graphics, strutils, Dialogs, Menus, ActnList, ExtCtrls, process,
{$IFDEF WINDOWS}Windows, {$ENDIF} XMLPropStorage, SynExportHTML, fphttpclient,
xfpjson, xjsonparser, xjsonscanner,
ce_common, ce_dmdwrap, ce_nativeproject, ce_synmemo, ce_writableComponent,
ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_projconf,
ce_common, ce_dmdwrap, ce_ceproject, ce_synmemo, ce_writableComponent,
ce_widget, ce_messages, ce_interfaces, ce_editor, ce_projinspect, ce_ceprojeditor,
ce_search, ce_miniexplorer, ce_libman, ce_libmaneditor, ce_todolist, ce_observer,
ce_toolseditor, ce_procinput, ce_optionseditor, ce_symlist, ce_mru, ce_processes,
ce_infos, ce_dubproject, ce_dialogs, ce_dubprojeditor,{$IFDEF UNIX} ce_gdb,{$ENDIF}
@ -328,7 +328,6 @@ type
private
fRunnablesOptions: TCEEditableRunnableOptions;
fRunnableCompiler: TCECompiler;
fSymStringExpander: ICESymStringExpander;
fProjectGroup: ICEProjectGroup;
fCovModUt: boolean;
@ -537,8 +536,6 @@ type
fMaxRecentDocs: integer;
fMaxRecentGroups: integer;
fDcdPort: word;
fRunnableDest: TCEPathname;
fAlwaysUseDest: boolean;
fDscanUnittests: boolean;
fAutoSaveProjectFiles: boolean;
fFlatLook: boolean;
@ -547,13 +544,8 @@ type
fShowBuildDuration: boolean;
function getAdditionalPATH: string;
procedure setAdditionalPATH(const value: string);
function getDubCompiler: TCECompiler;
procedure setDubCompiler(value: TCECompiler);
function getRunnableCompiler: TCECompiler;
procedure setRunnableCompiler(value: TCECompiler);
function getNativeProjecCompiler: TCECompiler;
procedure setNativeProjecCompiler(value: TCECompiler);
procedure setRunnableDestination(const value: TCEPathname);
procedure setSplitterScsrollSpeed(value: byte);
published
property additionalPATH: string read getAdditionalPATH write setAdditionalPath;
@ -564,21 +556,14 @@ type
property maxRecentProjects: integer read fMaxRecentProjs write fMaxRecentProjs;
property maxRecentDocuments: integer read fMaxRecentDocs write fMaxRecentDocs;
property maxRecentProjectsGroups: integer read fMaxRecentGroups write fMaxRecentGroups;
property dubCompiler: TCECompiler read getDubCompiler write setDubCompiler;
property nativeProjectCompiler: TCECompiler read getNativeProjecCompiler write setNativeProjecCompiler;
property dscanUnittests: boolean read fDscanUnittests write fDscanUnittests default true;
property autoSaveProjectFiles: boolean read fAutoSaveProjectFiles write fAutoSaveProjectFiles default false;
property flatLook: boolean read fFlatLook write fFlatLook;
property splitterScrollSpeed: byte read fSplitterScrollSpeed write setSplitterScsrollSpeed;
property showBuildDuration: boolean read fShowBuildDuration write fShowBuildDuration default false;
// published for ICEEditableOptions but stored by DCD wrapper since it reloads before CEMainForm
property dcdPort: word read fDcdPort write fDcdPort stored false;
// TODO-cmaintenance: remove this property from version 3 update 1
property nativeProjecCompiler: TCECompiler read getNativeProjecCompiler write setNativeProjecCompiler stored false; deprecated;
property runnableDestination: TCEPathname read fRunnableDest write setRunnableDestination stored false; deprecated;
property runnableDestinationAlways: boolean read fAlwaysUseDest write fAlwaysUseDest stored false; deprecated;
end;
TCEApplicationOptions = class(TCEApplicationOptionsBase, ICEEditableOptions)
@ -775,48 +760,14 @@ begin
fFlatLook:=true;
end;
function TCEApplicationOptionsBase.getDubCompiler: TCECompiler;
begin
exit(ce_dubproject.getDubCompiler);
end;
function TCEApplicationOptionsBase.getNativeProjecCompiler: TCECompiler;
begin
exit(ce_nativeproject.getNativeProjectCompiler);
end;
procedure TCEApplicationOptionsBase.setDubCompiler(value: TCECompiler);
begin
ce_dubproject.setDubCompiler(value);
exit(ce_ceproject.getCEProjectCompiler);
end;
procedure TCEApplicationOptionsBase.setNativeProjecCompiler(value: TCECompiler);
begin
ce_nativeproject.setNativeProjectCompiler(value);
end;
function TCEApplicationOptionsBase.getRunnableCompiler: TCECompiler;
begin
exit(CEMainForm.fRunnableCompiler);
end;
procedure TCEApplicationOptionsBase.setRunnableCompiler(value: TCECompiler);
begin
case value of
ldc: if not exeInSysPath('ldmd2' + exeExt) then
value := dmd;
gdc: if not exeInSysPath('gdmd' + exeExt) then
value := dmd;
end;
CEMainForm.fRunnableCompiler:=value;
end;
procedure TCEApplicationOptionsBase.setRunnableDestination(const value: TCEPathname);
begin
fRunnableDest := value;
if (length(fRunnableDest) > 0)
and (fRunnableDest[length(fRunnableDest)] <> DirectorySeparator) then
fRunnableDest += DirectorySeparator;
ce_ceproject.setCEProjectCompiler(value);
end;
procedure TCEApplicationOptionsBase.setSplitterScsrollSpeed(value: byte);
@ -884,7 +835,6 @@ begin
fFlatLook:=fBackup.fFlatLook;
fAutoCheckUpdates:= fBackup.fAutoCheckUpdates;
CEMainForm.fDscanUnittests := fDscanUnittests;
dubCompiler:= fBackup.dubCompiler;
nativeProjectCompiler:= fBackup.nativeProjectCompiler;
end
else inherited;
@ -919,7 +869,6 @@ begin
fBackup.fFlatLook:= fFlatLook;
fBackup.fAutoCheckUpdates:= fAutoCheckUpdates;
fBackup.fShowBuildDuration:= fShowBuildDuration;
fBackup.dubCompiler:= dubCompiler;
fBackup.nativeProjectCompiler:= nativeProjectCompiler;
end
else inherited;
@ -1010,7 +959,7 @@ begin
if assigned(hdl) then
mem := hdl.findDocument(dst.fProject.filename);
if mem.isNotNil then
if dst.fProject.getFormat = pfNative then
if dst.fProject.getFormat = pfCE then
mem.Highlighter := LfmSyn
else
mem.Highlighter := JsSyn;
@ -1996,8 +1945,8 @@ procedure TCEMainForm.projNew(project: ICECommonProject);
begin
fProject := project;
case fProject.getFormat of
pfNative: fNativeProject := TCENativeProject(fProject.getProject);
pfDub: fDubProject := TCEDubProject(fProject.getProject);
pfCE: fNativeProject := TCENativeProject(fProject.getProject);
pfDUB: fDubProject := TCEDubProject(fProject.getProject);
end;
if not fProject.inGroup then
fFreeProj := project;
@ -2024,8 +1973,8 @@ procedure TCEMainForm.projFocused(project: ICECommonProject);
begin
fProject := project;
case fProject.getFormat of
pfNative: fNativeProject := TCENativeProject(fProject.getProject);
pfDub: fDubProject := TCEDubProject(fProject.getProject);
pfCE: fNativeProject := TCENativeProject(fProject.getProject);
pfDUB: fDubProject := TCEDubProject(fProject.getProject);
end;
if not fProject.inGroup then
fFreeProj := project
@ -2326,7 +2275,7 @@ begin
if fProject = nil then exit;
if fProject.filename = fDoc.fileName then exit;
//
if fProject.getFormat = pfNative then
if fProject.getFormat = pfCE then
begin
if fDoc.fileName.fileExists and not fDoc.isTemporary then
fNativeProject.addSource(fDoc.fileName)
@ -3014,7 +2963,7 @@ begin
fCompStart := Time;
fProject.compile;
end;
if fProject.outputFilename.fileExists or (fProject.getFormat = pfDub) then
if fProject.outputFilename.fileExists or (fProject.getFormat = pfDUB) then
fProject.run;
end;
@ -3265,9 +3214,6 @@ end;
procedure TCEMainForm.newDubProj;
begin
fDubProject := TCEDubProject.create(nil);
fDubProject.json.Add('name', '');
fDubProject.beginModification;
fDubProject.endModification;
fProject := fDubProject as ICECommonProject;
showProjTitle;
end;
@ -3331,7 +3277,7 @@ procedure TCEMainForm.actProjSaveAsExecute(Sender: TObject);
begin
if checkProjectLock then
exit;
if (fProject.getFormat = pfDub) and TCEDubProject(fProject.getProject).isSDL then
if (fProject.getFormat = pfDUB) and TCEDubProject(fProject.getProject).isSDL then
begin
fMsgs.message(DubSdlWarning, fProject, amcProj, amkWarn);
exit;
@ -3347,7 +3293,7 @@ end;
procedure TCEMainForm.actProjSaveExecute(Sender: TObject);
begin
if fProject = nil then exit;
if (fProject.getFormat = pfDub) and TCEDubProject(fProject.getProject).isSDL then
if (fProject.getFormat = pfDUB) and TCEDubProject(fProject.getProject).isSDL then
begin
fMsgs.message(DubSdlWarning, fProject, amcProj, amkWarn);
exit;
@ -3377,8 +3323,8 @@ var
win: TControl = nil;
begin
if assigned(fProject) then case fProject.getFormat of
pfDub: win := DockMaster.GetAnchorSite(fDubProjWidg);
pfNative: win := DockMaster.GetAnchorSite(fPrjCfWidg);
pfDUB: win := DockMaster.GetAnchorSite(fDubProjWidg);
pfCE: win := DockMaster.GetAnchorSite(fPrjCfWidg);
end
else win := DockMaster.GetAnchorSite(fPrjCfWidg);
if win.isNotNil then
@ -3392,7 +3338,7 @@ procedure TCEMainForm.actProjSourceExecute(Sender: TObject);
begin
if fProject = nil then exit;
if not fProject.filename.fileExists then exit;
if (fProject.getFormat = pfDub) and TCEDubProject(fProject.getProject).isSDL then
if (fProject.getFormat = pfDUB) and TCEDubProject(fProject.getProject).isSDL then
begin
fMsgs.message(DubSdlWarning, fProject, amcProj, amkWarn);
exit;
@ -3400,7 +3346,7 @@ begin
//
openFile(fProject.filename);
fDoc.isProjectDescription := true;
if fProject.getFormat = pfNative then
if fProject.getFormat = pfCE then
fDoc.Highlighter := LfmSyn
else
fDoc.Highlighter := JsSyn;

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls, Graphics,
ExtCtrls, Menus, ComCtrls, Buttons, lcltype, strutils, ce_widget, ce_sharedres,
ce_common, ce_interfaces, ce_observer, ce_writableComponent, ce_dubproject,
ce_nativeproject, EditBtn, ce_dialogs, ce_synmemo, ce_projutils, ce_dsgncontrols;
ce_ceproject, EditBtn, ce_dialogs, ce_synmemo, ce_projutils, ce_dsgncontrols;
type

View File

@ -5,8 +5,8 @@ unit ce_mru;
interface
uses
Classes, SysUtils, ce_interfaces, ce_observer,
ce_nativeproject, ce_synmemo, ce_common;
Classes, SysUtils,
ce_interfaces, ce_observer, ce_synmemo, ce_common;
type

View File

@ -7,7 +7,7 @@ uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, ExtCtrls, Menus,
Buttons, dialogs, ComCtrls, StdCtrls,
ce_widget, ce_common, ce_interfaces, ce_writableComponent, ce_observer,
ce_nativeproject, ce_dubproject, ce_projutils, ce_sharedres, ce_dsgncontrols,
ce_ceproject, ce_dubproject, ce_projutils, ce_sharedres, ce_dsgncontrols,
ce_dialogs;
type
@ -198,7 +198,7 @@ procedure TProjectGroup.projChanged(project: ICECommonProject);
var
itm: TProjectGroupItem;
begin
if assigned(project) and project.inGroup and (project.getFormat = pfDub) then
if assigned(project) and project.inGroup and (project.getFormat = pfDUB) then
begin
itm := Self.addItem(project.filename);
if assigned(itm) then
@ -280,7 +280,7 @@ function TProjectGroup.getProject(ix: Integer): ICECommonProject;
begin
item[ix].lazyLoad;
result := item[ix].project;
if result.getFormat = pfDub then
if result.getFormat = pfDUB then
result.setActiveConfigurationIndex(item[ix].configurationIndex);
end;
@ -439,7 +439,7 @@ begin
begin
fProj := loadProject(absoluteFilename, true);
fProj.inGroup(true);
if fProj.getFormat = pfDub then
if fProj.getFormat = pfDUB then
fProj.setActiveConfigurationIndex(fConfigIndex);
end;
end;
@ -454,7 +454,7 @@ end;
function TProjectGroupItem.storeConfigIndex: boolean;
begin
exit(fProj.getFormat = pfDub);
exit(fProj.getFormat = pfDUB);
end;
function TProjectGroupItem.absoluteFilename: string;
@ -713,8 +713,8 @@ begin
Data:= prj;
fmt := prj.project.getFormat;
case fmt of
pfNative: Caption := prj.fFilename.extractFileName;
pfDub: Caption := TCEDubProject(prj.project.getProject).packageName;
pfCE: Caption := prj.fFilename.extractFileName;
pfDUB: Caption := TCEDubProject(prj.project.getProject).packageName;
end;
SubItems.Add(typeStr[fmt]);
SubItems.Add(asyncStr[prj.fAsyncMode]);
@ -733,8 +733,8 @@ begin
begin
if fFreeProj.filename.fileExists then
case fFreeProj.getFormat of
pfNative: StaticText1.Caption:= 'Free standing: ' + fFreeProj.filename.extractFileName;
pfDub: StaticText1.Caption:= 'Free standing: ' + TCEDubProject(fFreeProj.getProject).packageName;
pfCE: StaticText1.Caption:= 'Free standing: ' + fFreeProj.filename.extractFileName;
pfDUB: StaticText1.Caption:= 'Free standing: ' + TCEDubProject(fFreeProj.getProject).packageName;
end
else
StaticText1.Caption:= 'Free standing: (not yet saved)';

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, TreeFilterEdit, Forms, Controls, Graphics, actnlist,
Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, lcltype, ce_nativeproject, ce_interfaces,
Dialogs, ExtCtrls, ComCtrls, Menus, Buttons, lcltype, ce_ceproject, ce_interfaces,
ce_common, ce_widget, ce_observer, ce_dialogs, ce_sharedres, ce_dsgncontrols;
type
@ -201,7 +201,7 @@ procedure TCEProjectInspectWidget.updateButtons;
var
ce: boolean;
begin
ce := fProject.getFormat = pfNative;
ce := fProject.getFormat = pfCE;
btnRemFile.Enabled:= ce;
btnRemFold.Enabled:= ce;
btnAddFile.Enabled:= ce;
@ -296,7 +296,7 @@ var
fname: string;
proj: TCENativeProject;
begin
if not assigned(fProject) or (fProject.getFormat = pfDub) then
if not assigned(fProject) or (fProject.getFormat = pfDUB) then
exit;
proj := TCENativeProject(fProject.getProject);
@ -327,7 +327,7 @@ var
proj: TCENativeProject;
i: integer;
begin
if not assigned(fProject) or (fProject.getFormat = pfDub) then
if not assigned(fProject) or (fProject.getFormat = pfDUB) then
exit;
dir := '';
@ -363,7 +363,7 @@ var
proj: TCENativeProject;
i: Integer;
begin
if not assigned(fProject) or (fProject.getFormat = pfDub)
if not assigned(fProject) or (fProject.getFormat = pfDUB)
or Tree.Selected.isNil or (Tree.Selected.Parent <> fFileNode) then
exit;
@ -390,7 +390,7 @@ var
proj: TCENativeProject;
i, j: integer;
begin
if not assigned(fProject) or (fProject.getFormat = pfDub)
if not assigned(fProject) or (fProject.getFormat = pfDUB)
or Tree.Selected.isNil or (Tree.Selected.Parent = fFileNode) then
exit;
@ -423,7 +423,7 @@ begin
getMultiDocHandler.openDocument(value);
end;
begin
if not assigned(fProject) or (fProject.getFormat = pfDub) then
if not assigned(fProject) or (fProject.getFormat = pfDUB) then
exit;
proj := TCENativeProject(fProject.getProject);
@ -452,7 +452,7 @@ end;
procedure TCEProjectInspectWidget.updateImperative;
var
src, conf: string;
conf: string;
itm: TTreeNode;
i,j: integer;
begin

View File

@ -5,7 +5,7 @@ interface
uses
Classes, SysUtils,
ce_nativeproject, ce_dubproject, ce_interfaces, ce_common, ce_observer, ce_synmemo;
ce_ceproject, ce_dubproject, ce_interfaces, ce_common, ce_observer, ce_synmemo;
type
TCEProjectFileFormat = (pffNone, pffCe, pffDub);

View File

@ -5,7 +5,7 @@ unit ce_symstring;
interface
uses
ce_observer, ce_interfaces, ce_nativeproject, ce_synmemo, ce_common,
ce_observer, ce_interfaces, ce_ceproject, ce_synmemo, ce_common,
ce_stringrange;
type
@ -93,8 +93,8 @@ procedure TCESymbolExpander.projNew(project: ICECommonProject);
begin
fProjInterface := project;
case project.getFormat of
pfNative: fProj := TCENativeProject(project.getProject);
pfDub: fProj := nil;
pfCE: fProj := TCENativeProject(project.getProject);
pfDUB: fProj := nil;
end;
fNeedUpdate := true;
end;
@ -112,8 +112,8 @@ procedure TCESymbolExpander.projFocused(project: ICECommonProject);
begin
fProjInterface := project;
case project.getFormat of
pfNative: fProj := TCENativeProject(project.getProject);
pfDub: fProj := nil;
pfCE: fProj := TCENativeProject(project.getProject);
pfDUB: fProj := nil;
end;
fNeedUpdate := true;
end;

View File

@ -8,7 +8,7 @@ uses
Classes, SysUtils, FileUtil, ListFilterEdit, Forms, Controls,
strutils, Graphics, Dialogs, ExtCtrls, Menus, Buttons, ComCtrls,
ce_widget, process, ce_common, ce_interfaces, ce_synmemo, ce_processes,
ce_nativeproject, ce_writableComponent, ce_observer, ce_sharedres,
ce_writableComponent, ce_observer, ce_sharedres,
ce_dsgncontrols;
type