When you specify a directory that contains UML profiles to load, ArgoUML will try to load all the profiles
but you don't have control of the load order. The issue is worse because the load order depends
on the HashSet which means that it can change with the location of the file. The hashCode of File
depends on the full path.
If UML profiles don't depend on each other, this is ok. But I have a UML profile that depends on another one.
I have two UML profiles:
Dynamo.xmi
AWA.xmi
and AWA.xmi uses the definitions from Dynamo.xmi.
Depending on the UML profile directory path, it works or not because we first load the second UML profile
and we fail to find the dependencies.
Guessing the order is difficult, trying to fix the loader is also difficult.
I've managed to have a text file that we can write and put in the UML profile directory.
ArgoUML can read that file to know the order in which it must load the UML profiles.
The file has the name argouml-profiles.conf.
It must contain a list of file names that must be loaded. The UML file must exist in the directory.
By writing the argouml-profiles.conf file in the UML profile directory, I can control the order.
Exemple of file:
Dynamo.xmi
AWA.xmi
If the argouml-profiles.conf does not exist, the old behavior is used.
When you specify a directory that contains UML profiles to load, ArgoUML will try to load all the profiles but you don't have control of the load order. The issue is worse because the load order depends on the HashSet which means that it can change with the location of the file. The hashCode of File
depends on the full path.
If UML profiles don't depend on each other, this is ok. But I have a UML profile that depends on another one. I have two UML profiles:
and AWA.xmi uses the definitions from Dynamo.xmi.
Depending on the UML profile directory path, it works or not because we first load the second UML profile and we fail to find the dependencies.
Guessing the order is difficult, trying to fix the loader is also difficult.
I've managed to have a text file that we can write and put in the UML profile directory. ArgoUML can read that file to know the order in which it must load the UML profiles.
The file has the name argouml-profiles.conf. It must contain a list of file names that must be loaded. The UML file must exist in the directory. By writing the argouml-profiles.conf file in the UML profile directory, I can control the order. Exemple of file:
If the argouml-profiles.conf does not exist, the old behavior is used.
I'll submit the pull request...