This commit is contained in:
2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
USES Common/std;
USES Common/Converters;
USES Common/CommonUtil;
USES Common/ModelDataRetreive;
USES Common/StringUtil;
proc main()
Init();
info = "UML check STARTED at \t"time()"\n";
AssocWithoutDescriptoins();
info = "UML check STOPPED at \t"time()"\n";
end proc
proc Init()
//Language
setLanguage("SQL");
mkdir([OutputDir]);
setOutput( [OutputDir] "/" "MissingAssocMultiplicites.bat" );
info = "Output generatig into: " [OutputDir] "/" "MissingAssocMultiplicites.bat\n";
end proc
proc AssocWithoutDescriptoins()
out = "@echo off\n";
loop (Instances -> MClass as StartClass Where( getStereotype([StartClass]) == "Entity" ) )
loop (StartClass -> Role as StartRole -> MAssociation as Assoc where ([Assoc.description] == "") )
loop (Assoc -> MAssociationEnd as EndRole -> MClass as PartnerClass Where ([StartRole.id] < [EndRole.id]) and (getStereotype([PartnerClass])== "Entity") )
if ( [StartRole.multiplicity] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([StartRole.guid]);
end if
if ( [EndRole.multiplicity] == "" )
info = "Assoc between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
out = "echo between [" [StartClass.name] "] [" [PartnerClass.name] "]\n";
GenerateEditorNavigation([EndRole.guid]);
end if
end loop
end loop
end loop
end proc