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
8c82944b
Commit
8c82944b
authored
Nov 19, 2020
by
Jucelino Fonseca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Teste e ajustes
parent
15cac967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
69 additions
and
27 deletions
+69
-27
ituExplorerV2.pas
EvoUMLPlugin/src/ituExplorerV2.pas
+69
-27
No files found.
EvoUMLPlugin/src/ituExplorerV2.pas
View file @
8c82944b
...
...
@@ -172,7 +172,7 @@ type
function
ContemPalavrasEspeciais
(
piTextoEntrada
:
string
):
boolean
;
procedure
AddAliasListas
(
piLinhas
:
string
;
piAlias
:
TStrings
);
function
LoadAliasBlocoFROMOQLEdit
(
piTexto
:
string
;
piAlias
:
TStrings
):
string
;
function
GetClassTicketByNameRelation
(
piNameObjeto
:
string
;
out
piNameAntObjeto
:
string
)
:
acClassTicket
;
function
GetClassTicketByNameRelation
(
piNameObjeto
:
string
;
out
piNameAntObjeto
:
string
;
piRetonarClassAnterior
:
boolean
=
false
)
:
acClassTicket
;
function
GetClassTicketByNameANDAlias
(
piNameObjeto
:
string
)
:
acClassTicket
;
//
function
GetTextoAfterWord
(
piSynEdit
:
TSynEdit
):
string
;
...
...
@@ -493,7 +493,7 @@ end;
procedure
TExplorerV2
.
SynEditOQLCommandProcessed
(
Sender
:
TObject
;
var
Command
:
TSynEditorCommand
;
var
AChar
:
TUTF8Char
;
Data
:
pointer
);
begin
fhlt1
.
CloseCompletionWindow
;
//
fhlt1.CloseCompletionWindow;
end
;
procedure
TExplorerV2
.
SynEditOQLKeyUp
(
Sender
:
TObject
;
var
Key
:
Word
;
...
...
@@ -807,7 +807,7 @@ begin
else
begin
lClassTicketCurrent
:=
self
.
GetClassTicketByNameRelation
(
piLinha
,
ls_ant_objeto
);
lClassTicketCurrent
:=
self
.
GetClassTicketByNameRelation
(
piLinha
,
ls_ant_objeto
,
true
);
if
Assigned
(
lClassTicketCurrent
)
then
begin
//ShowMessage(ls_ant_objeto);
...
...
@@ -992,6 +992,7 @@ var ls_texto,
ls_Alias
:
string
;
ls_classe
:
string
;
lClassTicketCurrent
:
acClassTicket
;
liIndex
:
Integer
;
begin
ls_Alias
:=
''
;
if
(
piLinhas
<>
''
)
and
(
not
ContemPalavrasEspeciais
(
piLinhas
))
then
...
...
@@ -1023,9 +1024,14 @@ begin
lClassTicketCurrent
:=
self
.
GetClassTicketByNameRelation
(
ls_classe
,
ls_name_ant_objeto
);
if
Assigned
(
lClassTicketCurrent
)
then
begin
if
piAlias
.
IndexOf
(
ls_Alias
)
<
0
then
liIndex
:=
piAlias
.
IndexOf
(
ls_Alias
);
if
liIndex
<
0
then
begin
piAlias
.
AddObject
(
UpperCase
(
ls_Alias
),
lClassTicketCurrent
);
end
else
begin
piAlias
.
Objects
[
liIndex
]
:=
lClassTicketCurrent
;
end
;
end
;
end
;
...
...
@@ -1116,8 +1122,9 @@ begin
end
;
function
TExplorerV2
.
GetClassTicketByNameRelation
(
piNameObjeto
:
string
;
out
piNameAntObjeto
:
string
):
acClassTicket
;
function
TExplorerV2
.
GetClassTicketByNameRelation
(
piNameObjeto
:
string
;
out
piNameAntObjeto
:
string
;
piRetonarClassAnterior
:
boolean
=
false
):
acClassTicket
;
var
lClassTicketCurrent
,
lCassTicketAnterior
,
lClassTicketAux
:
acClassTicket
;
lEnumerator
:
acEnumerator
;
li
,
...
...
@@ -1136,6 +1143,7 @@ begin
lClassTicketCurrent
:=
Self
.
GetClassTicketByNameANDAlias
(
ls_Objeto
);
while
li_Pos
>
0
do
begin
lCassTicketAnterior
:=
lClassTicketCurrent
;
lClassTicketAux
:=
nil
;
ls_aux
:=
trim
(
Copy
(
ls_aux
,
li_Pos
+
1
,
Length
(
ls_aux
)));
ls_ant_objeto
:=
ls_aux
;
...
...
@@ -1175,10 +1183,19 @@ begin
end
;
end
;
end
;
lClassTicketCurrent
:=
lClassTicketAux
;
lClassTicketCurrent
:=
lClassTicketAux
;
end
;
end
;
result
:=
lClassTicketCurrent
;
if
(
trim
(
ls_ant_objeto
)
<>
''
)
and
(
not
Assigned
(
result
))
then
;
begin
if
piRetonarClassAnterior
then
begin
result
:=
lCassTicketAnterior
;
end
;
end
;
end
else
begin
...
...
@@ -1227,15 +1244,14 @@ begin
if
trim
(
result
)
<>
''
then
begin
piSynEdit
.
CaretX
:=
Length
(
result
);
piSynEdit
.
CaretY
:=
p1
.
Y
;
p2
.
Y
:=
p1
.
Y
;
p2
.
X
:=
Length
(
result
);
piSynEdit
.
CaretXY
:=
p2
;
p1
:=
piSynEdit
.
PrevWordPos
;
lWord
:=
piSynEdit
.
GetWordAtRowCol
(
p1
);
p1
.
X
:=
p1
.
X
+
Length
(
lWord
);
p2
:=
piSynEdit
.
CaretXY
;
p2
.
X
:=
Length
(
result
);
result
:=
piSynEdit
.
TextBetweenPoints
[
p1
,
p2
];
piSynEdit
.
CaretXY
:=
PointAtual
;;
...
...
@@ -1424,7 +1440,11 @@ begin
else
begin
result
:=
lTextAfterWord
;
if
IsExepressaoValida
(
OpEve
,
trim
(
lTextAfterWord
),
lTemPalavra
)
then
if
Trim
(
lTextAfterWord
)
=
Trim
(
result
)
then
begin
lTemPalavra
:=
false
;
end
;
if
IsExepressaoValida
(
OpEve
,
trim
(
lTextAfterWord
),
lTemPalavra
)
then
begin
result
:=
''
;
end
;
...
...
@@ -1432,7 +1452,14 @@ begin
end
else
if
trim
(
lTextAfterWord
)
=
''
then
begin
result
:=
result
+
lTextAfterWord
;
if
IsExepressaoValida
(
opEve
,
trim
(
Result
))
then
begin
result
:=
''
;
end
else
begin
result
:=
result
+
lTextAfterWord
;
end
;
end
;
end
else
if
(
lTextAfterWord
<>
''
)
then
...
...
@@ -1689,16 +1716,16 @@ begin
lFromSec
:=
fhlt1
.
AddSection
(
__FROM
);
lWhereSec
:=
fhlt1
.
AddSection
(
__WHERE
);
fopEvenSearchSelect
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
None
);
fopEvenSearchSelect
.
Action
:=
pac_Rep_LastTok
;
fopEvenSearchSelect
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
LastIdentPart
);
//
fopEvenSearchSelect.Action := pac_Rep_LastTok;
fopEvenSearchSelect
.
block
:=
lSelectSec
;
fopEvenSearchFrom
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
None
);
fopEvenSearchFrom
.
Action
:=
pac_Rep_LastTok
;
fopEvenSearchFrom
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
LastIdentPart
);
//
fopEvenSearchFrom.Action := pac_Rep_LastTok;
fopEvenSearchFrom
.
block
:=
lFromSec
;
fopEvenSearchWhere
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
None
);
fopEvenSearchWhere
.
Action
:=
pac_Rep_LastTok
;
fopEvenSearchWhere
:=
fhlt1
.
AddOpenEvent
(
'identifier'
,
''
,
fil_
LastIdentPart
);
//
fopEvenSearchWhere.Action := pac_Rep_LastTok;
fopEvenSearchWhere
.
block
:=
lWhereSec
;
fopEvenSelectAposPonto
:=
fhlt1
.
AddOpenEvent
(
'identifier,''.'''
,
''
,
fil_None
);
...
...
@@ -1714,15 +1741,15 @@ begin
fopEvenWhereAposPonto
.
block
:=
lWhereSec
;
fopEvenSelectCompleto
:=
fhlt1
.
AddOpenEvent
(
''
,
''
,
fil_None
);
fopEvenselectCompleto
.
Action
:=
pac_Insert
;
fopEvenselectCompleto
.
Action
:=
pac_Insert
;
;
fopEvenSelectCompleto
.
block
:=
lSelectSec
;
fopEvenFromCompleto
:=
fhlt1
.
AddOpenEvent
(
''
,
''
,
fil_None
);
fopEvenFromCompleto
.
Action
:=
pac_Insert
;
fopEvenFromCompleto
.
Action
:=
pac_Insert
;
;
fopEvenFromCompleto
.
block
:=
lFromSec
;
fopEvenWhereCompleto
:=
fhlt1
.
AddOpenEvent
(
''
,
''
,
fil_None
);
fopEvenWhereCompleto
.
Action
:=
pac_Insert
;
fopEvenWhereCompleto
.
Action
:=
pac_Insert
;
;
fopEvenWhereCompleto
.
block
:=
lWhereSec
;
fopEvenFromAposPonto
.
OnLoadItems
:=
opEveLoadItems
;
...
...
@@ -1731,6 +1758,7 @@ begin
fopEvenselectCompleto
.
OnLoadItems
:=
opEveLoadItems
;
fopEvenFromCompleto
.
OnLoadItems
:=
opEveLoadItems
;
fopEvenWhereCompleto
.
OnLoadItems
:=
opEveLoadItems
;
fopEvenSearchSelect
.
OnLoadItems
:=
opEveLoadItems
;
fopEvenSearchFrom
.
OnLoadItems
:=
opEveLoadItems
;
fopEvenSearchWhere
.
OnLoadItems
:=
opEveLoadItems
;
...
...
@@ -1756,22 +1784,32 @@ var lLista : TStrings;
lAceitaAtributo
:
boolean
;
li
:
integer
;
begin
opEve
.
ClearAvails
;
opEve
.
ClearAvails
;
lAceitaAtributo
:=
false
;
ls_Texto
:=
SynEditOQL
.
GetWordAtRowCol
(
SynEditOQL
.
CaretXY
);
if
not
IsKeyword
(
ls_Texto
)
then
begin
if
(
opEve
=
fopEvenSelectAposPonto
)
or
(
opEve
=
fopEvenWhereAposPonto
)
or
(
opEve
=
fopEvenFromAposPonto
)
(
opEve
=
fopEvenFromAposPonto
)
or
(
opEve
=
fopEvenWhereCompleto
)
or
(
opEve
=
fopEvenSearchWhere
)
or
(
opEve
=
fopEvenSearchSelect
)
or
(
opEve
=
fopEvenselectCompleto
)
then
begin
LoadAliasOQLEdit
(
SynEditOQL
.
Text
,
fAlias
);
if
opEve
=
fopEvenWhereAposPonto
then
if
(
opEve
=
fopEvenWhereCompleto
)
or
(
opEve
=
fopEvenSearchWhere
)
or
(
opEve
=
fopEvenWhereAposPonto
)
then
begin
lAceitaAtributo
:=
true
;
end
else
if
opEve
=
fopEvenSelectAposPonto
then
else
if
(
opEve
=
fopEvenSelectAposPonto
)
or
(
opEve
=
fopEvenSearchSelect
)
or
(
opEve
=
fopEvenselectCompleto
)
then
begin
if
XMLQuery
.
Checked
then
begin
...
...
@@ -1783,7 +1821,11 @@ begin
try
lLinha
:=
RetirarPalavraChaveOLQ
(
SynEditOQL
,
opEve
);
LoadListCompletion
(
lLinha
,
lAceitaAtributo
,
lLista
);
for
li
:=
0
to
lLista
.
Count
-
1
do
if
lLista
.
Count
>
0
then
begin
opEve
.
AddAvail
(
''
);
end
;
for
li
:=
0
to
lLista
.
Count
-
1
do
begin
opEve
.
AddAvail
(
lLista
.
Strings
[
li
]);
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