Join GitHub today
Need for namespace reset override #1315
Currently if you say
you get in UmpleOnline
There are two problems here:
a) Reverse the situation. Only take the first namespace, and leave it in place. Also add a 'namespace -;' syntax that would indicate that following this point no namespace is active. That could be injected to step putting subsequent classes in a namespace. This could be injected at the start of the diagram code.
b) Add an extra optional second argument to the namespace directive 'final' (or something similar) to prevent overrides and warnings about them.
c) Leave the first namespace as the final namespace. Don't override on any redefinition by default, and hence drop the warning. Also add a 'override' as a possible second argument to force an override should this be desired. The idea of having namespace - would still be a good idea but would not be needed to be injected in UmpleOnline for diagrams.
Suggest option c
The issue you opened is one of the issues I have faced a while ago and tried to fix this with some constraints and warning. There are many scenarios you may imagine to mix namespaces. It becomes more complicated when you use
OK. So here is the proposed solution, reflecting Vahdat's issue and respecting the need to enable existing systems to still compile.
In fact although the warning messages 30 say that the namespace is being redefined, in fact it it is not.
also if you attempt to specify the original namespace, you still get the warning:
Therefore the best solution is
In this case, class X would end up being in p not in n