mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 07:45:54 +01:00
Expert for creating new DMVC projects and Controller units
This commit is contained in:
parent
094e2ea6ab
commit
4c227b1e63
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
*.dcu
|
||||
Expert/
|
95
Expert/DMVC.Expert.CodeGen.NewControllerUnit.pas
Normal file
95
Expert/DMVC.Expert.CodeGen.NewControllerUnit.pas
Normal file
@ -0,0 +1,95 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.NewControllerUnit;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
DMVC.Expert.CodeGen.NewUnit;
|
||||
|
||||
type
|
||||
TNewControllerUnitEx = class(TNewUnit)
|
||||
protected
|
||||
FCreateIndexMethod : Boolean;
|
||||
FControllerClassName : String;
|
||||
function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; override;
|
||||
public
|
||||
constructor Create(const aCreateIndexMethod : boolean; const AControllerClassName: String; const APersonality : String = '' );
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
System.SysUtils,
|
||||
VCL.Dialogs,
|
||||
DMVC.Expert.CodeGen.Templates,
|
||||
DMVC.Expert.CodeGen.SourceFile;
|
||||
|
||||
|
||||
constructor TNewControllerUnitEx.Create(const aCreateIndexMethod : boolean; const AControllerClassName : String; const APersonality : String = '' );
|
||||
begin
|
||||
Assert(Length(AControllerClassName) > 0);
|
||||
FAncestorName := '';
|
||||
FFormName := '';
|
||||
FImplFileName := '';
|
||||
FIntfFileName := '';
|
||||
FControllerClassName := AControllerClassName;
|
||||
FCreateIndexMethod := aCreateIndexMethod;
|
||||
Personality := APersonality;
|
||||
end;
|
||||
|
||||
function TNewControllerUnitEx.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
|
||||
var
|
||||
lUnitIdent: string;
|
||||
lFormName: string;
|
||||
lFileName: string;
|
||||
lIndexMethodIntf: string;
|
||||
lIndexMethodImpl: string;
|
||||
lControllerUnit: string;
|
||||
begin
|
||||
lControllerUnit := sControllerUnit;
|
||||
lIndexMethodIntf := sIndexMethodIntf;
|
||||
lIndexMethodImpl := Format(sIndexMethodImpl,[FControllerClassName]);
|
||||
|
||||
if not FCreateIndexMethod then
|
||||
begin
|
||||
lIndexMethodIntf := '';
|
||||
lIndexMethodImpl := '';
|
||||
end;
|
||||
// http://stackoverflow.com/questions/4196412/how-do-you-retrieve-a-new-unit-name-from-delphis-open-tools-api
|
||||
// So using method mentioned by Marco Cantu.
|
||||
(BorlandIDEServices as IOTAModuleServices).GetNewModuleAndClassName( '', lUnitIdent, lFormName, lFileName);
|
||||
Result := TSourceFile.Create(sControllerUnit, [lUnitIdent, FControllerClassName, lIndexMethodIntf, lIndexMethodImpl]);
|
||||
end;
|
||||
|
||||
|
||||
end.
|
79
Expert/DMVC.Expert.CodeGen.NewDMVCProject.pas
Normal file
79
Expert/DMVC.Expert.CodeGen.NewDMVCProject.pas
Normal file
@ -0,0 +1,79 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.NewDMVCProject;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsAPI,
|
||||
DMVC.Expert.CodeGen.NewProject;
|
||||
|
||||
type
|
||||
TDMVCProjectFile = class(TNewProjectEx)
|
||||
protected
|
||||
function NewProjectSource(const ProjectName: string): IOTAFile; override;
|
||||
function GetFrameworkType: string; override;
|
||||
public
|
||||
constructor Create; overload;
|
||||
constructor Create(const APersonality: string); overload;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DMVC.Expert.CodeGen.SourceFile,
|
||||
DMVC.Expert.CodeGen.Templates,
|
||||
System.SysUtils;
|
||||
|
||||
constructor TDMVCProjectFile.Create;
|
||||
begin
|
||||
//TODO: Figure out how to make this be DMVCProjectX where X is the next available.
|
||||
//Return Blank and the project will be 'ProjectX.dpr' where X is the next available number
|
||||
FFileName := '';
|
||||
end;
|
||||
|
||||
constructor TDMVCProjectFile.Create(const APersonality: string);
|
||||
begin
|
||||
Create;
|
||||
Personality := APersonality;
|
||||
end;
|
||||
|
||||
function TDMVCProjectFile.GetFrameworkType: string;
|
||||
begin
|
||||
Result := 'VCL';
|
||||
end;
|
||||
|
||||
function TDMVCProjectFile.NewProjectSource(const ProjectName: string): IOTAFile;
|
||||
begin
|
||||
Result := TSourceFile.Create(sDMVCDPR, [ProjectName]);
|
||||
end;
|
||||
|
||||
end.
|
192
Expert/DMVC.Expert.CodeGen.NewProject.pas
Normal file
192
Expert/DMVC.Expert.CodeGen.NewProject.pas
Normal file
@ -0,0 +1,192 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.NewProject;
|
||||
// This is done to Warnings that I can't control, as Embarcadero has
|
||||
// deprecated the functions, but due to design you are still required to
|
||||
// to implement.
|
||||
{$WARN SYMBOL_DEPRECATED OFF}
|
||||
interface
|
||||
|
||||
uses
|
||||
PlatformAPI,
|
||||
ToolsAPI;
|
||||
|
||||
type
|
||||
TNewProject = class abstract(TNotifierObject,IOTACreator, IOTAProjectCreator,IOTAProjectCreator80)
|
||||
protected
|
||||
//IOTACreator
|
||||
function GetCreatorType: string; virtual;
|
||||
function GetExisting: Boolean;
|
||||
function GetFileSystem: string;
|
||||
function GetOwner: IOTAModule;
|
||||
function GetUnnamed: Boolean;
|
||||
// IOTAProjectCreator
|
||||
function GetFileName: string;
|
||||
function GetOptionFileName: string; deprecated;
|
||||
function GetShowSource: Boolean;
|
||||
procedure NewDefaultModule; deprecated;
|
||||
function NewOptionSource(const ProjectName: string): IOTAFile; deprecated;
|
||||
procedure NewProjectResource(const Project: IOTAProject);
|
||||
function NewProjectSource(const ProjectName: string): IOTAFile; virtual; abstract; // MUST OVERRIDE!
|
||||
// IOTAProjectCreator80
|
||||
function GetProjectPersonality: string;virtual;
|
||||
procedure NewDefaultProjectModule(const Project: IOTAProject);
|
||||
private
|
||||
procedure SetFileName(const Value: String);
|
||||
protected
|
||||
FFileName : String;
|
||||
public
|
||||
property FileName : String read GetFileName write SetFileName;
|
||||
end;
|
||||
|
||||
TNewProjectEx = class(TNewProject, IOTAProjectCreator160)
|
||||
private
|
||||
FPersonality: string;
|
||||
protected
|
||||
function GetProjectPersonality: string;override;
|
||||
|
||||
// IOTAProjectCreator160
|
||||
function GetPlatforms: TArray<string>;
|
||||
function GetFrameworkType: string; virtual;
|
||||
function GetPreferredPlatform: string;
|
||||
procedure SetInitialOptions(const NewProject: IOTAProject);
|
||||
public
|
||||
property Personality : string read FPersonality write FPersonality;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
System.SysUtils;
|
||||
|
||||
|
||||
{ TNewProject }
|
||||
|
||||
function TNewProject.GetCreatorType: string;
|
||||
begin
|
||||
Result := sConsole; // May want to change this in the future, at least making method virtual
|
||||
end;
|
||||
|
||||
function TNewProject.GetExisting: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TNewProject.GetFileName: string;
|
||||
begin
|
||||
Result := FFileName;
|
||||
end;
|
||||
|
||||
function TNewProject.GetFileSystem: string;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewProject.GetOptionFileName: string;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewProject.GetOwner: IOTAModule;
|
||||
begin
|
||||
Result := (BorlandIDEServices as IOTAModuleServices).MainProjectGroup;
|
||||
end;
|
||||
|
||||
function TNewProject.GetProjectPersonality: string;
|
||||
begin
|
||||
Result := sDelphiPersonality;
|
||||
end;
|
||||
|
||||
function TNewProject.GetShowSource: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TNewProject.GetUnnamed: Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TNewProject.NewDefaultModule;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TNewProject.NewDefaultProjectModule(const Project: IOTAProject);
|
||||
begin
|
||||
end;
|
||||
|
||||
function TNewProject.NewOptionSource(const ProjectName: string): IOTAFile;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure TNewProject.NewProjectResource(const Project: IOTAProject);
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TNewProject.SetFileName(const Value: String);
|
||||
begin
|
||||
FFileName := Value;
|
||||
end;
|
||||
|
||||
function TNewProjectEx.GetFrameworkType: string;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewProjectEx.GetPlatforms: TArray<string>;
|
||||
begin
|
||||
Result := TArray<string>.Create(cWin32Platform, cWin64Platform);
|
||||
end;
|
||||
|
||||
function TNewProjectEx.GetPreferredPlatform: string;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewProjectEx.GetProjectPersonality: string;
|
||||
begin
|
||||
Result := sDelphiPersonality
|
||||
end;
|
||||
|
||||
procedure TNewProjectEx.SetInitialOptions(const NewProject: IOTAProject);
|
||||
var
|
||||
LBuildConf: IOTAProjectOptionsConfigurations;
|
||||
begin
|
||||
if Supports(NewProject.ProjectOptions, IOTAProjectOptionsConfigurations, LBuildConf) then
|
||||
begin
|
||||
LBuildConf.BaseConfiguration.AsBoolean['UsingDelphiRTL'] := True;
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
end.
|
188
Expert/DMVC.Expert.CodeGen.NewUnit.pas
Normal file
188
Expert/DMVC.Expert.CodeGen.NewUnit.pas
Normal file
@ -0,0 +1,188 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.NewUnit;
|
||||
// This is done to Warnings that I can't control, as Embarcadero has
|
||||
// deprecated the functions, but due to design you are still required to
|
||||
// to implement.
|
||||
{$WARN SYMBOL_DEPRECATED OFF}
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsAPI;
|
||||
|
||||
type
|
||||
|
||||
TNewUnit = class(TNotifierObject, IOTACreator, IOTAModuleCreator)
|
||||
private
|
||||
FPersonality : string;
|
||||
protected
|
||||
//Specific to class
|
||||
FFormName: string;
|
||||
FImplFileName: string;
|
||||
FIntfFileName: string;
|
||||
FAncestorName: string;
|
||||
procedure SetAncestorName(const Value: string); virtual;
|
||||
procedure SetFormName(const Value: string); virtual;
|
||||
procedure SetImplFileName(const Value: string); virtual;
|
||||
procedure SetIntfFileName(const Value: string); virtual;
|
||||
// IOTACreator
|
||||
function GetCreatorType: string; virtual;
|
||||
function GetExisting: Boolean;
|
||||
function GetFileSystem: string;
|
||||
function GetOwner: IOTAModule;
|
||||
function GetUnnamed: Boolean;
|
||||
// IOTAModuleCreator
|
||||
function GetAncestorName: string;
|
||||
function GetImplFileName: string;
|
||||
function GetIntfFileName: string;
|
||||
function GetFormName: string;
|
||||
function GetMainForm: Boolean;
|
||||
function GetShowForm: Boolean;
|
||||
function GetShowSource: Boolean;
|
||||
function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile; virtual;
|
||||
function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; virtual;
|
||||
function NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; virtual;
|
||||
procedure FormCreated(const FormEditor: IOTAFormEditor); virtual;
|
||||
public
|
||||
property FormName: string read GetFormName write SetFormName;
|
||||
property ImplFileName: string read GetImplFileName write SetImplFileName;
|
||||
property IntfFileName: string read GetIntfFileName write SetIntfFileName;
|
||||
property AncestorName: string read GetAncestorName write SetAncestorName;
|
||||
property Personality: string read FPersonality write FPersonality;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TUnitCreator }
|
||||
|
||||
procedure TNewUnit.FormCreated(const FormEditor: IOTAFormEditor);
|
||||
begin
|
||||
end;
|
||||
|
||||
function TNewUnit.GetAncestorName: string;
|
||||
begin
|
||||
Result := FAncestorName;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetCreatorType: string;
|
||||
begin
|
||||
Result := sUnit;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetExisting: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetFileSystem: string;
|
||||
begin
|
||||
Result := '';
|
||||
end;
|
||||
|
||||
function TNewUnit.GetFormName: string;
|
||||
begin
|
||||
Result := FFormName;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetImplFileName: string;
|
||||
begin
|
||||
Result := FImplFileName;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetIntfFileName: string;
|
||||
begin
|
||||
Result := FIntfFileName;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetMainForm: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetOwner: IOTAModule;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetShowForm: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetShowSource: Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TNewUnit.GetUnnamed: Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
function TNewUnit.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TNewUnit.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
function TNewUnit.NewIntfSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
|
||||
begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure TNewUnit.SetAncestorName(const Value: string);
|
||||
begin
|
||||
FAncestorName := Value;
|
||||
end;
|
||||
|
||||
procedure TNewUnit.SetFormName(const Value: string);
|
||||
begin
|
||||
FFormName := Value;
|
||||
end;
|
||||
|
||||
procedure TNewUnit.SetImplFileName(const Value: string);
|
||||
begin
|
||||
FImplFileName := Value;
|
||||
end;
|
||||
|
||||
procedure TNewUnit.SetIntfFileName(const Value: string);
|
||||
begin
|
||||
FIntfFileName := Value;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
|
||||
end.
|
97
Expert/DMVC.Expert.CodeGen.NewWebModuleUnit.pas
Normal file
97
Expert/DMVC.Expert.CodeGen.NewWebModuleUnit.pas
Normal file
@ -0,0 +1,97 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.NewWebModuleUnit;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
DMVC.Expert.CodeGen.NewUnit;
|
||||
|
||||
type
|
||||
TNewWebModuleUnitEx = class(TNewUnit)
|
||||
private
|
||||
FUnitIdent, FFormName, FFileName : String;
|
||||
protected
|
||||
FWebModuleClassName : string;
|
||||
FControllerClassName: string;
|
||||
FControllerUnit: string;
|
||||
function GetCreatorType: string; override;
|
||||
function NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile; override;
|
||||
function NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile; override;
|
||||
public
|
||||
constructor Create(const aWebModuleClassName: string; aControllerClassName: string; aControllerUnit: string; const APersonality : String = '' );
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Winapi.Windows,
|
||||
System.SysUtils,
|
||||
VCL.Dialogs,
|
||||
DMVC.Expert.CodeGen.Templates,
|
||||
DMVC.Expert.CodeGen.SourceFile;
|
||||
|
||||
constructor TNewWebModuleUnitEx.Create(const aWebModuleClassName : string; aControllerClassName: string; aControllerUnit: string; const APersonality : String = '' );
|
||||
begin
|
||||
Assert(Length(aWebModuleClassName) > 0);
|
||||
FAncestorName := '';
|
||||
FFormName := '';
|
||||
FImplFileName := '';
|
||||
FIntfFileName := '';
|
||||
FWebModuleClassName := aWebModuleClassName;
|
||||
FControllerClassName := aControllerClassName;
|
||||
FControllerUnit := aControllerUnit;
|
||||
Personality := APersonality;
|
||||
(BorlandIDEServices as IOTAModuleServices).GetNewModuleAndClassName( '', FUnitIdent, FFormName, FFileName);
|
||||
end;
|
||||
|
||||
function TNewWebModuleUnitEx.GetCreatorType: string;
|
||||
begin
|
||||
Result := sForm;
|
||||
end;
|
||||
|
||||
function TNewWebModuleUnitEx.NewFormFile(const FormIdent, AncestorIdent: string): IOTAFile;
|
||||
begin
|
||||
Result := TSourceFile.Create(sWebModuleDFM, [FormIdent, FWebModuleClassName]);
|
||||
end;
|
||||
|
||||
function TNewWebModuleUnitEx.NewImplSource(const ModuleIdent, FormIdent, AncestorIdent: string): IOTAFile;
|
||||
begin
|
||||
//ModuleIdent is blank for some reason.
|
||||
// http://stackoverflow.com/questions/4196412/how-do-you-retrieve-a-new-unit-name-from-delphis-open-tools-api
|
||||
// So using method mentioned by Marco Cantu.
|
||||
Result := TSourceFile.Create(sWebModuleUnit, [FUnitIdent, FWebModuleClassName, FControllerUnit, FControllerClassName]);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
end.
|
70
Expert/DMVC.Expert.CodeGen.SourceFile.pas
Normal file
70
Expert/DMVC.Expert.CodeGen.SourceFile.pas
Normal file
@ -0,0 +1,70 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.SourceFile;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.SysUtils,
|
||||
System.Classes,
|
||||
ToolsAPI;
|
||||
|
||||
type
|
||||
TSourceFile = class(TInterfacedObject, IOTAFile)
|
||||
private
|
||||
FSource: string;
|
||||
public
|
||||
function GetSource: string;
|
||||
function GetAge: TDateTime;
|
||||
constructor Create(const Source: string; const Args: array of const );
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TSourceFile }
|
||||
|
||||
constructor TSourceFile.Create(const Source: string; const Args: array of const );
|
||||
begin
|
||||
FSource := Format(Source, Args);
|
||||
end;
|
||||
|
||||
function TSourceFile.GetAge: TDateTime;
|
||||
begin
|
||||
Result := Now;
|
||||
end;
|
||||
|
||||
function TSourceFile.GetSource: string;
|
||||
begin
|
||||
Result := FSource;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
192
Expert/DMVC.Expert.CodeGen.Templates.pas
Normal file
192
Expert/DMVC.Expert.CodeGen.Templates.pas
Normal file
@ -0,0 +1,192 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.CodeGen.Templates;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
|
||||
{ Delphi template code }
|
||||
|
||||
sDMVCDPR = 'program %0:s;'#13#10 +
|
||||
#13#10 +
|
||||
' {$APPTYPE CONSOLE}'#13#10 +
|
||||
''#13#10 +
|
||||
'uses'#13#10 +
|
||||
' System.SysUtils,'#13#10 +
|
||||
' Winapi.Windows,'#13#10 +
|
||||
' Winapi.ShellAPI,'#13#10 +
|
||||
' Web.WebReq,'#13#10 +
|
||||
' Web.WebBroker,'#13#10 +
|
||||
' IdHTTPWebBrokerBridge;'#13#10 +
|
||||
''#13#10 +
|
||||
'{$R *.res}'#13#10 +
|
||||
#13#10 +
|
||||
'procedure RunServer(APort: Integer);'#13#10 +
|
||||
'var'#13#10 +
|
||||
' LInputRecord: TInputRecord;'#13#10 +
|
||||
' LEvent: DWord;'#13#10 +
|
||||
' LHandle: THandle;'#13#10 +
|
||||
' LServer: TIdHTTPWebBrokerBridge;'#13#10 +
|
||||
'begin'#13#10 +
|
||||
' Writeln(Format(''Starting HTTP Server or port %%d'', [APort]));'#13#10 +
|
||||
' LServer := TIdHTTPWebBrokerBridge.Create(nil);'#13#10 +
|
||||
' try'#13#10 +
|
||||
' LServer.DefaultPort := APort;'#13#10 +
|
||||
' LServer.Active := True;'#13#10 +
|
||||
' ShellExecute(0, ''open'', pChar(''http://localhost:'' + inttostr(APort)), nil, nil, SW_SHOWMAXIMIZED);'#13#10 +
|
||||
' Writeln(''Press ESC to stop the server'');'#13#10 +
|
||||
' LHandle := GetStdHandle(STD_INPUT_HANDLE);'#13#10 +
|
||||
' while True do'#13#10 +
|
||||
' begin'#13#10 +
|
||||
' Win32Check(ReadConsoleInput(LHandle, LInputRecord, 1, LEvent));'#13#10 +
|
||||
' if (LInputRecord.EventType = KEY_EVENT) and'#13#10 +
|
||||
' LInputRecord.Event.KeyEvent.bKeyDown and'#13#10 +
|
||||
' (LInputRecord.Event.KeyEvent.wVirtualKeyCode = VK_ESCAPE) then'#13#10 +
|
||||
' break;'#13#10 +
|
||||
' end;'#13#10 +
|
||||
' finally'#13#10 +
|
||||
' LServer.Free;'#13#10 +
|
||||
' end;'#13#10 +
|
||||
'end;'#13#10 +
|
||||
#13#10 +
|
||||
'begin'#13#10 +
|
||||
' ReportMemoryLeaksOnShutdown := True;'#13#10 +
|
||||
' try'#13#10 +
|
||||
' if WebRequestHandler <> nil then'#13#10 +
|
||||
' WebRequestHandler.WebModuleClass := WebModuleClass;'#13#10 +
|
||||
' WebRequestHandlerProc.MaxConnections := 1024;'#13#10 +
|
||||
' RunServer(3000);'#13#10 +
|
||||
' except'#13#10 +
|
||||
' on E: Exception do'#13#10 +
|
||||
' Writeln(E.ClassName, '': '', E.Message);'#13#10 +
|
||||
' end;'#13#10 +
|
||||
'end.'#13#10;
|
||||
|
||||
|
||||
// 0 - Unit Name
|
||||
// 1 - Class Name
|
||||
// 2 - Index Method - Interface
|
||||
// 3 - Index Method - Implementation
|
||||
sControllerUnit = 'unit %0:s;'#13#10 +
|
||||
#13#10 +
|
||||
'interface'#13#10 +
|
||||
#13#10 +
|
||||
'uses'#13#10 +
|
||||
' MVCFramework;'#13#10 +
|
||||
#13#10 +
|
||||
'type'#13#10 +
|
||||
#13#10 +
|
||||
' %1:s = class(TMVCController) '#13#10 +
|
||||
' public'#13#10 +
|
||||
'%2:s' +
|
||||
' end;'#13#10 +
|
||||
#13#10 +
|
||||
'implementation'#13#10 +
|
||||
#13#10 +
|
||||
'%3:s'#13#10 +
|
||||
#13#10 +
|
||||
'end.'#13#10;
|
||||
|
||||
sIndexMethodIntf =
|
||||
' [MVCPath(''/'')]'#13#10 +
|
||||
' [MVCHTTPMethod([httpGET])]'#13#10 +
|
||||
' procedure Index(ctx: TWebContext);'#13#10;
|
||||
|
||||
// 0 - Class Name
|
||||
sIndexMethodImpl =
|
||||
'procedure %0:s.Index(ctx: TWebContext);'#13#10 +
|
||||
'begin'#13#10 +
|
||||
#13#10 +
|
||||
'end;';
|
||||
|
||||
|
||||
sDefaultControllerName = 'TMyController';
|
||||
sDefaultWebModuleName = 'TMyWebModule';
|
||||
|
||||
|
||||
// 0 = unit name
|
||||
// 1 = webmodule classname
|
||||
// 2 = controller unit
|
||||
// 3 - controller class name
|
||||
sWebModuleUnit =
|
||||
'unit %0:s;'#13#10 +
|
||||
''#13#10 +
|
||||
'interface'#13#10 +
|
||||
#13#10 +
|
||||
'uses System.SysUtils,'#13#10 +
|
||||
' System.Classes,'#13#10 +
|
||||
' Web.HTTPApp,'#13#10 +
|
||||
' MVCFramework;'#13#10 +
|
||||
#13#10 +
|
||||
'type'#13#10 +
|
||||
' %1:s = class(TWebModule)'#13#10 +
|
||||
' procedure WebModuleCreate(Sender: TObject);'#13#10 +
|
||||
' procedure WebModuleDestroy(Sender: TObject);'#13#10 +
|
||||
' private'#13#10 +
|
||||
' MVC: TMVCEngine;'#13#10 +
|
||||
' public'#13#10 +
|
||||
' { Public declarations }'#13#10 +
|
||||
' end;'#13#10 +
|
||||
#13#10 +
|
||||
'var'#13#10 +
|
||||
' WebModuleClass: TComponentClass = %1:s;'#13#10 +
|
||||
#13#10 +
|
||||
'implementation'#13#10 +
|
||||
#13#10 +
|
||||
'{$R *.dfm}'#13#10 +
|
||||
#13#10 +
|
||||
'uses %2:s;'#13#10 +
|
||||
#13#10 +
|
||||
'procedure %1:s.WebModuleCreate(Sender: TObject);'#13#10 +
|
||||
'begin'#13#10 +
|
||||
' MVC := TMVCEngine.Create(Self);'#13#10 +
|
||||
' MVC.AddController(%3:s);'#13#10 +
|
||||
'end;'#13#10 +
|
||||
#13#10 +
|
||||
'procedure %1:s.WebModuleDestroy(Sender: TObject);'#13#10 +
|
||||
'begin'#13#10 +
|
||||
' MVC.Free;'#13#10 +
|
||||
'end;'#13#10 +
|
||||
#13#10 +
|
||||
'end.'#13#10;
|
||||
|
||||
|
||||
sWebModuleDFM =
|
||||
'object %0:s: %1:s'#13#10 +
|
||||
' OldCreateOrder = False'#13#10 +
|
||||
' Height = 230'#13#10 +
|
||||
' Width = 415'#13#10 +
|
||||
'end';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
127
Expert/DMVC.Expert.Forms.NewProjectWizard.dfm
Normal file
127
Expert/DMVC.Expert.Forms.NewProjectWizard.dfm
Normal file
@ -0,0 +1,127 @@
|
||||
object frmDMVCNewProject: TfrmDMVCNewProject
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'New DUnitX Project Wizard'
|
||||
ClientHeight = 311
|
||||
ClientWidth = 284
|
||||
Color = clBtnFace
|
||||
Constraints.MinHeight = 145
|
||||
Constraints.MinWidth = 250
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poMainFormCenter
|
||||
OnCreate = FormCreate
|
||||
DesignSize = (
|
||||
284
|
||||
311)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object lblWbModule: TLabel
|
||||
Left = 24
|
||||
Top = 45
|
||||
Width = 114
|
||||
Height = 13
|
||||
Caption = 'WebModule Class Name'
|
||||
end
|
||||
object gbControllerUnitOptions: TGroupBox
|
||||
Left = 8
|
||||
Top = 144
|
||||
Width = 268
|
||||
Height = 121
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Controller Unit Options'
|
||||
TabOrder = 2
|
||||
DesignSize = (
|
||||
268
|
||||
121)
|
||||
object lblClassName: TLabel
|
||||
Left = 16
|
||||
Top = 54
|
||||
Width = 105
|
||||
Height = 13
|
||||
Caption = 'Controller Class Name'
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 16
|
||||
Top = -48
|
||||
Width = 31
|
||||
Height = 13
|
||||
Caption = 'Label1'
|
||||
end
|
||||
object chkCreateIndexMethod: TCheckBox
|
||||
Left = 16
|
||||
Top = 31
|
||||
Width = 236
|
||||
Height = 17
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Create Index Method'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object edtClassName: TEdit
|
||||
Left = 16
|
||||
Top = 73
|
||||
Width = 236
|
||||
Height = 21
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 120
|
||||
Top = 278
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 3
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 201
|
||||
Top = 278
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 4
|
||||
end
|
||||
object chkCreateControllerUnit: TCheckBox
|
||||
Left = 24
|
||||
Top = 107
|
||||
Width = 217
|
||||
Height = 17
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Create Controller Unit'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 1
|
||||
OnClick = chkCreateControllerUnitClick
|
||||
end
|
||||
object chkAddToProjectGroup: TCheckBox
|
||||
Left = 24
|
||||
Top = 10
|
||||
Width = 268
|
||||
Height = 17
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Add to Existing Project Group'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
object edtWebModuleName: TEdit
|
||||
Left = 24
|
||||
Top = 64
|
||||
Width = 236
|
||||
Height = 21
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
109
Expert/DMVC.Expert.Forms.NewProjectWizard.pas
Normal file
109
Expert/DMVC.Expert.Forms.NewProjectWizard.pas
Normal file
@ -0,0 +1,109 @@
|
||||
unit DMVC.Expert.Forms.NewProjectWizard;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
WinAPI.Messages,
|
||||
System.SysUtils,
|
||||
System.Variants,
|
||||
System.Classes,
|
||||
VCL.Graphics,
|
||||
VCL.Controls,
|
||||
VCL.Forms,
|
||||
VCL.Dialogs,
|
||||
VCL.StdCtrls;
|
||||
|
||||
type
|
||||
TfrmDMVCNewProject = class(TForm)
|
||||
gbControllerUnitOptions: TGroupBox;
|
||||
btnOK: TButton;
|
||||
btnCancel: TButton;
|
||||
chkCreateIndexMethod: TCheckBox;
|
||||
chkCreateControllerUnit: TCheckBox;
|
||||
chkAddToProjectGroup: TCheckBox;
|
||||
edtClassName: TEdit;
|
||||
lblClassName: TLabel;
|
||||
edtWebModuleName: TEdit;
|
||||
Label1: TLabel;
|
||||
lblWbModule: TLabel;
|
||||
procedure chkCreateControllerUnitClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
function GetAddToProjectGroup: boolean;
|
||||
function GetCreateIndexMethod: boolean;
|
||||
function GetCreateControllerUnit: boolean;
|
||||
function GetControllerClassName: string;
|
||||
function GetWebModuleClassName: string;
|
||||
public
|
||||
{ Public declarations }
|
||||
// Read Only Properties to extract values without having to know control values.
|
||||
property ControllerClassName: string read GetControllerClassName;
|
||||
property CreateControllerUnit: Boolean read GetCreateControllerUnit;
|
||||
property AddToProjectGroup: Boolean read GetAddToProjectGroup;
|
||||
property CreateIndexMethod: Boolean read GetCreateIndexMethod;
|
||||
property WebModuleClassName: string read GetWebModuleClassName;
|
||||
end;
|
||||
|
||||
var
|
||||
frmDMVCNewProject: TfrmDMVCNewProject;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DMVC.Expert.CodeGen.Templates;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDMVCNewProject.chkCreateControllerUnitClick(Sender: TObject);
|
||||
begin
|
||||
gbControllerUnitOptions.Enabled := chkCreateIndexMethod.Checked;
|
||||
chkCreateIndexMethod.Enabled := chkCreateControllerUnit.Checked;
|
||||
edtClassName.Enabled := chkCreateControllerUnit.Checked;
|
||||
end;
|
||||
|
||||
procedure TfrmDMVCNewProject.FormCreate(Sender: TObject);
|
||||
begin
|
||||
edtClassName.TextHint := sDefaultControllerName;
|
||||
edtWebModuleName.TextHint := sDefaultWebModuleName;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewProject.GetAddToProjectGroup: boolean;
|
||||
begin
|
||||
Result := chkAddToProjectGroup.Checked;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewProject.GetCreateIndexMethod: boolean;
|
||||
begin
|
||||
Result := chkCreateIndexMethod.Checked;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewProject.GetWebModuleClassName: string;
|
||||
begin
|
||||
if Trim(edtWebModuleName.Text) = '' then
|
||||
begin
|
||||
Result := sDefaultWebModuleName
|
||||
end else
|
||||
begin
|
||||
Result := Trim(edtWebModuleName.Text);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewProject.GetCreateControllerUnit: boolean;
|
||||
begin
|
||||
Result := chkCreateControllerUnit.Checked;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewProject.GetControllerClassName: string;
|
||||
begin
|
||||
if Trim(edtClassName.Text) = '' then
|
||||
begin
|
||||
Result := sDefaultControllerName
|
||||
end else
|
||||
begin
|
||||
Result := Trim(edtClassName.Text);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
83
Expert/DMVC.Expert.Forms.NewUnitWizard.dfm
Normal file
83
Expert/DMVC.Expert.Forms.NewUnitWizard.dfm
Normal file
@ -0,0 +1,83 @@
|
||||
object frmDMVCNewUnit: TfrmDMVCNewUnit
|
||||
Left = 0
|
||||
Top = 0
|
||||
Caption = 'New DMVC Controller Unit Wizard'
|
||||
ClientHeight = 163
|
||||
ClientWidth = 262
|
||||
Color = clBtnFace
|
||||
Constraints.MinHeight = 145
|
||||
Constraints.MinWidth = 250
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
OldCreateOrder = False
|
||||
Position = poMainFormCenter
|
||||
OnCreate = FormCreate
|
||||
DesignSize = (
|
||||
262
|
||||
163)
|
||||
PixelsPerInch = 96
|
||||
TextHeight = 13
|
||||
object GroupBox1: TGroupBox
|
||||
Left = 8
|
||||
Top = 8
|
||||
Width = 246
|
||||
Height = 113
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Controller Unit Options'
|
||||
TabOrder = 0
|
||||
DesignSize = (
|
||||
246
|
||||
113)
|
||||
object lblClassName: TLabel
|
||||
Left = 16
|
||||
Top = 70
|
||||
Width = 105
|
||||
Height = 13
|
||||
Caption = 'Controller Class Name'
|
||||
end
|
||||
object edtClassName: TEdit
|
||||
Left = 16
|
||||
Top = 89
|
||||
Width = 220
|
||||
Height = 21
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
TabOrder = 1
|
||||
end
|
||||
object chkCreateIndexMethod: TCheckBox
|
||||
Left = 16
|
||||
Top = 32
|
||||
Width = 218
|
||||
Height = 17
|
||||
Anchors = [akLeft, akTop, akRight]
|
||||
Caption = 'Create Index Method'
|
||||
Checked = True
|
||||
State = cbChecked
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 98
|
||||
Top = 130
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 1
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 179
|
||||
Top = 130
|
||||
Width = 75
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
98
Expert/DMVC.Expert.Forms.NewUnitWizard.pas
Normal file
98
Expert/DMVC.Expert.Forms.NewUnitWizard.pas
Normal file
@ -0,0 +1,98 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.Forms.NewUnitWizard;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
WinAPI.Windows,
|
||||
WinAPI.Messages,
|
||||
System.SysUtils,
|
||||
System.Variants,
|
||||
System.Classes,
|
||||
VCL.Graphics,
|
||||
VCL.Controls,
|
||||
VCL.Forms,
|
||||
VCL.Dialogs,
|
||||
VCL.StdCtrls;
|
||||
|
||||
type
|
||||
TfrmDMVCNewUnit = class(TForm)
|
||||
GroupBox1: TGroupBox;
|
||||
btnOK: TButton;
|
||||
btnCancel: TButton;
|
||||
lblClassName: TLabel;
|
||||
edtClassName: TEdit;
|
||||
chkCreateIndexMethod: TCheckBox;
|
||||
procedure FormCreate(Sender: TObject);
|
||||
private
|
||||
function GetCreateIndexMethod: boolean;
|
||||
function GetControllerClassName: string;
|
||||
{ Private declarations }
|
||||
public
|
||||
{ Public declarations }
|
||||
property ControllerClassName : string read GetControllerClassName;
|
||||
property CreateIndexMethod : boolean read GetCreateIndexMethod;
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
frmDMVCNewUnit: TfrmDMVCNewUnit;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DMVC.Expert.CodeGen.Templates;
|
||||
|
||||
{$R *.dfm}
|
||||
|
||||
procedure TfrmDMVCNewUnit.FormCreate(Sender: TObject);
|
||||
begin
|
||||
edtClassName.TextHint := sDefaultControllerName;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewUnit.GetCreateIndexMethod: boolean;
|
||||
begin
|
||||
Result := chkCreateIndexMethod.Checked;
|
||||
end;
|
||||
|
||||
function TfrmDMVCNewUnit.GetControllerClassName: string;
|
||||
begin
|
||||
if Trim(edtClassName.Text) = '' then
|
||||
begin
|
||||
Result := sDefaultControllerName
|
||||
end else
|
||||
begin
|
||||
Result := Trim(edtClassName.Text);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
BIN
Expert/DMVC.Expert.NewProject.ico
Normal file
BIN
Expert/DMVC.Expert.NewProject.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 31 KiB |
BIN
Expert/DMVC.Expert.NewUnit.ico
Normal file
BIN
Expert/DMVC.Expert.NewUnit.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 57 KiB |
166
Expert/DMVC.Expert.NewUnitWizard.pas
Normal file
166
Expert/DMVC.Expert.NewUnitWizard.pas
Normal file
@ -0,0 +1,166 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ DUnitX }
|
||||
{ }
|
||||
{ Copyright (C) 2015 Vincent Parrett & Contributors }
|
||||
{ }
|
||||
{ vincent@finalbuilder.com }
|
||||
{ http://www.finalbuilder.com }
|
||||
{ }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DUnitX.Expert.NewUnitWizard;
|
||||
|
||||
interface
|
||||
|
||||
{$I DUnitX.inc}
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
{$IFDEF USE_NS}
|
||||
VCL.Graphics;
|
||||
{$ELSE}
|
||||
Graphics;
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
TDUnitXNewUnitWizard = class(TNotifierObject, IOTAWizard,
|
||||
IOTARepositoryWizard, IOTARepositoryWizard80, IOTAProjectWizard)
|
||||
protected
|
||||
FIcon: TIcon;
|
||||
public
|
||||
// IOTARepositoryWizard80
|
||||
function GetGalleryCategory: IOTAGalleryCategory;
|
||||
function GetPersonality: string;
|
||||
// IOTARepositoryWizard60
|
||||
function GetDesigner: string;
|
||||
// IOTARepositoryWizard
|
||||
function GetAuthor: string;
|
||||
function GetComment: string;
|
||||
function GetPage: string;
|
||||
function GetGlyph: Cardinal;
|
||||
|
||||
// IOTAWizard
|
||||
function GetIDString: string;
|
||||
function GetName: string;
|
||||
function GetState: TWizardState;
|
||||
{ Launch the AddIn }
|
||||
procedure Execute;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DUnitX.Expert.Forms.NewUnitWizard,
|
||||
DUnitX.Expert.CodeGen.NewTestUnit,
|
||||
Controls,
|
||||
Forms,
|
||||
Windows;
|
||||
|
||||
{ TNewBatchJobWizard }
|
||||
|
||||
constructor TDUnitXNewUnitWizard.Create;
|
||||
begin
|
||||
FIcon := TIcon.Create;
|
||||
FIcon.LoadFromResourceName(HInstance, 'DUnitXNewUnitIcon');
|
||||
end;
|
||||
|
||||
destructor TDUnitXNewUnitWizard.Destroy;
|
||||
begin
|
||||
FIcon.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TDUnitXNewUnitWizard.Execute;
|
||||
var
|
||||
WizardForm : TfrmDunitXNewUnit;
|
||||
ModuleServices : IOTAModuleServices;
|
||||
Project : IOTAProject;
|
||||
TestUnit : IOTAModule;
|
||||
begin
|
||||
WizardForm := TfrmDunitXNewUnit.Create(Application);
|
||||
try
|
||||
if WizardForm.ShowModal = mrOk then
|
||||
begin
|
||||
ModuleServices := (BorlandIDEServices as IOTAModuleServices);
|
||||
Project := GetActiveProject;
|
||||
TestUnit := ModuleServices.CreateModule(
|
||||
TNewTestUnit.Create(WizardForm.CreateSetupTearDownMethods,
|
||||
WizardForm.CreateSampleMethods,
|
||||
WizardForm.TestFixtureClasaName ));
|
||||
Project.AddFile(TestUnit.FileName,true);
|
||||
end;
|
||||
finally
|
||||
WizardForm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetAuthor: string;
|
||||
begin
|
||||
result := 'DUnitX Team - https://github.com/VSoftTechnologies/DUnitX';
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetComment: string;
|
||||
begin
|
||||
result := 'Create New DUnitX Test Unit';
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetDesigner: string;
|
||||
begin
|
||||
result := dAny;
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetGalleryCategory: IOTAGalleryCategory;
|
||||
begin
|
||||
result := (BorlandIDEServices as IOTAGalleryCategoryManager)
|
||||
.FindCategory(sCategoryDelphiNewFiles);
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetGlyph: Cardinal;
|
||||
begin
|
||||
result := CopyIcon(FIcon.Handle);
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetIDString: string;
|
||||
begin
|
||||
result := 'DunitX.Wizard.NewUnitWizard';
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetName: string;
|
||||
begin
|
||||
result := 'DUnitX Unit';
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetPage: string;
|
||||
begin
|
||||
result := 'Delphi Files';
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetPersonality: string;
|
||||
begin
|
||||
result := sDelphiPersonality;
|
||||
end;
|
||||
|
||||
function TDUnitXNewUnitWizard.GetState: TWizardState;
|
||||
begin
|
||||
result := [wsEnabled];
|
||||
end;
|
||||
|
||||
end.
|
99
Expert/DMVC.Expert.NewUnitWizardEx.pas
Normal file
99
Expert/DMVC.Expert.NewUnitWizardEx.pas
Normal file
@ -0,0 +1,99 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.NewUnitWizardEx;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
VCL.Graphics,
|
||||
PlatformAPI;
|
||||
|
||||
type
|
||||
TDMVCNewUnitWizard = class
|
||||
public
|
||||
class procedure RegisterDMVCNewUnitWizard(const APersonality: string);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DMVC.Expert.Forms.NewUnitWizard,
|
||||
DMVC.Expert.CodeGen.NewControllerUnit,
|
||||
Controls,
|
||||
Forms,
|
||||
Windows,
|
||||
ExpertsRepository;
|
||||
|
||||
resourcestring
|
||||
sNewDMVCUnitCaption = 'DMVC Unit';
|
||||
sNewDMVCProjectHint = 'Create New DMVC Controller Unit';
|
||||
|
||||
class procedure TDMVCNewUnitWizard.RegisterDMVCNewUnitWizard(const aPersonality: string);
|
||||
begin
|
||||
RegisterPackageWizard(TExpertsRepositoryProjectWizardWithProc.Create(aPersonality,
|
||||
sNewDMVCProjectHint, sNewDMVCUnitCaption, 'DMVC.Wizard.NewUnitWizard', // do not localize
|
||||
'DMVC', 'DMVC Team - https://github.com/danieleteti/delphimvcframework', // do not localize
|
||||
procedure
|
||||
var
|
||||
WizardForm : TfrmDMVCNewUnit;
|
||||
ModuleServices : IOTAModuleServices;
|
||||
Project : IOTAProject;
|
||||
ControllerUnit : IOTAModule;
|
||||
begin
|
||||
WizardForm := TfrmDMVCNewUnit.Create(Application);
|
||||
try
|
||||
if WizardForm.ShowModal = mrOk then
|
||||
begin
|
||||
ModuleServices := (BorlandIDEServices as IOTAModuleServices);
|
||||
Project := GetActiveProject;
|
||||
ControllerUnit := ModuleServices.CreateModule(
|
||||
TNewControllerUnitEx.Create(WizardForm.CreateIndexMethod,
|
||||
WizardForm.ControllerClassName,
|
||||
aPersonality));
|
||||
if Project <> nil then
|
||||
begin
|
||||
Project.AddFile(ControllerUnit.FileName,true);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
WizardForm.Free;
|
||||
end;
|
||||
end,
|
||||
function: Cardinal
|
||||
begin
|
||||
Result := LoadIcon(HInstance,'DMVCNewUnitIcon');
|
||||
end,
|
||||
TArray<string>.Create(cWin32Platform, cWin64Platform),
|
||||
nil));
|
||||
end;
|
||||
|
||||
end.
|
185
Expert/DMVC.Expert.ProjectWizard.pas
Normal file
185
Expert/DMVC.Expert.ProjectWizard.pas
Normal file
@ -0,0 +1,185 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ DUnitX }
|
||||
{ }
|
||||
{ Copyright (C) 2015 Vincent Parrett & Contributors }
|
||||
{ }
|
||||
{ vincent@finalbuilder.com }
|
||||
{ http://www.finalbuilder.com }
|
||||
{ }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DUnitX.Expert.ProjectWizard;
|
||||
|
||||
interface
|
||||
|
||||
{$I DUnitX.inc}
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
{$IFDEF USE_NS}
|
||||
VCL.Graphics;
|
||||
{$ELSE}
|
||||
Graphics;
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
type
|
||||
TDUnitXNewProjectWizard = class(TNotifierObject,IOTAWizard,IOTARepositoryWizard, IOTARepositoryWizard80, IOTAProjectWizard)
|
||||
protected
|
||||
FIcon : TIcon;
|
||||
public
|
||||
// IOTARepositoryWizard80
|
||||
function GetGalleryCategory: IOTAGalleryCategory;
|
||||
function GetPersonality: string;
|
||||
// IOTARepositoryWizard60
|
||||
function GetDesigner: string;
|
||||
// IOTARepositoryWizard
|
||||
function GetAuthor: string;
|
||||
function GetComment: string;
|
||||
function GetPage: string;
|
||||
function GetGlyph: Cardinal;
|
||||
|
||||
|
||||
// IOTAWizard
|
||||
function GetIDString: string;
|
||||
function GetName: string;
|
||||
function GetState: TWizardState;
|
||||
{ Launch the AddIn }
|
||||
procedure Execute;
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DUnitX.Expert.Forms.NewProjectWizard,
|
||||
DUnitX.Expert.CodeGen.NewTestProject,
|
||||
DUnitX.Expert.CodeGen.NewTestUnit,
|
||||
DccStrs,
|
||||
Controls,
|
||||
Forms,
|
||||
Windows;
|
||||
|
||||
{ TNewBatchJobWizard }
|
||||
|
||||
constructor TDUnitXNewProjectWizard.Create;
|
||||
begin
|
||||
FIcon := TIcon.create;
|
||||
FIcon.LoadFromResourceName(HInstance,'DUnitXNewProjectIcon');
|
||||
end;
|
||||
|
||||
destructor TDUnitXNewProjectWizard.Destroy;
|
||||
begin
|
||||
FIcon.Free;
|
||||
inherited;
|
||||
end;
|
||||
|
||||
procedure TDUnitXNewProjectWizard.Execute;
|
||||
var
|
||||
WizardForm : TfrmDunitXNewProject;
|
||||
ModuleServices : IOTAModuleServices;
|
||||
Project : IOTAProject;
|
||||
Config : IOTABuildConfiguration;
|
||||
TestUnit : IOTAModule;
|
||||
begin
|
||||
WizardForm := TfrmDunitXNewProject.Create(Application);
|
||||
try
|
||||
if WizardForm.ShowModal = mrOk then
|
||||
begin
|
||||
if not WizardForm.AddToProjectGroup then
|
||||
begin
|
||||
(BorlandIDEServices as IOTAModuleServices).CloseAll;
|
||||
end;
|
||||
ModuleServices := (BorlandIDEServices as IOTAModuleServices);
|
||||
// Create Project Source
|
||||
ModuleServices.CreateModule(TTestProjectFile.Create);
|
||||
Project := GetActiveProject;
|
||||
Config := (Project.ProjectOptions as IOTAProjectOptionsConfigurations).BaseConfiguration;
|
||||
Config.SetValue(sUnitSearchPath,'$(DUnitX)');
|
||||
// Create Test Unit
|
||||
if WizardForm.CreateTestUnit then
|
||||
begin
|
||||
TestUnit := ModuleServices.CreateModule(
|
||||
TNewTestUnit.Create(WizardForm.CreateSetupTearDownMethods,
|
||||
WizardForm.CreateSampleMethods,
|
||||
WizardForm.TestFixtureClasaName ));
|
||||
Project.AddFile(TestUnit.FileName,true);
|
||||
end;
|
||||
|
||||
|
||||
end;
|
||||
finally
|
||||
WizardForm.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetAuthor: string;
|
||||
begin
|
||||
result := 'DUnitX Team - https://github.com/VSoftTechnologies/DUnitX';
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetComment: string;
|
||||
begin
|
||||
result := 'Create New DUnitX Test Project';
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetDesigner: string;
|
||||
begin
|
||||
result := dAny;
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetGalleryCategory: IOTAGalleryCategory;
|
||||
begin
|
||||
result := (BorlandIDEServices as IOTAGalleryCategoryManager).FindCategory(sCategoryDelphiNew);
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetGlyph: Cardinal;
|
||||
begin
|
||||
result := CopyIcon(FIcon.Handle);
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetIDString: string;
|
||||
begin
|
||||
result := 'DunitX.Wizard.NewProjectWizard';
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetName: string;
|
||||
begin
|
||||
result := 'DUnitX Project';
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetPage: string;
|
||||
begin
|
||||
// Results not used if IOTARepositoryWizard80.GetGalleryCategory implemented
|
||||
result := 'Delphi Project';
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetPersonality: string;
|
||||
begin
|
||||
result := sDelphiPersonality;
|
||||
end;
|
||||
|
||||
function TDUnitXNewProjectWizard.GetState: TWizardState;
|
||||
begin
|
||||
result := [wsEnabled];
|
||||
end;
|
||||
|
||||
end.
|
139
Expert/DMVC.Expert.ProjectWizardEx.pas
Normal file
139
Expert/DMVC.Expert.ProjectWizardEx.pas
Normal file
@ -0,0 +1,139 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.ProjectWizardEx;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
VCL.Graphics,
|
||||
PlatformAPI;
|
||||
|
||||
type
|
||||
TDMVCNewProjectWizard = class
|
||||
private
|
||||
class function GetUnitName(aFilename: string): string;
|
||||
public
|
||||
class procedure RegisterDMVCProjectWizard(const APersonality: string);
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
DccStrs,
|
||||
System.IOUtils,
|
||||
Vcl.Controls,
|
||||
Vcl.Forms,
|
||||
WinApi.Windows,
|
||||
System.SysUtils,
|
||||
DMVC.Expert.Forms.NewProjectWizard,
|
||||
DMVC.Expert.CodeGen.NewDMVCProject,
|
||||
DMVC.Expert.CodeGen.NewControllerUnit,
|
||||
DMVC.Expert.CodeGen.NewWebModuleUnit,
|
||||
ExpertsRepository;
|
||||
|
||||
resourcestring
|
||||
sNewDMVCProjectCaption = 'DMVC Project';
|
||||
sNewDMVCProjectHint = 'Create New DMVC Project with Controller';
|
||||
|
||||
{ TDUnitXNewProjectWizard }
|
||||
|
||||
class function TDMVCNewProjectWizard.GetUnitName(aFilename: string): string;
|
||||
begin
|
||||
Result := TPath.GetFileNameWithoutExtension(aFilename);
|
||||
end;
|
||||
|
||||
class procedure TDMVCNewProjectWizard.RegisterDMVCProjectWizard(const APersonality: string);
|
||||
begin
|
||||
RegisterPackageWizard(TExpertsRepositoryProjectWizardWithProc.Create(APersonality,
|
||||
sNewDMVCProjectHint, sNewDMVCProjectCaption, 'DMVC.Wizard.NewProjectWizard', // do not localize
|
||||
'DMVC', 'DMVC Team - https://github.com/danieleteti/delphimvcframework', // do not localize
|
||||
procedure
|
||||
var
|
||||
WizardForm : TfrmDMVCNewProject;
|
||||
ModuleServices : IOTAModuleServices;
|
||||
Project : IOTAProject;
|
||||
Config : IOTABuildConfiguration;
|
||||
ControllerUnit : IOTAModule;
|
||||
WebModuleUnit : IOTAModule;
|
||||
ControllerCreator : IOTACreator;
|
||||
WebModuleCreator : IOTAModuleCreator;
|
||||
begin
|
||||
WizardForm := TfrmDMVCNewProject.Create(Application);
|
||||
try
|
||||
if WizardForm.ShowModal = mrOk then
|
||||
begin
|
||||
if not WizardForm.AddToProjectGroup then
|
||||
begin
|
||||
(BorlandIDEServices as IOTAModuleServices).CloseAll;
|
||||
end;
|
||||
ModuleServices := (BorlandIDEServices as IOTAModuleServices);
|
||||
|
||||
// Create Project Source
|
||||
ModuleServices.CreateModule(TDMVCProjectFile.Create(APersonality));
|
||||
Project := GetActiveProject;
|
||||
|
||||
Config := (Project.ProjectOptions as IOTAProjectOptionsConfigurations).BaseConfiguration;
|
||||
Config.SetValue(sUnitSearchPath,'$(DMVC)');
|
||||
Config.SetValue(sFramework, 'VCL');
|
||||
|
||||
// Create Controller Unit
|
||||
if WizardForm.CreateControllerUnit then
|
||||
begin
|
||||
ControllerCreator := TNewControllerUnitEx.Create(WizardForm.CreateIndexMethod, WizardForm.ControllerClassName, aPersonality);
|
||||
ControllerUnit := ModuleServices.CreateModule(ControllerCreator);
|
||||
if Project <> nil then
|
||||
begin
|
||||
Project.AddFile(ControllerUnit.FileName, True);
|
||||
end;
|
||||
end;
|
||||
|
||||
// Create Webmodule Unit
|
||||
WebModuleCreator := TNewWebModuleUnitEx.Create(WizardForm.WebModuleClassName, WizardForm.ControllerClassName, GetUnitName(ControllerUnit.FileName), APersonality);
|
||||
WebModuleUnit := ModuleServices.CreateModule(WebModuleCreator);
|
||||
if Project <> nil then
|
||||
begin
|
||||
Project.AddFile(WebModuleUnit.FileName, True);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
WizardForm.Free;
|
||||
end;
|
||||
end,
|
||||
function: Cardinal
|
||||
begin
|
||||
Result := LoadIcon(HInstance,'DMVCNewProjectIcon');
|
||||
end,
|
||||
TArray<string>.Create(cWin32Platform, cWin64Platform),
|
||||
nil));
|
||||
end;
|
||||
|
||||
end.
|
52
Expert/DMVC.Expert.Registration.pas
Normal file
52
Expert/DMVC.Expert.Registration.pas
Normal file
@ -0,0 +1,52 @@
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Delphi MVC Framework }
|
||||
{ }
|
||||
{ Copyright (c) 2010-2015 Daniele Teti and the DMVCFramework Team }
|
||||
{ }
|
||||
{ https://github.com/danieleteti/delphimvcframework }
|
||||
{ }
|
||||
{***************************************************************************}
|
||||
{ }
|
||||
{ Licensed under the Apache License, Version 2.0 (the "License"); }
|
||||
{ you may not use this file except in compliance with the License. }
|
||||
{ You may obtain a copy of the License at }
|
||||
{ }
|
||||
{ http://www.apache.org/licenses/LICENSE-2.0 }
|
||||
{ }
|
||||
{ Unless required by applicable law or agreed to in writing, software }
|
||||
{ distributed under the License is distributed on an "AS IS" BASIS, }
|
||||
{ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. }
|
||||
{ See the License for the specific language governing permissions and }
|
||||
{ limitations under the License. }
|
||||
{ }
|
||||
{ This IDE expert is based off of the one included with the DUnitX }
|
||||
{ project. Original source by Robert Love. Adapted by Nick Hodges. }
|
||||
{ }
|
||||
{ The DUnitX project is run by Vincent Parrett and can be found at: }
|
||||
{ }
|
||||
{ https://github.com/VSoftTechnologies/DUnitX }
|
||||
{***************************************************************************}
|
||||
|
||||
unit DMVC.Expert.Registration;
|
||||
|
||||
interface
|
||||
|
||||
//Note: "Register" method name is case senstive.
|
||||
procedure Register;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
ToolsApi,
|
||||
Vcl.Dialogs,
|
||||
DMVC.Expert.ProjectWizardEx,
|
||||
DMVC.Expert.NewUnitWizardEx;
|
||||
|
||||
procedure Register;
|
||||
begin
|
||||
TDMVCNewProjectWizard.RegisterDMVCProjectWizard(sDelphiPersonality);
|
||||
TDMVCNewUnitWizard.RegisterDMVCNewUnitWizard(sDelphiPersonality);
|
||||
end;
|
||||
|
||||
end.
|
52
Expert/DMVC_IDE_Expert_D10Seattle.dpk
Normal file
52
Expert/DMVC_IDE_Expert_D10Seattle.dpk
Normal file
@ -0,0 +1,52 @@
|
||||
package DMVC_IDE_Expert_D10Seattle;
|
||||
|
||||
{$R *.res}
|
||||
{$R *.dres}
|
||||
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DEFINE DEBUG}
|
||||
{$ENDIF IMPLICITBUILDING}
|
||||
{$DESCRIPTION 'DUnitX IDE Expert'}
|
||||
{$DESIGNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl,
|
||||
designide,
|
||||
ExpertsCreators;
|
||||
|
||||
contains
|
||||
DMVC.Expert.CodeGen.SourceFile in 'DMVC.Expert.CodeGen.SourceFile.pas',
|
||||
DMVC.Expert.Registration in 'DMVC.Expert.Registration.pas',
|
||||
DMVC.Expert.Forms.NewUnitWizard in 'DMVC.Expert.Forms.NewUnitWizard.pas' {frmDMVCNewUnit},
|
||||
DMVC.Expert.Forms.NewProjectWizard in 'DMVC.Expert.Forms.NewProjectWizard.pas' {frmDMVCNewProject},
|
||||
DMVC.Expert.CodeGen.NewUnit in 'DMVC.Expert.CodeGen.NewUnit.pas',
|
||||
DMVC.Expert.CodeGen.NewDMVCProject in 'DMVC.Expert.CodeGen.NewDMVCProject.pas',
|
||||
DMVC.Expert.CodeGen.Templates in 'DMVC.Expert.CodeGen.Templates.pas',
|
||||
DMVC.Expert.CodeGen.NewProject in 'DMVC.Expert.CodeGen.NewProject.pas',
|
||||
DMVC.Expert.CodeGen.NewControllerUnit in 'DMVC.Expert.CodeGen.NewControllerUnit.pas',
|
||||
DMVC.Expert.NewUnitWizardEx in 'DMVC.Expert.NewUnitWizardEx.pas',
|
||||
DMVC.Expert.ProjectWizardEx in 'DMVC.Expert.ProjectWizardEx.pas',
|
||||
DMVC.Expert.CodeGen.NewWebModuleUnit in 'DMVC.Expert.CodeGen.NewWebModuleUnit.pas';
|
||||
|
||||
end.
|
588
Expert/DMVC_IDE_Expert_D10Seattle.dproj
Normal file
588
Expert/DMVC_IDE_Expert_D10Seattle.dproj
Normal file
@ -0,0 +1,588 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{516CEAEF-DA74-4CBA-9344-CD4C630B73A8}</ProjectGuid>
|
||||
<MainSource>DMVC_IDE_Expert_D10Seattle.dpk</MainSource>
|
||||
<ProjectVersion>18.1</ProjectVersion>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Package</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice32' and '$(Base)'=='true') or '$(Base_iOSDevice32)'!=''">
|
||||
<Base_iOSDevice32>true</Base_iOSDevice32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='iOSDevice64' and '$(Base)'=='true') or '$(Base_iOSDevice64)'!=''">
|
||||
<Base_iOSDevice64>true</Base_iOSDevice64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='OSX32' and '$(Base)'=='true') or '$(Base_OSX32)'!=''">
|
||||
<Base_OSX32>true</Base_OSX32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_UnitSearchPath>..\;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<SanitizedProjectName>DMVC_IDE_Expert_D10Seattle</SanitizedProjectName>
|
||||
<DCC_Description>DUnitX - IDE Expert</DCC_Description>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DesignOnlyPackage>true</DesignOnlyPackage>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<GenDll>true</GenDll>
|
||||
<GenPackage>true</GenPackage>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
|
||||
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice32)'!=''">
|
||||
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
|
||||
<Base_iOSDevice>true</Base_iOSDevice>
|
||||
<DCC_UsePackage>rtl;$(DCC_UsePackage);$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<Base>true</Base>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_iOSDevice64)'!=''">
|
||||
<DCC_CBuilderOutput>None</DCC_CBuilderOutput>
|
||||
<Base_iOSDevice>true</Base_iOSDevice>
|
||||
<DCC_UsePackage>rtl;$(DCC_UsePackage);$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<Base>true</Base>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_OSX32)'!=''">
|
||||
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>rtl;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DebugDCUs>true</DCC_DebugDCUs>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<Debugger_HostApplication>C:\Program Files (x86)\Embarcadero\Studio\17.0\bin\bds.exe</Debugger_HostApplication>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<DCC_Description>DUnitX IDE Expert</DCC_Description>
|
||||
<DCC_RemoteDebug>false</DCC_RemoteDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="rtl.dcp"/>
|
||||
<DCCReference Include="designide.dcp"/>
|
||||
<DCCReference Include="ExpertsCreators.dcp"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.SourceFile.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.Registration.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.Forms.NewUnitWizard.pas">
|
||||
<Form>frmDMVCNewUnit</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="DMVC.Expert.Forms.NewProjectWizard.pas">
|
||||
<Form>frmDMVCNewProject</Form>
|
||||
<FormType>dfm</FormType>
|
||||
</DCCReference>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.NewUnit.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.NewDMVCProject.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.Templates.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.NewProject.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.NewControllerUnit.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.NewUnitWizardEx.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.ProjectWizardEx.pas"/>
|
||||
<DCCReference Include="DMVC.Expert.CodeGen.NewWebModuleUnit.pas"/>
|
||||
<RcItem Include="DMVC.Expert.NewProject.ico">
|
||||
<ResourceType>ICON</ResourceType>
|
||||
<ResourceId>DMVCNewProjectIcon</ResourceId>
|
||||
</RcItem>
|
||||
<RcItem Include="DMVC.Expert.NewUnit.ico">
|
||||
<ResourceType>ICON</ResourceType>
|
||||
<ResourceId>DMVCNewUnitIcon</ResourceId>
|
||||
</RcItem>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">DMVC_IDE_Expert_D10Seattle.dpk</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
<VersionInfoKeys Name="CFBundleName"/>
|
||||
<VersionInfoKeys Name="CFBundleDisplayName"/>
|
||||
<VersionInfoKeys Name="UIDeviceFamily"/>
|
||||
<VersionInfoKeys Name="CFBundleIdentifier"/>
|
||||
<VersionInfoKeys Name="CFBundleVersion"/>
|
||||
<VersionInfoKeys Name="CFBundlePackageType"/>
|
||||
<VersionInfoKeys Name="CFBundleSignature"/>
|
||||
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
|
||||
<VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
|
||||
<VersionInfoKeys Name="CFBundleExecutable"/>
|
||||
<VersionInfoKeys Name="CFBundleResourceSpecification"/>
|
||||
<VersionInfoKeys Name="LSRequiresIPhoneOS"/>
|
||||
<VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
|
||||
<VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
|
||||
<VersionInfoKeys Name="package"/>
|
||||
<VersionInfoKeys Name="label"/>
|
||||
<VersionInfoKeys Name="versionCode"/>
|
||||
<VersionInfoKeys Name="versionName"/>
|
||||
<VersionInfoKeys Name="persistent"/>
|
||||
<VersionInfoKeys Name="restoreAnyVersion"/>
|
||||
<VersionInfoKeys Name="installLocation"/>
|
||||
<VersionInfoKeys Name="largeHeap"/>
|
||||
<VersionInfoKeys Name="theme"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k230.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp230.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k230.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp230.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Deployment Version="2">
|
||||
<DeployFile LocalName="C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\DMVC_IDE_Expert_D10Seattle.bpl" Configuration="Debug" Class="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<RemoteName>DMVC_IDE_Expert_D10Seattle.bpl</RemoteName>
|
||||
<Overwrite>true</Overwrite>
|
||||
</Platform>
|
||||
</DeployFile>
|
||||
<DeployClass Name="ProjectiOSDeviceResourceRules"/>
|
||||
<DeployClass Name="ProjectOSXResource">
|
||||
<Platform Name="OSX32">
|
||||
<RemoteDir>Contents\Resources</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidClassesDexFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>classes</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon144">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xxhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AdditionalDebugSymbols">
|
||||
<Platform Name="Win32">
|
||||
<RemoteDir>Contents\MacOS</RemoteDir>
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeMipsFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\mips</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch768">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="ProjectOutput">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyFramework">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.framework</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidLibnativeX86File">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\x86</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSDeviceDebug">
|
||||
<Platform Name="iOSDevice64">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1024">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch320">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSInfoPList"/>
|
||||
<DeployClass Name="AndroidLibnativeArmeabiFile">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DebugSymbols">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPad_Launch1536">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage470">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-normal</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon96">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xhdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage640">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-large</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="iPhone_Launch640x1136">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSEntitlements"/>
|
||||
<DeployClass Name="AndroidGDBServer">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon72">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-hdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectOSXInfoPList"/>
|
||||
<DeployClass Name="ProjectOSXEntitlements"/>
|
||||
<DeployClass Name="iPad_Launch2048">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashStyles">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\values</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage426">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-small</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidSplashImageDef">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectiOSResource">
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="ProjectAndroidManifest">
|
||||
<Platform Name="Android">
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_DefaultAppIcon">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="File">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="Android">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>0</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="AndroidServiceOutput">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>library\lib\armeabi-v7a</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Required="true" Name="DependencyPackage">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.bpl</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice64">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSDevice32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="iOSSimulator">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon48">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-mdpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_SplashImage960">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-xlarge</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="Android_LauncherIcon36">
|
||||
<Platform Name="Android">
|
||||
<RemoteDir>res\drawable-ldpi</RemoteDir>
|
||||
<Operation>1</Operation>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<DeployClass Name="DependencyModule">
|
||||
<Platform Name="Win32">
|
||||
<Operation>0</Operation>
|
||||
<Extensions>.dll;.bpl</Extensions>
|
||||
</Platform>
|
||||
<Platform Name="OSX32">
|
||||
<Operation>1</Operation>
|
||||
<Extensions>.dylib</Extensions>
|
||||
</Platform>
|
||||
</DeployClass>
|
||||
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
|
||||
<ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="OSX32" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
|
||||
<ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
|
||||
</Deployment>
|
||||
<Platforms>
|
||||
<Platform value="iOSDevice32">False</Platform>
|
||||
<Platform value="iOSDevice64">False</Platform>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
<UnitTesting>
|
||||
<TestProjectName>C:\dev\DUnitX\Expert\Test\DUnitX_IDE_Expert_XE5Tests.dproj</TestProjectName>
|
||||
</UnitTesting>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
<Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
|
||||
</Project>
|
BIN
Expert/DMVC_IDE_Expert_D10Seattle.res
Normal file
BIN
Expert/DMVC_IDE_Expert_D10Seattle.res
Normal file
Binary file not shown.
2
Expert/DMVC_IDE_Expert_D10SeattleResource.rc
Normal file
2
Expert/DMVC_IDE_Expert_D10SeattleResource.rc
Normal file
@ -0,0 +1,2 @@
|
||||
DMVCNewProjectIcon ICON "DMVC.Expert.NewProject.ico"
|
||||
DMVCNewUnitIcon ICON "DMVC.Expert.NewUnit.ico"
|
BIN
Expert/DUnitX_IDE_Expert_D10Seattle.res
Normal file
BIN
Expert/DUnitX_IDE_Expert_D10Seattle.res
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user