Commit 80a94596 authored by Sandro Camata Santana's avatar Sandro Camata Santana

Inicio implementação do plugin EvoUML

parent 831d6539
Pipeline #1438 failed with stages
ituOQLParams.pas(7,22) Note: Fixed character case of unit "acuOQl" to "acuOQL".
ituOQLParams.pas Note: Replaced unit "Mask" with "MaskEdit" in uses section.
ituOQLParams.pas Note: Replaced unit "Windows" with "LCLIntf, LCLType, LMessages" in uses section.
ituOQLParams.pas(1,19) Note: Added MODE Delphi syntax modifier after unit name.
: Conversion Ready.
library CurioAddIn;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
uses
SysUtils,
Classes,
Interfaces,
Forms,
acuObject,
utuMessage,
acuRepositorySQL,
acuSQLDialectManager,
acuSQLDialectSQLServer,
acuSQLDialectOracle,
acuSQLDialectDB2,
acuFramework,
acuQuerySQLODBC,
ituExplorerV2,
IntegracaoDelphiSUML in 'IntegracaoDelphiSUML.pas',
Mostra_Processamento in 'Mostra_Processamento.pas' {FMostra_Processamento},
InstantClasses in 'InstantCode\InstantClasses.pas',
InstantCode in 'InstantCode\InstantCode.pas',
InstantTextFiler in 'InstantCode\InstantTextFiler.pas',
Utility in 'Utility.pas',
utuOQL in 'utuOQL.pas',
utuXSD in 'utuXSD.pas',
DelphiAddInObj in 'DelphiAddInObj.pas';
exports
InitializeAddIn,
FinalizeAddIn,
DoMenuAction;
{$R *.res}
begin
ChangeLocaleFormatSetting;
gDefaultDatabaseDriver := typeOf(acDatabaseSQLODBC);
PersistenceManager.DefaultRepositoryClass := typeOf(acRepositorySQL);
PersistenceManager.RegisterClass(typeOf(acPersistentObject), acPersistentObjectClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('MS SQL Server', typeOf(acSQLDialectSQLServer), acSQLDialectSQLServerClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('Oracle', typeOf(acSQLDialectOracle), acSQLDialectOracleClassFactory.Create);
gSQLDialectManager.RegisterSQLDialect('DB2', typeOf(acSQLDialectDB2), acSQLDialectDB2ClassFactory.Create);
Application.Initialize;
// ExtensionManager.LoadProfiles;
// StarUMLApplication.OpenProject('D:\Users\sandrosantana\Documents\git\GED\mdl\GED.uml');
// Application.CreateForm(TExplorerV2, ExplorerV2);
// Application.Run;
end.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{$IFDEF VER130}
{$DEFINE MSWINDOWS}
{$DEFINE D5}
{$DEFINE D5+}
{$ENDIF}
{$IFDEF VER140}
{$DEFINE D5+}
{$DEFINE D6}
{$DEFINE D6+}
{$ENDIF}
{$IFDEF VER150}
{$DEFINE D5+}
{$DEFINE D6+}
{$DEFINE D7}
{$DEFINE D7+}
{$ENDIF}
{$IFDEF VER170}
{$DEFINE D5+}
{$DEFINE D6+}
{$DEFINE D7+}
{$DEFINE D9}
{$DEFINE D9+}
{$ENDIF}
{$IFDEF VER180}
{$DEFINE D5+}
{$DEFINE D6+}
{$DEFINE D7+}
{$DEFINE D9+}
{$DEFINE D10}
{$DEFINE D10+}
{$ENDIF}
{$IFDEF FPC}
{$DEFINE D5+}
{$DEFINE D6+}
{$DEFINE D7+}
{$DEFINE SUPPORTS_WIDESTRING}
{$DEFINE SUPPORTS_INTERFACE}
{$DEFINE SUPPORTS_INT64}
{$DEFINE SUPPORTS_DYNAMICARRAYS}
{$DEFINE SUPPORTS_DEFAULTPARAMS}
{$DEFINE SUPPORTS_OVERLOAD}
{$ASMMODE Intel}
{$UNDEF UseRegAsm}
{$ENDIF}
{$IFDEF D5}
{$A+}
{$ELSE}
{$A8}
{$ENDIF}
{$B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T+,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$IFDEF D6+}
{$WARN SYMBOL_DEPRECATED ON}
{$WARN SYMBOL_LIBRARY ON}
{$WARN SYMBOL_PLATFORM ON}
{$WARN UNIT_LIBRARY ON}
{$WARN UNIT_PLATFORM ON}
{$WARN UNIT_DEPRECATED ON}
{$ENDIF}
{$IFDEF D7+}
{$WARN HRESULT_COMPAT ON}
{$WARN HIDING_MEMBER ON}
{$WARN HIDDEN_VIRTUAL ON}
{$WARN GARBAGE ON}
{$WARN BOUNDS_ERROR ON}
{$WARN ZERO_NIL_COMPAT ON}
{$WARN STRING_CONST_TRUNCED ON}
{$WARN FOR_LOOP_VAR_VARPAR ON}
{$WARN TYPED_CONST_VARPAR ON}
{$WARN ASG_TO_TYPED_CONST ON}
{$WARN CASE_LABEL_RANGE ON}
{$WARN FOR_VARIABLE ON}
{$WARN CONSTRUCTING_ABSTRACT ON}
{$WARN COMPARISON_FALSE ON}
{$WARN COMPARISON_TRUE ON}
{$WARN COMPARING_SIGNED_UNSIGNED ON}
{$WARN COMBINING_SIGNED_UNSIGNED ON}
{$WARN UNSUPPORTED_CONSTRUCT ON}
{$WARN FILE_OPEN ON}
{$WARN FILE_OPEN_UNITSRC ON}
{$WARN BAD_GLOBAL_SYMBOL ON}
{$WARN DUPLICATE_CTOR_DTOR ON}
{$WARN INVALID_DIRECTIVE ON}
{$WARN PACKAGE_NO_LINK ON}
{$WARN PACKAGED_THREADVAR ON}
{$WARN IMPLICIT_IMPORT ON}
{$WARN HPPEMIT_IGNORED ON}
{$WARN NO_RETVAL ON}
{$WARN USE_BEFORE_DEF ON}
{$WARN FOR_LOOP_VAR_UNDEF ON}
{$WARN UNIT_NAME_MISMATCH ON}
{$WARN NO_CFG_FILE_FOUND ON}
{$WARN MESSAGE_DIRECTIVE ON}
{$WARN IMPLICIT_VARIANTS ON}
{$WARN UNICODE_TO_LOCALE ON}
{$WARN LOCALE_TO_UNICODE ON}
{$WARN IMAGEBASE_MULTIPLE ON}
{$WARN SUSPICIOUS_TYPECAST ON}
{$WARN PRIVATE_PROPACCESSOR ON}
{$WARN UNSAFE_TYPE OFF}
{$WARN UNSAFE_CODE OFF}
{$WARN UNSAFE_CAST OFF}
{$ENDIF}
This diff is collapsed.
This diff is collapsed.
Copyright (C) Evológica 2017
object FMostra_Processamento: TFMostra_Processamento
Left = 220
Top = 220
BorderStyle = bsDialog
ClientHeight = 65
ClientWidth = 548
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object pnlMensagem: TPanel
Left = 0
Top = 38
Width = 548
Height = 27
Align = alBottom
BevelInner = bvLowered
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'MS Sans Serif'
Font.Style = [fsBold]
ParentFont = False
TabOrder = 0
ExplicitTop = 54
end
object Panel2: TPanel
Left = 0
Top = 0
Width = 548
Height = 38
Align = alClient
BevelInner = bvLowered
TabOrder = 1
ExplicitHeight = 68
object pgbBarraDeProgresso: TProgressBar
Left = 9
Top = 10
Width = 533
Height = 18
Smooth = True
TabOrder = 0
end
end
end
unit Mostra_Processamento;
{$IFDEF FPC}
{$MODE Delphi}
{$ENDIF}
interface
uses
{$IFnDEF FPC}
Windows,
{$ELSE}
LCLIntf, LCLType, LMessages,
{$ENDIF}
Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls;
type
TFMostra_Processamento = class(TForm)
pnlMensagem: TPanel;
Panel2: TPanel;
pgbBarraDeProgresso: TProgressBar;
private
{ Private declarations }
public
{ Public declarations }
end;
TFShowProgress = class
public
constructor create(piMsg: string = ''; piPosition: integer = 0; piTotal: integer = 0); virtual; abstract;
procedure ChangeMessage (piMsg: string); overload; virtual; abstract;
procedure ChangeMessage (piMsg: string; piPosition: integer; piTotal: integer); overload;
procedure ChangeCounters (piPosition: integer; piTotal: integer); virtual; abstract;
procedure Inc (piSize: integer = 1); virtual; abstract;
end;
TFShowProgressForm = class(TFShowProgress)
private
fFormProgress: TFMostra_Processamento;
public
destructor Destroy; override;
constructor create(piMsg: string = ''; piPosition: integer = 0; piTotal: integer = 0); override;
procedure ChangeMessage (piMsg: string); override;
procedure ChangeCounters (piPosition: integer; piTotal: integer); override;
procedure Inc (piSize: integer = 1); override;
end;
implementation
{$R *.dfm}
{ TFShowProgressForm }
procedure TFShowProgressForm.ChangeCounters(piPosition, piTotal: integer);
begin
fFormProgress.pgbBarraDeProgresso.Max := piTotal;
fFormProgress.pgbBarraDeProgresso.Position := piPosition;
Application.ProcessMessages;
end;
procedure TFShowProgressForm.ChangeMessage(piMsg: string);
begin
fFormProgress.pnlMensagem.Caption := piMsg;
Application.ProcessMessages;
end;
constructor TFShowProgressForm.create(piMsg: string; piPosition, piTotal: integer);
begin
fFormProgress := TFMostra_Processamento.Create(nil);
fFormProgress.pgbBarraDeProgresso.Max := piTotal;
fFormProgress.pgbBarraDeProgresso.Position := piPosition;
fFormProgress.pnlMensagem.Caption := piMsg;
fFormProgress.Show;
Application.ProcessMessages;
end;
destructor TFShowProgressForm.destroy;
begin
fFormProgress.Free;
inherited;
end;
procedure TFShowProgressForm.Inc(piSize: integer);
begin
fFormProgress.pgbBarraDeProgresso.Position := fFormProgress.pgbBarraDeProgresso.Position + piSize;
Application.ProcessMessages;
end;
{ TFShowProgress }
procedure TFShowProgress.ChangeMessage(piMsg: string; piPosition, piTotal: integer);
begin
Self.ChangeMessage(piMsg);
Self.ChangeCounters(piPosition, piTotal);
end;
end.
staruml-evologica-plugin
unit Utility;
{******************************************************************************}
{ }
{ StarUML - The Open Source UML/MDA Platform. }
{ }
{ Copyright (C) 2002-2005 - Plastic Software, Inc. }
{ }
{ }
{ This program is free software; you can redistribute it and/or modify it }
{ under the terms of the GNU General Public License as published by the Free }
{ Software Foundation; either version 2 of the License, or (at your option) }
{ any later version. }
{ }
{ This program is distributed in the hope that it will be useful, but WITHOUT }
{ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or }
{ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for }
{ more details. }
{ }
{ You should have received a copy of the GNU General Public License along with }
{ this program; if not, write to the Free Software Foundation, Inc., 51 }
{ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA }
{ }
{ Linking StarUML statically or dynamically with other modules is making a }
{ combined work based on StarUML. Thus, the terms and conditions of the GNU }
{ General Public License cover the whole combination. }
{ }
{ In addition, as a special exception, Plastic Software give you permission to }
{ combine StarUML program with free software programs or libraries that are }
{ released under the GNU LGPL/Mozilla/Apache/BSD and with code included in the }
{ standard release of ExpressBar, ExpressNavBar, ExpressInspector, }
{ ExpressPageControl, ProGrammar, NextGrid under the commercial license (or }
{ modified versions of such code, with unchanged license). You may copy and }
{ distribute such a system following the terms of the GNU GPL for StarUML and }
{ the licenses of the other code concerned, provided that you include the }
{ source code of that other code when and as the GNU GPL requires distribution }
{ of source code. Plastic Software also give you permission to combine StarUML }
{ program with dynamically linking plug-in (or add-in) programs that are }
{ released under the GPL-incompatible and proprietary license. }
{ }
{ Note that people who make modified versions of StarUML are not obligated to }
{ grant this special exception for their modified versions; it is their choice }
{ whether to do so. The GNU General Public License gives permission to release }
{ a modified version without this exception; this exception also makes it }
{ possible to release a modified version which carries forward this exception. }
{******************************************************************************}
interface
uses
StdCtrls, Classes;
function GetDllDirectory: string;
type
// PStringWriter
PStringWriter = class
private
Buffer: TStringList;
OnCurLine: Boolean;
FTabToSpace: Boolean;
FSpaceCnt: Integer;
FIndentationCount: Integer;
FHeader: string;
FFooter: string;
function GetIntentationStr: string;
public
constructor Create;
destructor Destroy; override;
procedure Indent(Count: Integer); overload;
procedure Outdent(Count: Integer); overload;
procedure Indent; overload;
procedure Outdent; overload;
procedure Clear;
procedure WriteLine(const S: string); overload;
procedure WriteLine(const FormatStr: string; const Args: array of const); overload;
procedure WriteLine; overload;
procedure Write(const S: string); overload;
procedure Write(const FormatStr: string; const Args: array of const); overload;
procedure Append(Writer: PStringWriter);
procedure SaveToFile(FileName: string; DirectoryCreation: Boolean = True);
function AsString(): String;
property IndentationCount: Integer read FIndentationCount write FIndentationCount;
property TabToSpace: Boolean read FTabToSpace write FTabToSpace ;
property SpaceCnt: Integer read FSpaceCnt write FSpaceCnt;
property Header: string read FHeader write FHeader;
property Footer: string read FFooter write FFooter;
end;
implementation
uses
Windows, SysUtils,Forms;
////////////////////////////////////////////////////////////////////////////////
// PStringWriter
constructor PStringWriter.Create;
begin
inherited;
Buffer := TStringList.Create;
FSpaceCnt := 4;
FIndentationCount := 0;
end;
destructor PStringWriter.Destroy;
begin
Buffer.Free;
Buffer := nil;
inherited;
end;
procedure PStringWriter.Indent(Count: Integer);
begin
FIndentationCount := FIndentationCount + Count;
if FIndentationCount < 0 then
FIndentationCount := 0;
end;
procedure PStringWriter.Outdent(Count: Integer);
begin
FIndentationCount := FIndentationCount - Count;
if FIndentationCount < 0 then
FIndentationCount := 0;
end;
procedure PStringWriter.Indent;
begin
Indent(1);
end;
procedure PStringWriter.Outdent;
begin
Outdent(1);
end;
function PStringWriter.AsString: String;
begin
Result := Buffer.Text;
end;
procedure PStringWriter.Clear;
begin
Buffer.Clear;
OnCurLine := False;
FSpaceCnt := 4;
FIndentationCount := 0;
end;
procedure PStringWriter.WriteLine(const S: string);
begin
if OnCurLine then
Buffer[Buffer.Count - 1] := Buffer[Buffer.Count - 1] + S
else
Buffer.Add(GetIntentationStr + S);
OnCurLine := False;
end;
function PStringWriter.GetIntentationStr: string;
begin
if FTabToSpace then
Result := StringOfChar(#32, FSpaceCnt * FIndentationCount)
else
Result := StringOfChar(#9, FIndentationCount);
end;
procedure PStringWriter.WriteLine(const FormatStr: string; const Args: array of const);
var
S : string;
begin
S := TrimLeft(Format(FormatStr, Args));
while S <> StringReplace(S, ' ', ' ', [rfReplaceAll]) do
S := StringReplace(S, ' ', ' ', [rfReplaceAll]);
WriteLine(S);
end;
procedure PStringWriter.WriteLine;
begin
WriteLine('');
end;
procedure PStringWriter.Write(const S: string);
begin
if not OnCurLine then
Buffer.Add(GetIntentationStr + S)
else begin
Buffer[Buffer.Count - 1] := Buffer[Buffer.Count - 1] + S;
end;
OnCurLine := True;
end;
procedure PStringWriter.Write(const FormatStr: string; const Args: array of const);
var
S : string;
begin
S := TrimLeft(Format(FormatStr, Args));
while S <> StringReplace(S, ' ', ' ', [rfReplaceAll]) do
S := StringReplace(S, ' ', ' ', [rfReplaceAll]);
Write(S);
end;
procedure PStringWriter.Append(Writer: PStringWriter);
var
I: Integer;
begin
for I := 0 to Writer.Buffer.Count - 1 do
WriteLine(Writer.Buffer[I]);
end;
procedure PStringWriter.SaveToFile(FileName: string; DirectoryCreation: Boolean = True);
var
Dir: string;
begin
Dir := ExtractFilePath(FileName);
if DirectoryCreation and not DirectoryExists(Dir) then
if not ForceDirectories(Dir) then
raise Exception.Create('Directory Create Error');
Buffer.SaveToFile(FileName);
end;
// PStringWriter
////////////////////////////////////////////////////////////////////////////////
function GetDllDirectory: string;
var
ModuleName : array[0..1023] of char;
Path: string;
begin
FillChar(ModuleName, Sizeof(ModuleName), #10);
GetModuleFileName(HInstance, ModuleName, Sizeof(ModuleName));
Path := ExtractFileDir(ModuleName);
Result := Path;
end;
end.
object ObjectExplorer: TObjectExplorer
Left = 0
Height = 240
Top = 0
Width = 320
ClientHeight = 240
ClientWidth = 320
TabOrder = 0
TabStop = True
DesignLeft = 2471
DesignTop = 505
object tvExplorer: TTreeView
Left = 0
Height = 240
Top = 0
Width = 320
Align = alClient
BorderStyle = bsNone
ReadOnly = True
ScrollBars = ssAutoBoth
ShowLines = False
TabOrder = 0
OnExpanding = tvExplorerItemExpanding
OnGetSelectedIndex = tvExplorerGetSelectedIndex
Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowRoot, tvoToolTips, tvoThemedDraw]
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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