Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
StarUML Evológica Plugin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
evologica
StarUML Evológica Plugin
Commits
8209f16a
Commit
8209f16a
authored
Nov 24, 2020
by
Sandro Camata Santana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajustes
parent
29d6d4f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
146 deletions
+189
-146
ituExplorerV2.dfm
EvoUMLPlugin/src/ituExplorerV2.dfm
+154
-139
ituExplorerV2.pas
EvoUMLPlugin/src/ituExplorerV2.pas
+35
-7
No files found.
EvoUMLPlugin/src/ituExplorerV2.dfm
View file @
8209f16a
object ExplorerV2: TExplorerV2
Left =
523
Height =
871
Top =
77
Width = 1
387
Left =
-1230
Height =
697
Top =
112
Width = 1
110
Caption = 'Model OQL Query'
ClientHeight =
871
ClientWidth = 1
387
ClientHeight =
697
ClientWidth = 1
110
Color = clWindow
DesignTimePPI = 120
Font.Color = clWindowText
Icon.Data = {
96A5050000000100060000000000010020002820040066000000101000000100
...
...
@@ -11585,42 +11584,42 @@ object ExplorerV2: TExplorerV2
ShowInTaskBar = stAlways
LCLVersion = '2.0.10.0'
object splVertical: TSplitter
Left =
45
0
Height =
871
Left =
36
0
Height =
697
Top = 0
Width =
6
Width =
5
MinSize = 5
ResizeStyle = rsPattern
end
object pnlEditor: TPanel
Left =
456
Height =
871
Left =
365
Height =
697
Top = 0
Width =
931
Width =
745
Align = alClient
BevelOuter = bvNone
ClientHeight =
871
ClientWidth =
931
ClientHeight =
697
ClientWidth =
745
Font.Color = clWindowText
ParentFont = False
TabOrder = 0
object pnlResult: TPanel
Left = 0
Height =
231
Top =
611
Width =
931
Height =
185
Top =
489
Width =
745
Align = alBottom
BevelOuter = bvNone
ClientHeight =
231
ClientWidth =
931
ClientHeight =
185
ClientWidth =
745
Font.Color = clWindowText
ParentFont = False
TabOrder = 0
object pcResults: TPageControl
Left = 0
Height =
231
Height =
185
Top = 0
Width =
931
Width =
745
ActivePage = tsError
Align = alClient
Font.Color = clWindowText
...
...
@@ -11696,16 +11695,16 @@ object ExplorerV2: TExplorerV2
end
object tsError: TTabSheet
Caption = 'tsError'
ClientHeight =
223
ClientWidth =
923
ClientHeight =
177
ClientWidth =
737
Font.Color = clWindowText
ImageIndex = 1
ParentFont = False
object memErrorText: TMemo
Left = 0
Height =
223
Height =
177
Top = 0
Width =
923
Width =
737
Align = alClient
BorderStyle = bsNone
Font.Color = clWindowText
...
...
@@ -11720,9 +11719,9 @@ object ExplorerV2: TExplorerV2
end
object pcEditor: TPageControl
Left = 0
Height =
545
Top =
60
Width =
475
Height =
436
Top =
48
Width =
380
ActivePage = tsOQL
Align = alClient
Font.Color = clWindowText
...
...
@@ -11734,27 +11733,29 @@ object ExplorerV2: TExplorerV2
Options = [nboMultiLine]
object tsOQL: TTabSheet
Caption = 'OQL - Object Query Language'
ClientHeight =
512
ClientWidth =
467
ClientHeight =
408
ClientWidth =
372
Font.Color = clWindowText
ParentFont = False
inline SynEditOQL: TSynEdit
Left = 0
Height =
512
Height =
408
Top = 0
Width =
467
Width =
372
Align = alClient
Font.Height = -1
6
Font.Height = -1
3
Font.Name = 'Courier New'
Font.Pitch = fpFixed
Font.Quality = fqNonAntialiased
ParentColor = False
ParentFont = False
TabOrder = 0
OnDragDrop = memOQLQuery2DragDrop
OnDragOver = memOQLQuery2DragOver
OnKeyUp = SynEditOQLKeyUp
OnUTF8KeyPress = SynEditOQLUTF8KeyPress
BorderStyle = bsNone
Gutter.Width =
42
Gutter.Width =
23
Gutter.MouseActions = <>
RightGutter.Width = 0
RightGutter.MouseActions = <>
...
...
@@ -12213,12 +12214,12 @@ object ExplorerV2: TExplorerV2
OnCommandProcessed = SynEditOQLCommandProcessed
inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks
Width =
30
Width =
24
Visible = False
MouseActions = <>
end
object SynGutterLineNumber1: TSynGutterLineNumber
Width =
21
Width =
17
MouseActions = <>
MarkupInfo.Background = clBtnFace
MarkupInfo.Foreground = clNone
...
...
@@ -12228,19 +12229,18 @@ object ExplorerV2: TExplorerV2
LeadingZeros = False
end
object SynGutterChanges1: TSynGutterChanges
Width =
5
Width =
4
MouseActions = <>
ModifiedColor = 59900
SavedColor = clGreen
end
object SynGutterSeparator1: TSynGutterSeparator
Width =
3
Width =
2
MouseActions = <>
MarkupInfo.Background = clWhite
MarkupInfo.Foreground = clGray
end
object SynGutterCodeFolding1: TSynGutterCodeFolding
Width = 13
Visible = False
MouseActions = <>
MarkupInfo.Background = clNone
...
...
@@ -12263,7 +12263,7 @@ object ExplorerV2: TExplorerV2
Top = 0
Width = 467
Align = alClient
Font.Height = -1
6
Font.Height = -1
3
Font.Name = 'Courier New'
Font.Pitch = fpFixed
Font.Quality = fqNonAntialiased
...
...
@@ -12271,7 +12271,7 @@ object ExplorerV2: TExplorerV2
ParentFont = False
TabOrder = 0
BorderStyle = bsNone
Gutter.Width =
42
Gutter.Width =
23
Gutter.MouseActions = <>
RightGutter.Width = 0
RightGutter.MouseActions = <>
...
...
@@ -12730,12 +12730,12 @@ object ExplorerV2: TExplorerV2
LineHighlightColor.Foreground = clNone
inline SynLeftGutterPartList1: TSynGutterPartList
object SynGutterMarks1: TSynGutterMarks
Width =
30
Width =
24
Visible = False
MouseActions = <>
end
object SynGutterLineNumber1: TSynGutterLineNumber
Width =
21
Width =
17
MouseActions = <>
MarkupInfo.Background = clBtnFace
MarkupInfo.Foreground = clNone
...
...
@@ -12745,19 +12745,18 @@ object ExplorerV2: TExplorerV2
LeadingZeros = False
end
object SynGutterChanges1: TSynGutterChanges
Width =
5
Width =
4
MouseActions = <>
ModifiedColor = 59900
SavedColor = clGreen
end
object SynGutterSeparator1: TSynGutterSeparator
Width =
3
Width =
2
MouseActions = <>
MarkupInfo.Background = clWhite
MarkupInfo.Foreground = clGray
end
object SynGutterCodeFolding1: TSynGutterCodeFolding
Width = 13
Visible = False
MouseActions = <>
MarkupInfo.Background = clNone
...
...
@@ -12771,24 +12770,24 @@ object ExplorerV2: TExplorerV2
end
object pnlActionBar: TPanel
Left = 0
Height =
60
Height =
48
Top = 0
Width =
931
Width =
745
Align = alTop
AutoSize = True
BevelOuter = bvNone
ClientHeight =
60
ClientWidth =
931
ClientHeight =
48
ClientWidth =
745
Font.Color = clWindowText
ParentFont = False
TabOrder = 2
object ToolBar1: TToolBar
Left = 0
Height =
60
Height =
48
Top = 0
Width =
931
ButtonHeight =
5
0
ButtonWidth =
62
Width =
745
ButtonHeight =
4
0
ButtonWidth =
50
Caption = 'ToolBar1'
Color = clBtnFace
Font.Color = clWindowText
...
...
@@ -12798,41 +12797,41 @@ object ExplorerV2: TExplorerV2
ShowCaptions = True
TabOrder = 0
object ToolButton1: TToolButton
Left =
68
Left =
55
Top = 2
Action = actModelPanel
end
object ToolButton2: TToolButton
Left = 1
30
Left = 1
05
Top = 2
Action = actResultsPanel
end
object ToolButton3: TToolButton
Left =
63
Height =
5
0
Left =
51
Height =
4
0
Top = 2
Caption = 'ToolButton3'
Style = tbsDivider
end
object ToolButton4: TToolButton
Left = 1
97
Left = 1
59
Top = 2
Action = actExecute
end
object ToolButton5: TToolButton
Left = 2
5
9
Left = 2
0
9
Top = 2
Action = actCancel
end
object ToolButton6: TToolButton
Left =
321
Height =
5
0
Left =
259
Height =
4
0
Top = 2
Caption = 'ToolButton6'
Style = tbsDivider
end
object ToolButton7: TToolButton
Left =
326
Left =
263
Top = 2
Action = OQLQuery
AutoSize = True
...
...
@@ -12840,7 +12839,7 @@ object ExplorerV2: TExplorerV2
Style = tbsCheck
end
object ToolButton8: TToolButton
Left =
414
Left =
336
Top = 2
Action = XMLQuery
Grouped = True
...
...
@@ -12852,8 +12851,8 @@ object ExplorerV2: TExplorerV2
Action = ReconnectDB
end
object ToolButton10: TToolButton
Left = 1
92
Height =
5
0
Left = 1
55
Height =
4
0
Top = 2
Caption = 'ToolButton10'
Style = tbsDivider
...
...
@@ -12861,32 +12860,30 @@ object ExplorerV2: TExplorerV2
end
end
object spResultObject: TSplitter
Left =
475
Height =
545
Top =
60
Width =
6
Left =
380
Height =
436
Top =
48
Width =
5
Align = alRight
ResizeAnchor = akRight
ResizeStyle = rsPattern
end
inline OQLObjects: TObjectExplorer
Left =
481
Height =
545
Top =
60
Width =
45
0
Left =
385
Height =
436
Top =
48
Width =
36
0
Align = alRight
ClientHeight =
545
ClientWidth =
45
0
ClientHeight =
436
ClientWidth =
36
0
TabOrder = 4
Visible = False
DesignLeft = 3089
DesignTop = 631
inherited tvExplorer: TTreeView
Height =
545
Width =
45
0
ExpandSignSize = 1
4
Height =
436
Width =
36
0
ExpandSignSize = 1
1
Images = ilModel
Indent = 2
8
Indent = 2
2
ParentColor = True
PopupMenu = pmCopiar
RightClickSelect = True
...
...
@@ -12896,33 +12893,33 @@ object ExplorerV2: TExplorerV2
object spResultXML: TSplitter
Cursor = crVSplit
Left = 0
Height =
6
Top =
605
Width =
931
Height =
5
Top =
484
Width =
745
Align = alBottom
ResizeAnchor = akBottom
ResizeStyle = rsPattern
end
object sbStatusBar: TStatusBar
Left = 0
Height = 2
9
Top =
842
Width =
931
Height = 2
3
Top =
674
Width =
745
AutoSize = False
Font.Color = clWindowText
Panels = <
item
Width =
5
00
Width =
4
00
end
item
Width = 1
88
Width = 1
50
end
item
Width = 1
25
Width = 1
00
end
item
Alignment = taRightJustify
Width = 3
75
Width = 3
00
end>
ParentFont = False
SimplePanel = False
...
...
@@ -12930,33 +12927,33 @@ object ExplorerV2: TExplorerV2
end
object pnlModel: TPanel
Left = 0
Height =
871
Height =
697
Top = 0
Width =
45
0
Width =
36
0
Align = alLeft
BevelOuter = bvNone
ClientHeight =
871
ClientWidth =
45
0
ClientHeight =
697
ClientWidth =
36
0
Font.Color = clWindowText
ParentFont = False
TabOrder = 1
object tvModelExplorer: TTreeView
Left = 0
Height =
75
1
Top =
120
Width =
45
0
Height =
60
1
Top =
96
Width =
36
0
Align = alClient
BorderStyle = bsNone
DragMode = dmAutomatic
ExpandSignSize = 1
2
ExpandSignSize = 1
0
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -1
5
Font.Height = -1
2
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
Images = ilModel
Indent =
22
Indent =
18
ParentColor = True
ParentFont = False
ReadOnly = True
...
...
@@ -12969,67 +12966,85 @@ object ExplorerV2: TExplorerV2
end
object pnFiltroClasse: TPanel
Left = 0
Height =
120
Height =
96
Top = 0
Width =
45
0
Width =
36
0
Align = alTop
ClientHeight = 120
ClientWidth = 450
ClientHeight = 96
ClientWidth = 360
Font.Color = clWindowText
ParentFont = False
TabOrder = 1
object edtClasse: TEdit
Left = 11
Height = 28
Top = 83
Width = 419
Left = 9
Height = 23
Top = 66
Width = 335
Font.Color = clWindowText
OnChange = edtClasseChange
ParentFont = False
TabOrder = 0
end
object gbAgrupamento: TGroupBox
Left =
11
Height =
56
Top =
3
Width =
419
Left =
9
Height =
45
Top =
2
Width =
335
Caption = 'Group'
ClientHeight =
31
ClientWidth =
415
ClientHeight =
25
ClientWidth =
331
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -1
5
Font.Height = -1
2
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
ParentFont = False
TabOrder = 1
object rbHieraquia: TRadioButton
Left =
20
0
Height =
24
Left =
16
0
Height =
19
Top = 0
Width =
87
Width =
71
Caption = 'Hierarchy'
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
OnClick = edtClasseChange
ParentFont = False
TabOrder = 0
end
object rbSequencial: TRadioButton
Left = 1
6
Height =
24
Left = 1
3
Height =
19
Top = 0
Width =
48
Width =
39
Caption = 'Flat'
Checked = True
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
OnClick = edtClasseChange
ParentFont = False
TabOrder = 1
TabStop = True
end
end
object Label2: TLabel
Left = 1
5
Height =
20
Top =
61
Width =
33
Left = 1
2
Height =
15
Top =
49
Width =
27
Caption = 'Class'
Font.CharSet = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -1
5
Font.Height = -1
2
Font.Name = 'Segoe UI'
Font.Pitch = fpVariable
Font.Quality = fqDraft
...
...
@@ -13041,8 +13056,8 @@ object ExplorerV2: TExplorerV2
object il1: TImageList
Height = 24
Width = 24
Left =
1190
Top =
10
Left =
952
Top =
8
Bitmap = {
4C690C0000001800000018000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
...
...
@@ -13912,16 +13927,16 @@ object ExplorerV2: TExplorerV2
}
end
object pmCopiar: TPopupMenu
Left =
1190
Top =
110
Left =
952
Top =
88
object Copia: TMenuItem
Caption = 'Copiar Dados'
OnClick = CopiaDadosObjeto
end
end
object ActionList1: TActionList
Left = 1
30
0
Top =
110
Left = 1
04
0
Top =
88
object actModelPanel: TAction
Checked = True
Hint = 'Show/Hide Persistence Model'
...
...
@@ -13965,12 +13980,12 @@ object ExplorerV2: TExplorerV2
DefaultFilter = 'Arquivos SQL (*.sql)|*.sql'
Enabled = False
SQLDialect = sqlSybase
Left = 1
40
0
Top =
10
Left = 1
12
0
Top =
8
end
object ilModel: TImageList
Left = 1
40
Top =
210
Left = 1
12
Top =
168
Bitmap = {
4C69090000001000000010000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000
...
...
EvoUMLPlugin/src/ituExplorerV2.pas
View file @
8209f16a
...
...
@@ -2224,17 +2224,39 @@ begin
end
;
procedure
TExplorerV2
.
memOQLQuery2DragDrop
(
Sender
,
Source
:
TObject
;
X
,
Y
:
Integer
);
function
FromClause
(
piNode
:
TTreeNode
;
var
poPath
:
string
):
string
;
function
IsRoot
(
piNode
:
TTreeNode
):
Boolean
;
begin
if
piNode
.
Level
=
1
if
(
piNode
.
Level
>
1
)
then
begin
if
((
TObject
(
piNode
.
Data
)
is
acClassTicket
)
and
(
piNode
.
ImageIndex
=
6
))
then
Result
:=
IsRoot
(
piNode
.
Parent
)
else
Result
:=
False
;
end
else
Result
:=
True
;
end
;
function
FromClause
(
piNode
:
TTreeNode
;
piCast
:
String
;
var
poPath
:
string
):
string
;
begin
if
IsRoot
(
piNode
)
//((piNode.Level = 1) or ((TObject(piNode.Data) is acClassTicket) and (piNode.ImageIndex = 6)))
then
begin
poPath
:=
acClassTicket
(
piNode
.
Data
).
PersistentObjectClassName
;
result
:=
poPath
;
end
else
begin
result
:=
FromClause
(
piNode
.
Parent
,
poPath
);
if
((
TObject
(
piNode
.
Data
)
is
acClassTicket
)
and
(
piNode
.
ImageIndex
=
6
))
then
begin
if
piCast
<>
''
then
result
:=
FromClause
(
piNode
.
Parent
,
piCast
,
poPath
)
else
result
:=
FromClause
(
piNode
.
Parent
,
acClassTicket
(
piNode
.
Data
).
PersistentObjectClassName
,
poPath
);
end
else
begin
result
:=
FromClause
(
piNode
.
Parent
,
''
,
poPath
);
poPath
:=
poPath
+
'.'
+
copy
(
piNode
.
Text
,
1
,
pred
(
pos
(
':'
,
piNode
.
Text
)));
result
:=
result
+
', '
+
#
13
#
10
+
' '
+
poPath
;
if
piCast
<>
''
then
result
:=
result
+
', '
+
#
13
#
10
+
' '
+
'('
+
piCast
+
')'
+
poPath
else
result
:=
result
+
', '
+
#
13
#
10
+
' '
+
poPath
;
end
;
end
;
end
;
var
lCaption
:
string
;
...
...
@@ -2260,7 +2282,7 @@ begin
if
GetKeyState
(
VK_CONTROL
)
<
0
then
begin
lCaption
:=
(
TObject
(
lNode
.
Parent
.
data
)
as
acClassTicket
).
PersistentObjectClassName
;
lFrom
:=
FromClause
(
lNode
.
Parent
,
lPath
);
lFrom
:=
FromClause
(
lNode
.
Parent
,
''
,
lPath
);
lSelect
:=
copy
(
lPath
,
1
,
pred
(
pos
(
'.'
,
lPath
)));
if
lSelect
=
''
then
lSelect
:=
lPath
;
SynEditOQL
.
SelText
:=
#
13
#
10
+
...
...
@@ -2347,16 +2369,22 @@ begin
end
;
end
;
end
;
fLastExecErrorFlag
:=
False
;
sbStatusBar
.
Panels
[
0
].
Text
:=
''
;
sbStatusBar
.
Panels
[
1
].
Text
:=
''
;
sbStatusBar
.
Panels
[
2
].
Text
:=
''
;
if
actResultsPanel
.
Checked
then
actResultsPanel
.
Execute
;
except
on
e
:
Exception
do
begin
if
not
actResultsPanel
.
Checked
then
actResultsPanel
.
Execut
e
;
fLastExecErrorFlag
:=
Tru
e
;
memErrorText
.
Text
:=
e
.
Message
;
pcResults
.
ActivePageIndex
:=
1
;
pcEditor
.
ActivePageIndex
:=
0
;
sbStatusBar
.
Panels
[
0
].
Text
:=
'OQL translation to SQL failed.'
;
sbStatusBar
.
Panels
[
1
].
Text
:=
''
;
sbStatusBar
.
Panels
[
2
].
Text
:=
''
;
if
not
actResultsPanel
.
Checked
then
actResultsPanel
.
Execute
;
end
;
end
;
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment