Commit 5dd19c72 authored by Jucelino Fonseca's avatar Jucelino Fonseca

ajustes

parent 01e2f5b7
...@@ -736,6 +736,7 @@ var lClassTicketCurrent, ...@@ -736,6 +736,7 @@ var lClassTicketCurrent,
lEnumerator : acEnumerator; lEnumerator : acEnumerator;
li, li,
li_Pos : integer; li_Pos : integer;
ls_ant_objeto,
ls_aux, ls_aux,
ls_Objeto : string; ls_Objeto : string;
lRelationTicket : acRelationTicket; lRelationTicket : acRelationTicket;
...@@ -774,11 +775,14 @@ begin ...@@ -774,11 +775,14 @@ begin
lClassTicketCurrent := self.MetaModel.GetClassTicketByName(ls_Objeto); lClassTicketCurrent := self.MetaModel.GetClassTicketByName(ls_Objeto);
while li_Pos > 0 do while li_Pos > 0 do
begin begin
ls_aux := trim(Copy(ls_aux,li_Pos +1,Length(ls_aux))); ls_aux := trim(Copy(ls_aux,li_Pos +1,Length(ls_aux)));
ls_ant_objeto := ls_aux;
li_Pos := Pos ('.',ls_aux); li_Pos := Pos ('.',ls_aux);
ls_Objeto := trim(Copy(ls_aux,0,li_Pos -1)); ls_Objeto := trim(Copy(ls_aux,0,li_Pos -1));
if Assigned(lClassTicketCurrent) and (ls_Objeto <> '') then if Assigned(lClassTicketCurrent) and (ls_Objeto <> '') then
begin begin
lbAchei := false; lbAchei := false;
for li := 0 to pred(lClassTicketCurrent.RelationTicketsIn.Count) do for li := 0 to pred(lClassTicketCurrent.RelationTicketsIn.Count) do
begin begin
...@@ -786,6 +790,7 @@ begin ...@@ -786,6 +790,7 @@ begin
if SameText(lRelationTicket.DestinationPropertyName, ls_Objeto) then if SameText(lRelationTicket.DestinationPropertyName, ls_Objeto) then
begin begin
lClassTicketAux := lRelationTicket.OriginClassTicket; lClassTicketAux := lRelationTicket.OriginClassTicket;
ls_ant_objeto := '';
lbAchei := true; lbAchei := true;
break; break;
end; end;
...@@ -798,6 +803,7 @@ begin ...@@ -798,6 +803,7 @@ begin
if SameText(lRelationTicket.OriginPropertyName, ls_Objeto) then if SameText(lRelationTicket.OriginPropertyName, ls_Objeto) then
begin begin
lClassTicketAux := lRelationTicket.DestinationClassTicket; lClassTicketAux := lRelationTicket.DestinationClassTicket;
ls_ant_objeto := '';
break; break;
end; end;
end; end;
...@@ -809,6 +815,7 @@ begin ...@@ -809,6 +815,7 @@ begin
if Assigned(lClassTicketCurrent) then if Assigned(lClassTicketCurrent) then
begin begin
//ShowMessage(ls_ant_objeto);
if piAceitaAtributo then if piAceitaAtributo then
begin begin
for li := 0 to pred(lClassTicketCurrent.Attributes.Count) do for li := 0 to pred(lClassTicketCurrent.Attributes.Count) do
...@@ -816,6 +823,8 @@ begin ...@@ -816,6 +823,8 @@ begin
lAttributeTicket := acAttributeTicket(lClassTicketCurrent.Attributes.Objects[li]); lAttributeTicket := acAttributeTicket(lClassTicketCurrent.Attributes.Objects[li]);
if lAttributeTicket.Stereotype = acAttributeStereotype.pvPersistent then if lAttributeTicket.Stereotype = acAttributeStereotype.pvPersistent then
begin begin
if BuscaParcial(ls_ant_objeto,lAttributeTicket.AttributeName) then
piLista.Add(lAttributeTicket.AttributeName); piLista.Add(lAttributeTicket.AttributeName);
end; end;
end; end;
...@@ -824,17 +833,23 @@ begin ...@@ -824,17 +833,23 @@ begin
begin begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsIn.Objects[li]); lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsIn.Objects[li]);
if trim(lRelationTicket.DestinationPropertyName) <> '' then if trim(lRelationTicket.DestinationPropertyName) <> '' then
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.DestinationPropertyName) then
piLista.Add(lRelationTicket.DestinationPropertyName); piLista.Add(lRelationTicket.DestinationPropertyName);
end; end;
end;
for li := 0 to pred(lClassTicketCurrent.RelationTicketsOut.Count) do for li := 0 to pred(lClassTicketCurrent.RelationTicketsOut.Count) do
begin begin
lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsOut.Objects[li]); lRelationTicket := acRelationTicket(lClassTicketCurrent.RelationTicketsOut.Objects[li]);
if trim(lRelationTicket.OriginPropertyName) <> '' then if trim(lRelationTicket.OriginPropertyName) <> '' then
begin
if BuscaParcial(ls_ant_objeto,lRelationTicket.OriginPropertyName) then
piLista.Add(lRelationTicket.OriginPropertyName); piLista.Add(lRelationTicket.OriginPropertyName);
end; end;
end; end;
end; end;
end;
end; end;
......
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