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
98cc6c01
Commit
98cc6c01
authored
Nov 16, 2020
by
Jucelino Fonseca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ajuste e teste
parent
30df7598
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
11 deletions
+56
-11
ituExplorerV2.pas
EvoUMLPlugin/src/ituExplorerV2.pas
+56
-11
No files found.
EvoUMLPlugin/src/ituExplorerV2.pas
View file @
98cc6c01
...
@@ -192,6 +192,7 @@ type
...
@@ -192,6 +192,7 @@ type
function
IsKeyword
(
piItem
:
string
):
boolean
;
function
IsKeyword
(
piItem
:
string
):
boolean
;
function
GetTextBetweenWord
(
piSynEdit
:
TSynEdit
;
piWordPos
:
TPoint
;
piWord
:
string
)
:
string
;
function
GetTextBetweenWord
(
piSynEdit
:
TSynEdit
;
piWordPos
:
TPoint
;
piWord
:
string
)
:
string
;
function
IsExepressaoValida
(
piOpEve
:
TFaOpenEvent
;
piTexto
:
string
;
piTemPalavraAntes
:
Boolean
=
false
):
boolean
;
function
IsExepressaoValida
(
piOpEve
:
TFaOpenEvent
;
piTexto
:
string
;
piTemPalavraAntes
:
Boolean
=
false
):
boolean
;
function
GetPrevWordPosValida
(
piSynEdit
:
TSynEdit
)
:
TPoint
;
protected
protected
procedure
CreateParams
(
var
Params
:
TCreateParams
);
override
;
procedure
CreateParams
(
var
Params
:
TCreateParams
);
override
;
function
Connect
:
acPersistenceSession
;
function
Connect
:
acPersistenceSession
;
...
@@ -1304,7 +1305,8 @@ function TExplorerV2.GetTextBetweenLines(piSynEdit: TSynEdit; out
...
@@ -1304,7 +1305,8 @@ function TExplorerV2.GetTextBetweenLines(piSynEdit: TSynEdit; out
var
p1
,
p2
,
PointAtual
:
TPoint
;
var
p1
,
p2
,
PointAtual
:
TPoint
;
lLen
:
integer
;
lLen
:
integer
;
begin
begin
p1
:=
piSynEdit
.
PrevWordPos
;
//p1 := piSynEdit.PrevWordPos;
p1
:=
Self
.
GetPrevWordPosValida
(
piSynEdit
);
piCareWordXY
:=
p1
;
piCareWordXY
:=
p1
;
p2
:=
piSynEdit
.
CaretXY
;
p2
:=
piSynEdit
.
CaretXY
;
PointAtual
:=
P2
;
PointAtual
:=
P2
;
...
@@ -1430,9 +1432,12 @@ begin
...
@@ -1430,9 +1432,12 @@ begin
end
;
end
;
end
end
else
if
(
lTextAfterWord
<>
''
)
then
else
if
(
lTextAfterWord
<>
''
)
then
begin
if
not
IsExepressaoValida
(
opEve
,
trim
(
lTextAfterWord
),
lTemPalavra
)
then
begin
begin
result
:=
lTextAfterWord
;
result
:=
lTextAfterWord
;
end
;
end
;
end
;
end
end
else
else
begin
begin
...
@@ -1525,6 +1530,12 @@ begin
...
@@ -1525,6 +1530,12 @@ begin
li_Pos
:=
1
;
li_Pos
:=
1
;
li_len
:=
Length
(
piTexto
);
li_len
:=
Length
(
piTexto
);
if
(
piOpEve
=
fopEvenSelectCompleto
)
then
if
(
piOpEve
=
fopEvenSelectCompleto
)
then
begin
if
piTemPalavraAntes
then
begin
ls_expressao
:=
'=,(*'
;
end
else
begin
begin
ls_expressao
:=
'=,()*'
;
ls_expressao
:=
'=,()*'
;
if
(
trim
(
piTexto
)
=
__ASTERICO
)
then
if
(
trim
(
piTexto
)
=
__ASTERICO
)
then
...
@@ -1532,10 +1543,18 @@ begin
...
@@ -1532,10 +1543,18 @@ begin
li_Pos
:=
li_Len
+
1
;
li_Pos
:=
li_Len
+
1
;
result
:=
false
;
result
:=
false
;
end
;
end
;
end
;
end
end
else
if
(
piOpEve
=
fopEvenFromCompleto
)
then
else
if
(
piOpEve
=
fopEvenFromCompleto
)
then
begin
if
piTemPalavraAntes
then
begin
ls_expressao
:=
',('
;
end
else
begin
begin
ls_expressao
:=
'=,()'
;
ls_expressao
:=
'=,()'
;
end
end
end
else
if
(
piOpEve
=
fopEvenWhereCompleto
)
then
else
if
(
piOpEve
=
fopEvenWhereCompleto
)
then
begin
begin
...
@@ -1564,6 +1583,32 @@ begin
...
@@ -1564,6 +1583,32 @@ begin
end
;
end
;
end
;
end
;
function
TExplorerV2
.
GetPrevWordPosValida
(
piSynEdit
:
TSynEdit
):
TPoint
;
var
lWordAnt
,
lWord
:
string
;
begin
result
:=
piSynEdit
.
PrevWordPos
;
lWordAnt
:=
trim
(
piSynEdit
.
GetWordAtRowCol
(
result
));
if
lWordAnt
=
''
then
begin
while
(
trim
(
lWordAnt
)
=
''
)
and
(
result
.
Y
>
0
)
do
begin
result
.
Y
:=
result
.
Y
-
1
;
lWordAnt
:=
trim
(
piSynEdit
.
GetWordAtRowCol
(
result
));
end
;
result
.
X
:=
result
.
X
+
Length
(
lWordAnt
)
+
1
;
lWord
:=
trim
(
piSynEdit
.
GetWordAtRowCol
(
result
));
while
lWord
<>
lWordAnt
do
begin
lWordAnt
:=
lWord
;
result
.
X
:=
result
.
X
+
Length
(
lWord
);
lWord
:=
trim
(
piSynEdit
.
GetWordAtRowCol
(
result
));
end
;
end
;
end
;
procedure
TExplorerV2
.
CreateParams
(
var
Params
:
TCreateParams
);
procedure
TExplorerV2
.
CreateParams
(
var
Params
:
TCreateParams
);
begin
begin
inherited
CreateParams
(
Params
);
inherited
CreateParams
(
Params
);
...
@@ -2358,4 +2403,4 @@ begin
...
@@ -2358,4 +2403,4 @@ begin
{$ENDIF}
{$ENDIF}
end
;
end
;
end
.
11
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