Commit b385ee3f authored by Jucelino Fonseca's avatar Jucelino Fonseca

Teste e ajustes

parent d0ba6c92
...@@ -36,6 +36,7 @@ const ...@@ -36,6 +36,7 @@ const
__SINAL_MAIOR = '>'; __SINAL_MAIOR = '>';
__SINAL_MENOR = '<'; __SINAL_MENOR = '<';
__SINAL_MENOS = '-'; __SINAL_MENOS = '-';
__OID = 'OID';
type type
TDLLDialog = class(TForm) TDLLDialog = class(TForm)
...@@ -758,6 +759,7 @@ var lClassTicketCurrent : acClassTicket; ...@@ -758,6 +759,7 @@ var lClassTicketCurrent : acClassTicket;
lbAchei : boolean; lbAchei : boolean;
lAttributeTicket : acAttributeTicket; lAttributeTicket : acAttributeTicket;
begin begin
piLista.Clear; piLista.Clear;
li_Pos := Pos ('..',piLinha); li_Pos := Pos ('..',piLinha);
if li_Pos > 0 then if li_Pos > 0 then
...@@ -767,6 +769,7 @@ begin ...@@ -767,6 +769,7 @@ begin
li_Pos := Pos (__PONTO,piLinha); li_Pos := Pos (__PONTO,piLinha);
if li_Pos <= 0 then if li_Pos <= 0 then
begin begin
lEnumerator := self.MetaModel.ClassTickets.GetEnumerator; lEnumerator := self.MetaModel.ClassTickets.GetEnumerator;
try try
while not lEnumerator.EOL do while not lEnumerator.EOL do
...@@ -784,42 +787,56 @@ begin ...@@ -784,42 +787,56 @@ begin
end end
else else
begin begin
lClassTicketCurrent := self.GetClassTicketByNameRelation(piLinha,ls_ant_objeto); lClassTicketCurrent := self.GetClassTicketByNameRelation(piLinha,ls_ant_objeto);
if Assigned(lClassTicketCurrent) then if Assigned(lClassTicketCurrent) then
begin begin
//ShowMessage(ls_ant_objeto); //ShowMessage(ls_ant_objeto);
if piAceitaAtributo then repeat
begin if piAceitaAtributo then
for li := 0 to pred(lClassTicketCurrent.Attributes.Count) do
begin begin
lAttributeTicket := acAttributeTicket(lClassTicketCurrent.Attributes.Objects[li]); for li := 0 to pred(lClassTicketCurrent.Attributes.Count) do
if lAttributeTicket.Stereotype = acAttributeStereotype.pvPersistent then
begin begin
lAttributeTicket := acAttributeTicket(lClassTicketCurrent.Attributes.Objects[li]);
if lAttributeTicket.Stereotype = acAttributeStereotype.pvPersistent then
begin
if BuscaParcial(ls_ant_objeto,__OID) then
begin
if piLista.IndexOf(__OID) < 0 then
begin
piLista.Add(__OID);
end;
end;
if BuscaParcial(ls_ant_objeto,lAttributeTicket.AttributeName) then
begin
piLista.Add(lAttributeTicket.AttributeName);
end;
if BuscaParcial(ls_ant_objeto,lAttributeTicket.AttributeName) then end;
piLista.Add(lAttributeTicket.AttributeName);
end; end;
end; end;
end; for li := 0 to pred(lClassTicketCurrent.RelationTicketsIn.Count) do
for li := 0 to pred(lClassTicketCurrent.RelationTicketsIn.Count) do
begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsIn.Objects[li]);
if trim(lRelationTicket.DestinationPropertyName) <> '' then
begin begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.DestinationPropertyName) then lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsIn.Objects[li]);
piLista.Add(lRelationTicket.DestinationPropertyName); if trim(lRelationTicket.DestinationPropertyName) <> '' then
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.DestinationPropertyName) then
piLista.Add(lRelationTicket.DestinationPropertyName);
end;
end; end;
end;
for li := 0 to pred(lClassTicketCurrent.RelationTicketsOut.Count) do for li := 0 to pred(lClassTicketCurrent.RelationTicketsOut.Count) do
begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsOut.Objects[li]);
if trim(lRelationTicket.OriginPropertyName) <> '' then
begin begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.OriginPropertyName) then lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsOut.Objects[li]);
piLista.Add(lRelationTicket.OriginPropertyName); if trim(lRelationTicket.OriginPropertyName) <> '' then
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.OriginPropertyName) then
piLista.Add(lRelationTicket.OriginPropertyName);
end;
end; end;
end; lClassTicketCurrent := lClassTicketCurrent.ParentClassTicket;
until lClassTicketCurrent = nil
end; end;
end; end;
...@@ -1289,7 +1306,35 @@ begin ...@@ -1289,7 +1306,35 @@ begin
end; end;
end; end;
{1 := piSynEdit.CaretXY ; if result <> '' then
begin
p1 := piSynEdit.CaretXY ;
zeroPoint.X := 0;
zeroPoint.y := piSynEdit.CaretY;
ls_aux := piSynEdit.TextBetweenPoints[zeroPoint,p1];
ls_espaco := ' ';
li_Pos := Pos(ls_espaco,trim(ls_aux));
while li_Pos > 0 do
begin
ls_aux := trim(Copy(ls_aux,li_Pos + 1,Length(ls_aux)));
li_Pos := Pos(ls_espaco,ls_aux);
end;
result :=ls_aux; {
li_Pos := Pos(result,ls_aux) ;
if li_Pos > 0 then
begin
ls_espaco := ' ';
ls_aux := trim(Copy(ls_aux,0,li_Pos));
li_Pos := Pos(ls_espaco,trim(ls_aux));
while li_Pos > 0 do
begin
ls_aux := trim(Copy(ls_aux,li_Pos + 1,Length(ls_aux)));
li_Pos := Pos(ls_espaco,ls_aux);
end;
result := ls_aux + result;
end }
end
{ p1 := piSynEdit.CaretXY ;
zeroPoint.X := 0; zeroPoint.X := 0;
zeroPoint.y := piSynEdit.CaretY; zeroPoint.y := piSynEdit.CaretY;
ls_aux := piSynEdit.TextBetweenPoints[zeroPoint,p1]; ls_aux := piSynEdit.TextBetweenPoints[zeroPoint,p1];
......
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