Commit d36b4459 authored by Sandro Camata Santana's avatar Sandro Camata Santana

Ajustes para compatibilização Linux
parent 1f872ceb
...@@ -11,9 +11,12 @@ uses ...@@ -11,9 +11,12 @@ uses
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
SysUtils, SysUtils,
LCLType,
Classes, Classes,
Interfaces, Interfaces,
{$IFDEF DARWIN}
CocoaInt, CocoaInt,
{$ENDIF}
Forms, Forms,
acuObject, acuObject,
utuMessage, utuMessage,
...@@ -37,12 +40,26 @@ uses ...@@ -37,12 +40,26 @@ uses
utuXSD in 'utuXSD.pas', utuXSD in 'utuXSD.pas',
DelphiAddInObj in 'DelphiAddInObj.pas'; DelphiAddInObj in 'DelphiAddInObj.pas';
type
{ ExceptionCatch }
ExceptionCatch= Class
public
procedure CustomExceptionHandler(Sender: TObject; E: Exception);
end;
exports exports
InitializeAddIn, InitializeAddIn,
FinalizeAddIn, FinalizeAddIn,
DoMenuAction; DoMenuAction;
{$R *.res} { ExceptionCatch }
procedure ExceptionCatch.CustomExceptionHandler(Sender: TObject; E: Exception);
begin
Application.MessageBox(PChar(E.message), 'Error...', MB_ICONERROR or MB_OK);
end;
begin begin
ChangeLocaleFormatSetting; ChangeLocaleFormatSetting;
...@@ -50,13 +67,18 @@ begin ...@@ -50,13 +67,18 @@ begin
PersistenceManager.DefaultRepositoryClass := typeOf(acRepositorySQL); PersistenceManager.DefaultRepositoryClass := typeOf(acRepositorySQL);
PersistenceManager.RegisterClass(typeOf(acPersistentObject), acPersistentObjectClassFactory.Create); PersistenceManager.RegisterClass(typeOf(acPersistentObject), acPersistentObjectClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('MS SQL Server', typeOf(acSQLDialectSQLServer), acSQLDialectSQLServerClassFactory.Create); gSQLDialectManager.RegisterSQLDialect('MS SQL Server', typeOf(acSQLDialectSQLServer), acSQLDialectSQLServerClassFactory.Create);
// gSQLDialectManager.RegisterSQLDialect('Oracle', typeOf(acSQLDialectOracle), acSQLDialectOracleClassFactory.Create); gSQLDialectManager.RegisterSQLDialect('Oracle', typeOf(acSQLDialectOracle), acSQLDialectOracleClassFactory.Create);
// gSQLDialectManager.RegisterSQLDialect('DB2', typeOf(acSQLDialectDB2), acSQLDialectDB2ClassFactory.Create); gSQLDialectManager.RegisterSQLDialect('DB2', typeOf(acSQLDialectDB2), acSQLDialectDB2ClassFactory.Create);
gLinksManager.RegisterLink('tcp/ip', typeOf(utLinkSock), utLinkSockClassFactory.Create); gLinksManager.RegisterLink('tcp/ip', typeOf(utLinkSock), utLinkSockClassFactory.Create);
{$IFDEF DARWIN}
MainPool := Nil; MainPool := Nil;
{$ENDIF}
Application.Initialize; Application.Initialize;
Application.Scaled := True;
Application.OnException := ExceptionCatch.CustomExceptionHandler;
// Application.CaptureExceptions := True; // Application.CaptureExceptions := True;
// ExtensionManager.LoadProfiles; // ExtensionManager.LoadProfiles;
......
...@@ -3,7 +3,7 @@ unit DelphiAddInObj; ...@@ -3,7 +3,7 @@ unit DelphiAddInObj;
interface interface
uses uses
LCLType, IntegracaoDelphiSUML, StarUMLintf, Classes; LCLType, IntegracaoDelphiSUML, StarUMLintf, cxuSession, Classes;
type type
...@@ -40,7 +40,7 @@ type ...@@ -40,7 +40,7 @@ type
procedure ListOwnedClasses( piPackage : IUMLPackage ; piObjectList : TInterfaceList ; piStringList : TStringList); procedure ListOwnedClasses( piPackage : IUMLPackage ; piObjectList : TInterfaceList ; piStringList : TStringList);
procedure ListOwnedUseCases ( piPackage : IUMLPackage ; piObjectList : TInterfaceList ; piStringList : TStringList); procedure ListOwnedUseCases ( piPackage : IUMLPackage ; piObjectList : TInterfaceList ; piStringList : TStringList);
class function GetServiceConnectionString: string; class function GetServiceSession: cxSession;
class function DoMenuAction(const ActionID: Integer): Integer; class function DoMenuAction(const ActionID: Integer): Integer;
// function NotifyEvent(AEvent: EventKind): HResult; stdcall; // function NotifyEvent(AEvent: EventKind): HResult; stdcall;
end; end;
...@@ -50,7 +50,8 @@ implementation ...@@ -50,7 +50,8 @@ implementation
uses uses
InstantCode, SysUtils, Mostra_Processamento, utuStateMachine, fCodeGen, Controls, Forms, InstantCode, SysUtils, Mostra_Processamento, utuStateMachine, fCodeGen, Controls, Forms,
fModelMappingsGenerationOptions, fXSDEditor, ituDataBaseLogin, cxuSession, formMemo, fModelMappingsGenerationOptions, fXSDEditor, ituDataBaseLogin, formMemo,
cxuCadastroClasse, cxuCadastroCasoDeUso,
utuMessage, uCadastroCasoDeUso, uCadastroClasse, ituServiceParameters, ituExplorerV2, utuMessage, uCadastroCasoDeUso, uCadastroClasse, ituServiceParameters, ituExplorerV2,
Registry, uRTFEditor, ituXSDExplorer, ituExportUnits, ituOQLExplorerV2; Registry, uRTFEditor, ituXSDExplorer, ituExportUnits, ituOQLExplorerV2;
...@@ -107,7 +108,7 @@ begin ...@@ -107,7 +108,7 @@ begin
result := gStarUMLApp.SelectionManager.GetSelectedModelAt(0); result := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
end; end;
class function TDelphiAddInObj.GetServiceConnectionString: string; class function TDelphiAddInObj.GetServiceSession: cxSession;
var lServiceParamDialog: TitServiceParameters; var lServiceParamDialog: TitServiceParameters;
lReg: TRegistry; lReg: TRegistry;
begin begin
...@@ -135,13 +136,10 @@ begin ...@@ -135,13 +136,10 @@ begin
gStarUMLApp.ProjectManager.Project.SetTaggedValueAsInteger('DBMappings', 'ProjectMap', 'SystemCode', lServiceParamDialog.SystemCode); gStarUMLApp.ProjectManager.Project.SetTaggedValueAsInteger('DBMappings', 'ProjectMap', 'SystemCode', lServiceParamDialog.SystemCode);
gStarUMLApp.ProjectManager.Project.SetTaggedValueAsInteger('DBMappings', 'ProjectMap', 'PortNumber', lServiceParamDialog.PortNumber); gStarUMLApp.ProjectManager.Project.SetTaggedValueAsInteger('DBMappings', 'ProjectMap', 'PortNumber', lServiceParamDialog.PortNumber);
result := format('ServerName=%s;PortNumber=%d;SystemCode=%d;UserName=%s;Password=%s;', result := lServiceParamDialog.Session;
[lServiceParamDialog.ServerName, lServiceParamDialog.PortNumber,
lServiceParamDialog.SystemCode, lServiceParamDialog.UserName,
lServiceParamDialog.Password]);
end end
else else
result := ''; result := Nil;
finally finally
lReg.free; lReg.free;
end; end;
...@@ -177,7 +175,6 @@ begin ...@@ -177,7 +175,6 @@ begin
on E: Exception do on E: Exception do
begin begin
Application.MessageBox(PAnsiChar(e.Message), 'Staruml', MB_ICONERROR); Application.MessageBox(PAnsiChar(e.Message), 'Staruml', MB_ICONERROR);
raise;
end; end;
end; end;
end; end;
...@@ -274,29 +271,32 @@ end; ...@@ -274,29 +271,32 @@ end;
class procedure TDelphiAddInObj.ActionMenu_InsertClass; class procedure TDelphiAddInObj.ActionMenu_InsertClass;
var lCadClasse: TCadastroClasse; var lCadClasse: TCadastroClasse;
lConnString: string; lSession: cxSession;
lCadastroClasseUC: cxCadastroClasse;
lModel: IModel; lModel: IModel;
lUMLPackageAux: IUMLPackage; lUMLPackageAux: IUMLPackage;
begin begin
lCadClasse := nil; lCadClasse := nil;
lConnString := GetServiceConnectionString; lSession := GetServiceSession;
if lConnString <> '' then if Assigned(lSession) then
begin begin
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0); lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
lCadastroClasseUC := cxCadastroClasse.Create(lSession);
try try
if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then lCadClasse := TCadastroClasse.Create(nil, lCadastroClasseUC, Nil);
begin try
lCadClasse := TCadastroClasse.Create(nil, lConnString, Nil); if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then
lCadClasse.ClassPackage := lModel as IUMLPackage; begin
end lCadClasse.ClassPackage := lModel as IUMLPackage;
else end;
begin if lCadClasse.ShowModal = mrok then
lCadClasse := TCadastroClasse.Create(nil, lConnString, Nil); gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass);
finally
lCadClasse.Free;
end; end;
if lCadClasse.ShowModal = mrok then
gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass);
finally finally
if assigned(lCadClasse) then lCadClasse.Free; lCadastroClasseUC.Free;
end; end;
end; end;
end; end;
...@@ -327,58 +327,66 @@ end; ...@@ -327,58 +327,66 @@ end;
class procedure TDelphiAddInObj.ActionMenu_EditClass; class procedure TDelphiAddInObj.ActionMenu_EditClass;
var lCadClasse: TCadastroClasse; var lCadClasse: TCadastroClasse;
lConnString: string; lSession: cxSession;
lCadastroClasseUC: cxCadastroClasse;
lModel: IModel; lModel: IModel;
lUMLClassAux: IUMLClass; lUMLClassAux: IUMLClass;
begin begin
lCadClasse := nil; lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
lConnString := GetServiceConnectionString; if lModel.QueryInterface(IUMLClass, lUMLClassAux) = S_OK then
if lConnString <> '' then
begin begin
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0); lUMLClassAux := lModel as IUMLClass;
if lModel.QueryInterface(IUMLClass, lUMLClassAux) = S_OK then lSession := GetServiceSession;
begin if Assigned(lSession) then
lUMLClassAux := lModel as IUMLClass; begin
lCadastroClasseUC := cxCadastroClasse.Create(lSession);
try
lCadClasse := TCadastroClasse.Create(nil, lCadastroClasseUC, lUMLClassAux);
try try
lCadClasse := TCadastroClasse.Create(nil, lConnString, lUMLClassAux);
if lCadClasse.ShowModal = mrok then if lCadClasse.ShowModal = mrok then
gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass); gStarUMLApp.SelectInModelExplorer(lCadClasse.UMLClass);
finally finally
if assigned(lCadClasse) then lCadClasse.Free; lCadClasse.Free;
end; end;
end finally
else lCadastroClasseUC.Free;
raise Exception.Create('This option is avaliable only for classes.'); end;
end; end;
end else raise Exception.Create('This option is avaliable only for classes.');
end; end;
class procedure TDelphiAddInObj.ActionMenu_EditUseCase; class procedure TDelphiAddInObj.ActionMenu_EditUseCase;
var lCadCasoDeUso: TCadastroCasoDeUso; var lCadCasoDeUso: TCadastroCasoDeUso;
lConnString: string; lSession: cxSession;
lCadastroCasoUsoUC: cxCadatroCasoDeUso;
lModel: IModel; lModel: IModel;
lUMLUseCaseAux: IUMLUseCase; lUMLUseCaseAux: IUMLUseCase;
begin begin
lCadCasoDeUso := nil; lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
lConnString := GetServiceConnectionString; if lModel.QueryInterface(IUMLUsecase, lUMLUseCaseAux) = S_OK then
if lConnString <> '' then
begin begin
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0); lUMLUseCaseAux := lModel as IUMLUsecase;
try
if lModel.QueryInterface(IUMLUsecase, lUMLUseCaseAux) = S_OK then
begin
lUMLUseCaseAux := lModel as IUMLUsecase;
lCadCasoDeUso := TCadastroCasoDeUso.Create(nil, lConnString, lUMLUseCaseAux);
end
else
raise exception.Create('This option is only avaliable for Usecases.');
if lCadCasoDeUso.ShowModal = mrok then lSession := GetServiceSession;
gStarUMLApp.SelectInModelExplorer(lCadCasoDeUso.UseCase); if assigned(lSession) then
finally begin
if assigned(lCadCasoDeUso) then lCadCasoDeUso.Free; lCadastroCasoUsoUC := cxCadatroCasoDeUso.Create(lSession);
try
lCadCasoDeUso := TCadastroCasoDeUso.Create(nil, lCadastroCasoUsoUC, lUMLUseCaseAux);
try
if lCadCasoDeUso.ShowModal = mrok then
gStarUMLApp.SelectInModelExplorer(lCadCasoDeUso.UseCase);
finally
lCadCasoDeUso.Free;
end;
finally
lCadastroCasoUsoUC.Free;
end;
end; end;
end; end
else raise exception.Create('This option is only avaliable for Usecases.');
end; end;
class procedure TDelphiAddInObj.ActionMenu_GeneratePreview; class procedure TDelphiAddInObj.ActionMenu_GeneratePreview;
...@@ -616,32 +624,33 @@ end; ...@@ -616,32 +624,33 @@ end;
class procedure TDelphiAddInObj.ActionMenu_InsertUseCase; class procedure TDelphiAddInObj.ActionMenu_InsertUseCase;
var lCadCasoDeUso: TCadastroCasoDeUso; var lCadCasoDeUso: TCadastroCasoDeUso;
lConnString: string; lSession: cxSession;
lCadastroCasoUsoUC: cxCadatroCasoDeUso;
lModel: IModel; lModel: IModel;
lUMLPackageAux: IUMLPackage; lUMLPackageAux: IUMLPackage;
begin begin
lCadCasoDeUso := nil; lCadCasoDeUso := nil;
lConnString := GetServiceConnectionString; lSession := GetServiceSession;
if lConnString <> '' then if assigned(lSession) then
begin begin
lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0); lModel := gStarUMLApp.SelectionManager.GetSelectedModelAt(0);
lCadastroCasoUsoUC := cxCadatroCasoDeUso.Create(lSession);
try try
if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then lCadCasoDeUso := TCadastroCasoDeUso.Create(nil, lCadastroCasoUsoUC, Nil);
begin try
lCadCasoDeUso := TCadastroCasoDeUso.Create(nil, lConnString, Nil); if lModel.QueryInterface(IUMLPackage, lUMLPackageAux) = S_OK then
lCadCasoDeUso.UseCasePackage := lModel as IUMLPackage; begin
end lCadCasoDeUso.UseCasePackage := lModel as IUMLPackage;
else end;
begin
lCadCasoDeUso := TCadastroCasoDeUso.Create(nil, lConnString, Nil);
end;
if lCadCasoDeUso.ShowModal = mrok then if lCadCasoDeUso.ShowModal = mrok then
gStarUMLApp.SelectInModelExplorer(lCadCasoDeUso.UseCase); gStarUMLApp.SelectInModelExplorer(lCadCasoDeUso.UseCase);
finally
if assigned(lCadCasoDeUso) then lCadCasoDeUso.Free;
end;
finally finally
if assigned(lCadCasoDeUso) then lCadCasoDeUso.Free; lCadastroCasoUsoUC.Free;
end; end;
end; end;
end; end;
......
...@@ -30,11 +30,7 @@ ...@@ -30,11 +30,7 @@
unit InstantTextFiler; unit InstantTextFiler;
{$IFDEF LINUX}
{$I '../InstantDefines.inc'}
{$ELSE}
{$I 'InstantDefines.inc'} {$I 'InstantDefines.inc'}
{$ENDIF}
interface interface
......
...@@ -118,8 +118,6 @@ type ...@@ -118,8 +118,6 @@ type
function GerarBodyStateMachine_CSharp(piModelMappingsOptions: TModelMappingsOptions; piStateMachine: utStateMachine; piUseCaseTicketCode: string; piUnitRegisterMappings: PStringWriter): string; function GerarBodyStateMachine_CSharp(piModelMappingsOptions: TModelMappingsOptions; piStateMachine: utStateMachine; piUseCaseTicketCode: string; piUnitRegisterMappings: PStringWriter): string;
function GerarBodyStateMachine_Java(piModelMappingsOptions: TModelMappingsOptions; piStateMachine: utStateMachine; piUseCaseTicketCode: string; piUnitRegisterMappings: PStringWriter): string; function GerarBodyStateMachine_Java(piModelMappingsOptions: TModelMappingsOptions; piStateMachine: utStateMachine; piUseCaseTicketCode: string; piUnitRegisterMappings: PStringWriter): string;
function GerarUnitOQL(piXMLFileName: string): string;
procedure SaveUseCaseDiagramJPG(piUseCaseName, piTargetDirectory: string); procedure SaveUseCaseDiagramJPG(piUseCaseName, piTargetDirectory: string);
procedure SaveAllDiagrams(const piTargetDirectory: string); procedure SaveAllDiagrams(const piTargetDirectory: string);
...@@ -168,34 +166,40 @@ type ...@@ -168,34 +166,40 @@ type
property StarUMLApp: IStarUMLApplication read fStarUMLApp; property StarUMLApp: IStarUMLApplication read fStarUMLApp;
end; end;
function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; cdecl; function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
function FinalizeAddIn: Integer; cdecl; function FinalizeAddIn: Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
function DoMenuAction(ActionID: Integer): Integer; cdecl; function DoMenuAction(ActionID: Integer): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
var gStarUMLApp: IStarUMLApplication; var gStarUMLApp: IStarUMLApplication;
implementation implementation
uses dialogs, uDBAttributeParameters, acuUseCaseStateMachine, acuFramework, Forms, DelphiAddInObj, uses dialogs, uDBAttributeParameters, acuUseCaseStateMachine, acuFramework, Forms, DelphiAddInObj,
Controls, strutils, utuMessage, acuOQL, utuXSD, utuOQL, acuModelMapping; Controls, strutils, utuMessage, utuXSD, acuModelMapping;
function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; cdecl; function InitializeAddIn(AApplicationHandle: THandle; AStarUMLApplication: TObject): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin begin
// Application.Handle := AApplicationHandle; // Application.Handle := AApplicationHandle;
if AStarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp) if AStarUMLApplication.GetInterface(IID_IStarUMLApplication, gStarUMLApp)
then Result := 0 then Result := 0
else Result := -1; else Result := -1;
end; end;
function FinalizeAddIn: Integer; cdecl; function FinalizeAddIn: Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin begin
Result := 0; gStarUMLApp := Nil;
end; end;
function DoMenuAction(ActionID: Integer): Integer; cdecl; function DoMenuAction(ActionID: Integer): Integer; {$IFDEF MSWINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
begin begin
Result := TDelphiAddInObj.DoMenuAction(ActionID); try
Result := TDelphiAddInObj.DoMenuAction(ActionID);
except
on E: Exception do
begin
Application.MessageBox(PAnsiChar(e.Message), 'Error...', MB_ICONERROR);
end;
end;
end; end;
...@@ -1540,78 +1544,72 @@ begin ...@@ -1540,78 +1544,72 @@ begin
end; end;
try try
// Obtm Gerenciador de Projeto do STARUML // Obtm Gerenciador de Projeto do STARUML
lPrjManager := gStarUMLApp.Get_ProjectManager; lPrjManager := gStarUMLApp.Get_ProjectManager;
// lPrjManager.OpenProject(pFileName);
// Obtm projeto do STARUML de onde sero extrados os elementos UML
lPrj := lPrjManager.Get_Project;
// Meta Modelo do Star UML
lIMetaModel := gStarUMLApp.MetaModel;
//Obtem a classe acPersistentObject do modelo do StarUML // Obtm projeto do STARUML de onde sero extrados os elementos UML
lElement := gStarUMLApp.FindByPathname(MODELO + '::FrameworkModel::acuFrameworkPackage::' + cBASE_PERSISTENT_OBJECT_CLASS); lPrj := lPrjManager.Get_Project;
if not assigned(lElement) then if assigned(lPrj) then
raise Exception.Create(format('Base class "%s" not found. Try to reopen model.', [cBASE_PERSISTENT_OBJECT_CLASS])); begin
// Meta Modelo do Star UML
lClassePersistentObject := lElement as IUMLClass; lIMetaModel := gStarUMLApp.MetaModel;
lLostClasses := TStringList.Create; //Obtem a classe acPersistentObject do modelo do StarUML
try lElement := gStarUMLApp.FindByPathname(MODELO + '::FrameworkModel::acuFrameworkPackage::' + cBASE_PERSISTENT_OBJECT_CLASS);
if FindLostClasses(lLostClasses) > 0 then
for I := 0 to lLostClasses.Count - 1 do
PutMessage(format('[Warning] Class "%s" does not descends from %s',[lLostClasses[i], cBASE_PERSISTENT_OBJECT_CLASS]),
gStarUMLApp.GetProject, 0);
finally
lLostClasses.Free;
end;
if assigned(lElement) then
begin
lClassePersistentObject := lElement as IUMLClass;
lLostClasses := TStringList.Create;
try
if FindLostClasses(lLostClasses) > 0 then
for I := 0 to lLostClasses.Count - 1 do
PutMessage(format('[Warning] Class "%s" does not descends from %s',[lLostClasses[i], cBASE_PERSISTENT_OBJECT_CLASS]),
gStarUMLApp.GetProject, 0);
finally
lLostClasses.Free;
end;
// if (lacMetaModel.ClassTickets.Count = 0) then result := AlimentarMetamodelRegisterMapping(lClassePersistentObject, MetaModel, piMetaModelOptions, piProgress);
result := AlimentarMetamodelRegisterMapping(lClassePersistentObject, MetaModel, piMetaModelOptions, piProgress);
// Busca metaclasse UMLMODEL no metamodelo lElement := gStarUMLApp.FindByPathname(MODELO);
// lMetaClass := lIMetaModel.FindMetaClass('UMLModel'); lModel := lElement as IUMLModel;
// Obtem modelo especfico para geraao de cdigo fonte
// lModel := pStarUMLApp.SelectionManager.GetSelectedModelAt(0) as IUMLModel;
lElement := gStarUMLApp.FindByPathname(MODELO);
lModel := lElement as IUMLModel;
lPackage := lModel as IUMLPackage; lPackage := lModel as IUMLPackage;
// if (lacMetaModel.RelationTickets.Count = 0) then result := AlimentarMetamodelRelationsAll(lPackage, MetaModel, piMetaModelOptions, piProgress);
result := AlimentarMetamodelRelationsAll(lPackage, MetaModel, piMetaModelOptions, piProgress);
// lElement := pStarUMLApp.FindByPathname(MODELO + '::FrameworkModel::ApplicationFramework::ucSecuredUseCase'); lElement := gStarUMLApp.FindByPathname(MODELO + '::FrameworkModel::acuFrameworkPackage::UCU::ucUseCase');
lElement := gStarUMLApp.FindByPathname(MODELO + '::FrameworkModel::acuFrameworkPackage::UCU::ucUseCase');
if not assigned(lElement) then raise Exception.Create('Use case "ucUseCase" not found.'); if not assigned(lElement) then raise Exception.Create('Use case "ucUseCase" not found.');
lRootUseCase := lElement as IUMLUseCase; lRootUseCase := lElement as IUMLUseCase;
//Verifica a existencia da StateMachine smServer no caso de uso ucUseCase //Verifica a existencia da StateMachine smServer no caso de uso ucUseCase
if (lRootUseCase.GetBehaviorCount = 0) or (lRootUseCase.GetBehaviorAt(0).Name <> cBASE_STATE_MACHINE) then if (lRootUseCase.GetBehaviorCount = 0) or (lRootUseCase.GetBehaviorAt(0).Name <> cBASE_STATE_MACHINE) then
raise Exception.Create('Statemachine "'+ cBASE_STATE_MACHINE + '" not found.'); raise Exception.Create('Statemachine "'+ cBASE_STATE_MACHINE + '" not found.');
lUMLBaseStateMachine := lRootUseCase.GetBehaviorAt(0); lUMLBaseStateMachine := lRootUseCase.GetBehaviorAt(0);
lUMLTopState := lUMLBaseStateMachine.Top as IUMLCompositeState; lUMLTopState := lUMLBaseStateMachine.Top as IUMLCompositeState;
for I := 0 to lUMLTopState.GetSubvertexCount - 1 do for I := 0 to lUMLTopState.GetSubvertexCount - 1 do
if lUMLTopState.GetSubvertexAt(i).Name = 'UseCaseSubmachine' then if lUMLTopState.GetSubvertexAt(i).Name = 'UseCaseSubmachine' then
begin begin
lUMLBaseSubmachineState := lUMLTopState.GetSubvertexAt(i) as IUMLSubmachineState; lUMLBaseSubmachineState := lUMLTopState.GetSubvertexAt(i) as IUMLSubmachineState;
break; break;
end; end;
GerarUseCaseTickets((lElement as IUMLUseCase), MetaModel, piProgress); GerarUseCaseTickets((lElement as IUMLUseCase), MetaModel, piProgress);
AlimentarMetamodelUseCase((lElement as IUMLUseCase), lUMLBaseStateMachine, lUMLBaseSubmachineState, MetaModel, piProgress); AlimentarMetamodelUseCase((lElement as IUMLUseCase), lUMLBaseStateMachine, lUMLBaseSubmachineState, MetaModel, piProgress);
lUMLBaseSubmachineState.Submachine := nil; lUMLBaseSubmachineState.Submachine := nil;
lElement := nil; lElement := nil;
if not piMetaModelOptions.SilentMode then PutMessage(FormatDateTime('hh:nn:ss', Time) + ' - Model mappings generated.', gStarUMLApp.GetProject, 2); if not piMetaModelOptions.SilentMode then PutMessage(FormatDateTime('hh:nn:ss', Time) + ' - Model mappings generated.', gStarUMLApp.GetProject, 2);
// MetaModel.SetOrder; end;
end;
finally finally
end; end;
end; end;
function TUtil.AlimentarMetamodelRegisterMapping(poClasseRaiz: IUMLClass; poMetaModel: acMetaModel; piMetaModelOptions: TMetaModelGenerationOptions; piProgress: TFShowProgress): string; function TUtil.AlimentarMetamodelRegisterMapping(poClasseRaiz: IUMLClass; poMetaModel: acMetaModel; piMetaModelOptions: TMetaModelGenerationOptions; piProgress: TFShowProgress): string;
...@@ -2667,242 +2665,6 @@ begin ...@@ -2667,242 +2665,6 @@ begin
piUnitRegisterMappings.Outdent(); piUnitRegisterMappings.Outdent();
end; end;
function TUtil.GerarUnitOQL(piXMLFileName: String): string;
procedure AddText(piStringStream: TStringStream; piIndent: integer = 0; piText: string = '');
begin
piText := StringOfChar(' ', piIndent) + piText;
piStringStream.WriteString(concat(piText,#13#10));
end;
var
lUnit: TStringStream;
lFieldOQLFile, lFieldOQL: utField;
lAux: TStringList;
lOQLName, lOQLQuery: string;
lEnum, lEnumParams: acEnumerator;
lOQLParam: acOQLParam;
// lQuery: acAbstractOQLQuery;
lFileName: string;
lOQLType: integer;
begin
if not FileExists(piXMLFileName) then
raise Exception.Create('File "' + piXMLFileName + '" does not exist');
lUnit := TStringStream.Create('');
try
lFieldOQLFile := utField.Create;
try
lAux := TStringList.Create;
try
lAux.LoadFromFile(piXMLFileName);
lFieldOQLFile.LoadFieldFromXMLString(lAux.Text);
finally
lAux.free;
end;
lFileName := ExtractFileName(piXMLFileName);
lFileName := LeftStr(lFileName, pos('.', lFileName) - 1);
AddText(lUnit, 0, 'unit utu' + lFileName + ';');
AddText(lUnit);
AddText(lUnit, 0, 'interface');
AddText(lUnit);
AddText(lUnit, 0, 'uses acuOQL, acuFramework;');
AddText(lUnit);
AddText(lUnit, 0, 'type');
AddText(lUnit);
lEnum := lFieldOQLFile.GetFieldsEnumerator;
try
//OQL Interfaces
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
if not lFieldOQL.HasAttribute('name') then raise Exception.Create('Attribute "name" not found for OQL. Not a valid XML OQL file.');
lOQLName := lFieldOQL.AttributeByName('name').AsString;
if not lFieldOQL.HasField('query') then raise Exception.Create('Field "query" not found for OQL. Not a valid XML OQL file.');
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
case lOQLType of
cDataSetOQLDataSet: AddText(lUnit, 2, 'I' + lOQLName + ' = interface(IDataSetOQLQuery)');
else AddText(lUnit, 2, 'I' + lOQLName + ' = interface(IOQLQuery)');
end;
// case lOQLType of
// cDataSetOQLDataSet: lQuery := acDataSetOQLQuery.Create(piSession, lOQLQuery);
// else lQuery := acOQLQuery.Create(piSession, lOQLQuery);
// end;
// try
// lEnumParams := lQuery.Parameters.GetEnumerator;
// try
// while not lEnumParams.EOL do
// begin
// lOQLParam := acOQLParam(lEnumParams.Current);
// AddText(lUnit, 4, 'function Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
// lEnumParams.MoveNext;
// end;
// finally
// lEnumParams.free;
// end;
// AddText(lUnit, 2, 'end;');
// AddText(lUnit);
// finally
// lQuery.Free;
// end;
// lEnum.MoveNext;
end;
//Factory Class Interface
AddText(lUnit, 2, 'ut' + lFileName + ' = class');
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
AddText(lUnit, 4, 'class function ' + lOQLName + '(piSessao: acPersistenceSession): ' + 'I' + lOQLName + ';');
lEnum.MoveNext;
end;
AddText(lUnit, 2, 'end;');
AddText(lUnit);
AddText(lUnit, 0, 'implementation');
AddText(lUnit);
AddText(lUnit, 0, 'type');
AddText(lUnit);
//OQL Types
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
case lOQLType of
cDataSetOQLDataSet: AddText(lUnit, 2, 'T' + lOQLName + ' = class(acDataSetOQLQuery, ' + 'I' + lOQLName + ')');
else AddText(lUnit, 2, 'T' + lOQLName + ' = class(acOQLQuery, ' + 'I' + lOQLName + ')');
end;
// case lOQLType of
// cDataSetOQLDataSet: lQuery := acDataSetOQLQuery.Create(piSession, lOQLQuery);
// else lQuery := acOQLQuery.Create(piSession, lOQLQuery);
// end;
// try
// lEnumParams := lQuery.Parameters.GetEnumerator;
// try
// while not lEnumParams.EOL do
// begin
// lOQLParam := acOQLParam(lEnumParams.Current);
// AddText(lUnit, 4, 'function Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
// lEnumParams.MoveNext;
// end;
// finally
// lEnumParams.free;
// end;
// AddText(lUnit, 2, 'end;');
// AddText(lUnit);
// finally
// lQuery.Free;
// end;
lEnum.MoveNext;
end;
//OQL Types Implementation
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
AddText(lUnit, 0, '{ T' + lOQLName + ' }');
AddText(lUnit);
// case lOQLType of
// cDataSetOQLDataSet: lQuery := acDataSetOQLQuery.Create(piSession, lOQLQuery);
// else lQuery := acOQLQuery.Create(piSession, lOQLQuery);
// end;
// try
// lEnumParams := lQuery.Parameters.GetEnumerator;
// try
// while not lEnumParams.EOL do
// begin
// lOQLParam := acOQLParam(lEnumParams.Current);
// AddText(lUnit, 0, 'function T' + lOQLName + '.Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
// AddText(lUnit, 0,'begin');
// AddText(lUnit, 2,'result := ' + lOQLParam.ClassName + '(Self.ParamByName(' + QuotedStr(lOQLParam.Name) + '));');
// AddText(lUnit, 0,'end;');
// AddText(lUnit);
// lEnumParams.MoveNext;
// end;
// finally
// lEnumParams.free;
// end;
// finally
// lQuery.Free;
// end;
lEnum.MoveNext;
end;
//Factory Class Implementation
AddText(lUnit, 0, '{ utOQLs }');
AddText(lUnit);
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
AddText(lUnit, 0, 'class function ut' + lFileName + '.' + lOQLName + '(piSessao: acPersistenceSession): I' + lOQLName + ';');
AddText(lUnit, 0, 'begin');
AddText(lUnit, 2, 'result := T' + lOQLName + '.Create(pisessao,');
lOQLQuery := StringReplace(lOQLQuery, '''', '''''', [rfReplaceAll]);
lOQLQuery := StringReplace(lOQLQuery, #13#10, ''' + #13#10 +' + #13#10 + '''', [rfReplaceAll]);
AddText(lUnit, 0, '''' + lOQLQuery + ''');');
AddText(lUnit, 0, 'end;');
AddText(lUnit);
lEnum.MoveNext;
end;
finally
lEnum.free;
end;
AddText(lUnit, 0, 'end.');
result := lUnit.DataString;
finally
lFieldOQLFile.free;
end;
finally
lUnit.free;
end;
end;
procedure TUtil.GerarUnitRegisterModelMappings(piModelMappingsOptions: TModelMappingsOptions; piProgress: TFShowProgress); procedure TUtil.GerarUnitRegisterModelMappings(piModelMappingsOptions: TModelMappingsOptions; piProgress: TFShowProgress);
const const
MAX_UC = 100; MAX_UC = 100;
...@@ -5316,7 +5078,7 @@ begin ...@@ -5316,7 +5078,7 @@ begin
GerarRelationsPartnerShips(lClassTicket, lInstantCodeClass); GerarRelationsPartnerShips(lClassTicket, lInstantCodeClass);
lInstantCodeModule.ImplementationSection.Clear; lInstantCodeModule.ImplementationSection.Clear;
lInstantCodeModule.InitializationSection.CodeText := 'PersistenceManager.RegisterClass('+lsNomeClasse+');'; lInstantCodeModule.InitializationSection.CodeText := '// PersistenceManager.RegisterClass(TypeOf('+lsNomeClasse+'));';
result := lInstantCodeModule.AsString; result := lInstantCodeModule.AsString;
// end // end
......
...@@ -10,8 +10,10 @@ object CodeGen: TCodeGen ...@@ -10,8 +10,10 @@ object CodeGen: TCodeGen
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
KeyPreview = True
OnShow = FormShow OnShow = FormShow
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '2.0.0.4'
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Height = 616 Height = 616
...@@ -23,26 +25,26 @@ object CodeGen: TCodeGen ...@@ -23,26 +25,26 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'UseCase' Caption = 'UseCase'
ClientHeight = 577 ClientHeight = 588
ClientWidth = 883 ClientWidth = 879
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Height = 577 Height = 588
Top = 0 Top = 0
Width = 883 Width = 879
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 577 ClientHeight = 588
ClientWidth = 883 ClientWidth = 879
TabOrder = 0 TabOrder = 0
object Panel2: TPanel object Panel2: TPanel
Left = 1 Left = 1
Height = 452 Height = 463
Top = 124 Top = 124
Width = 280 Width = 280
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 452 ClientHeight = 463
ClientWidth = 280 ClientWidth = 280
TabOrder = 0 TabOrder = 0
object Panel4: TPanel object Panel4: TPanel
...@@ -197,7 +199,7 @@ object CodeGen: TCodeGen ...@@ -197,7 +199,7 @@ object CodeGen: TCodeGen
end end
object lvUseCases: TListView object lvUseCases: TListView
Left = 0 Left = 0
Height = 367 Height = 378
Top = 41 Top = 41
Width = 280 Width = 280
Align = alClient Align = alClient
...@@ -205,7 +207,7 @@ object CodeGen: TCodeGen ...@@ -205,7 +207,7 @@ object CodeGen: TCodeGen
Columns = < Columns = <
item item
Caption = 'UseCase' Caption = 'UseCase'
Width = 250 Width = 258
end> end>
MultiSelect = True MultiSelect = True
ReadOnly = True ReadOnly = True
...@@ -218,7 +220,7 @@ object CodeGen: TCodeGen ...@@ -218,7 +220,7 @@ object CodeGen: TCodeGen
object Panel13: TPanel object Panel13: TPanel
Left = 0 Left = 0
Height = 44 Height = 44
Top = 408 Top = 419
Width = 280 Width = 280
Align = alBottom Align = alBottom
BevelInner = bvLowered BevelInner = bvLowered
...@@ -241,33 +243,33 @@ object CodeGen: TCodeGen ...@@ -241,33 +243,33 @@ object CodeGen: TCodeGen
end end
object PageControl2: TPageControl object PageControl2: TPageControl
Left = 281 Left = 281
Height = 452 Height = 463
Top = 124 Top = 124
Width = 601 Width = 597
ActivePage = TabSheet2 ActivePage = TabSheet2
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
TabOrder = 1 TabOrder = 1
object TabSheet2: TTabSheet object TabSheet2: TTabSheet
Caption = 'Usecase' Caption = 'Usecase'
ClientHeight = 413 ClientHeight = 435
ClientWidth = 595 ClientWidth = 587
object Panel5: TPanel object Panel5: TPanel
Left = 0 Left = 0
Height = 413 Height = 435
Top = 0 Top = 0
Width = 595 Width = 587
Align = alClient Align = alClient
BevelInner = bvLowered BevelInner = bvLowered
Caption = 'Panel5' Caption = 'Panel5'
ClientHeight = 413 ClientHeight = 435
ClientWidth = 595 ClientWidth = 587
TabOrder = 0 TabOrder = 0
object Panel6: TPanel object Panel6: TPanel
Left = 2 Left = 2
Height = 20 Height = 20
Top = 2 Top = 2
Width = 591 Width = 583
Align = alTop Align = alTop
BevelInner = bvLowered BevelInner = bvLowered
Caption = 'UseCase code preview' Caption = 'UseCase code preview'
...@@ -275,9 +277,9 @@ object CodeGen: TCodeGen ...@@ -275,9 +277,9 @@ object CodeGen: TCodeGen
end end
inline memCode: TSynEdit inline memCode: TSynEdit
Left = 2 Left = 2
Height = 389 Height = 411
Top = 22 Top = 22
Width = 591 Width = 583
Align = alClient Align = alClient
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -355,8 +357,8 @@ object CodeGen: TCodeGen ...@@ -355,8 +357,8 @@ object CodeGen: TCodeGen
end end
object TabSheet3: TTabSheet object TabSheet3: TTabSheet
Caption = 'XSD' Caption = 'XSD'
ClientHeight = 413 ClientHeight = 435
ClientWidth = 595 ClientWidth = 587
ImageIndex = 1 ImageIndex = 1
object lvXSD: TListView object lvXSD: TListView
Left = 0 Left = 0
...@@ -404,8 +406,8 @@ object CodeGen: TCodeGen ...@@ -404,8 +406,8 @@ object CodeGen: TCodeGen
TabOrder = 1 TabOrder = 1
object TabSheet4: TTabSheet object TabSheet4: TTabSheet
Caption = 'XSD In' Caption = 'XSD In'
ClientHeight = 245 ClientHeight = 280
ClientWidth = 589 ClientWidth = 591
inline memXSDIn: TSynEdit inline memXSDIn: TSynEdit
Left = 0 Left = 0
Height = 245 Height = 245
...@@ -487,8 +489,8 @@ object CodeGen: TCodeGen ...@@ -487,8 +489,8 @@ object CodeGen: TCodeGen
end end
object TabSheet5: TTabSheet object TabSheet5: TTabSheet
Caption = 'XSD Out' Caption = 'XSD Out'
ClientHeight = 245 ClientHeight = 280
ClientWidth = 589 ClientWidth = 591
ImageIndex = 1 ImageIndex = 1
inline memXSDOut: TSynEdit inline memXSDOut: TSynEdit
Left = 0 Left = 0
...@@ -576,27 +578,27 @@ object CodeGen: TCodeGen ...@@ -576,27 +578,27 @@ object CodeGen: TCodeGen
Left = 1 Left = 1
Height = 123 Height = 123
Top = 1 Top = 1
Width = 881 Width = 877
ActivePage = TabSheet7 ActivePage = TabSheet7
Align = alTop Align = alTop
TabIndex = 0 TabIndex = 0
TabOrder = 2 TabOrder = 2
object TabSheet7: TTabSheet object TabSheet7: TTabSheet
Caption = 'General' Caption = 'General'
ClientHeight = 84 ClientHeight = 95
ClientWidth = 875 ClientWidth = 867
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 84 Height = 95
Top = 0 Top = 0
Width = 875 Width = 867
Align = alClient Align = alClient
Caption = 'General' Caption = 'General'
ClientHeight = 84 ClientHeight = 95
ClientWidth = 875 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object SpeedButton6: TSpeedButton object SpeedButton6: TSpeedButton
Left = 768 Left = 761
Height = 71 Height = 71
Top = 15 Top = 15
Width = 100 Width = 100
...@@ -837,8 +839,8 @@ object CodeGen: TCodeGen ...@@ -837,8 +839,8 @@ object CodeGen: TCodeGen
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 67 ClientHeight = 69
ClientWidth = 87 ClientWidth = 93
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Server' 'Server'
...@@ -861,8 +863,8 @@ object CodeGen: TCodeGen ...@@ -861,8 +863,8 @@ object CodeGen: TCodeGen
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1 ChildSizing.ControlsPerLine = 1
ClientHeight = 67 ClientHeight = 69
ClientWidth = 90 ClientWidth = 96
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'Delphi' 'Delphi'
...@@ -878,8 +880,8 @@ object CodeGen: TCodeGen ...@@ -878,8 +880,8 @@ object CodeGen: TCodeGen
Top = 7 Top = 7
Width = 537 Width = 537
Caption = 'Output directory' Caption = 'Output directory'
ClientHeight = 67 ClientHeight = 69
ClientWidth = 529 ClientWidth = 535
TabOrder = 2 TabOrder = 2
object SpeedButton5: TSpeedButton object SpeedButton5: TSpeedButton
Left = 503 Left = 503
...@@ -919,7 +921,7 @@ object CodeGen: TCodeGen ...@@ -919,7 +921,7 @@ object CodeGen: TCodeGen
end end
object edtDirectory: TEdit object edtDirectory: TEdit
Left = 10 Left = 10
Height = 22 Height = 31
Top = 33 Top = 33
Width = 487 Width = 487
TabOrder = 0 TabOrder = 0
...@@ -929,8 +931,8 @@ object CodeGen: TCodeGen ...@@ -929,8 +931,8 @@ object CodeGen: TCodeGen
end end
object Options: TTabSheet object Options: TTabSheet
Caption = 'Options' Caption = 'Options'
ClientHeight = 97 ClientHeight = 95
ClientWidth = 871 ClientWidth = 867
ImageIndex = 1 ImageIndex = 1
object Panel9: TPanel object Panel9: TPanel
Left = 380 Left = 380
...@@ -953,8 +955,8 @@ object CodeGen: TCodeGen ...@@ -953,8 +955,8 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet8: TTabSheet object TabSheet8: TTabSheet
Caption = 'Java' Caption = 'Java'
ClientHeight = 54 ClientHeight = 89
ClientWidth = 481 ClientWidth = 483
object Label1: TLabel object Label1: TLabel
Left = 10 Left = 10
Height = 13 Height = 13
...@@ -1012,8 +1014,8 @@ object CodeGen: TCodeGen ...@@ -1012,8 +1014,8 @@ object CodeGen: TCodeGen
end end
object TabSheet6: TTabSheet object TabSheet6: TTabSheet
Caption = 'SQL' Caption = 'SQL'
ClientHeight = 590 ClientHeight = 588
ClientWidth = 881 ClientWidth = 879
ImageIndex = 1 ImageIndex = 1
object PageControl5: TPageControl object PageControl5: TPageControl
Left = 0 Left = 0
...@@ -1026,8 +1028,8 @@ object CodeGen: TCodeGen ...@@ -1026,8 +1028,8 @@ object CodeGen: TCodeGen
TabOrder = 0 TabOrder = 0
object TabSheet9: TTabSheet object TabSheet9: TTabSheet
Caption = 'SQL Server' Caption = 'SQL Server'
ClientHeight = 551 ClientHeight = 586
ClientWidth = 875 ClientWidth = 877
object Panel7: TPanel object Panel7: TPanel
Left = 0 Left = 0
Height = 564 Height = 564
...@@ -1035,8 +1037,8 @@ object CodeGen: TCodeGen ...@@ -1035,8 +1037,8 @@ object CodeGen: TCodeGen
Width = 873 Width = 873
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 564 ClientHeight = 560
ClientWidth = 873 ClientWidth = 869
TabOrder = 0 TabOrder = 0
object Panel8: TPanel object Panel8: TPanel
Left = 1 Left = 1
...@@ -1044,8 +1046,8 @@ object CodeGen: TCodeGen ...@@ -1044,8 +1046,8 @@ object CodeGen: TCodeGen
Top = 1 Top = 1
Width = 871 Width = 871
Align = alTop Align = alTop
ClientHeight = 40 ClientHeight = 36
ClientWidth = 871 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object SpeedButton4: TSpeedButton object SpeedButton4: TSpeedButton
Left = 9 Left = 9
...@@ -1138,8 +1140,8 @@ object CodeGen: TCodeGen ...@@ -1138,8 +1140,8 @@ object CodeGen: TCodeGen
end end
object TabSheet10: TTabSheet object TabSheet10: TTabSheet
Caption = 'Oracle' Caption = 'Oracle'
ClientHeight = 564 ClientHeight = 586
ClientWidth = 873 ClientWidth = 877
ImageIndex = 1 ImageIndex = 1
object Panel11: TPanel object Panel11: TPanel
Left = 0 Left = 0
...@@ -1148,8 +1150,8 @@ object CodeGen: TCodeGen ...@@ -1148,8 +1150,8 @@ object CodeGen: TCodeGen
Width = 873 Width = 873
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 564 ClientHeight = 560
ClientWidth = 873 ClientWidth = 869
TabOrder = 0 TabOrder = 0
object Panel12: TPanel object Panel12: TPanel
Left = 1 Left = 1
...@@ -1157,8 +1159,8 @@ object CodeGen: TCodeGen ...@@ -1157,8 +1159,8 @@ object CodeGen: TCodeGen
Top = 1 Top = 1
Width = 871 Width = 871
Align = alTop Align = alTop
ClientHeight = 40 ClientHeight = 36
ClientWidth = 871 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object SpeedButton7: TSpeedButton object SpeedButton7: TSpeedButton
Left = 9 Left = 9
...@@ -1251,8 +1253,8 @@ object CodeGen: TCodeGen ...@@ -1251,8 +1253,8 @@ object CodeGen: TCodeGen
end end
object TabSheet11: TTabSheet object TabSheet11: TTabSheet
Caption = 'DB2' Caption = 'DB2'
ClientHeight = 564 ClientHeight = 586
ClientWidth = 873 ClientWidth = 877
ImageIndex = 2 ImageIndex = 2
object Panel14: TPanel object Panel14: TPanel
Left = 0 Left = 0
...@@ -1261,8 +1263,8 @@ object CodeGen: TCodeGen ...@@ -1261,8 +1263,8 @@ object CodeGen: TCodeGen
Width = 873 Width = 873
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 564 ClientHeight = 560
ClientWidth = 873 ClientWidth = 869
TabOrder = 0 TabOrder = 0
object Panel15: TPanel object Panel15: TPanel
Left = 1 Left = 1
...@@ -1270,8 +1272,8 @@ object CodeGen: TCodeGen ...@@ -1270,8 +1272,8 @@ object CodeGen: TCodeGen
Top = 1 Top = 1
Width = 871 Width = 871
Align = alTop Align = alTop
ClientHeight = 40 ClientHeight = 36
ClientWidth = 871 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object SpeedButton8: TSpeedButton object SpeedButton8: TSpeedButton
Left = 9 Left = 9
......
object PreviewClassCode: TPreviewClassCode object PreviewClassCode: TPreviewClassCode
Left = 0 Left = 2149
Height = 573 Height = 580
Top = 0 Top = 247
Width = 799 Width = 803
Caption = 'Preview Class Code' Caption = 'Preview Class Code'
ClientHeight = 573 ClientHeight = 580
ClientWidth = 799 ClientWidth = 803
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
KeyPreview = True
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '2.0.0.4'
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 573 Height = 580
Top = 0 Top = 0
Width = 799 Width = 803
Align = alClient Align = alClient
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 573 ClientHeight = 580
ClientWidth = 799 ClientWidth = 803
TabOrder = 0 TabOrder = 0
object Panel1: TPanel object Panel1: TPanel
Left = 1 Left = 1
Height = 40 Height = 40
Top = 1 Top = 1
Width = 797 Width = 801
Align = alTop Align = alTop
ClientHeight = 40 ClientHeight = 40
ClientWidth = 797 ClientWidth = 801
TabOrder = 0 TabOrder = 0
object Button1: TButton object Button1: TButton
Left = 12 Left = 12
...@@ -42,9 +44,9 @@ object PreviewClassCode: TPreviewClassCode ...@@ -42,9 +44,9 @@ object PreviewClassCode: TPreviewClassCode
end end
object pgc_Main: TPageControl object pgc_Main: TPageControl
Left = 1 Left = 1
Height = 531 Height = 538
Top = 41 Top = 41
Width = 797 Width = 801
ActivePage = TabSheet1 ActivePage = TabSheet1
Align = alClient Align = alClient
ShowTabs = False ShowTabs = False
...@@ -52,45 +54,476 @@ object PreviewClassCode: TPreviewClassCode ...@@ -52,45 +54,476 @@ object PreviewClassCode: TPreviewClassCode
TabOrder = 1 TabOrder = 1
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'Class Preview' Caption = 'Class Preview'
ClientHeight = 524 ClientHeight = 534
ClientWidth = 789 ClientWidth = 791
object pgc_ClassCode: TPageControl object pgc_ClassCode: TPageControl
Left = 0 Left = 0
Height = 524 Height = 534
Top = 0 Top = 0
Width = 789 Width = 791
ActivePage = TabSheet3 ActivePage = TabSheet3
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
TabOrder = 0 TabOrder = 0
object TabSheet3: TTabSheet object TabSheet3: TTabSheet
Caption = 'Delphi' Caption = 'ObjPascal'
ClientHeight = 485 ClientHeight = 506
ClientWidth = 783 ClientWidth = 781
inline mem_ClassPascal: TSynEdit inline mem_ClassPascal: TSynEdit
Left = 0 Left = 0
Height = 485 Height = 506
Top = 0 Top = 0
Width = 783 Width = 781
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = 13
Font.Name = 'Courier New' Font.Name = 'DejaVu Sans Mono'
Font.Pitch = fpFixed Font.Pitch = fpFixed
Font.Quality = fqNonAntialiased Font.Quality = fqNonAntialiased
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
Gutter.Width = 57 BorderStyle = bsNone
Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
Keystrokes = <> Highlighter = SynFreePascalSyn1
Keystrokes = <
item
Command = ecUp
ShortCut = 38
end
item
Command = ecSelUp
ShortCut = 8230
end
item
Command = ecScrollUp
ShortCut = 16422
end
item
Command = ecDown
ShortCut = 40
end
item
Command = ecSelDown
ShortCut = 8232
end
item
Command = ecScrollDown
ShortCut = 16424
end
item
Command = ecLeft
ShortCut = 37
end
item
Command = ecSelLeft
ShortCut = 8229
end
item
Command = ecWordLeft
ShortCut = 16421
end
item
Command = ecSelWordLeft
ShortCut = 24613
end
item
Command = ecRight
ShortCut = 39
end
item
Command = ecSelRight
ShortCut = 8231
end
item
Command = ecWordRight
ShortCut = 16423
end
item
Command = ecSelWordRight
ShortCut = 24615
end
item
Command = ecPageDown
ShortCut = 34
end
item
Command = ecSelPageDown
ShortCut = 8226
end
item
Command = ecPageBottom
ShortCut = 16418
end
item
Command = ecSelPageBottom
ShortCut = 24610
end
item
Command = ecPageUp
ShortCut = 33
end
item
Command = ecSelPageUp
ShortCut = 8225
end
item
Command = ecPageTop
ShortCut = 16417
end
item
Command = ecSelPageTop
ShortCut = 24609
end
item
Command = ecLineStart
ShortCut = 36
end
item
Command = ecSelLineStart
ShortCut = 8228
end
item
Command = ecEditorTop
ShortCut = 16420
end
item
Command = ecSelEditorTop
ShortCut = 24612
end
item
Command = ecLineEnd
ShortCut = 35
end
item
Command = ecSelLineEnd
ShortCut = 8227
end
item
Command = ecEditorBottom
ShortCut = 16419
end
item
Command = ecSelEditorBottom
ShortCut = 24611
end
item
Command = ecToggleMode
ShortCut = 45
end
item
Command = ecCopy
ShortCut = 16429
end
item
Command = ecPaste
ShortCut = 8237
end
item
Command = ecDeleteChar
ShortCut = 46
end
item
Command = ecCut
ShortCut = 8238
end
item
Command = ecDeleteLastChar
ShortCut = 8
end
item
Command = ecDeleteLastChar
ShortCut = 8200
end
item
Command = ecDeleteLastWord
ShortCut = 16392
end
item
Command = ecUndo
ShortCut = 32776
end
item
Command = ecRedo
ShortCut = 40968
end
item
Command = ecLineBreak
ShortCut = 13
end
item
Command = ecSelectAll
ShortCut = 16449
end
item
Command = ecCopy
ShortCut = 16451
end
item
Command = ecBlockIndent
ShortCut = 24649
end
item
Command = ecLineBreak
ShortCut = 16461
end
item
Command = ecInsertLine
ShortCut = 16462
end
item
Command = ecDeleteWord
ShortCut = 16468
end
item
Command = ecBlockUnindent
ShortCut = 24661
end
item
Command = ecPaste
ShortCut = 16470
end
item
Command = ecCut
ShortCut = 16472
end
item
Command = ecDeleteLine
ShortCut = 16473
end
item
Command = ecDeleteEOL
ShortCut = 24665
end
item
Command = ecUndo
ShortCut = 16474
end
item
Command = ecRedo
ShortCut = 24666
end
item
Command = ecGotoMarker0
ShortCut = 16432
end
item
Command = ecGotoMarker1
ShortCut = 16433
end
item
Command = ecGotoMarker2
ShortCut = 16434
end
item
Command = ecGotoMarker3
ShortCut = 16435
end
item
Command = ecGotoMarker4
ShortCut = 16436
end
item
Command = ecGotoMarker5
ShortCut = 16437
end
item
Command = ecGotoMarker6
ShortCut = 16438
end
item
Command = ecGotoMarker7
ShortCut = 16439
end
item
Command = ecGotoMarker8
ShortCut = 16440
end
item
Command = ecGotoMarker9
ShortCut = 16441
end
item
Command = ecSetMarker0
ShortCut = 24624
end
item
Command = ecSetMarker1
ShortCut = 24625
end
item
Command = ecSetMarker2
ShortCut = 24626
end
item
Command = ecSetMarker3
ShortCut = 24627
end
item
Command = ecSetMarker4
ShortCut = 24628
end
item
Command = ecSetMarker5
ShortCut = 24629
end
item
Command = ecSetMarker6
ShortCut = 24630
end
item
Command = ecSetMarker7
ShortCut = 24631
end
item
Command = ecSetMarker8
ShortCut = 24632
end
item
Command = ecSetMarker9
ShortCut = 24633
end
item
Command = EcFoldLevel1
ShortCut = 41009
end
item
Command = EcFoldLevel2
ShortCut = 41010
end
item
Command = EcFoldLevel3
ShortCut = 41011
end
item
Command = EcFoldLevel4
ShortCut = 41012
end
item
Command = EcFoldLevel5
ShortCut = 41013
end
item
Command = EcFoldLevel6
ShortCut = 41014
end
item
Command = EcFoldLevel7
ShortCut = 41015
end
item
Command = EcFoldLevel8
ShortCut = 41016
end
item
Command = EcFoldLevel9
ShortCut = 41017
end
item
Command = EcFoldLevel0
ShortCut = 41008
end
item
Command = EcFoldCurrent
ShortCut = 41005
end
item
Command = EcUnFoldCurrent
ShortCut = 41003
end
item
Command = EcToggleMarkupWord
ShortCut = 32845
end
item
Command = ecNormalSelect
ShortCut = 24654
end
item
Command = ecColumnSelect
ShortCut = 24643
end
item
Command = ecLineSelect
ShortCut = 24652
end
item
Command = ecTab
ShortCut = 9
end
item
Command = ecShiftTab
ShortCut = 8201
end
item
Command = ecMatchBracket
ShortCut = 24642
end
item
Command = ecColSelUp
ShortCut = 40998
end
item
Command = ecColSelDown
ShortCut = 41000
end
item
Command = ecColSelLeft
ShortCut = 40997
end
item
Command = ecColSelRight
ShortCut = 40999
end
item
Command = ecColSelPageDown
ShortCut = 40994
end
item
Command = ecColSelPageBottom
ShortCut = 57378
end
item
Command = ecColSelPageUp
ShortCut = 40993
end
item
Command = ecColSelPageTop
ShortCut = 57377
end
item
Command = ecColSelLineStart
ShortCut = 40996
end
item
Command = ecColSelLineEnd
ShortCut = 40995
end
item
Command = ecColSelEditorTop
ShortCut = 57380
end
item
Command = ecColSelEditorBottom
ShortCut = 57379
end>
MouseActions = <> MouseActions = <>
MouseTextActions = <> MouseTextActions = <>
MouseSelActions = <> MouseSelActions = <>
Lines.Strings = (
''
)
Options = [eoAutoIndent, eoBracketHighlight, eoEnhanceHomeKey, eoGroupUndo, eoHalfPageScroll, eoHideRightMargin, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoAltSetsColumnMode]
Options2 = [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock, eoColorSelectionTillEol]
MouseOptions = [emAltSetsColumnMode, emCtrlWheelZoom]
VisibleSpecialChars = [vscSpace, vscTabAtLast] VisibleSpecialChars = [vscSpace, vscTabAtLast]
ReadOnly = True ReadOnly = True
RightEdge = 0
ScrollBars = ssAutoBoth
SelectedColor.BackPriority = 50 SelectedColor.BackPriority = 50
SelectedColor.ForePriority = 50 SelectedColor.ForePriority = 50
SelectedColor.FramePriority = 50 SelectedColor.FramePriority = 50
...@@ -112,6 +545,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -112,6 +545,7 @@ object PreviewClassCode: TPreviewClassCode
inline SynLeftGutterPartList1: TSynGutterPartList inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks object SynGutterMarks1: TSynGutterMarks
Width = 24 Width = 24
Visible = False
MouseActions = <> MouseActions = <>
end end
object SynGutterLineNumber1: TSynGutterLineNumber object SynGutterLineNumber1: TSynGutterLineNumber
...@@ -137,6 +571,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -137,6 +571,7 @@ object PreviewClassCode: TPreviewClassCode
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
end end
object SynGutterCodeFolding1: TSynGutterCodeFolding object SynGutterCodeFolding1: TSynGutterCodeFolding
Visible = False
MouseActions = <> MouseActions = <>
MarkupInfo.Background = clNone MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
...@@ -148,15 +583,16 @@ object PreviewClassCode: TPreviewClassCode ...@@ -148,15 +583,16 @@ object PreviewClassCode: TPreviewClassCode
end end
object TabSheet4: TTabSheet object TabSheet4: TTabSheet
Caption = 'Java' Caption = 'Java'
ClientHeight = 453 ClientHeight = 506
ClientWidth = 785 ClientWidth = 781
ImageIndex = 1 ImageIndex = 1
inline mem_ClassJava: TSynEdit inline mem_ClassJava: TSynEdit
Left = 0 Left = 0
Height = 453 Height = 506
Top = 0 Top = 0
Width = 785 Width = 781
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -165,16 +601,446 @@ object PreviewClassCode: TPreviewClassCode ...@@ -165,16 +601,446 @@ object PreviewClassCode: TPreviewClassCode
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
Gutter.Width = 57 BorderStyle = bsNone
Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
Keystrokes = <> Highlighter = SynJavaSyn1
Keystrokes = <
item
Command = ecUp
ShortCut = 38
end
item
Command = ecSelUp
ShortCut = 8230
end
item
Command = ecScrollUp
ShortCut = 16422
end
item
Command = ecDown
ShortCut = 40
end
item
Command = ecSelDown
ShortCut = 8232
end
item
Command = ecScrollDown
ShortCut = 16424
end
item
Command = ecLeft
ShortCut = 37
end
item
Command = ecSelLeft
ShortCut = 8229
end
item
Command = ecWordLeft
ShortCut = 16421
end
item
Command = ecSelWordLeft
ShortCut = 24613
end
item
Command = ecRight
ShortCut = 39
end
item
Command = ecSelRight
ShortCut = 8231
end
item
Command = ecWordRight
ShortCut = 16423
end
item
Command = ecSelWordRight
ShortCut = 24615
end
item
Command = ecPageDown
ShortCut = 34
end
item
Command = ecSelPageDown
ShortCut = 8226
end
item
Command = ecPageBottom
ShortCut = 16418
end
item
Command = ecSelPageBottom
ShortCut = 24610
end
item
Command = ecPageUp
ShortCut = 33
end
item
Command = ecSelPageUp
ShortCut = 8225
end
item
Command = ecPageTop
ShortCut = 16417
end
item
Command = ecSelPageTop
ShortCut = 24609
end
item
Command = ecLineStart
ShortCut = 36
end
item
Command = ecSelLineStart
ShortCut = 8228
end
item
Command = ecEditorTop
ShortCut = 16420
end
item
Command = ecSelEditorTop
ShortCut = 24612
end
item
Command = ecLineEnd
ShortCut = 35
end
item
Command = ecSelLineEnd
ShortCut = 8227
end
item
Command = ecEditorBottom
ShortCut = 16419
end
item
Command = ecSelEditorBottom
ShortCut = 24611
end
item
Command = ecToggleMode
ShortCut = 45
end
item
Command = ecCopy
ShortCut = 16429
end
item
Command = ecPaste
ShortCut = 8237
end
item
Command = ecDeleteChar
ShortCut = 46
end
item
Command = ecCut
ShortCut = 8238
end
item
Command = ecDeleteLastChar
ShortCut = 8
end
item
Command = ecDeleteLastChar
ShortCut = 8200
end
item
Command = ecDeleteLastWord
ShortCut = 16392
end
item
Command = ecUndo
ShortCut = 32776
end
item
Command = ecRedo
ShortCut = 40968
end
item
Command = ecLineBreak
ShortCut = 13
end
item
Command = ecSelectAll
ShortCut = 16449
end
item
Command = ecCopy
ShortCut = 16451
end
item
Command = ecBlockIndent
ShortCut = 24649
end
item
Command = ecLineBreak
ShortCut = 16461
end
item
Command = ecInsertLine
ShortCut = 16462
end
item
Command = ecDeleteWord
ShortCut = 16468
end
item
Command = ecBlockUnindent
ShortCut = 24661
end
item
Command = ecPaste
ShortCut = 16470
end
item
Command = ecCut
ShortCut = 16472
end
item
Command = ecDeleteLine
ShortCut = 16473
end
item
Command = ecDeleteEOL
ShortCut = 24665
end
item
Command = ecUndo
ShortCut = 16474
end
item
Command = ecRedo
ShortCut = 24666
end
item
Command = ecGotoMarker0
ShortCut = 16432
end
item
Command = ecGotoMarker1
ShortCut = 16433
end
item
Command = ecGotoMarker2
ShortCut = 16434
end
item
Command = ecGotoMarker3
ShortCut = 16435
end
item
Command = ecGotoMarker4
ShortCut = 16436
end
item
Command = ecGotoMarker5
ShortCut = 16437
end
item
Command = ecGotoMarker6
ShortCut = 16438
end
item
Command = ecGotoMarker7
ShortCut = 16439
end
item
Command = ecGotoMarker8
ShortCut = 16440
end
item
Command = ecGotoMarker9
ShortCut = 16441
end
item
Command = ecSetMarker0
ShortCut = 24624
end
item
Command = ecSetMarker1
ShortCut = 24625
end
item
Command = ecSetMarker2
ShortCut = 24626
end
item
Command = ecSetMarker3
ShortCut = 24627
end
item
Command = ecSetMarker4
ShortCut = 24628
end
item
Command = ecSetMarker5
ShortCut = 24629
end
item
Command = ecSetMarker6
ShortCut = 24630
end
item
Command = ecSetMarker7
ShortCut = 24631
end
item
Command = ecSetMarker8
ShortCut = 24632
end
item
Command = ecSetMarker9
ShortCut = 24633
end
item
Command = EcFoldLevel1
ShortCut = 41009
end
item
Command = EcFoldLevel2
ShortCut = 41010
end
item
Command = EcFoldLevel3
ShortCut = 41011
end
item
Command = EcFoldLevel4
ShortCut = 41012
end
item
Command = EcFoldLevel5
ShortCut = 41013
end
item
Command = EcFoldLevel6
ShortCut = 41014
end
item
Command = EcFoldLevel7
ShortCut = 41015
end
item
Command = EcFoldLevel8
ShortCut = 41016
end
item
Command = EcFoldLevel9
ShortCut = 41017
end
item
Command = EcFoldLevel0
ShortCut = 41008
end
item
Command = EcFoldCurrent
ShortCut = 41005
end
item
Command = EcUnFoldCurrent
ShortCut = 41003
end
item
Command = EcToggleMarkupWord
ShortCut = 32845
end
item
Command = ecNormalSelect
ShortCut = 24654
end
item
Command = ecColumnSelect
ShortCut = 24643
end
item
Command = ecLineSelect
ShortCut = 24652
end
item
Command = ecTab
ShortCut = 9
end
item
Command = ecShiftTab
ShortCut = 8201
end
item
Command = ecMatchBracket
ShortCut = 24642
end
item
Command = ecColSelUp
ShortCut = 40998
end
item
Command = ecColSelDown
ShortCut = 41000
end
item
Command = ecColSelLeft
ShortCut = 40997
end
item
Command = ecColSelRight
ShortCut = 40999
end
item
Command = ecColSelPageDown
ShortCut = 40994
end
item
Command = ecColSelPageBottom
ShortCut = 57378
end
item
Command = ecColSelPageUp
ShortCut = 40993
end
item
Command = ecColSelPageTop
ShortCut = 57377
end
item
Command = ecColSelLineStart
ShortCut = 40996
end
item
Command = ecColSelLineEnd
ShortCut = 40995
end
item
Command = ecColSelEditorTop
ShortCut = 57380
end
item
Command = ecColSelEditorBottom
ShortCut = 57379
end>
MouseActions = <> MouseActions = <>
MouseTextActions = <> MouseTextActions = <>
MouseSelActions = <> MouseSelActions = <>
Lines.Strings = (
''
)
Options = [eoAutoIndent, eoBracketHighlight, eoEnhanceHomeKey, eoGroupUndo, eoHalfPageScroll, eoHideRightMargin, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoAltSetsColumnMode]
Options2 = [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock, eoColorSelectionTillEol]
MouseOptions = [emAltSetsColumnMode, emCtrlWheelZoom]
VisibleSpecialChars = [vscSpace, vscTabAtLast] VisibleSpecialChars = [vscSpace, vscTabAtLast]
ReadOnly = True ReadOnly = True
RightEdge = 0
ScrollBars = ssAutoBoth
SelectedColor.BackPriority = 50 SelectedColor.BackPriority = 50
SelectedColor.ForePriority = 50 SelectedColor.ForePriority = 50
SelectedColor.FramePriority = 50 SelectedColor.FramePriority = 50
...@@ -196,6 +1062,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -196,6 +1062,7 @@ object PreviewClassCode: TPreviewClassCode
inline SynLeftGutterPartList1: TSynGutterPartList inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks object SynGutterMarks1: TSynGutterMarks
Width = 24 Width = 24
Visible = False
MouseActions = <> MouseActions = <>
end end
object SynGutterLineNumber1: TSynGutterLineNumber object SynGutterLineNumber1: TSynGutterLineNumber
...@@ -221,6 +1088,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -221,6 +1088,7 @@ object PreviewClassCode: TPreviewClassCode
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
end end
object SynGutterCodeFolding1: TSynGutterCodeFolding object SynGutterCodeFolding1: TSynGutterCodeFolding
Visible = False
MouseActions = <> MouseActions = <>
MarkupInfo.Background = clNone MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
...@@ -232,15 +1100,16 @@ object PreviewClassCode: TPreviewClassCode ...@@ -232,15 +1100,16 @@ object PreviewClassCode: TPreviewClassCode
end end
object TabSheet5: TTabSheet object TabSheet5: TTabSheet
Caption = 'C#' Caption = 'C#'
ClientHeight = 453 ClientHeight = 506
ClientWidth = 785 ClientWidth = 781
ImageIndex = 2 ImageIndex = 2
inline mem_ClassCSharp: TSynEdit inline mem_ClassCSharp: TSynEdit
Left = 0 Left = 0
Height = 453 Height = 506
Top = 0 Top = 0
Width = 785 Width = 781
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -249,16 +1118,446 @@ object PreviewClassCode: TPreviewClassCode ...@@ -249,16 +1118,446 @@ object PreviewClassCode: TPreviewClassCode
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
Gutter.Width = 57 BorderStyle = bsNone
Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
Keystrokes = <> Highlighter = SynFreePascalSyn1
Keystrokes = <
item
Command = ecUp
ShortCut = 38
end
item
Command = ecSelUp
ShortCut = 8230
end
item
Command = ecScrollUp
ShortCut = 16422
end
item
Command = ecDown
ShortCut = 40
end
item
Command = ecSelDown
ShortCut = 8232
end
item
Command = ecScrollDown
ShortCut = 16424
end
item
Command = ecLeft
ShortCut = 37
end
item
Command = ecSelLeft
ShortCut = 8229
end
item
Command = ecWordLeft
ShortCut = 16421
end
item
Command = ecSelWordLeft
ShortCut = 24613
end
item
Command = ecRight
ShortCut = 39
end
item
Command = ecSelRight
ShortCut = 8231
end
item
Command = ecWordRight
ShortCut = 16423
end
item
Command = ecSelWordRight
ShortCut = 24615
end
item
Command = ecPageDown
ShortCut = 34
end
item
Command = ecSelPageDown
ShortCut = 8226
end
item
Command = ecPageBottom
ShortCut = 16418
end
item
Command = ecSelPageBottom
ShortCut = 24610
end
item
Command = ecPageUp
ShortCut = 33
end
item
Command = ecSelPageUp
ShortCut = 8225
end
item
Command = ecPageTop
ShortCut = 16417
end
item
Command = ecSelPageTop
ShortCut = 24609
end
item
Command = ecLineStart
ShortCut = 36
end
item
Command = ecSelLineStart
ShortCut = 8228
end
item
Command = ecEditorTop
ShortCut = 16420
end
item
Command = ecSelEditorTop
ShortCut = 24612
end
item
Command = ecLineEnd
ShortCut = 35
end
item
Command = ecSelLineEnd
ShortCut = 8227
end
item
Command = ecEditorBottom
ShortCut = 16419
end
item
Command = ecSelEditorBottom
ShortCut = 24611
end
item
Command = ecToggleMode
ShortCut = 45
end
item
Command = ecCopy
ShortCut = 16429
end
item
Command = ecPaste
ShortCut = 8237
end
item
Command = ecDeleteChar
ShortCut = 46
end
item
Command = ecCut
ShortCut = 8238
end
item
Command = ecDeleteLastChar
ShortCut = 8
end
item
Command = ecDeleteLastChar
ShortCut = 8200
end
item
Command = ecDeleteLastWord
ShortCut = 16392
end
item
Command = ecUndo
ShortCut = 32776
end
item
Command = ecRedo
ShortCut = 40968
end
item
Command = ecLineBreak
ShortCut = 13
end
item
Command = ecSelectAll
ShortCut = 16449
end
item
Command = ecCopy
ShortCut = 16451
end
item
Command = ecBlockIndent
ShortCut = 24649
end
item
Command = ecLineBreak
ShortCut = 16461
end
item
Command = ecInsertLine
ShortCut = 16462
end
item
Command = ecDeleteWord
ShortCut = 16468
end
item
Command = ecBlockUnindent
ShortCut = 24661
end
item
Command = ecPaste
ShortCut = 16470
end
item
Command = ecCut
ShortCut = 16472
end
item
Command = ecDeleteLine
ShortCut = 16473
end
item
Command = ecDeleteEOL
ShortCut = 24665
end
item
Command = ecUndo
ShortCut = 16474
end
item
Command = ecRedo
ShortCut = 24666
end
item
Command = ecGotoMarker0
ShortCut = 16432
end
item
Command = ecGotoMarker1
ShortCut = 16433
end
item
Command = ecGotoMarker2
ShortCut = 16434
end
item
Command = ecGotoMarker3
ShortCut = 16435
end
item
Command = ecGotoMarker4
ShortCut = 16436
end
item
Command = ecGotoMarker5
ShortCut = 16437
end
item
Command = ecGotoMarker6
ShortCut = 16438
end
item
Command = ecGotoMarker7
ShortCut = 16439
end
item
Command = ecGotoMarker8
ShortCut = 16440
end
item
Command = ecGotoMarker9
ShortCut = 16441
end
item
Command = ecSetMarker0
ShortCut = 24624
end
item
Command = ecSetMarker1
ShortCut = 24625
end
item
Command = ecSetMarker2
ShortCut = 24626
end
item
Command = ecSetMarker3
ShortCut = 24627
end
item
Command = ecSetMarker4
ShortCut = 24628
end
item
Command = ecSetMarker5
ShortCut = 24629
end
item
Command = ecSetMarker6
ShortCut = 24630
end
item
Command = ecSetMarker7
ShortCut = 24631
end
item
Command = ecSetMarker8
ShortCut = 24632
end
item
Command = ecSetMarker9
ShortCut = 24633
end
item
Command = EcFoldLevel1
ShortCut = 41009
end
item
Command = EcFoldLevel2
ShortCut = 41010
end
item
Command = EcFoldLevel3
ShortCut = 41011
end
item
Command = EcFoldLevel4
ShortCut = 41012
end
item
Command = EcFoldLevel5
ShortCut = 41013
end
item
Command = EcFoldLevel6
ShortCut = 41014
end
item
Command = EcFoldLevel7
ShortCut = 41015
end
item
Command = EcFoldLevel8
ShortCut = 41016
end
item
Command = EcFoldLevel9
ShortCut = 41017
end
item
Command = EcFoldLevel0
ShortCut = 41008
end
item
Command = EcFoldCurrent
ShortCut = 41005
end
item
Command = EcUnFoldCurrent
ShortCut = 41003
end
item
Command = EcToggleMarkupWord
ShortCut = 32845
end
item
Command = ecNormalSelect
ShortCut = 24654
end
item
Command = ecColumnSelect
ShortCut = 24643
end
item
Command = ecLineSelect
ShortCut = 24652
end
item
Command = ecTab
ShortCut = 9
end
item
Command = ecShiftTab
ShortCut = 8201
end
item
Command = ecMatchBracket
ShortCut = 24642
end
item
Command = ecColSelUp
ShortCut = 40998
end
item
Command = ecColSelDown
ShortCut = 41000
end
item
Command = ecColSelLeft
ShortCut = 40997
end
item
Command = ecColSelRight
ShortCut = 40999
end
item
Command = ecColSelPageDown
ShortCut = 40994
end
item
Command = ecColSelPageBottom
ShortCut = 57378
end
item
Command = ecColSelPageUp
ShortCut = 40993
end
item
Command = ecColSelPageTop
ShortCut = 57377
end
item
Command = ecColSelLineStart
ShortCut = 40996
end
item
Command = ecColSelLineEnd
ShortCut = 40995
end
item
Command = ecColSelEditorTop
ShortCut = 57380
end
item
Command = ecColSelEditorBottom
ShortCut = 57379
end>
MouseActions = <> MouseActions = <>
MouseTextActions = <> MouseTextActions = <>
MouseSelActions = <> MouseSelActions = <>
Lines.Strings = (
''
)
Options = [eoAutoIndent, eoBracketHighlight, eoEnhanceHomeKey, eoGroupUndo, eoHalfPageScroll, eoHideRightMargin, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoAltSetsColumnMode]
Options2 = [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock, eoColorSelectionTillEol]
MouseOptions = [emAltSetsColumnMode, emCtrlWheelZoom]
VisibleSpecialChars = [vscSpace, vscTabAtLast] VisibleSpecialChars = [vscSpace, vscTabAtLast]
ReadOnly = True ReadOnly = True
RightEdge = 0
ScrollBars = ssAutoBoth
SelectedColor.BackPriority = 50 SelectedColor.BackPriority = 50
SelectedColor.ForePriority = 50 SelectedColor.ForePriority = 50
SelectedColor.FramePriority = 50 SelectedColor.FramePriority = 50
...@@ -280,6 +1579,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -280,6 +1579,7 @@ object PreviewClassCode: TPreviewClassCode
inline SynLeftGutterPartList1: TSynGutterPartList inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks object SynGutterMarks1: TSynGutterMarks
Width = 24 Width = 24
Visible = False
MouseActions = <> MouseActions = <>
end end
object SynGutterLineNumber1: TSynGutterLineNumber object SynGutterLineNumber1: TSynGutterLineNumber
...@@ -305,6 +1605,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -305,6 +1605,7 @@ object PreviewClassCode: TPreviewClassCode
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
end end
object SynGutterCodeFolding1: TSynGutterCodeFolding object SynGutterCodeFolding1: TSynGutterCodeFolding
Visible = False
MouseActions = <> MouseActions = <>
MarkupInfo.Background = clNone MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
...@@ -316,28 +1617,29 @@ object PreviewClassCode: TPreviewClassCode ...@@ -316,28 +1617,29 @@ object PreviewClassCode: TPreviewClassCode
end end
object TabSheet6: TTabSheet object TabSheet6: TTabSheet
Caption = 'SQL' Caption = 'SQL'
ClientHeight = 453 ClientHeight = 506
ClientWidth = 785 ClientWidth = 781
ImageIndex = 3 ImageIndex = 3
object PageControl1: TPageControl object PageControl1: TPageControl
Left = 0 Left = 0
Height = 453 Height = 506
Top = 0 Top = 0
Width = 785 Width = 781
ActivePage = TabSheet10 ActivePage = TabSheet10
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
TabOrder = 0 TabOrder = 0
object TabSheet10: TTabSheet object TabSheet10: TTabSheet
Caption = 'SQL Server' Caption = 'SQL Server'
ClientHeight = 414 ClientHeight = 478
ClientWidth = 779 ClientWidth = 771
inline mem_ClassSQL: TSynEdit inline mem_ClassSQL: TSynEdit
Left = 0 Left = 0
Height = 414 Height = 478
Top = 0 Top = 0
Width = 779 Width = 771
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -346,16 +1648,446 @@ object PreviewClassCode: TPreviewClassCode ...@@ -346,16 +1648,446 @@ object PreviewClassCode: TPreviewClassCode
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
Gutter.Width = 57 BorderStyle = bsNone
Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
Keystrokes = <> Highlighter = SynSQLSyn1
Keystrokes = <
item
Command = ecUp
ShortCut = 38
end
item
Command = ecSelUp
ShortCut = 8230
end
item
Command = ecScrollUp
ShortCut = 16422
end
item
Command = ecDown
ShortCut = 40
end
item
Command = ecSelDown
ShortCut = 8232
end
item
Command = ecScrollDown
ShortCut = 16424
end
item
Command = ecLeft
ShortCut = 37
end
item
Command = ecSelLeft
ShortCut = 8229
end
item
Command = ecWordLeft
ShortCut = 16421
end
item
Command = ecSelWordLeft
ShortCut = 24613
end
item
Command = ecRight
ShortCut = 39
end
item
Command = ecSelRight
ShortCut = 8231
end
item
Command = ecWordRight
ShortCut = 16423
end
item
Command = ecSelWordRight
ShortCut = 24615
end
item
Command = ecPageDown
ShortCut = 34
end
item
Command = ecSelPageDown
ShortCut = 8226
end
item
Command = ecPageBottom
ShortCut = 16418
end
item
Command = ecSelPageBottom
ShortCut = 24610
end
item
Command = ecPageUp
ShortCut = 33
end
item
Command = ecSelPageUp
ShortCut = 8225
end
item
Command = ecPageTop
ShortCut = 16417
end
item
Command = ecSelPageTop
ShortCut = 24609
end
item
Command = ecLineStart
ShortCut = 36
end
item
Command = ecSelLineStart
ShortCut = 8228
end
item
Command = ecEditorTop
ShortCut = 16420
end
item
Command = ecSelEditorTop
ShortCut = 24612
end
item
Command = ecLineEnd
ShortCut = 35
end
item
Command = ecSelLineEnd
ShortCut = 8227
end
item
Command = ecEditorBottom
ShortCut = 16419
end
item
Command = ecSelEditorBottom
ShortCut = 24611
end
item
Command = ecToggleMode
ShortCut = 45
end
item
Command = ecCopy
ShortCut = 16429
end
item
Command = ecPaste
ShortCut = 8237
end
item
Command = ecDeleteChar
ShortCut = 46
end
item
Command = ecCut
ShortCut = 8238
end
item
Command = ecDeleteLastChar
ShortCut = 8
end
item
Command = ecDeleteLastChar
ShortCut = 8200
end
item
Command = ecDeleteLastWord
ShortCut = 16392
end
item
Command = ecUndo
ShortCut = 32776
end
item
Command = ecRedo
ShortCut = 40968
end
item
Command = ecLineBreak
ShortCut = 13
end
item
Command = ecSelectAll
ShortCut = 16449
end
item
Command = ecCopy
ShortCut = 16451
end
item
Command = ecBlockIndent
ShortCut = 24649
end
item
Command = ecLineBreak
ShortCut = 16461
end
item
Command = ecInsertLine
ShortCut = 16462
end
item
Command = ecDeleteWord
ShortCut = 16468
end
item
Command = ecBlockUnindent
ShortCut = 24661
end
item
Command = ecPaste
ShortCut = 16470
end
item
Command = ecCut
ShortCut = 16472
end
item
Command = ecDeleteLine
ShortCut = 16473
end
item
Command = ecDeleteEOL
ShortCut = 24665
end
item
Command = ecUndo
ShortCut = 16474
end
item
Command = ecRedo
ShortCut = 24666
end
item
Command = ecGotoMarker0
ShortCut = 16432
end
item
Command = ecGotoMarker1
ShortCut = 16433
end
item
Command = ecGotoMarker2
ShortCut = 16434
end
item
Command = ecGotoMarker3
ShortCut = 16435
end
item
Command = ecGotoMarker4
ShortCut = 16436
end
item
Command = ecGotoMarker5
ShortCut = 16437
end
item
Command = ecGotoMarker6
ShortCut = 16438
end
item
Command = ecGotoMarker7
ShortCut = 16439
end
item
Command = ecGotoMarker8
ShortCut = 16440
end
item
Command = ecGotoMarker9
ShortCut = 16441
end
item
Command = ecSetMarker0
ShortCut = 24624
end
item
Command = ecSetMarker1
ShortCut = 24625
end
item
Command = ecSetMarker2
ShortCut = 24626
end
item
Command = ecSetMarker3
ShortCut = 24627
end
item
Command = ecSetMarker4
ShortCut = 24628
end
item
Command = ecSetMarker5
ShortCut = 24629
end
item
Command = ecSetMarker6
ShortCut = 24630
end
item
Command = ecSetMarker7
ShortCut = 24631
end
item
Command = ecSetMarker8
ShortCut = 24632
end
item
Command = ecSetMarker9
ShortCut = 24633
end
item
Command = EcFoldLevel1
ShortCut = 41009
end
item
Command = EcFoldLevel2
ShortCut = 41010
end
item
Command = EcFoldLevel3
ShortCut = 41011
end
item
Command = EcFoldLevel4
ShortCut = 41012
end
item
Command = EcFoldLevel5
ShortCut = 41013
end
item
Command = EcFoldLevel6
ShortCut = 41014
end
item
Command = EcFoldLevel7
ShortCut = 41015
end
item
Command = EcFoldLevel8
ShortCut = 41016
end
item
Command = EcFoldLevel9
ShortCut = 41017
end
item
Command = EcFoldLevel0
ShortCut = 41008
end
item
Command = EcFoldCurrent
ShortCut = 41005
end
item
Command = EcUnFoldCurrent
ShortCut = 41003
end
item
Command = EcToggleMarkupWord
ShortCut = 32845
end
item
Command = ecNormalSelect
ShortCut = 24654
end
item
Command = ecColumnSelect
ShortCut = 24643
end
item
Command = ecLineSelect
ShortCut = 24652
end
item
Command = ecTab
ShortCut = 9
end
item
Command = ecShiftTab
ShortCut = 8201
end
item
Command = ecMatchBracket
ShortCut = 24642
end
item
Command = ecColSelUp
ShortCut = 40998
end
item
Command = ecColSelDown
ShortCut = 41000
end
item
Command = ecColSelLeft
ShortCut = 40997
end
item
Command = ecColSelRight
ShortCut = 40999
end
item
Command = ecColSelPageDown
ShortCut = 40994
end
item
Command = ecColSelPageBottom
ShortCut = 57378
end
item
Command = ecColSelPageUp
ShortCut = 40993
end
item
Command = ecColSelPageTop
ShortCut = 57377
end
item
Command = ecColSelLineStart
ShortCut = 40996
end
item
Command = ecColSelLineEnd
ShortCut = 40995
end
item
Command = ecColSelEditorTop
ShortCut = 57380
end
item
Command = ecColSelEditorBottom
ShortCut = 57379
end>
MouseActions = <> MouseActions = <>
MouseTextActions = <> MouseTextActions = <>
MouseSelActions = <> MouseSelActions = <>
Lines.Strings = (
''
)
Options = [eoAutoIndent, eoBracketHighlight, eoEnhanceHomeKey, eoGroupUndo, eoHalfPageScroll, eoHideRightMargin, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoAltSetsColumnMode]
Options2 = [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock, eoColorSelectionTillEol]
MouseOptions = [emAltSetsColumnMode, emCtrlWheelZoom]
VisibleSpecialChars = [vscSpace, vscTabAtLast] VisibleSpecialChars = [vscSpace, vscTabAtLast]
ReadOnly = True ReadOnly = True
RightEdge = 0
ScrollBars = ssAutoBoth
SelectedColor.BackPriority = 50 SelectedColor.BackPriority = 50
SelectedColor.ForePriority = 50 SelectedColor.ForePriority = 50
SelectedColor.FramePriority = 50 SelectedColor.FramePriority = 50
...@@ -377,6 +2109,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -377,6 +2109,7 @@ object PreviewClassCode: TPreviewClassCode
inline SynLeftGutterPartList1: TSynGutterPartList inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks object SynGutterMarks1: TSynGutterMarks
Width = 24 Width = 24
Visible = False
MouseActions = <> MouseActions = <>
end end
object SynGutterLineNumber1: TSynGutterLineNumber object SynGutterLineNumber1: TSynGutterLineNumber
...@@ -402,6 +2135,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -402,6 +2135,7 @@ object PreviewClassCode: TPreviewClassCode
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
end end
object SynGutterCodeFolding1: TSynGutterCodeFolding object SynGutterCodeFolding1: TSynGutterCodeFolding
Visible = False
MouseActions = <> MouseActions = <>
MarkupInfo.Background = clNone MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
...@@ -413,15 +2147,16 @@ object PreviewClassCode: TPreviewClassCode ...@@ -413,15 +2147,16 @@ object PreviewClassCode: TPreviewClassCode
end end
object TabSheet14: TTabSheet object TabSheet14: TTabSheet
Caption = 'Oracle' Caption = 'Oracle'
ClientHeight = 0 ClientHeight = 478
ClientWidth = 0 ClientWidth = 771
ImageIndex = 1 ImageIndex = 1
inline mem_ClassOracle: TSynEdit inline mem_ClassOracle: TSynEdit
Left = 0 Left = 0
Height = 441 Height = 478
Top = 0 Top = 0
Width = 773 Width = 771
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
...@@ -430,16 +2165,446 @@ object PreviewClassCode: TPreviewClassCode ...@@ -430,16 +2165,446 @@ object PreviewClassCode: TPreviewClassCode
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
Gutter.Width = 57 BorderStyle = bsNone
Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
Keystrokes = <> Highlighter = SynSQLSyn1
Keystrokes = <
item
Command = ecUp
ShortCut = 38
end
item
Command = ecSelUp
ShortCut = 8230
end
item
Command = ecScrollUp
ShortCut = 16422
end
item
Command = ecDown
ShortCut = 40
end
item
Command = ecSelDown
ShortCut = 8232
end
item
Command = ecScrollDown
ShortCut = 16424
end
item
Command = ecLeft
ShortCut = 37
end
item
Command = ecSelLeft
ShortCut = 8229
end
item
Command = ecWordLeft
ShortCut = 16421
end
item
Command = ecSelWordLeft
ShortCut = 24613
end
item
Command = ecRight
ShortCut = 39
end
item
Command = ecSelRight
ShortCut = 8231
end
item
Command = ecWordRight
ShortCut = 16423
end
item
Command = ecSelWordRight
ShortCut = 24615
end
item
Command = ecPageDown
ShortCut = 34
end
item
Command = ecSelPageDown
ShortCut = 8226
end
item
Command = ecPageBottom
ShortCut = 16418
end
item
Command = ecSelPageBottom
ShortCut = 24610
end
item
Command = ecPageUp
ShortCut = 33
end
item
Command = ecSelPageUp
ShortCut = 8225
end
item
Command = ecPageTop
ShortCut = 16417
end
item
Command = ecSelPageTop
ShortCut = 24609
end
item
Command = ecLineStart
ShortCut = 36
end
item
Command = ecSelLineStart
ShortCut = 8228
end
item
Command = ecEditorTop
ShortCut = 16420
end
item
Command = ecSelEditorTop
ShortCut = 24612
end
item
Command = ecLineEnd
ShortCut = 35
end
item
Command = ecSelLineEnd
ShortCut = 8227
end
item
Command = ecEditorBottom
ShortCut = 16419
end
item
Command = ecSelEditorBottom
ShortCut = 24611
end
item
Command = ecToggleMode
ShortCut = 45
end
item
Command = ecCopy
ShortCut = 16429
end
item
Command = ecPaste
ShortCut = 8237
end
item
Command = ecDeleteChar
ShortCut = 46
end
item
Command = ecCut
ShortCut = 8238
end
item
Command = ecDeleteLastChar
ShortCut = 8
end
item
Command = ecDeleteLastChar
ShortCut = 8200
end
item
Command = ecDeleteLastWord
ShortCut = 16392
end
item
Command = ecUndo
ShortCut = 32776
end
item
Command = ecRedo
ShortCut = 40968
end
item
Command = ecLineBreak
ShortCut = 13
end
item
Command = ecSelectAll
ShortCut = 16449
end
item
Command = ecCopy
ShortCut = 16451
end
item
Command = ecBlockIndent
ShortCut = 24649
end
item
Command = ecLineBreak
ShortCut = 16461
end
item
Command = ecInsertLine
ShortCut = 16462
end
item
Command = ecDeleteWord
ShortCut = 16468
end
item
Command = ecBlockUnindent
ShortCut = 24661
end
item
Command = ecPaste
ShortCut = 16470
end
item
Command = ecCut
ShortCut = 16472
end
item
Command = ecDeleteLine
ShortCut = 16473
end
item
Command = ecDeleteEOL
ShortCut = 24665
end
item
Command = ecUndo
ShortCut = 16474
end
item
Command = ecRedo
ShortCut = 24666
end
item
Command = ecGotoMarker0
ShortCut = 16432
end
item
Command = ecGotoMarker1
ShortCut = 16433
end
item
Command = ecGotoMarker2
ShortCut = 16434
end
item
Command = ecGotoMarker3
ShortCut = 16435
end
item
Command = ecGotoMarker4
ShortCut = 16436
end
item
Command = ecGotoMarker5
ShortCut = 16437
end
item
Command = ecGotoMarker6
ShortCut = 16438
end
item
Command = ecGotoMarker7
ShortCut = 16439
end
item
Command = ecGotoMarker8
ShortCut = 16440
end
item
Command = ecGotoMarker9
ShortCut = 16441
end
item
Command = ecSetMarker0
ShortCut = 24624
end
item
Command = ecSetMarker1
ShortCut = 24625
end
item
Command = ecSetMarker2
ShortCut = 24626
end
item
Command = ecSetMarker3
ShortCut = 24627
end
item
Command = ecSetMarker4
ShortCut = 24628
end
item
Command = ecSetMarker5
ShortCut = 24629
end
item
Command = ecSetMarker6
ShortCut = 24630
end
item
Command = ecSetMarker7
ShortCut = 24631
end
item
Command = ecSetMarker8
ShortCut = 24632
end
item
Command = ecSetMarker9
ShortCut = 24633
end
item
Command = EcFoldLevel1
ShortCut = 41009
end
item
Command = EcFoldLevel2
ShortCut = 41010
end
item
Command = EcFoldLevel3
ShortCut = 41011
end
item
Command = EcFoldLevel4
ShortCut = 41012
end
item
Command = EcFoldLevel5
ShortCut = 41013
end
item
Command = EcFoldLevel6
ShortCut = 41014
end
item
Command = EcFoldLevel7
ShortCut = 41015
end
item
Command = EcFoldLevel8
ShortCut = 41016
end
item
Command = EcFoldLevel9
ShortCut = 41017
end
item
Command = EcFoldLevel0
ShortCut = 41008
end
item
Command = EcFoldCurrent
ShortCut = 41005
end
item
Command = EcUnFoldCurrent
ShortCut = 41003
end
item
Command = EcToggleMarkupWord
ShortCut = 32845
end
item
Command = ecNormalSelect
ShortCut = 24654
end
item
Command = ecColumnSelect
ShortCut = 24643
end
item
Command = ecLineSelect
ShortCut = 24652
end
item
Command = ecTab
ShortCut = 9
end
item
Command = ecShiftTab
ShortCut = 8201
end
item
Command = ecMatchBracket
ShortCut = 24642
end
item
Command = ecColSelUp
ShortCut = 40998
end
item
Command = ecColSelDown
ShortCut = 41000
end
item
Command = ecColSelLeft
ShortCut = 40997
end
item
Command = ecColSelRight
ShortCut = 40999
end
item
Command = ecColSelPageDown
ShortCut = 40994
end
item
Command = ecColSelPageBottom
ShortCut = 57378
end
item
Command = ecColSelPageUp
ShortCut = 40993
end
item
Command = ecColSelPageTop
ShortCut = 57377
end
item
Command = ecColSelLineStart
ShortCut = 40996
end
item
Command = ecColSelLineEnd
ShortCut = 40995
end
item
Command = ecColSelEditorTop
ShortCut = 57380
end
item
Command = ecColSelEditorBottom
ShortCut = 57379
end>
MouseActions = <> MouseActions = <>
MouseTextActions = <> MouseTextActions = <>
MouseSelActions = <> MouseSelActions = <>
Lines.Strings = (
''
)
Options = [eoAutoIndent, eoBracketHighlight, eoEnhanceHomeKey, eoGroupUndo, eoHalfPageScroll, eoHideRightMargin, eoSmartTabs, eoTabsToSpaces, eoTrimTrailingSpaces, eoAltSetsColumnMode]
Options2 = [eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock, eoColorSelectionTillEol]
MouseOptions = [emAltSetsColumnMode, emCtrlWheelZoom]
VisibleSpecialChars = [vscSpace, vscTabAtLast] VisibleSpecialChars = [vscSpace, vscTabAtLast]
ReadOnly = True ReadOnly = True
RightEdge = 0
ScrollBars = ssAutoBoth
SelectedColor.BackPriority = 50 SelectedColor.BackPriority = 50
SelectedColor.ForePriority = 50 SelectedColor.ForePriority = 50
SelectedColor.FramePriority = 50 SelectedColor.FramePriority = 50
...@@ -461,6 +2626,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -461,6 +2626,7 @@ object PreviewClassCode: TPreviewClassCode
inline SynLeftGutterPartList1: TSynGutterPartList inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks object SynGutterMarks1: TSynGutterMarks
Width = 24 Width = 24
Visible = False
MouseActions = <> MouseActions = <>
end end
object SynGutterLineNumber1: TSynGutterLineNumber object SynGutterLineNumber1: TSynGutterLineNumber
...@@ -486,6 +2652,7 @@ object PreviewClassCode: TPreviewClassCode ...@@ -486,6 +2652,7 @@ object PreviewClassCode: TPreviewClassCode
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
end end
object SynGutterCodeFolding1: TSynGutterCodeFolding object SynGutterCodeFolding1: TSynGutterCodeFolding
Visible = False
MouseActions = <> MouseActions = <>
MarkupInfo.Background = clNone MarkupInfo.Background = clNone
MarkupInfo.Foreground = clGray MarkupInfo.Foreground = clGray
...@@ -501,4 +2668,24 @@ object PreviewClassCode: TPreviewClassCode ...@@ -501,4 +2668,24 @@ object PreviewClassCode: TPreviewClassCode
end end
end end
end end
object SynFreePascalSyn1: TSynFreePascalSyn
Enabled = False
CompilerMode = pcmObjFPC
NestedComments = True
left = 383
top = 19
end
object SynJavaSyn1: TSynJavaSyn
DefaultFilter = 'Java Files (*.java)|*.java'
Enabled = False
left = 503
top = 19
end
object SynSQLSyn1: TSynSQLSyn
DefaultFilter = 'SQL Files (*.sql)|*.sql'
Enabled = False
SQLDialect = sqlSybase
left = 589
top = 19
end
end end
...@@ -3,29 +3,36 @@ unit formMemo; ...@@ -3,29 +3,36 @@ unit formMemo;
interface interface
uses uses
Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,
Dialogs, StdCtrls, ExtCtrls, ComCtrls, SynEdit; StdCtrls, ExtCtrls, ComCtrls, SynEdit, SynHighlighterPas, SynHighlighterJava,
SynHighlighterSQL;
type type
{ TPreviewClassCode }
TPreviewClassCode = class(TForm) TPreviewClassCode = class(TForm)
Panel2: TPanel; Panel2: TPanel;
Panel1: TPanel; Panel1: TPanel;
Button1: TButton; Button1: TButton;
pgc_Main: TPageControl; pgc_Main: TPageControl;
mem_ClassJava: TSynEdit;
mem_ClassPascal: TSynEdit;
mem_ClassCSharp: TSynEdit;
mem_ClassSQL: TSynEdit;
mem_ClassOracle: TSynEdit;
SynFreePascalSyn1: TSynFreePascalSyn;
SynJavaSyn1: TSynJavaSyn;
SynSQLSyn1: TSynSQLSyn;
TabSheet1: TTabSheet; TabSheet1: TTabSheet;
pgc_ClassCode: TPageControl; pgc_ClassCode: TPageControl;
TabSheet3: TTabSheet; TabSheet3: TTabSheet;
mem_ClassPascal: TSynEdit;
TabSheet4: TTabSheet; TabSheet4: TTabSheet;
mem_ClassJava: TSynEdit;
TabSheet5: TTabSheet; TabSheet5: TTabSheet;
mem_ClassCSharp: TSynEdit;
TabSheet6: TTabSheet; TabSheet6: TTabSheet;
PageControl1: TPageControl; PageControl1: TPageControl;
TabSheet10: TTabSheet; TabSheet10: TTabSheet;
TabSheet14: TTabSheet; TabSheet14: TTabSheet;
mem_ClassSQL: TSynEdit;
mem_ClassOracle: TSynEdit;
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
private private
{ Private declarations } { Private declarations }
......
object DataBaseLogin: TDataBaseLogin object DataBaseLogin: TDataBaseLogin
Left = 2241 Left = 1480
Height = 543 Height = 537
Top = 255 Top = 299
Width = 440 Width = 440
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Connect to Database Server' Caption = 'Connect to Database Server'
ClientHeight = 543 ClientHeight = 537
ClientWidth = 440 ClientWidth = 440
Color = clBtnFace Color = clBtnFace
OnClose = FormClose OnClose = FormClose
OnShow = FormShow OnShow = FormShow
ParentFont = True ParentFont = True
Position = poOwnerFormCenter Position = poOwnerFormCenter
LCLVersion = '2.0.0.4'
object GroupBox2: TGroupBox object GroupBox2: TGroupBox
Left = 8 Left = 8
Height = 208 Height = 208
Top = 288 Top = 288
Width = 424 Width = 424
TabOrder = 11 ClientHeight = 206
ClientWidth = 422
TabOrder = 1
object edtUsuario: TLabeledEdit
Left = 15
Height = 43
Top = 95
Width = 400
EditLabel.Height = 19
EditLabel.Width = 400
EditLabel.Caption = 'Usuário'
EditLabel.ParentColor = False
TabOrder = 1
end
object edtPassword: TLabeledEdit
Left = 15
Height = 43
Top = 160
Width = 400
EchoMode = emPassword
EditLabel.Height = 19
EditLabel.Width = 400
EditLabel.Caption = 'Senha'
EditLabel.ParentColor = False
PasswordChar = '*'
TabOrder = 2
end
object cbDialect: TComboBox
Left = 15
Height = 39
Top = 25
Width = 400
ItemHeight = 0
OnChange = cbODBCD_DSNChange
Style = csDropDownList
TabOrder = 0
end
object Label2: TLabel
Left = 15
Height = 19
Top = 5
Width = 48
Caption = 'Dialeto'
ParentColor = False
end
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 8 Left = 8
Height = 272 Height = 272
Top = 8 Top = 8
Width = 424 Width = 424
TabOrder = 10 ClientHeight = 270
end ClientWidth = 422
object cbODBCD_DSN: TComboBox
Left = 32
Height = 15
Top = 48
Width = 389
ItemHeight = 0
OnChange = cbODBCD_DSNChange
Style = csDropDownList
TabOrder = 1
end
object edtUsuario: TLabeledEdit
Left = 21
Height = 22
Top = 398
Width = 400
EditLabel.Height = 16
EditLabel.Width = 400
EditLabel.Caption = 'Usuário'
EditLabel.ParentColor = False
TabOrder = 7
end
object edtPassword: TLabeledEdit
Left = 21
Height = 22
Top = 454
Width = 400
EchoMode = emPassword
EditLabel.Height = 16
EditLabel.Width = 400
EditLabel.Caption = 'Senha'
EditLabel.ParentColor = False
PasswordChar = '*'
TabOrder = 8
end
object cbDialect: TComboBox
Left = 21
Height = 15
Top = 339
Width = 400
ItemHeight = 0
OnChange = cbODBCD_DSNChange
Style = csDropDownList
TabOrder = 6
end
object Label2: TLabel
Left = 21
Height = 16
Top = 320
Width = 45
Caption = 'Dialeto'
ParentColor = False
end
object rbDSN: TRadioButton
Left = 16
Height = 18
Top = 16
Width = 115
Caption = 'Selecionar DSN'
Checked = True
OnClick = rbDSNClick
TabOrder = 0 TabOrder = 0
TabStop = True object cbODBCD_DSN: TComboBox
end Left = 26
object rbPersonalizado: TRadioButton Height = 39
Left = 16 Top = 48
Height = 18 Width = 389
Top = 88 ItemHeight = 0
Width = 108 OnChange = cbODBCD_DSNChange
Caption = 'Personalizado' Style = csDropDownList
OnClick = rbPersonalizadoClick TabOrder = 1
TabOrder = 2 end
end object rbDSN: TRadioButton
object cbODBCD_DRIVERS: TComboBox Left = 10
Left = 35 Height = 24
Height = 15 Top = 16
Top = 120 Width = 130
Width = 386 Caption = 'Selecionar DSN'
Enabled = False Checked = True
ItemHeight = 0 OnClick = rbDSNClick
OnChange = cbODBCD_DSNChange TabOrder = 0
Style = csDropDownList TabStop = True
TabOrder = 3 end
end object rbPersonalizado: TRadioButton
object edtDatabaseName: TLabeledEdit Left = 10
Left = 32 Height = 24
Height = 22 Top = 88
Top = 232 Width = 119
Width = 389 Caption = 'Personalizado'
EditLabel.Height = 16 OnClick = rbPersonalizadoClick
EditLabel.Width = 389 TabOrder = 2
EditLabel.Caption = 'Nome do Banco de Dados' end
EditLabel.ParentColor = False object cbODBCD_DRIVERS: TComboBox
Enabled = False Left = 26
TabOrder = 5 Height = 39
end Top = 115
object edtServerName: TLabeledEdit Width = 389
Left = 32 Enabled = False
Height = 22 ItemHeight = 0
Top = 176 OnChange = cbODBCD_DSNChange
Width = 389 Style = csDropDownList
EditLabel.Height = 16 TabOrder = 3
EditLabel.Width = 389 end
EditLabel.Caption = 'Servidor' object edtDatabaseName: TLabeledEdit
EditLabel.ParentColor = False Left = 26
Enabled = False Height = 43
TabOrder = 4 Top = 232
Width = 389
EditLabel.Height = 19
EditLabel.Width = 389
EditLabel.Caption = 'Nome do Banco de Dados'
EditLabel.ParentColor = False
Enabled = False
TabOrder = 4
end
object edtServerName: TLabeledEdit
Left = 26
Height = 43
Top = 176
Width = 389
EditLabel.Height = 19
EditLabel.Width = 389
EditLabel.Caption = 'Servidor'
EditLabel.ParentColor = False
Enabled = False
TabOrder = 5
end
end end
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 40 Height = 40
Top = 503 Top = 497
Width = 440 Width = 440
Align = alBottom Align = alBottom
ClientHeight = 40 ClientHeight = 40
ClientWidth = 440 ClientWidth = 440
TabOrder = 9 TabOrder = 2
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 268 Left = 238
Height = 25 Height = 27
Top = 7 Top = 5
Width = 75 Width = 93
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Caption = 'Ok' Caption = 'Ok'
Default = True
Kind = bkOK Kind = bkOK
ModalResult = 1 ModalResult = 1
OnClick = Button1Click OnClick = Button1Click
TabOrder = 0 TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 349 Left = 337
Height = 25 Height = 27
Top = 7 Top = 5
Width = 75 Width = 93
Anchors = [akTop, akRight] Anchors = [akTop, akRight]
Cancel = True
Caption = 'Cancel' Caption = 'Cancel'
Kind = bkCancel Kind = bkCancel
ModalResult = 2 ModalResult = 2
......
object ExplorerV2: TExplorerV2 object ExplorerV2: TExplorerV2
Left = 2406 Left = 577
Height = 695 Height = 696
Top = 177 Top = 103
Width = 1228 Width = 1232
Caption = 'Model OQL Query' Caption = 'Model OQL Query'
ClientHeight = 695 ClientHeight = 696
ClientWidth = 1228 ClientWidth = 1232
Color = clWindow Color = clWindow
Icon.Data = { Icon.Data = {
96A5050000000100060000000000010020002820040066000000101000000100 96A5050000000100060000000000010020002820040066000000101000000100
...@@ -11574,6 +11574,7 @@ object ExplorerV2: TExplorerV2 ...@@ -11574,6 +11574,7 @@ object ExplorerV2: TExplorerV2
001FF80000000000001FF80000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFF 001FF80000000000001FF80000000000001FFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
} }
KeyPreview = True
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
OnDestroy = FormDestroy OnDestroy = FormDestroy
...@@ -11581,9 +11582,10 @@ object ExplorerV2: TExplorerV2 ...@@ -11581,9 +11582,10 @@ object ExplorerV2: TExplorerV2
ParentFont = True ParentFont = True
Position = poMainFormCenter Position = poMainFormCenter
ShowInTaskBar = stAlways ShowInTaskBar = stAlways
LCLVersion = '2.0.0.4'
object splVertical: TSplitter object splVertical: TSplitter
Left = 360 Left = 360
Height = 695 Height = 696
Top = 0 Top = 0
Width = 5 Width = 5
MinSize = 5 MinSize = 5
...@@ -11591,56 +11593,56 @@ object ExplorerV2: TExplorerV2 ...@@ -11591,56 +11593,56 @@ object ExplorerV2: TExplorerV2
end end
object pnlEditor: TPanel object pnlEditor: TPanel
Left = 365 Left = 365
Height = 695 Height = 696
Top = 0 Top = 0
Width = 863 Width = 867
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 695 ClientHeight = 696
ClientWidth = 863 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object pnlResult: TPanel object pnlResult: TPanel
Left = 0 Left = 0
Height = 185 Height = 185
Top = 495 Top = 490
Width = 863 Width = 867
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 185 ClientHeight = 185
ClientWidth = 863 ClientWidth = 867
TabOrder = 0 TabOrder = 0
object pcResults: TPageControl object pcResults: TPageControl
Left = 0 Left = 0
Height = 185 Height = 185
Top = 0 Top = 0
Width = 863 Width = 867
ActivePage = tsError ActivePage = tsError
Align = alClient Align = alClient
ShowTabs = False
TabIndex = 1 TabIndex = 1
TabOrder = 0 TabOrder = 0
object tsQueryResult: TTabSheet object tsQueryResult: TTabSheet
Caption = 'tsQueryResult' Caption = 'tsQueryResult'
ClientHeight = 158 ClientHeight = 181
ClientWidth = 882 ClientWidth = 857
TabVisible = False
object pcXMLResults: TPageControl object pcXMLResults: TPageControl
Left = 0 Left = 0
Height = 158 Height = 181
Top = 0 Top = 0
Width = 882 Width = 853
ActivePage = tsList ActivePage = tsList
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
TabOrder = 0 TabOrder = 0
object tsList: TTabSheet object tsList: TTabSheet
Caption = 'Result List' Caption = 'Result List'
ClientHeight = 119 ClientHeight = 177
ClientWidth = 876 ClientWidth = 849
object lvXMLListResult: TListView object lvXMLListResult: TListView
Left = 0 Left = 0
Height = 131 Height = 148
Top = 0 Top = 0
Width = 874 Width = 843
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
Columns = <> Columns = <>
...@@ -11648,25 +11650,26 @@ object ExplorerV2: TExplorerV2 ...@@ -11648,25 +11650,26 @@ object ExplorerV2: TExplorerV2
ParentColor = True ParentColor = True
ReadOnly = True ReadOnly = True
RowSelect = True RowSelect = True
ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
end end
end end
object tsXML: TTabSheet object tsXML: TTabSheet
Caption = 'XML Result' Caption = 'XML Result'
ClientHeight = 131 ClientHeight = 177
ClientWidth = 874 ClientWidth = 849
ImageIndex = 1 ImageIndex = 1
object memXMLTextResult: TMemo object memXMLTextResult: TMemo
Left = 0 Left = 0
Height = 131 Height = 148
Top = 0 Top = 0
Width = 874 Width = 843
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
ParentColor = True ParentColor = True
ReadOnly = True ReadOnly = True
ScrollBars = ssBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
end end
end end
...@@ -11674,20 +11677,19 @@ object ExplorerV2: TExplorerV2 ...@@ -11674,20 +11677,19 @@ object ExplorerV2: TExplorerV2
end end
object tsError: TTabSheet object tsError: TTabSheet
Caption = 'tsError' Caption = 'tsError'
ClientHeight = 146 ClientHeight = 181
ClientWidth = 857 ClientWidth = 857
ImageIndex = 1 ImageIndex = 1
TabVisible = False
object memErrorText: TMemo object memErrorText: TMemo
Left = 0 Left = 0
Height = 146 Height = 181
Top = 0 Top = 0
Width = 857 Width = 857
Align = alClient Align = alClient
BorderStyle = bsNone BorderStyle = bsNone
ParentColor = True ParentColor = True
ReadOnly = True ReadOnly = True
ScrollBars = ssBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
end end
end end
...@@ -11695,28 +11697,31 @@ object ExplorerV2: TExplorerV2 ...@@ -11695,28 +11697,31 @@ object ExplorerV2: TExplorerV2
end end
object pcEditor: TPageControl object pcEditor: TPageControl
Left = 0 Left = 0
Height = 442 Height = 437
Top = 48 Top = 48
Width = 498 Width = 502
ActivePage = tsOQL ActivePage = tsOQL
Align = alClient Align = alClient
MultiLine = True MultiLine = True
ParentFont = False
TabIndex = 0 TabIndex = 0
TabOrder = 1 TabOrder = 1
OnChange = pcEditorChange OnChange = pcEditorChange
Options = [nboMultiLine] Options = [nboMultiLine]
object tsOQL: TTabSheet object tsOQL: TTabSheet
Caption = 'OQL - Object Query Language' Caption = 'OQL - Object Query Language'
ClientHeight = 403 ClientHeight = 404
ClientWidth = 492 ClientWidth = 492
inline SynEditOQL: TSynEdit inline SynEditOQL: TSynEdit
Left = 0 Left = 0
Height = 403 Height = 404
Top = 0 Top = 0
Width = 492 Width = 492
Align = alClient Align = alClient
Font.Height = -13 Color = clWindow
Font.Name = 'Courier New' Font.Color = clWindowText
Font.Height = 13
Font.Name = 'DejaVu Sans Mono'
Font.Pitch = fpFixed Font.Pitch = fpFixed
Font.Quality = fqNonAntialiased Font.Quality = fqNonAntialiased
ParentColor = False ParentColor = False
...@@ -11725,7 +11730,7 @@ object ExplorerV2: TExplorerV2 ...@@ -11725,7 +11730,7 @@ object ExplorerV2: TExplorerV2
OnDragDrop = memOQLQuery2DragDrop OnDragDrop = memOQLQuery2DragDrop
OnDragOver = memOQLQuery2DragOver OnDragOver = memOQLQuery2DragOver
BorderStyle = bsNone BorderStyle = bsNone
Gutter.Width = 33 Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
...@@ -12222,14 +12227,16 @@ object ExplorerV2: TExplorerV2 ...@@ -12222,14 +12227,16 @@ object ExplorerV2: TExplorerV2
end end
object tsSQL: TTabSheet object tsSQL: TTabSheet
Caption = 'SQL Translation' Caption = 'SQL Translation'
ClientHeight = 403 ClientHeight = 404
ClientWidth = 492 ClientWidth = 492
inline SynEditSQL: TSynEdit inline SynEditSQL: TSynEdit
Left = 0 Left = 0
Height = 403 Height = 404
Top = 0 Top = 0
Width = 492 Width = 492
Align = alClient Align = alClient
Color = clWindow
Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Courier New' Font.Name = 'Courier New'
Font.Pitch = fpFixed Font.Pitch = fpFixed
...@@ -12238,7 +12245,7 @@ object ExplorerV2: TExplorerV2 ...@@ -12238,7 +12245,7 @@ object ExplorerV2: TExplorerV2
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
BorderStyle = bsNone BorderStyle = bsNone
Gutter.Width = 33 Gutter.Width = 23
Gutter.MouseActions = <> Gutter.MouseActions = <>
RightGutter.Width = 0 RightGutter.Width = 0
RightGutter.MouseActions = <> RightGutter.MouseActions = <>
...@@ -12739,18 +12746,18 @@ object ExplorerV2: TExplorerV2 ...@@ -12739,18 +12746,18 @@ object ExplorerV2: TExplorerV2
Left = 0 Left = 0
Height = 48 Height = 48
Top = 0 Top = 0
Width = 863 Width = 867
Align = alTop Align = alTop
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 48 ClientHeight = 48
ClientWidth = 863 ClientWidth = 867
TabOrder = 2 TabOrder = 2
object ToolBar1: TToolBar object ToolBar1: TToolBar
Left = 0 Left = 0
Height = 48 Height = 48
Top = 0 Top = 0
Width = 863 Width = 867
ButtonHeight = 40 ButtonHeight = 40
ButtonWidth = 50 ButtonWidth = 50
Caption = 'ToolBar1' Caption = 'ToolBar1'
...@@ -12802,7 +12809,7 @@ object ExplorerV2: TExplorerV2 ...@@ -12802,7 +12809,7 @@ object ExplorerV2: TExplorerV2
Style = tbsCheck Style = tbsCheck
end end
object ToolButton8: TToolButton object ToolButton8: TToolButton
Left = 351 Left = 355
Top = 2 Top = 2
Action = XMLQuery Action = XMLQuery
Grouped = True Grouped = True
...@@ -12823,8 +12830,8 @@ object ExplorerV2: TExplorerV2 ...@@ -12823,8 +12830,8 @@ object ExplorerV2: TExplorerV2
end end
end end
object spResultObject: TSplitter object spResultObject: TSplitter
Left = 498 Left = 502
Height = 442 Height = 437
Top = 48 Top = 48
Width = 5 Width = 5
Align = alRight Align = alRight
...@@ -12832,41 +12839,40 @@ object ExplorerV2: TExplorerV2 ...@@ -12832,41 +12839,40 @@ object ExplorerV2: TExplorerV2
ResizeStyle = rsPattern ResizeStyle = rsPattern
end end
inline OQLObjects: TObjectExplorer inline OQLObjects: TObjectExplorer
Left = 503 Left = 507
Height = 442 Height = 437
Top = 48 Top = 48
Width = 360 Width = 360
Align = alRight Align = alRight
ClientHeight = 442 ClientHeight = 437
ClientWidth = 360 ClientWidth = 360
TabOrder = 4 TabOrder = 4
Visible = False Visible = False
inherited tvExplorer: TTreeView inherited tvExplorer: TTreeView
Height = 442 Height = 437
Width = 360 Width = 360
Images = ilModel Images = ilModel
ParentColor = True ParentColor = True
PopupMenu = pmCopiar PopupMenu = pmCopiar
ReadOnly = False
RightClickSelect = True RightClickSelect = True
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoRightClickSelect, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw] Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end end
end end
object spResultXML: TSplitter object spResultXML: TSplitter
Cursor = crVSplit Cursor = crVSplit
Left = 0 Left = 0
Height = 5 Height = 5
Top = 490 Top = 485
Width = 863 Width = 867
Align = alBottom Align = alBottom
ResizeAnchor = akBottom ResizeAnchor = akBottom
ResizeStyle = rsPattern ResizeStyle = rsPattern
end end
object sbStatusBar: TStatusBar object sbStatusBar: TStatusBar
Left = 0 Left = 0
Height = 15 Height = 21
Top = 680 Top = 675
Width = 863 Width = 867
Panels = < Panels = <
item item
Width = 400 Width = 400
...@@ -12886,17 +12892,17 @@ object ExplorerV2: TExplorerV2 ...@@ -12886,17 +12892,17 @@ object ExplorerV2: TExplorerV2
end end
object pnlModel: TPanel object pnlModel: TPanel
Left = 0 Left = 0
Height = 695 Height = 696
Top = 0 Top = 0
Width = 360 Width = 360
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 695 ClientHeight = 696
ClientWidth = 360 ClientWidth = 360
TabOrder = 1 TabOrder = 1
object tvModelExplorer: TTreeView object tvModelExplorer: TTreeView
Left = 0 Left = 0
Height = 695 Height = 696
Top = 0 Top = 0
Width = 360 Width = 360
Align = alClient Align = alClient
......
...@@ -117,6 +117,8 @@ type ...@@ -117,6 +117,8 @@ type
{ Public declarations } { Public declarations }
property MetaModel: acMetaModel read fMetaModel write SetMetaModel; property MetaModel: acMetaModel read fMetaModel write SetMetaModel;
property Util: TUtil read fUtil; property Util: TUtil read fUtil;
property SQLDialect: acAbstractSQLDialect read fSQLDialect;
property Schema: String read fSchema;
end; end;
var var
...@@ -370,6 +372,7 @@ begin ...@@ -370,6 +372,7 @@ begin
end end
else else
begin begin
pcResults.ActivePageIndex := 0;
spResultObject.Visible := False; spResultObject.Visible := False;
pnlResult.Visible := True; pnlResult.Visible := True;
spResultXML.Visible := True; spResultXML.Visible := True;
......
object OQLExplorerV2: TOQLExplorerV2 object OQLExplorerV2: TOQLExplorerV2
Left = 375 Left = 2177
Height = 558 Height = 552
Top = 363 Top = 281
Width = 1090 Width = 1090
Caption = 'OQLExplorerV2' Caption = 'Curio OQL Explorer'
ClientHeight = 558 ClientHeight = 552
ClientWidth = 1090 ClientWidth = 1090
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
...@@ -11582,90 +11582,73 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11582,90 +11582,73 @@ object OQLExplorerV2: TOQLExplorerV2
OnCreate = FormCreate OnCreate = FormCreate
OnResize = FormResize OnResize = FormResize
OnShow = FormShow OnShow = FormShow
LCLVersion = '2.0.2.0' LCLVersion = '2.0.0.4'
object pnlActionBar: TPanel
Left = 0
Height = 35
Top = 0
Width = 1090
Align = alTop
BevelOuter = bvNone
TabOrder = 0
end
object pcCXOQL: TPageControl object pcCXOQL: TPageControl
Left = 0 Left = 0
Height = 523 Height = 517
Top = 35 Top = 35
Width = 1090 Width = 1090
ActivePage = tsCXOQL ActivePage = tsCXOQL
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
TabOrder = 1 TabOrder = 0
object tsCXOQL: TTabSheet object tsCXOQL: TTabSheet
Caption = 'CXOQL' Caption = 'CXOQL'
ClientHeight = 497 ClientHeight = 489
ClientWidth = 1082 ClientWidth = 1080
object pnlCXOQL: TPanel object pnlCXOQL: TPanel
Left = 0 Left = 0
Height = 497 Height = 489
Top = 0 Top = 0
Width = 1082 Width = 1080
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 497 ClientHeight = 489
ClientWidth = 1082 ClientWidth = 1080
ParentBackground = False ParentBackground = False
TabOrder = 0 TabOrder = 0
object splVertical: TSplitter object splVertical: TSplitter
Left = 219 Left = 274
Height = 497 Height = 489
Top = 0 Top = 0
Width = 8 Width = 4
Color = clBtnFace Color = clBtnFace
OnCanResize = splVerticalCanResize OnCanResize = splVerticalCanResize
ParentColor = False ParentColor = False
end end
object pnlOQLList: TPanel object pnlOQLList: TPanel
Left = 0 Left = 0
Height = 497 Height = 489
Top = 0 Top = 0
Width = 219 Width = 274
Align = alLeft Align = alLeft
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 497 ClientHeight = 489
ClientWidth = 219 ClientWidth = 274
TabOrder = 0 TabOrder = 0
object pnlOQLButtons: TPanel
Left = 0
Height = 35
Top = 0
Width = 219
Align = alTop
BevelOuter = bvNone
TabOrder = 0
end
object pnlList: TPanel object pnlList: TPanel
Left = 0 Left = 0
Height = 462 Height = 463
Top = 35 Top = 26
Width = 219 Width = 274
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 462 ClientHeight = 463
ClientWidth = 219 ClientWidth = 274
TabOrder = 1 TabOrder = 0
object lvOQLList: TListView object lvOQLList: TListView
Left = 0 Left = 0
Height = 374 Height = 375
Top = 0 Top = 0
Width = 219 Width = 274
Align = alClient Align = alClient
Columns = < Columns = <
item item
AutoSize = True AutoSize = True
Caption = 'OQL Name' Caption = 'OQL Name'
Width = 74 Width = 272
end> end>
ScrollBars = ssAutoBoth
SmallImages = ilOQLState SmallImages = ilOQLState
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
...@@ -11674,30 +11657,51 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11674,30 +11657,51 @@ object OQLExplorerV2: TOQLExplorerV2
object memError: TMemo object memError: TMemo
Left = 0 Left = 0
Height = 88 Height = 88
Top = 374 Top = 375
Width = 219 Width = 274
Align = alBottom Align = alBottom
Color = clBtnFace Color = clBtnFace
ReadOnly = True ReadOnly = True
TabOrder = 1 TabOrder = 1
end end
end end
object ToolBar2: TToolBar
Left = 0
Height = 26
Top = 0
Width = 274
Caption = 'ToolBar2'
Images = ilCXOQL
List = True
ShowCaptions = True
TabOrder = 1
object ToolButton5: TToolButton
Left = 1
Top = 2
Action = aNewOQL
end
object ToolButton6: TToolButton
Left = 80
Top = 2
Action = aDeleteOQL
end
end
end end
object pnlRight: TPanel object pnlRight: TPanel
Left = 227 Left = 278
Height = 497 Height = 489
Top = 0 Top = 0
Width = 855 Width = 802
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 497 ClientHeight = 489
ClientWidth = 855 ClientWidth = 802
TabOrder = 1 TabOrder = 1
object pnlOQLExplorer: TPanel object pnlOQLExplorer: TPanel
Left = 0 Left = 0
Height = 424 Height = 416
Top = 73 Top = 73
Width = 855 Width = 802
Align = alClient Align = alClient
BevelOuter = bvNone BevelOuter = bvNone
ParentBackground = False ParentBackground = False
...@@ -11707,16 +11711,16 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11707,16 +11711,16 @@ object OQLExplorerV2: TOQLExplorerV2
Left = 0 Left = 0
Height = 73 Height = 73
Top = 0 Top = 0
Width = 855 Width = 802
Align = alTop Align = alTop
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 73 ClientHeight = 73
ClientWidth = 855 ClientWidth = 802
ParentBackground = False ParentBackground = False
TabOrder = 0 TabOrder = 0
object labelName: TLabel object labelName: TLabel
Left = 58 Left = 58
Height = 13 Height = 14
Top = 13 Top = 13
Width = 31 Width = 31
Caption = 'Name:' Caption = 'Name:'
...@@ -11724,7 +11728,7 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11724,7 +11728,7 @@ object OQLExplorerV2: TOQLExplorerV2
end end
object labelDescription: TLabel object labelDescription: TLabel
Left = 32 Left = 32
Height = 13 Height = 14
Top = 43 Top = 43
Width = 57 Width = 57
Caption = 'Description:' Caption = 'Description:'
...@@ -11732,14 +11736,14 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11732,14 +11736,14 @@ object OQLExplorerV2: TOQLExplorerV2
end end
object edtName: TEdit object edtName: TEdit
Left = 97 Left = 97
Height = 21 Height = 31
Top = 10 Top = 10
Width = 384 Width = 384
TabOrder = 0 TabOrder = 0
end end
object edtDescription: TEdit object edtDescription: TEdit
Left = 97 Left = 97
Height = 21 Height = 31
Top = 40 Top = 40
Width = 384 Width = 384
TabOrder = 1 TabOrder = 1
...@@ -11750,8 +11754,8 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11750,8 +11754,8 @@ object OQLExplorerV2: TOQLExplorerV2
end end
object tsPASunit: TTabSheet object tsPASunit: TTabSheet
Caption = 'Unit' Caption = 'Unit'
ClientHeight = 497 ClientHeight = 489
ClientWidth = 1082 ClientWidth = 1080
ImageIndex = 1 ImageIndex = 1
object pnlPASUnit: TPanel object pnlPASUnit: TPanel
Left = 0 Left = 0
...@@ -11776,6 +11780,39 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -11776,6 +11780,39 @@ object OQLExplorerV2: TOQLExplorerV2
end end
end end
end end
object ToolBar1: TToolBar
Left = 0
Height = 35
Top = 0
Width = 1090
ButtonHeight = 24
ButtonWidth = 24
Caption = 'ToolBar1'
Images = ilCXOQL
List = True
ShowCaptions = True
TabOrder = 1
object ToolButton1: TToolButton
Left = 1
Top = 2
Action = aNewFile
end
object ToolButton2: TToolButton
Left = 56
Top = 2
Action = aLoadFile
end
object ToolButton3: TToolButton
Left = 116
Top = 2
Action = aSaveFile
end
object ToolButton4: TToolButton
Left = 174
Top = 2
Action = aExportPas
end
end
object abExportPAS: TAction object abExportPAS: TAction
Caption = 'abExportPAS' Caption = 'abExportPAS'
Visible = False Visible = False
...@@ -12588,8 +12625,8 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -12588,8 +12625,8 @@ object OQLExplorerV2: TOQLExplorerV2
} }
end end
object ilOQLState: TImageList object ilOQLState: TImageList
left = 16 left = 861
top = 472 top = 5
Bitmap = { Bitmap = {
4C6903000000100000001000000000000000000000000071ADFF0071ADFF0071 4C6903000000100000001000000000000000000000000071ADFF0071ADFF0071
ADFF0071ADFF0071ADFF0071ADFF000000000000000000000000000000000000 ADFF0071ADFF0071ADFF0071ADFF000000000000000000000000000000000000
...@@ -12702,4 +12739,38 @@ object OQLExplorerV2: TOQLExplorerV2 ...@@ -12702,4 +12739,38 @@ object OQLExplorerV2: TOQLExplorerV2
Filter = 'pas|*.pas' Filter = 'pas|*.pas'
left = 616 left = 616
end end
object ActionList1: TActionList
left = 926
top = 6
object aNewOQL: TAction
Caption = '&New OQL'
ImageIndex = 5
OnExecute = aNewOQLExecute
end
object aDeleteOQL: TAction
Caption = '&Delete OQL'
ImageIndex = 9
OnExecute = aDeleteOQLExecute
end
object aNewFile: TAction
Caption = 'Ne&w'
ImageIndex = 10
OnExecute = aNewFileExecute
end
object aLoadFile: TAction
Caption = '&Open'
ImageIndex = 3
OnExecute = aLoadFileExecute
end
object aSaveFile: TAction
Caption = '&Save'
ImageIndex = 7
OnExecute = aSaveFileExecute
end
object aExportPas: TAction
Caption = '&Export'
ImageIndex = 8
OnExecute = aExportPASExecute
end
end
end end
...@@ -21,16 +21,23 @@ type ...@@ -21,16 +21,23 @@ type
{ TOQLExplorerV2 } { TOQLExplorerV2 }
TOQLExplorerV2 = class(TForm) TOQLExplorerV2 = class(TForm)
ilCXOQL: TImageList; aExportPas: TAction;
pnlActionBar: TPanel;
abExportPAS: TAction;
abCXOQL: TAction;
aNewOQL: TAction;
aDeleteOQL: TAction;
aSaveFile: TAction; aSaveFile: TAction;
aLoadFile: TAction; aLoadFile: TAction;
aExportPAS: TAction; aNewFile: TAction;
aDeleteOQL: TAction;
aNewOQL: TAction;
ActionList1: TActionList;
ilCXOQL: TImageList;
pcCXOQL: TPageControl; pcCXOQL: TPageControl;
ToolBar1: TToolBar;
ToolBar2: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ToolButton4: TToolButton;
ToolButton5: TToolButton;
ToolButton6: TToolButton;
tsCXOQL: TTabSheet; tsCXOQL: TTabSheet;
tsPASunit: TTabSheet; tsPASunit: TTabSheet;
ilOQLState: TImageList; ilOQLState: TImageList;
...@@ -51,10 +58,7 @@ type ...@@ -51,10 +58,7 @@ type
SaveDialog1: TSaveDialog; SaveDialog1: TSaveDialog;
SaveUnit: TSaveDialog; SaveUnit: TSaveDialog;
memUnit: TMemo; memUnit: TMemo;
pnlOQLButtons: TPanel;
pnlList: TPanel; pnlList: TPanel;
acttbOQL: TAction;
aNewFile: TAction;
procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure aNewOQLExecute(Sender: TObject); procedure aNewOQLExecute(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
...@@ -66,7 +70,6 @@ type ...@@ -66,7 +70,6 @@ type
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure FormResize(Sender: TObject); procedure FormResize(Sender: TObject);
procedure lvOQLListChange(Sender: TObject; Item: TListItem;Change: TItemChange); procedure lvOQLListChange(Sender: TObject; Item: TListItem;Change: TItemChange);
procedure lvOQLListChanging(Sender: TObject; Item: TListItem;Change: TItemChange; var AllowChange: Boolean);
procedure aNewFileExecute(Sender: TObject); procedure aNewFileExecute(Sender: TObject);
procedure splVerticalCanResize(Sender: TObject; var NewSize: Integer; var Accept: Boolean); procedure splVerticalCanResize(Sender: TObject; var NewSize: Integer; var Accept: Boolean);
...@@ -78,6 +81,8 @@ type ...@@ -78,6 +81,8 @@ type
fFlagFormClosing : Boolean; // Impede que as OQLs sejam inutilmente verificados ao fechar o form fFlagFormClosing : Boolean; // Impede que as OQLs sejam inutilmente verificados ao fechar o form
fExplorer: TExplorerV2; fExplorer: TExplorerV2;
fOQLList: utOQLFile; fOQLList: utOQLFile;
fLastItem: TListItem;
function GerarUnitOQL(piXMLFileName: String): string;
procedure InterfaceToSelectedOQL; procedure InterfaceToSelectedOQL;
function GetQueryType ( piExplorer : TExplorerV2 ) : Integer; function GetQueryType ( piExplorer : TExplorerV2 ) : Integer;
function ValidaQuery(piQuery: string; piOQLType: integer): string; function ValidaQuery(piQuery: string; piOQLType: integer): string;
...@@ -98,7 +103,7 @@ var ...@@ -98,7 +103,7 @@ var
implementation implementation
uses acuObject, acuOQL, IntegracaoDelphiSUML; uses acuObject, acuOQL, acuOQLtoSQLTranslator, IntegracaoDelphiSUML, utuMessage;
{$R *.dfm} {$R *.dfm}
...@@ -113,6 +118,7 @@ begin ...@@ -113,6 +118,7 @@ begin
lvOQLList.Selected.Delete; lvOQLList.Selected.Delete;
lOQL.Delete; lOQL.Delete;
fLastItem := Nil;
if lvOQLList.Items.Count > 0 then if lvOQLList.Items.Count > 0 then
if li - 1 >= 0 then if li - 1 >= 0 then
lvOQLList.Selected := lvOQLList.Items[li-1] lvOQLList.Selected := lvOQLList.Items[li-1]
...@@ -126,14 +132,14 @@ procedure TOQLExplorerV2.aExportPASExecute(Sender: TObject); ...@@ -126,14 +132,14 @@ procedure TOQLExplorerV2.aExportPASExecute(Sender: TObject);
var lFileName: string; var lFileName: string;
begin begin
if fOQLList.FileName = '' then if fOQLList.FileName = '' then
ShowMessage('Need to save file before generation.') ShowMessage('You need to save before exporting.')
else else
begin begin
InterfaceToSelectedOQL; InterfaceToSelectedOQL;
fOQLList.Save; fOQLList.Save;
Screen.Cursor := crHourGlass; Screen.Cursor := crHourGlass;
try try
memUnit.Lines.Text := fExplorer.Util.GerarUnitOQL(fOQLList.FileName); memUnit.Lines.Text := GerarUnitOQL(fOQLList.FileName);
finally finally
Screen.Cursor := crDefault; Screen.Cursor := crDefault;
end; end;
...@@ -148,18 +154,297 @@ begin ...@@ -148,18 +154,297 @@ begin
end; end;
end; end;
function TOQLExplorerV2.GerarUnitOQL(piXMLFileName: String): string;
procedure AddText(piStringStream: TStringStream; piIndent: integer = 0; piText: string = '');
begin
piText := StringOfChar(' ', piIndent) + piText;
piStringStream.WriteString(concat(piText,#13#10));
end;
var
lUnit: TStringStream;
lFieldOQLFile, lFieldOQL: utField;
lAux: TStringList;
lOQLName, lOQLQuery: string;
lEnum, lEnumParams: acEnumerator;
lOQLParam: acOQLParam;
lOQLtoSQLTranslator: acOQLtoSQLTranslator;
lQueryParams: acQueryParams;
lFileName: string;
lOQLType: integer;
lSQL: string;
begin
if not FileExists(piXMLFileName) then
raise Exception.Create('File "' + piXMLFileName + '" does not exist');
lUnit := TStringStream.Create('');
try
lFieldOQLFile := utField.Create;
try
lAux := TStringList.Create;
try
lAux.LoadFromFile(piXMLFileName);
lFieldOQLFile.LoadFieldFromXMLString(lAux.Text);
finally
lAux.free;
end;
lFileName := ExtractFileName(piXMLFileName);
lFileName := LeftStr(lFileName, pos('.', lFileName) - 1);
AddText(lUnit, 0, 'unit utu' + lFileName + ';');
AddText(lUnit);
AddText(lUnit, 0, 'interface');
AddText(lUnit);
AddText(lUnit, 0, 'uses acuOQL, acuFramework;');
AddText(lUnit);
AddText(lUnit, 0, 'type');
AddText(lUnit);
lEnum := lFieldOQLFile.GetFieldsEnumerator;
try
//OQL Interfaces
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
if not lFieldOQL.HasAttribute('name') then raise Exception.Create('Attribute "name" not found for OQL. Not a valid XML OQL file.');
lOQLName := lFieldOQL.AttributeByName('name').AsString;
if not lFieldOQL.HasField('query') then raise Exception.Create('Field "query" not found for OQL. Not a valid XML OQL file.');
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
case lOQLType of
cDataSetOQLDataSet: AddText(lUnit, 2, 'I' + lOQLName + ' = interface(IDataSetOQLQuery)');
else AddText(lUnit, 2, 'I' + lOQLName + ' = interface(IOQLQuery)');
end;
lQueryParams := acQueryParams.Create;
try
lOQLtoSQLTranslator := acOQLtoSQLTranslator.Create(fExplorer.Util.MetaModelPersistenceMap);
try
case lOQLType of
cDataSetOQLDataSet:
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkDataSet, lQueryParams);
end;
else
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkObject, lQueryParams);
end;
end;
finally
lOQLtoSQLTranslator.Free;
end;
lEnumParams := lQueryParams.GetEnumerator;
try
while not lEnumParams.EOL do
begin
lOQLParam := acOQLParam(lEnumParams.Current);
AddText(lUnit, 4, 'function Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
lEnumParams.MoveNext;
end;
finally
lEnumParams.free;
end;
AddText(lUnit, 2, 'end;');
AddText(lUnit);
finally
lQueryParams.Free;
end;
lEnum.MoveNext;
end;
//Factory Class Interface
AddText(lUnit, 2, 'ut' + lFileName + ' = class');
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
AddText(lUnit, 4, 'class function ' + lOQLName + '(piSessao: acPersistenceSession): ' + 'I' + lOQLName + ';');
lEnum.MoveNext;
end;
AddText(lUnit, 2, 'end;');
AddText(lUnit);
AddText(lUnit, 0, 'implementation');
AddText(lUnit);
AddText(lUnit, 0, 'type');
AddText(lUnit);
//OQL Types
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
case lOQLType of
cDataSetOQLDataSet: AddText(lUnit, 2, 'T' + lOQLName + ' = class(acDataSetOQLQuery, ' + 'I' + lOQLName + ')');
else AddText(lUnit, 2, 'T' + lOQLName + ' = class(acOQLQuery, ' + 'I' + lOQLName + ')');
end;
lQueryParams := acQueryParams.Create;
try
lOQLtoSQLTranslator := acOQLtoSQLTranslator.Create(fExplorer.Util.MetaModelPersistenceMap);
try
case lOQLType of
cDataSetOQLDataSet:
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkDataSet, lQueryParams);
end;
else
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkObject, lQueryParams);
end;
end;
finally
lOQLtoSQLTranslator.Free;
end;
lEnumParams := lQueryParams.GetEnumerator;
try
while not lEnumParams.EOL do
begin
lOQLParam := acOQLParam(lEnumParams.Current);
AddText(lUnit, 4, 'function Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
lEnumParams.MoveNext;
end;
finally
lEnumParams.free;
end;
AddText(lUnit, 2, 'end;');
AddText(lUnit);
finally
lQueryParams.Free;
end;
lEnum.MoveNext;
end;
//OQL Types Implementation
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
//Default cOQLQuery
lOQLType := cOQLQuery;
if lFieldOQL.HasAttribute('oqltype') then
lOQLType := lFieldOQL.AttributeByName('oqltype').AsInteger;
AddText(lUnit, 0, '{ T' + lOQLName + ' }');
AddText(lUnit);
lQueryParams := acQueryParams.Create;
try
lOQLtoSQLTranslator := acOQLtoSQLTranslator.Create(fExplorer.Util.MetaModelPersistenceMap);
try
case lOQLType of
cDataSetOQLDataSet:
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkDataSet, lQueryParams);
end;
else
begin
lSQL := lOQLtoSQLTranslator.TranslateOQLtoSQL(lOQLQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkObject, lQueryParams);
end;
end;
finally
lOQLtoSQLTranslator.Free;
end;
lEnumParams := lQueryParams.GetEnumerator;
try
while not lEnumParams.EOL do
begin
lOQLParam := acOQLParam(lEnumParams.Current);
AddText(lUnit, 0, 'function T' + lOQLName + '.Param_' + lOQLParam.Name + ': ' + lOQLParam.ClassName + ';');
AddText(lUnit, 0,'begin');
AddText(lUnit, 2,'result := ' + lOQLParam.ClassName + '(Self.ParamByName(' + QuotedStr(lOQLParam.Name) + '));');
AddText(lUnit, 0,'end;');
AddText(lUnit);
lEnumParams.MoveNext;
end;
finally
lEnumParams.free;
end;
finally
lQueryParams.Free;
end;
lEnum.MoveNext;
end;
//Factory Class Implementation
AddText(lUnit, 0, '{ utOQLs }');
AddText(lUnit);
lEnum.MoveFirst;
while not lEnum.EOL do
begin
lFieldOQL := utField(lEnum.Current);
lOQLName := lFieldOQL.AttributeByName('name').AsString;
lOQLQuery := lFieldOQL.FieldByName('query').AsString;
AddText(lUnit, 0, 'class function ut' + lFileName + '.' + lOQLName + '(piSessao: acPersistenceSession): I' + lOQLName + ';');
AddText(lUnit, 0, 'begin');
AddText(lUnit, 2, 'result := T' + lOQLName + '.Create(pisessao,');
lOQLQuery := StringReplace(lOQLQuery, '''', '''''', [rfReplaceAll]);
lOQLQuery := StringReplace(lOQLQuery, #13#10, ''' + #13#10 +' + #13#10 + '''', [rfReplaceAll]);
AddText(lUnit, 0, '''' + lOQLQuery + ''');');
AddText(lUnit, 0, 'end;');
AddText(lUnit);
lEnum.MoveNext;
end;
finally
lEnum.free;
end;
AddText(lUnit, 0, 'end.');
result := lUnit.DataString;
finally
lFieldOQLFile.free;
end;
finally
lUnit.free;
end;
end;
procedure TOQLExplorerV2.aLoadFileExecute(Sender: TObject); procedure TOQLExplorerV2.aLoadFileExecute(Sender: TObject);
var var
lM: integer; lM: integer;
lCancel: Boolean; lCancel: Boolean;
begin begin
lCancel := False; lCancel := False;
lM := application.MessageBox('Save before open another file?', 'Attention', MB_ICONQUESTION + MB_YESNO); if (lvOQLList.Items.Count > 1) or (edtName.Caption <> '_NEW_OQL_1') then
case lM of begin
IDYES: aSaveFileExecute(Sender); lM := application.MessageBox('Save before open another file?', 'Attention', MB_ICONQUESTION + MB_YESNO);
IDCANCEL: lCancel := True; case lM of
IDYES: aSaveFileExecute(Sender);
IDCANCEL: lCancel := True;
end;
end; end;
if not (lCancel) then if not (lCancel) then
...@@ -182,7 +467,7 @@ begin ...@@ -182,7 +467,7 @@ begin
end; end;
end; end;
finally finally
Caption := fOQLList.FileName; Caption := 'Curió OQL Studio - ' + fOQLList.FileName;
UpdateOQLList; UpdateOQLList;
end; end;
end; end;
...@@ -256,7 +541,7 @@ begin ...@@ -256,7 +541,7 @@ begin
lvOQLList.SortType := stText; lvOQLList.SortType := stText;
lvOQLList.SortType := stNone; lvOQLList.SortType := stNone;
fOQLList.Save(lFileName); fOQLList.Save(lFileName);
Caption := lFileName; Caption := 'Curió OQL Studio - ' + lFileName;
Application.MessageBox('File saved.', '', MB_ICONINFORMATION); Application.MessageBox('File saved.', '', MB_ICONINFORMATION);
except except
on E: Exception do on E: Exception do
...@@ -296,10 +581,13 @@ end; ...@@ -296,10 +581,13 @@ end;
procedure TOQLExplorerV2.FormCloseQuery(Sender: TObject; var CanClose: Boolean); procedure TOQLExplorerV2.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
var lM: integer; var lM: integer;
begin begin
lM := application.MessageBox('Save before close?', 'Attention', MB_ICONQUESTION + MB_YESNO); if (lvOQLList.Items.Count > 1) or (edtName.Caption <> '_NEW_OQL_1') then
case lM of begin
IDYES: aSaveFileExecute(sender); lM := application.MessageBox('Save before close?', 'Attention', MB_ICONQUESTION + MB_YESNO);
IDCANCEL: CanClose := false; case lM of
IDYES: aSaveFileExecute(sender);
IDCANCEL: CanClose := false;
end;
end; end;
end; end;
...@@ -309,7 +597,7 @@ begin ...@@ -309,7 +597,7 @@ begin
lFileName := ''; lFileName := '';
fOQLList := utOQLFile.create(lFileName); fOQLList := utOQLFile.create(lFileName);
UpdateOQLList; UpdateOQLList;
Caption := 'New...'; Caption := 'Curió OQL Studio';
end; end;
procedure TOQLExplorerV2.FormResize(Sender: TObject); procedure TOQLExplorerV2.FormResize(Sender: TObject);
...@@ -337,9 +625,9 @@ procedure TOQLExplorerV2.InterfaceToSelectedOQL; ...@@ -337,9 +625,9 @@ procedure TOQLExplorerV2.InterfaceToSelectedOQL;
var lOQL: utOQL; var lOQL: utOQL;
lErro: string; lErro: string;
begin begin
if Assigned(lvOQLList.Selected) and Assigned(fExplorer.SynEditOQL) then if Assigned(fLastItem) and Assigned(fExplorer.SynEditOQL) then
begin begin
lOQL := utOQL(lvOQLList.Selected.Data); lOQL := utOQL(fLastItem.Data);
lOQL.ID := edtName.Text; lOQL.ID := edtName.Text;
lOQL.Description := edtDescription.Text; lOQL.Description := edtDescription.Text;
lOQL.Query := fExplorer.SynEditOQL.Text; lOQL.Query := fExplorer.SynEditOQL.Text;
...@@ -352,42 +640,40 @@ begin ...@@ -352,42 +640,40 @@ begin
if lErro = '' then if lErro = '' then
begin begin
if lOQL.OQLType = 1 if lOQL.OQLType = 1
then lvOQLList.Selected.ImageIndex := 1 then fLastItem.ImageIndex := 1
else lvOQLList.Selected.ImageIndex := 0; else fLastItem.ImageIndex := 0;
end end
else else
lvOQLList.Selected.ImageIndex := 2; fLastItem.ImageIndex := 2;
lvOQLList.Selected.Caption := edtName.Text; fLastItem.Caption := edtName.Text;
lvOQLList.Selected.SubItems[0] := lErro; fLastItem.SubItems[0] := lErro;
end; end;
end; end;
procedure TOQLExplorerV2.lvOQLListChange(Sender: TObject; Item: TListItem; Change: TItemChange); procedure TOQLExplorerV2.lvOQLListChange(Sender: TObject; Item: TListItem; Change: TItemChange);
begin begin
if assigned(fLastItem) and (fLastItem <> Item) then InterfaceToSelectedOQL;
SelectedOQLToInterface; SelectedOQLToInterface;
end; end;
procedure TOQLExplorerV2.lvOQLListChanging(Sender: TObject;Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
begin
InterfaceToSelectedOQL;
end;
procedure TOQLExplorerV2.SelectedOQLToInterface; procedure TOQLExplorerV2.SelectedOQLToInterface;
var lOQL: utOQL; var lOQL: utOQL;
begin begin
edtName.Text := ''; edtName.Text := '';
edtDescription.Text := ''; edtDescription.Text := '';
fExplorer.SynEditOQL.Text := '';
if Assigned(lvOQLList.Selected) and Assigned( fExplorer.SynEditOQL) then if Assigned(lvOQLList.Selected) and Assigned( fExplorer.SynEditOQL) then
begin begin
fExplorer.SynEditOQL.Text := ''; fLastItem := lvOQLList.Selected;
lOQL := utOQL(lvOQLList.Selected.Data); lOQL := utOQL(lvOQLList.Selected.Data);
edtName.Text := lOQL.ID; edtName.Text := lOQL.ID;
edtDescription.Text := lOQL.Description; edtDescription.Text := lOQL.Description;
fExplorer.SynEditOQL.Text := lOQL.Query; fExplorer.SynEditOQL.Text := lOQL.Query;
memError.Text := lvOQLList.Selected.SubItems[0]; memError.Text := lvOQLList.Selected.SubItems[0];
SetQueryType(lOQL.OQLType); SetQueryType(lOQL.OQLType);
end; end
lvOQLList.Column[0].Caption := 'OQL Name (' + IntToStr(fOQLList.Count) + ')'; else fLastItem := Nil;
lvOQLList.Column[0].Caption := 'OQL''s (' + IntToStr(fOQLList.Count) + ')';
end; end;
procedure TOQLExplorerV2.SetQueryType(piType: integer); procedure TOQLExplorerV2.SetQueryType(piType: integer);
...@@ -446,7 +732,7 @@ begin ...@@ -446,7 +732,7 @@ begin
end; end;
function TOQLExplorerV2.ValidaQuery(piQuery: string; piOQLType: integer): string; function TOQLExplorerV2.ValidaQuery(piQuery: string; piOQLType: integer): string;
var lQuery: acAbstractOQLQuery; var lOQLtoSQLTranslator: acOQLtoSQLTranslator;
begin begin
result := ''; result := '';
if not fFlagFormClosing then if not fFlagFormClosing then
...@@ -454,21 +740,27 @@ begin ...@@ -454,21 +740,27 @@ begin
try try
if Assigned(fExplorer) then if Assigned(fExplorer) then
begin begin
// if Assigned(fExplorer.Session) then lOQLtoSQLTranslator := acOQLtoSQLTranslator.Create(fExplorer.Util.MetaModelPersistenceMap);
// begin try
// if piOQLType = 1 then case piOQLType of
// lQuery := acDataSetOQLQuery.Create(fExplorer.Session, piQuery) cDataSetOQLDataSet:
// else begin
// lQuery := acOQLQuery.Create(fExplorer.Session, piQuery); lOQLtoSQLTranslator.TranslateOQLtoSQL(piQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkDataSet);
// lQuery.Free; end;
// end; else
begin
lOQLtoSQLTranslator.TranslateOQLtoSQL(piQuery, fExplorer.SQLDialect, fExplorer.Schema, acQueryResultKind.qrkObject);
end;
end;
finally
lOQLtoSQLTranslator.Free;
end;
end; end;
except except
on e:exception do on e:exception do
begin begin
Result := e.Message; Result := e.Message;
end; end;
end; end;
end; end;
end; end;
......
object itServiceParameters: TitServiceParameters object itServiceParameters: TitServiceParameters
Left = 0 Left = 778
Height = 276 Height = 289
Top = 0 Top = 453
Width = 306 Width = 314
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Propriedades do Serviço' Caption = 'Propriedades do Serviço'
ClientHeight = 276 ClientHeight = 289
ClientWidth = 306 ClientWidth = 314
Color = clBtnFace
ParentFont = True ParentFont = True
Position = poDesktopCenter Position = poScreenCenter
LCLVersion = '2.0.0.4'
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 237 Height = 240
Top = 0 Top = 0
Width = 306 Width = 314
Align = alClient Align = alClient
ClientHeight = 237 ClientHeight = 240
ClientWidth = 306 ClientWidth = 314
TabOrder = 1 TabOrder = 1
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 6 Left = 6
Height = 77 Height = 77
Top = 3 Top = 3
Width = 296 Width = 296
ClientHeight = 70 ClientHeight = 75
ClientWidth = 288 ClientWidth = 294
TabOrder = 0 TabOrder = 0
object Label2: TLabel object Label2: TLabel
Left = 5 Left = 5
Height = 16 Height = 19
Top = 14 Top = 14
Width = 117 Width = 122
Caption = 'Nome do Servidor:' Caption = 'Nome do Servidor:'
ParentColor = False ParentColor = False
end end
object Label1: TLabel object Label1: TLabel
Left = 11 Left = 11
Height = 16 Height = 19
Top = 42 Top = 42
Width = 111 Width = 116
Caption = 'Número da Porta:' Caption = 'Número da Porta:'
ParentColor = False ParentColor = False
end end
object edtServerName: TEdit object edtServerName: TEdit
Left = 133 Left = 133
Height = 22 Height = 29
Top = 8 Top = 8
Width = 155 Width = 155
TabOrder = 0 TabOrder = 0
end end
object edtPortNumber: TEdit object edtPortNumber: TEdit
Left = 133 Left = 133
Height = 22 Height = 29
Top = 36 Top = 36
Width = 155 Width = 155
TabOrder = 1 TabOrder = 1
...@@ -63,20 +63,20 @@ object itServiceParameters: TitServiceParameters ...@@ -63,20 +63,20 @@ object itServiceParameters: TitServiceParameters
Height = 48 Height = 48
Top = 88 Top = 88
Width = 296 Width = 296
ClientHeight = 41 ClientHeight = 46
ClientWidth = 288 ClientWidth = 294
TabOrder = 1 TabOrder = 1
object Label3: TLabel object Label3: TLabel
Left = 0 Left = 0
Height = 16 Height = 19
Top = 12 Top = 12
Width = 122 Width = 126
Caption = 'Código do Sistema:' Caption = 'Código do Sistema:'
ParentColor = False ParentColor = False
end end
object edtSystemCode: TEdit object edtSystemCode: TEdit
Left = 133 Left = 133
Height = 22 Height = 29
Top = 8 Top = 8
Width = 155 Width = 155
TabOrder = 0 TabOrder = 0
...@@ -87,35 +87,35 @@ object itServiceParameters: TitServiceParameters ...@@ -87,35 +87,35 @@ object itServiceParameters: TitServiceParameters
Height = 80 Height = 80
Top = 144 Top = 144
Width = 296 Width = 296
ClientHeight = 73 ClientHeight = 78
ClientWidth = 288 ClientWidth = 294
TabOrder = 2 TabOrder = 2
object Label5: TLabel object Label5: TLabel
Left = 9 Left = 9
Height = 16 Height = 19
Top = 12 Top = 12
Width = 113 Width = 117
Caption = 'Nome do Usuário:' Caption = 'Nome do Usuário:'
ParentColor = False ParentColor = False
end end
object Label4: TLabel object Label4: TLabel
Left = 80 Left = 80
Height = 16 Height = 19
Top = 46 Top = 46
Width = 42 Width = 45
Caption = 'Senha:' Caption = 'Senha:'
ParentColor = False ParentColor = False
end end
object edtUserName: TEdit object edtUserName: TEdit
Left = 133 Left = 133
Height = 22 Height = 29
Top = 6 Top = 6
Width = 155 Width = 155
TabOrder = 0 TabOrder = 0
end end
object edtPassword: TEdit object edtPassword: TEdit
Left = 133 Left = 133
Height = 22 Height = 29
Top = 40 Top = 40
Width = 155 Width = 155
EchoMode = emPassword EchoMode = emPassword
...@@ -126,18 +126,18 @@ object itServiceParameters: TitServiceParameters ...@@ -126,18 +126,18 @@ object itServiceParameters: TitServiceParameters
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 39 Height = 49
Top = 237 Top = 240
Width = 306 Width = 314
Align = alBottom Align = alBottom
ClientHeight = 39 ClientHeight = 49
ClientWidth = 306 ClientWidth = 314
TabOrder = 0 TabOrder = 0
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 141 Left = 96
Height = 25 Height = 35
Top = 6 Top = 6
Width = 75 Width = 99
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Ok' Caption = 'Ok'
Kind = bkOK Kind = bkOK
...@@ -146,10 +146,10 @@ object itServiceParameters: TitServiceParameters ...@@ -146,10 +146,10 @@ object itServiceParameters: TitServiceParameters
TabOrder = 0 TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 229 Left = 203
Height = 25 Height = 35
Top = 6 Top = 6
Width = 75 Width = 97
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Cancel' Caption = 'Cancel'
Kind = bkCancel Kind = bkCancel
......
...@@ -4,7 +4,7 @@ interface ...@@ -4,7 +4,7 @@ interface
uses uses
LCLType, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, LCLType, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls; Dialogs, StdCtrls, Buttons, ExtCtrls, cxuSession;
type type
TitServiceParameters = class(TForm) TitServiceParameters = class(TForm)
...@@ -27,6 +27,7 @@ type ...@@ -27,6 +27,7 @@ type
Label4: TLabel; Label4: TLabel;
procedure BitBtn1Click(Sender: TObject); procedure BitBtn1Click(Sender: TObject);
private private
fSession: cxSession;
function GetPassword: string; function GetPassword: string;
function GetPortNumber: integer; function GetPortNumber: integer;
function GetServerName: string; function GetServerName: string;
...@@ -40,6 +41,7 @@ type ...@@ -40,6 +41,7 @@ type
{ Private declarations } { Private declarations }
public public
{ Public declarations } { Public declarations }
property Session: cxSession read fSession write fSession;
property ServerName: string read GetServerName write SetServerName; property ServerName: string read GetServerName write SetServerName;
property PortNumber: integer read GetPortNumber write SetPortNumber; property PortNumber: integer read GetPortNumber write SetPortNumber;
property SystemCode: integer read GetSystemCode write SetSystemCode; property SystemCode: integer read GetSystemCode write SetSystemCode;
...@@ -55,6 +57,7 @@ implementation ...@@ -55,6 +57,7 @@ implementation
{ TServiceParameters } { TServiceParameters }
procedure TitServiceParameters.BitBtn1Click(Sender: TObject); procedure TitServiceParameters.BitBtn1Click(Sender: TObject);
var lConnectioString: String;
begin begin
if edtServerName.Text = '' then if edtServerName.Text = '' then
begin begin
...@@ -79,7 +82,7 @@ begin ...@@ -79,7 +82,7 @@ begin
end; end;
try try
strtoint(edtPortNumber.Text); StrToInt(edtPortNumber.Text);
except except
Application.MessageBox('Porta informada invlida.','Ateno', MB_ICONEXCLAMATION); Application.MessageBox('Porta informada invlida.','Ateno', MB_ICONEXCLAMATION);
edtPortNumber.SetFocus; edtPortNumber.SetFocus;
...@@ -88,13 +91,29 @@ begin ...@@ -88,13 +91,29 @@ begin
end; end;
try try
strtoint(edtSystemCode.Text); StrToInt(edtSystemCode.Text);
except except
Application.MessageBox('Cdigo do sistema informado invlido.','Ateno', MB_ICONEXCLAMATION); Application.MessageBox('Cdigo do sistema informado invlido.','Ateno', MB_ICONEXCLAMATION);
edtSystemCode.SetFocus; edtSystemCode.SetFocus;
edtSystemCode.SelectAll; edtSystemCode.SelectAll;
modalresult := mrnone; modalresult := mrnone;
end; end;
try
lConnectioString := format('ServerName=%s;PortNumber=%d;SystemCode=%d;UserName=%s;Password=%s;',
[edtServerName.Caption, StrToInt(edtPortNumber.Caption),
StrToInt(edtSystemCode.Caption), edtUserName.Caption,
edtPassword.Caption]);
fSession := cxSession.Create(lConnectioString);
except
on e:Exception do
begin
Application.MessageBox(PCHAR(e.Message), 'Ateno', MB_ICONEXCLAMATION);
modalresult := mrnone;
end;
end;
end; end;
function TitServiceParameters.GetPassword: string; function TitServiceParameters.GetPassword: string;
......
object CadastroCasoDeUso: TCadastroCasoDeUso object CadastroCasoDeUso: TCadastroCasoDeUso
Left = 0 Left = 902
Height = 395 Height = 456
Top = 0 Top = 226
Width = 781 Width = 782
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Cadastro de caso de uso' Caption = 'Cadastro de Caso de Uso'
ClientHeight = 395 ClientHeight = 456
ClientWidth = 781 ClientWidth = 782
Color = clBtnFace Position = poScreenCenter
ParentFont = True LCLVersion = '2.0.0.4'
Position = poDesktopCenter
object pnPrincipal: TPanel object pnPrincipal: TPanel
Left = 8 Left = 0
Height = 263 Height = 316
Top = 9 Top = 0
Width = 768 Width = 782
Align = alTop
BevelOuter = bvLowered BevelOuter = bvLowered
ClientHeight = 263 ClientHeight = 316
ClientWidth = 768 ClientWidth = 782
Color = 15658734
ParentColor = False ParentColor = False
TabOrder = 0 TabOrder = 0
object lblNome: TLabel object lblNome: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 88 Top = 88
Width = 32 Width = 31
Caption = 'Nome' Caption = 'Nome'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -36,9 +35,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -36,9 +35,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object lblCodigo: TLabel object lblCodigo: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 6 Top = 6
Width = 38 Width = 39
Caption = 'Código' Caption = 'Código'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -49,9 +48,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -49,9 +48,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object lblDescricao: TLabel object lblDescricao: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 131 Top = 140
Width = 54 Width = 55
Caption = 'Descrição' Caption = 'Descrição'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -62,9 +61,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -62,9 +61,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object lblEntidade: TLabel object lblEntidade: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 222 Top = 251
Width = 49 Width = 50
Caption = 'Entidade' Caption = 'Entidade'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -75,9 +74,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -75,9 +74,9 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object lblCategoria: TLabel object lblCategoria: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 176 Top = 193
Width = 53 Width = 56
Caption = 'Categoria' Caption = 'Categoria'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -88,18 +87,18 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -88,18 +87,18 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object lblValorCodigo: TLabel object lblValorCodigo: TLabel
Left = 8 Left = 8
Height = 16 Height = 19
Top = 24 Top = 24
Width = 63 Width = 61
Caption = '<código>' Caption = '<código>'
Layout = tlCenter Layout = tlCenter
ParentColor = False ParentColor = False
end end
object Label1: TLabel object Label1: TLabel
Left = 304 Left = 304
Height = 15 Height = 14
Top = 6 Top = 6
Width = 56 Width = 65
Caption = 'Operações' Caption = 'Operações'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -109,10 +108,10 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -109,10 +108,10 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
ParentFont = False ParentFont = False
end end
object Label2: TLabel object Label2: TLabel
Left = 437 Left = 538
Height = 15 Height = 14
Top = 6 Top = 6
Width = 48 Width = 56
Caption = 'Sistemas' Caption = 'Sistemas'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -123,15 +122,15 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -123,15 +122,15 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object edtNome: TEdit object edtNome: TEdit
Left = 8 Left = 8
Height = 22 Height = 31
Top = 103 Top = 103
Width = 289 Width = 289
TabOrder = 0 TabOrder = 0
end end
object cbxEntidade: TComboBox object cbxEntidade: TComboBox
Left = 8 Left = 8
Height = 20 Height = 37
Top = 237 Top = 270
Width = 289 Width = 289
AutoDropDown = True AutoDropDown = True
ItemHeight = 0 ItemHeight = 0
...@@ -141,8 +140,8 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -141,8 +140,8 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object cbxCategoria: TComboBox object cbxCategoria: TComboBox
Left = 8 Left = 8
Height = 20 Height = 37
Top = 193 Top = 212
Width = 289 Width = 289
AutoDropDown = True AutoDropDown = True
ItemHeight = 0 ItemHeight = 0
...@@ -152,7 +151,7 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -152,7 +151,7 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object ltvSistema: TListView object ltvSistema: TListView
Left = 536 Left = 536
Height = 233 Height = 280
Top = 24 Top = 24
Width = 232 Width = 232
AutoWidthLastColumn = True AutoWidthLastColumn = True
...@@ -160,14 +159,15 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -160,14 +159,15 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
Columns = < Columns = <
item item
Caption = 'Sistemas' Caption = 'Sistemas'
Width = 226 Width = 230
end> end>
ScrollBars = ssAutoBoth
SortType = stText SortType = stText
TabOrder = 5 TabOrder = 5
end end
object ltvOperacao: TListView object ltvOperacao: TListView
Left = 304 Left = 304
Height = 233 Height = 280
Top = 24 Top = 24
Width = 224 Width = 224
AutoWidthLastColumn = True AutoWidthLastColumn = True
...@@ -175,31 +175,32 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -175,31 +175,32 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
Columns = < Columns = <
item item
Caption = 'Operações' Caption = 'Operações'
Width = 218 Width = 222
end> end>
ScrollBars = ssAutoBoth
SortType = stText SortType = stText
TabOrder = 4 TabOrder = 4
end end
object edtDescricao: TEdit object edtDescricao: TEdit
Left = 8 Left = 8
Height = 22 Height = 31
Top = 146 Top = 155
Width = 289 Width = 289
TabOrder = 1 TabOrder = 1
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 209 Left = 226
Height = 90 Height = 90
Top = 6 Top = 6
Width = 88 Width = 71
Caption = 'Ícone' Caption = 'Ícone'
ClientHeight = 68 ClientHeight = 70
ClientWidth = 80 ClientWidth = 69
TabOrder = 6 TabOrder = 6
object Label5: TLabel object Label5: TLabel
Left = 20 Left = 17
Height = 28 Height = 28
Top = 24 Top = 22
Width = 37 Width = 37
Alignment = taCenter Alignment = taCenter
AutoSize = False AutoSize = False
...@@ -216,28 +217,29 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -216,28 +217,29 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
end end
object imgIcone: TImage object imgIcone: TImage
Cursor = crHandPoint Cursor = crHandPoint
Left = 8 Left = 5
Height = 55 Height = 60
Top = 8 Top = 5
Width = 63 Width = 60
Center = True Center = True
OnClick = imgIconeClick OnClick = imgIconeClick
end end
end end
end end
object Panel1: TPanel object Panel1: TPanel
Left = 220 Left = 0
Height = 56 Height = 74
Top = 288 Top = 316
Width = 556 Width = 782
ClientHeight = 56 Align = alTop
ClientWidth = 556 ClientHeight = 74
TabOrder = 2 ClientWidth = 782
TabOrder = 1
object Label3: TLabel object Label3: TLabel
Left = 8 Left = 225
Height = 13 Height = 14
Top = 7 Top = 13
Width = 198 Width = 202
Caption = 'Destino para criação do caso de uso' Caption = 'Destino para criação do caso de uso'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -247,10 +249,10 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -247,10 +249,10 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
ParentFont = False ParentFont = False
end end
object btnSelecionarDestino: TSpeedButton object btnSelecionarDestino: TSpeedButton
Left = 411 Left = 620
Height = 25 Height = 36
Top = 20 Top = 29
Width = 145 Width = 148
Caption = 'Selecionar destino' Caption = 'Selecionar destino'
Glyph.Data = { Glyph.Data = {
36050000424D3605000000000000360400002800000010000000100000000100 36050000424D3605000000000000360400002800000010000000100000000100
...@@ -299,28 +301,26 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -299,28 +301,26 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
OnClick = btnSelecionarDestinoClick OnClick = btnSelecionarDestinoClick
end end
object edtPackage: TEdit object edtPackage: TEdit
Left = 8 Left = 225
Height = 22 Height = 29
Top = 23 Top = 29
Width = 393 Width = 393
Color = 15461355 Color = 15461355
ReadOnly = True ReadOnly = True
TabOrder = 0 TabOrder = 0
end end
end object edtUseCaseName: TEdit
object Panel2: TPanel Left = 8
Left = 8 Height = 29
Height = 56 Top = 29
Top = 288 Width = 198
Width = 206 TabOrder = 1
ClientHeight = 56 end
ClientWidth = 206
TabOrder = 1
object Label4: TLabel object Label4: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 7 Top = 13
Width = 190 Width = 191
Caption = 'Nome no StarUML (case sensitive)' Caption = 'Nome no StarUML (case sensitive)'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -329,42 +329,36 @@ object CadastroCasoDeUso: TCadastroCasoDeUso ...@@ -329,42 +329,36 @@ object CadastroCasoDeUso: TCadastroCasoDeUso
ParentColor = False ParentColor = False
ParentFont = False ParentFont = False
end end
object edtUseCaseName: TEdit
Left = 8
Height = 22
Top = 23
Width = 198
TabOrder = 0
end
end end
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Height = 39 Height = 55
Top = 356 Top = 401
Width = 781 Width = 782
Align = alBottom Align = alBottom
ClientHeight = 39 ClientHeight = 55
ClientWidth = 781 ClientWidth = 782
TabOrder = 3 TabOrder = 2
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 613 Left = 649
Height = 25 Height = 40
Top = 6 Top = 6
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Ok' Default = True
DefaultCaption = True
Kind = bkOK Kind = bkOK
ModalResult = 1
OnClick = btnSalvarClick OnClick = btnSalvarClick
TabOrder = 0 TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 701 Left = 522
Height = 25 Height = 40
Top = 6 Top = 6
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Cancel' Cancel = True
DefaultCaption = True
Kind = bkCancel Kind = bkCancel
ModalResult = 2 ModalResult = 2
TabOrder = 1 TabOrder = 1
......
...@@ -19,6 +19,8 @@ type ...@@ -19,6 +19,8 @@ type
TCadastroCasoDeUso = class(TForm) TCadastroCasoDeUso = class(TForm)
BitBtn1: TBitBtn; BitBtn1: TBitBtn;
BitBtn2: TBitBtn; BitBtn2: TBitBtn;
edtUseCaseName: TEdit;
Label4: TLabel;
Panel3: TPanel; Panel3: TPanel;
pnPrincipal: TPanel; pnPrincipal: TPanel;
lblNome: TLabel; lblNome: TLabel;
...@@ -41,9 +43,6 @@ type ...@@ -41,9 +43,6 @@ type
edtPackage: TEdit; edtPackage: TEdit;
Label3: TLabel; Label3: TLabel;
btnSelecionarDestino: TSpeedButton; btnSelecionarDestino: TSpeedButton;
Panel2: TPanel;
edtUseCaseName: TEdit;
Label4: TLabel;
Label5: TLabel; Label5: TLabel;
procedure imgIconeClick(Sender: TObject); procedure imgIconeClick(Sender: TObject);
procedure btnSelecionarDestinoClick(Sender: TObject); procedure btnSelecionarDestinoClick(Sender: TObject);
...@@ -51,6 +50,7 @@ type ...@@ -51,6 +50,7 @@ type
procedure SpeedButton1Click(Sender: TObject); procedure SpeedButton1Click(Sender: TObject);
private private
FOID: integer; FOID: integer;
FContextField: utField;
fUMLUseCase: IUMLUseCase; fUMLUseCase: IUMLUseCase;
fFormIcones: TCadastroCasoDeUsoIcones; fFormIcones: TCadastroCasoDeUsoIcones;
fcxCadastroCasoDeUso: cxCadatroCasoDeUso; fcxCadastroCasoDeUso: cxCadatroCasoDeUso;
...@@ -63,7 +63,8 @@ type ...@@ -63,7 +63,8 @@ type
{ Private declarations } { Private declarations }
public public
{ Public declarations } { Public declarations }
Constructor Create(Sender: TComponent; piConnectionString: string; piUseCase: IUMLUseCase); reintroduce; Constructor Create(Sender: TComponent; piCadatroCasoDeUso: cxCadatroCasoDeUso; piUseCase: IUMLUseCase); reintroduce;
Destructor Destroy; override;
property UseCasePackage: IUMLPackage read fUseCasePackage write fUseCasePackage; property UseCasePackage: IUMLPackage read fUseCasePackage write fUseCasePackage;
property UseCase: IUMLUseCase read fUMLUseCase; property UseCase: IUMLUseCase read fUMLUseCase;
...@@ -81,15 +82,21 @@ uses IntegracaoDelphiSUML; ...@@ -81,15 +82,21 @@ uses IntegracaoDelphiSUML;
type type
CP1252String = type AnsiString(1252); CP1252String = type AnsiString(1252);
constructor TCadastroCasoDeUso.Create(Sender: TComponent; piConnectionString: string; piUseCase: IUMLUseCase); constructor TCadastroCasoDeUso.Create(Sender: TComponent; piCadatroCasoDeUso: cxCadatroCasoDeUso; piUseCase: IUMLUseCase);
begin begin
inherited Create(sender); inherited Create(sender);
fUMLUseCase := piUseCase; fUMLUseCase := piUseCase;
fFormIcones := TCadastroCasoDeUsoIcones.Create(self); fFormIcones := TCadastroCasoDeUsoIcones.Create(self);
fcxCadastroCasoDeUso := cxCadatroCasoDeUso.Create(piConnectionString); fcxCadastroCasoDeUso := piCadatroCasoDeUso;
self.Initialize; self.Initialize;
end; end;
destructor TCadastroCasoDeUso.Destroy;
begin
FreeAndNil(FContextField);
inherited Destroy;
end;
procedure TCadastroCasoDeUso.imgIconeClick(Sender: TObject); procedure TCadastroCasoDeUso.imgIconeClick(Sender: TObject);
begin begin
if fFormIcones.ShowModal = mrOk then if fFormIcones.ShowModal = mrOk then
...@@ -101,27 +108,25 @@ begin ...@@ -101,27 +108,25 @@ begin
end; end;
procedure TCadastroCasoDeUso.Initialize; procedure TCadastroCasoDeUso.Initialize;
var lField, lResponseField: utField; var lUseCaseCode: string;
lUseCaseCode: string; lRequestField, lResponseField: utField;
begin begin
//Retorna do caso de uso os atributos da classe //Retorna do caso de uso os atributos da classe
lResponseField := utField.Create; FreeAndNil(FContextField);
try FContextField := utField.Create;
lField := utField.Create;
fcxCadastroCasoDeUso.rmObtemContexto(lField, lResponseField); lRequestField := utField.Create;
SendToInterface(lResponseField); fcxCadastroCasoDeUso.rmObtemContexto(lRequestField, FContextField);
finally SendToInterface(FContextField);
// lResponseField.free;
end;
if assigned(fUMLUseCase) then if assigned(fUMLUseCase) then
begin begin
lField := utField.Create; lRequestField := utField.Create;
lUseCaseCode := fUMLUseCase.GetTaggedValueAsString('DBMappings', 'DBUseCaseMap', 'Code'); lUseCaseCode := fUMLUseCase.GetTaggedValueAsString('DBMappings', 'DBUseCaseMap', 'Code');
lField.AddField('CODIGO').AsString := lUseCaseCode; lRequestField.AddField('CODIGO').AsString := lUseCaseCode;
lResponseField := utField.Create; lResponseField := utField.Create;
try try
fcxCadastroCasoDeUso.rmEditaObjeto(lField, lResponseField); fcxCadastroCasoDeUso.rmEditaObjeto(lRequestField, lResponseField);
SendToInterface(lResponseField); SendToInterface(lResponseField);
finally finally
lResponseField.free; lResponseField.free;
...@@ -135,8 +140,8 @@ begin ...@@ -135,8 +140,8 @@ begin
begin begin
lResponseField := utField.Create; lResponseField := utField.Create;
try try
lField := utField.Create; lRequestField := utField.Create;
fcxCadastroCasoDeUso.rmIncluiObjeto(lField, lResponseField); fcxCadastroCasoDeUso.rmIncluiObjeto(lRequestField, lResponseField);
SendToInterface(lResponseField); SendToInterface(lResponseField);
finally finally
lResponseField.free; lResponseField.free;
...@@ -162,19 +167,19 @@ begin ...@@ -162,19 +167,19 @@ begin
// lFieldCasoDeUso.AddAttribute('OID').AsInteger := FOID; // lFieldCasoDeUso.AddAttribute('OID').AsInteger := FOID;
lFieldCasoDeUso.AddAttribute('nome').AsString := edtNome.Text; lFieldCasoDeUso.AddAttribute('nome').AsString := edtNome.Text;
lFieldCasoDeUso.AddAttribute('descricao').AsString := edtDescricao.Text; lFieldCasoDeUso.AddAttribute('descricao').AsString := edtDescricao.Text;
if cbxEntidade.ItemIndex <> -1 then lFieldCasoDeUso.AddAttribute('idoentidade').AsInteger := integer(cbxEntidade.Items.Objects[cbxEntidade.ItemIndex]); if cbxEntidade.ItemIndex <> -1 then lFieldCasoDeUso.AddAttribute('idoentidade').AsInteger := utAttribute(cbxEntidade.Items.Objects[cbxEntidade.ItemIndex]).AsInteger;
if cbxCategoria.ItemIndex <> -1 then lFieldCasoDeUso.AddAttribute('idocategoria').AsInteger := integer(cbxCategoria.Items.Objects[cbxCategoria.ItemIndex]); if cbxCategoria.ItemIndex <> -1 then lFieldCasoDeUso.AddAttribute('idocategoria').AsInteger := utAttribute(cbxCategoria.Items.Objects[cbxCategoria.ItemIndex]).AsInteger;
if assigned(fFormIcones.ltvIcones.Selected) then lFieldCasoDeUso.AddAttribute('idoicone').AsInteger := integer(fFormIcones.ltvIcones.Selected.Data); if assigned(fFormIcones.ltvIcones.Selected) then lFieldCasoDeUso.AddAttribute('idoicone').AsInteger := utAttribute(fFormIcones.ltvIcones.Selected.Data).AsInteger;
lFieldSistemas := lFieldCasoDeUso.AddField('sistemas'); lFieldSistemas := lFieldCasoDeUso.AddField('sistemas');
for I := 0 to ltvSistema.Items.Count - 1 do for I := 0 to ltvSistema.Items.Count - 1 do
if ltvSistema.Items[i].Checked then if ltvSistema.Items[i].Checked then
lFieldSistemas.AddField('ido').AsInteger := integer(ltvSistema.Items[i].Data); lFieldSistemas.AddField('ido').AsInteger := utAttribute(ltvSistema.Items[i].Data).AsInteger;
lFieldOperacoes := lFieldCasoDeUso.AddField('operacoes'); lFieldOperacoes := lFieldCasoDeUso.AddField('operacoes');
for I := 0 to ltvOperacao.Items.Count - 1 do for I := 0 to ltvOperacao.Items.Count - 1 do
if ltvOperacao.Items[i].Checked then if ltvOperacao.Items[i].Checked then
lFieldOperacoes.AddField('ido').AsInteger := integer(ltvOperacao.Items[i].Data); lFieldOperacoes.AddField('ido').AsInteger := utAttribute(ltvOperacao.Items[i].Data).AsInteger;
end; end;
procedure TCadastroCasoDeUso.SendToInterface(piField: utField); procedure TCadastroCasoDeUso.SendToInterface(piField: utField);
...@@ -392,7 +397,10 @@ begin ...@@ -392,7 +397,10 @@ begin
lElementSelector.ClearSelectableModels(); lElementSelector.ClearSelectableModels();
lElementSelector.AddSelectableModel('UMLPackage'); lElementSelector.AddSelectableModel('UMLPackage');
if lElementSelector.Execute('Selecione o local para criar o caso de uso') then if lElementSelector.Execute('Selecione o local para criar o caso de uso') then
begin
UseCasePackage := lElementSelector.GetSelectedModel as IUMLPackage; UseCasePackage := lElementSelector.GetSelectedModel as IUMLPackage;
edtPackage.Text := UseCasePackage.PathName;
end;
end; end;
procedure TCadastroCasoDeUso.btnSalvarClick(Sender: TObject); procedure TCadastroCasoDeUso.btnSalvarClick(Sender: TObject);
...@@ -414,12 +422,6 @@ begin ...@@ -414,12 +422,6 @@ begin
try try
if assigned(fUMLUseCase) then if assigned(fUMLUseCase) then
begin begin
// if (assigned(fUseCasePackage.FindByName(edtUseCaseName.Text))) and (edtUseCaseName.Text <> fUMLUseCase.Name) then
// begin
// application.MessageBox('Caso de uso j existente no pacote selecionado.','StarUML', MB_ICONEXCLAMATION + MB_OK);
// exit;
// end;
SalvaObjeto; SalvaObjeto;
fUMLUseCase.Name := edtUseCaseName.Text; fUMLUseCase.Name := edtUseCaseName.Text;
end end
......
object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones
Left = 0 Left = 726
Height = 405 Height = 412
Top = 0 Top = 329
Width = 497 Width = 501
Caption = 'Ícones' Caption = 'Ícones'
ClientHeight = 405 ClientHeight = 412
ClientWidth = 497 ClientWidth = 501
Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Position = poDesktopCenter Position = poScreenCenter
LCLVersion = '2.0.0.4'
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 366 Height = 357
Top = 0 Top = 0
Width = 497 Width = 501
Align = alClient Align = alClient
ClientHeight = 366 ClientHeight = 357
ClientWidth = 497 ClientWidth = 501
TabOrder = 0 TabOrder = 0
object ltvIcones: TListView object ltvIcones: TListView
Left = 1 Left = 1
Height = 364 Height = 355
Top = 1 Top = 1
Width = 495 Width = 499
Align = alClient Align = alClient
Columns = < Columns = <
item item
...@@ -32,7 +32,9 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones ...@@ -32,7 +32,9 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones
Width = 10 Width = 10
end> end>
HideSelection = False HideSelection = False
LargeImages = imgListaIcone
ReadOnly = True ReadOnly = True
ScrollBars = ssAutoBoth
SortType = stText SortType = stText
TabOrder = 0 TabOrder = 0
ViewStyle = vsIcon ViewStyle = vsIcon
...@@ -41,31 +43,33 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones ...@@ -41,31 +43,33 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones
end end
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 39 Height = 55
Top = 366 Top = 357
Width = 497 Width = 501
Align = alBottom Align = alBottom
ClientHeight = 39 ClientHeight = 55
ClientWidth = 497 ClientWidth = 501
TabOrder = 1 TabOrder = 1
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 328 Left = 371
Height = 25 Height = 40
Top = 8 Top = 6
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Ok' Default = True
DefaultCaption = True
Kind = bkOK Kind = bkOK
ModalResult = 1 ModalResult = 1
TabOrder = 0 TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 416 Left = 244
Height = 25 Height = 40
Top = 8 Top = 6
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Cancel' Cancel = True
DefaultCaption = True
Kind = bkCancel Kind = bkCancel
ModalResult = 2 ModalResult = 2
TabOrder = 1 TabOrder = 1
...@@ -73,7 +77,7 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones ...@@ -73,7 +77,7 @@ object CadastroCasoDeUsoIcones: TCadastroCasoDeUsoIcones
end end
object imgListaIcone: TImageList object imgListaIcone: TImageList
Height = 32 Height = 32
ShareImages = True Scaled = True
Width = 32 Width = 32
left = 440 left = 440
top = 56 top = 56
......
object CadastroClasse: TCadastroClasse object CadastroClasse: TCadastroClasse
Left = 0 Left = 308
Height = 313 Height = 345
Top = 0 Top = 249
Width = 503 Width = 504
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Cadastro de Classe' Caption = 'Cadastro de Classe'
ClientHeight = 313 ClientHeight = 345
ClientWidth = 503 ClientWidth = 504
Color = clBtnFace Position = poScreenCenter
ParentFont = True LCLVersion = '2.0.0.4'
Position = poDesktopCenter
object Panel1: TPanel object Panel1: TPanel
Left = 0 Left = 0
Height = 313 Height = 345
Top = 0 Top = 0
Width = 503 Width = 504
Align = alClient Align = alClient
ClientHeight = 313 ClientHeight = 345
ClientWidth = 503 ClientWidth = 504
TabOrder = 0 TabOrder = 0
object Panel3: TPanel object Panel3: TPanel
Left = 6 Left = 1
Height = 123 Height = 130
Top = 141 Top = 140
Width = 490 Width = 502
ClientHeight = 123 Align = alTop
ClientWidth = 490 ClientHeight = 130
ClientWidth = 502
TabOrder = 2 TabOrder = 2
object Panel5: TPanel object Panel5: TPanel
Left = 0 Left = 0
Height = 48 Height = 103
Top = 16 Top = 16
Width = 200 Width = 200
ClientHeight = 48 ClientHeight = 103
ClientWidth = 200 ClientWidth = 200
TabOrder = 0 TabOrder = 0
object Label4: TLabel object Label4: TLabel
Left = 8 Left = 8
Height = 13 Height = 14
Top = 5 Top = 5
Width = 153 Width = 153
Caption = 'Nome da classe no StarUML' Caption = 'Nome da classe no StarUML'
...@@ -50,7 +50,7 @@ object CadastroClasse: TCadastroClasse ...@@ -50,7 +50,7 @@ object CadastroClasse: TCadastroClasse
end end
object edtNomeStarUML: TEdit object edtNomeStarUML: TEdit
Left = 8 Left = 8
Height = 22 Height = 29
Top = 21 Top = 21
Width = 184 Width = 184
TabOrder = 0 TabOrder = 0
...@@ -58,39 +58,39 @@ object CadastroClasse: TCadastroClasse ...@@ -58,39 +58,39 @@ object CadastroClasse: TCadastroClasse
end end
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
Left = 216 Left = 216
Height = 96 Height = 103
Top = 16 Top = 16
Width = 270 Width = 270
Caption = 'DB Mappings' Caption = 'DB Mappings'
ClientHeight = 74 ClientHeight = 83
ClientWidth = 262 ClientWidth = 268
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 6 Left = 6
Height = 16 Height = 19
Top = 14 Top = 14
Width = 39 Width = 41
Caption = 'Table:' Caption = 'Table:'
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 0 Left = 0
Height = 16 Height = 19
Top = 47 Top = 47
Width = 45 Width = 51
Caption = 'DBIDO:' Caption = 'DBIDO:'
ParentColor = False ParentColor = False
end end
object edtDBTableName: TEdit object edtDBTableName: TEdit
Left = 46 Left = 46
Height = 22 Height = 29
Top = 8 Top = 8
Width = 210 Width = 210
TabOrder = 0 TabOrder = 0
end end
object edtDBIDO: TEdit object edtDBIDO: TEdit
Left = 46 Left = 46
Height = 22 Height = 29
Top = 41 Top = 41
Width = 210 Width = 210
TabOrder = 1 TabOrder = 1
...@@ -98,18 +98,19 @@ object CadastroClasse: TCadastroClasse ...@@ -98,18 +98,19 @@ object CadastroClasse: TCadastroClasse
end end
end end
object Panel2: TPanel object Panel2: TPanel
Left = 6 Left = 1
Height = 56 Height = 65
Top = 79 Top = 75
Width = 490 Width = 502
ClientHeight = 56 Align = alTop
ClientWidth = 490 ClientHeight = 65
ClientWidth = 502
TabOrder = 1 TabOrder = 1
object Label3: TLabel object Label3: TLabel
Left = 7 Left = 7
Height = 13 Height = 14
Top = 8 Top = 8
Width = 167 Width = 171
Caption = 'Destino para criação da classe' Caption = 'Destino para criação da classe'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -120,8 +121,8 @@ object CadastroClasse: TCadastroClasse ...@@ -120,8 +121,8 @@ object CadastroClasse: TCadastroClasse
end end
object btnSelecionarDestino: TSpeedButton object btnSelecionarDestino: TSpeedButton
Left = 333 Left = 333
Height = 25 Height = 34
Top = 20 Top = 24
Width = 151 Width = 151
Caption = 'Selecionar destino' Caption = 'Selecionar destino'
Glyph.Data = { Glyph.Data = {
...@@ -172,7 +173,7 @@ object CadastroClasse: TCadastroClasse ...@@ -172,7 +173,7 @@ object CadastroClasse: TCadastroClasse
end end
object edtPackage: TEdit object edtPackage: TEdit
Left = 7 Left = 7
Height = 22 Height = 29
Top = 23 Top = 23
Width = 321 Width = 321
Color = 15461355 Color = 15461355
...@@ -181,18 +182,19 @@ object CadastroClasse: TCadastroClasse ...@@ -181,18 +182,19 @@ object CadastroClasse: TCadastroClasse
end end
end end
object Panel4: TPanel object Panel4: TPanel
Left = 6 Left = 1
Height = 66 Height = 74
Top = 8 Top = 1
Width = 490 Width = 502
ClientHeight = 66 Align = alTop
ClientWidth = 490 ClientHeight = 74
ClientWidth = 502
TabOrder = 0 TabOrder = 0
object lblNome: TLabel object lblNome: TLabel
Left = 97 Left = 97
Height = 13 Height = 14
Top = 13 Top = 13
Width = 122 Width = 124
Caption = 'Nome (case sensitive)' Caption = 'Nome (case sensitive)'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -203,17 +205,17 @@ object CadastroClasse: TCadastroClasse ...@@ -203,17 +205,17 @@ object CadastroClasse: TCadastroClasse
end end
object lblValorCodigo: TLabel object lblValorCodigo: TLabel
Left = 9 Left = 9
Height = 16 Height = 19
Top = 32 Top = 32
Width = 93 Width = 97
Caption = 'lblValorCodigo' Caption = 'lblValorCodigo'
ParentColor = False ParentColor = False
end end
object lblCodigo: TLabel object lblCodigo: TLabel
Left = 9 Left = 9
Height = 13 Height = 14
Top = 13 Top = 13
Width = 38 Width = 39
Caption = 'Código' Caption = 'Código'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -11 Font.Height = -11
...@@ -224,7 +226,7 @@ object CadastroClasse: TCadastroClasse ...@@ -224,7 +226,7 @@ object CadastroClasse: TCadastroClasse
end end
object edtNome: TEdit object edtNome: TEdit
Left = 96 Left = 96
Height = 22 Height = 29
Top = 32 Top = 32
Width = 390 Width = 390
OnChange = edtNomeChange OnChange = edtNomeChange
...@@ -233,32 +235,33 @@ object CadastroClasse: TCadastroClasse ...@@ -233,32 +235,33 @@ object CadastroClasse: TCadastroClasse
end end
object Panel7: TPanel object Panel7: TPanel
Left = 1 Left = 1
Height = 39 Height = 55
Top = 273 Top = 289
Width = 501 Width = 502
Align = alBottom Align = alBottom
ClientHeight = 39 ClientHeight = 55
ClientWidth = 501 ClientWidth = 502
TabOrder = 3 TabOrder = 3
object BitBtn1: TBitBtn object BitBtn1: TBitBtn
Left = 328 Left = 369
Height = 25 Height = 40
Top = 8 Top = 8
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Ok' Default = True
DefaultCaption = True
Kind = bkOK Kind = bkOK
ModalResult = 1
OnClick = btnSalvarClick OnClick = btnSalvarClick
TabOrder = 0 TabOrder = 0
end end
object BitBtn2: TBitBtn object BitBtn2: TBitBtn
Left = 416 Left = 242
Height = 25 Height = 40
Top = 8 Top = 8
Width = 75 Width = 120
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
Caption = 'Cancel' Cancel = True
DefaultCaption = True
Kind = bkCancel Kind = bkCancel
ModalResult = 2 ModalResult = 2
TabOrder = 1 TabOrder = 1
......
...@@ -56,7 +56,7 @@ type ...@@ -56,7 +56,7 @@ type
procedure Initialize; procedure Initialize;
public public
{ Public declarations } { Public declarations }
Constructor Create(Sender: TComponent; piConnectionString: string; piUMLClass: IUMLCLass); reintroduce; Constructor Create(Sender: TComponent; piCadastroClasse: cxCadastroClasse; piUMLClass: IUMLCLass); reintroduce;
property ClassPackage: IUMLPackage read fClassPackage write fClassPackage; property ClassPackage: IUMLPackage read fClassPackage write fClassPackage;
property UMLClass: IUMLClass read fUMLClass write fUMLClass; property UMLClass: IUMLClass read fUMLClass write fUMLClass;
...@@ -73,7 +73,7 @@ uses IntegracaoDelphiSUML; ...@@ -73,7 +73,7 @@ uses IntegracaoDelphiSUML;
{ TCadastroClasse } { TCadastroClasse }
constructor TCadastroClasse.Create(Sender: TComponent; piConnectionString: string; piUMLClass: IUMLCLass); constructor TCadastroClasse.Create(Sender: TComponent; piCadastroClasse: cxCadastroClasse; piUMLClass: IUMLCLass);
begin begin
inherited Create(sender); inherited Create(sender);
...@@ -83,7 +83,7 @@ begin ...@@ -83,7 +83,7 @@ begin
edtDBIDO.Text := fUMLClass.GetTaggedValueAsString('DBMappings', 'DBClassMap', 'DBIDO'); edtDBIDO.Text := fUMLClass.GetTaggedValueAsString('DBMappings', 'DBClassMap', 'DBIDO');
edtDBTableName.Text := fUMLClass.GetTaggedValueAsString('DBMappings', 'DBClassMap', 'Table'); edtDBTableName.Text := fUMLClass.GetTaggedValueAsString('DBMappings', 'DBClassMap', 'Table');
end; end;
fcxCadastroClasse := cxCadastroClasse.Create(piConnectionString); fcxCadastroClasse := piCadastroClasse;
self.Initialize; self.Initialize;
end; end;
...@@ -94,17 +94,17 @@ var lUMLFactory: IUMLFactory; ...@@ -94,17 +94,17 @@ var lUMLFactory: IUMLFactory;
begin begin
if edtNomeStarUML.Text = '' then if edtNomeStarUML.Text = '' then
begin begin
application.MessageBox(' necessrio informar o nome da classe no StarUML.','StarUML', MB_ICONEXCLAMATION + MB_OK); application.MessageBox('É necessário informar o nome da classe no StarUML.','StarUML', MB_ICONEXCLAMATION + MB_OK);
exit; exit;
end else end else
if edtPackage.Text = '' then if edtPackage.Text = '' then
begin begin
application.MessageBox(' necessrio informar o package onde ser criado o caso de uso.','StarUML', MB_ICONEXCLAMATION + MB_OK); application.MessageBox('É necessário informar o package onde será criado o caso de uso.','StarUML', MB_ICONEXCLAMATION + MB_OK);
exit; exit;
end; end;
try try
//Se em modo de edio (classe j criada) //Se em modo de edição (classe já criada)
if assigned(fUMLClass) then if assigned(fUMLClass) then
begin begin
SalvaObjeto; SalvaObjeto;
...@@ -114,10 +114,10 @@ begin ...@@ -114,10 +114,10 @@ begin
end end
else else
begin begin
//Seno cria o objeto no StarUML e salva no caso de uso //Senão cria o objeto no StarUML e salva no caso de uso
if assigned(fClassPackage.FindByName(edtNomeStarUML.Text)) then if assigned(fClassPackage.FindByName(edtNomeStarUML.Text)) then
begin begin
application.MessageBox('Classe j existente no pacote selecionado.','StarUML', MB_ICONEXCLAMATION + MB_OK); application.MessageBox('Classe já existente no pacote selecionado.','StarUML', MB_ICONEXCLAMATION + MB_OK);
exit; exit;
end; end;
...@@ -158,8 +158,11 @@ begin ...@@ -158,8 +158,11 @@ begin
lElementSelector.ClearSelectableModels(); lElementSelector.ClearSelectableModels();
lElementSelector.AddSelectableModel('UMLPackage'); lElementSelector.AddSelectableModel('UMLPackage');
lElementSelector.AddSelectableModel('UMLModel'); lElementSelector.AddSelectableModel('UMLModel');
if lElementSelector.Execute('Selecione o local para criar o caso de uso') then if lElementSelector.Execute('Selecione o local para criar a classe') then
begin
ClassPackage := lElementSelector.GetSelectedModel as IUMLPackage; ClassPackage := lElementSelector.GetSelectedModel as IUMLPackage;
edtPackage.caption := ClassPackage.PathName;
end;
end; end;
procedure TCadastroClasse.edtNomeChange(Sender: TObject); procedure TCadastroClasse.edtNomeChange(Sender: TObject);
...@@ -182,8 +185,8 @@ var lField, lResponseField: utField; ...@@ -182,8 +185,8 @@ var lField, lResponseField: utField;
lClassCode: string; lClassCode: string;
begin begin
FOID := -1; FOID := -1;
//Se for edio, seta o contexto no caso de uso (cadastro de classe )para a classe corrente //Se for edição, seta o contexto no caso de uso (cadastro de classe )para a classe corrente
// atraves do cdigo // atraves do código
if assigned(fUMLClass) then if assigned(fUMLClass) then
begin begin
lField := utField.Create; lField := utField.Create;
......
object fDBAttributeParameters: TfDBAttributeParameters object fDBAttributeParameters: TfDBAttributeParameters
Left = 0 Left = 0
Height = 359 Height = 353
Top = 0 Top = 27
Width = 348 Width = 348
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'fDBAttributeParameters' Caption = 'fDBAttributeParameters'
ClientHeight = 359 ClientHeight = 353
ClientWidth = 348 ClientWidth = 348
Color = clBtnFace Color = clBtnFace
Font.Color = clWindowText Font.Color = clWindowText
...@@ -44,7 +44,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -44,7 +44,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
object Panel2: TPanel object Panel2: TPanel
Left = 0 Left = 0
Height = 44 Height = 44
Top = 315 Top = 309
Width = 348 Width = 348
Align = alBottom Align = alBottom
ClientHeight = 44 ClientHeight = 44
...@@ -52,7 +52,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -52,7 +52,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
TabOrder = 1 TabOrder = 1
object ckbCheckLength: TCheckBox object ckbCheckLength: TCheckBox
Left = 9 Left = 9
Height = 33 Height = 23
Top = 6 Top = 6
Width = 88 Width = 88
Caption = 'Check length' Caption = 'Check length'
...@@ -98,11 +98,11 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -98,11 +98,11 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object Panel3: TPanel object Panel3: TPanel
Left = 0 Left = 0
Height = 288 Height = 282
Top = 27 Top = 27
Width = 348 Width = 348
Align = alClient Align = alClient
ClientHeight = 288 ClientHeight = 282
ClientWidth = 348 ClientWidth = 348
TabOrder = 0 TabOrder = 0
object GroupBox1: TGroupBox object GroupBox1: TGroupBox
...@@ -111,14 +111,14 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -111,14 +111,14 @@ object fDBAttributeParameters: TfDBAttributeParameters
Top = 6 Top = 6
Width = 323 Width = 323
Caption = 'Attribute (StarUML)' Caption = 'Attribute (StarUML)'
ClientHeight = 85 ClientHeight = 70
ClientWidth = 323 ClientWidth = 321
TabOrder = 0 TabOrder = 0
object Label5: TLabel object Label5: TLabel
Left = 12 Left = 12
Height = 16 Height = 16
Top = 54 Top = 54
Width = 33 Width = 32
Caption = 'Type:' Caption = 'Type:'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -140,13 +140,13 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -140,13 +140,13 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object cbbStarUMLTypes: TComboBox object cbbStarUMLTypes: TComboBox
Left = 52 Left = 52
Height = 24 Height = 28
Top = 50 Top = 50
Width = 249 Width = 249
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
ItemHeight = 16 ItemHeight = 0
OnClick = cbbStarUMLTypesClick OnClick = cbbStarUMLTypesClick
ParentFont = False ParentFont = False
Style = csDropDownList Style = csDropDownList
...@@ -154,7 +154,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -154,7 +154,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object edtAttributeName: TEdit object edtAttributeName: TEdit
Left = 52 Left = 52
Height = 24 Height = 33
Top = 20 Top = 20
Width = 249 Width = 249
Font.Color = clWindowText Font.Color = clWindowText
...@@ -171,8 +171,8 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -171,8 +171,8 @@ object fDBAttributeParameters: TfDBAttributeParameters
Top = 97 Top = 97
Width = 323 Width = 323
Caption = 'DB Mappings' Caption = 'DB Mappings'
ClientHeight = 184 ClientHeight = 169
ClientWidth = 323 ClientWidth = 321
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 16 Left = 16
...@@ -190,7 +190,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -190,7 +190,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
Left = 21 Left = 21
Height = 16 Height = 16
Top = 62 Top = 62
Width = 33 Width = 32
Caption = 'Type:' Caption = 'Type:'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -224,7 +224,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -224,7 +224,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object lblAttLength: TLabel object lblAttLength: TLabel
Left = 290 Left = 290
Height = 13 Height = 14
Top = 35 Top = 35
Width = 58 Width = 58
Caption = 'lblAttLength' Caption = 'lblAttLength'
...@@ -232,9 +232,9 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -232,9 +232,9 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object ckbMand: TCheckBox object ckbMand: TCheckBox
Left = 18 Left = 18
Height = 17 Height = 23
Top = 159 Top = 159
Width = 97 Width = 86
Caption = 'Mandatory' Caption = 'Mandatory'
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
...@@ -244,7 +244,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -244,7 +244,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object edtName: TEdit object edtName: TEdit
Left = 67 Left = 67
Height = 24 Height = 33
Top = 29 Top = 29
Width = 214 Width = 214
Font.Color = clWindowText Font.Color = clWindowText
...@@ -256,7 +256,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -256,7 +256,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object edtFSize: TEdit object edtFSize: TEdit
Left = 67 Left = 67
Height = 24 Height = 33
Top = 89 Top = 89
Width = 78 Width = 78
Font.Color = clWindowText Font.Color = clWindowText
...@@ -267,7 +267,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -267,7 +267,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object edtVSize: TEdit object edtVSize: TEdit
Left = 67 Left = 67
Height = 24 Height = 33
Top = 119 Top = 119
Width = 78 Width = 78
Font.Color = clWindowText Font.Color = clWindowText
...@@ -284,7 +284,7 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -284,7 +284,7 @@ object fDBAttributeParameters: TfDBAttributeParameters
Font.Color = clWindowText Font.Color = clWindowText
Font.Height = -13 Font.Height = -13
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
ItemHeight = 16 ItemHeight = 0
Items.Strings = ( Items.Strings = (
'CHAR' 'CHAR'
'DATETIME' 'DATETIME'
...@@ -302,9 +302,9 @@ object fDBAttributeParameters: TfDBAttributeParameters ...@@ -302,9 +302,9 @@ object fDBAttributeParameters: TfDBAttributeParameters
end end
object ckbIsAuditable: TCheckBox object ckbIsAuditable: TCheckBox
Left = 154 Left = 154
Height = 17 Height = 23
Top = 159 Top = 159
Width = 97 Width = 80
Caption = 'IsAuditable' Caption = 'IsAuditable'
TabOrder = 5 TabOrder = 5
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment