Hi Tom, et al.,

For the deprecation of the initNotationProviders() method in 
FigEdgeModelElement (and FigNodeModelelement),
I propose the following change to the Javadoc - is this OK for you?
Let's keep this method, but not call it from constructors.

Regards,
Michiel



     /**
      * Replace the NotationProvider(s).
      *
      * @param own the current owner
      * This method separates initialization of
      * notation providers from any later updates which are required.
      * Initialization must be done in the
      * constructor using methods which
      * can't be overriden. <p>
      * NotationProviders can not be updated - they
      * are lightweight throw-away objects.
      * Hence there is functionally
      * only this method to create a (new) NotationProvider whenever
      * needed. E.g. when the notation language is
      * changed by the user, then the NPs are to be re-created.
      * So, this method shall not be
      * called from a Fig constructor.<p>
      *
      * After the removal of the deprecated method setOwner(),
      * this method shall contain the following statement:
      *     assert notationProviderName != null
      */
     protected void initNotationProviders(Object own) {
         if (notationProviderName != null) {
             notationProviderName.cleanListener(this, own);
         }
         /* This should NOT be looking for a NamedElement,
          * since this is not always about the name of this
          * modelelement alone.*/
         if (Model.getFacade().isAModelElement(own)) {
             NotationName notation = Notation.findNotation(
                     getNotationSettings().getNotationLanguage());
             notationProviderName =
                 NotationProviderFactory2.getInstance().getNotationProvider(
                         getNotationProviderType(), own, this,
                         notation);
         }
     }


BTW:
Tom originally wrote:
@deprecated for 0.27.3 by tfmorris. Initialization of notation providers 
and any later needed updates must be separated. Initialization must be 
done in a way that can't be overridden since the subclasses constructors 
won't have completed by the time the subclass implementation is run.

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=1002413

To unsubscribe from this discussion, e-mail: 
[[email protected]].

Reply via email to