FileDocCategorySizeDatePackage
Complainer.javaAPI DocExample2016Thu Feb 17 20:00:42 GMT 2000com.togethersoft.modules.genidl

Complainer

public class Complainer extends Object
Warning message producer.

Fields Summary
private Hashtable
errorHashtable
private Object
voidObject
private com.togethersoft.openapi.scriptapi.APIManager
myAPIManager
private boolean
mySuppressMessages
Constructors Summary
public Complainer(com.togethersoft.openapi.scriptapi.APIManager apiManager, boolean suppress)

        mySuppressMessages = suppress;
        myAPIManager = apiManager;
    
Methods Summary
public voiderror(java.lang.String msg)

        if (!mySuppressMessages) {
            if (!errorHashtable.containsKey(msg)) {
                myAPIManager.createMessage(msg);
                errorHashtable.put(msg, voidObject);
            }
        }
    
public voidproduceInheritanceWarnings(com.togethersoft.openapi.scriptapi.UML.UMLClassifier classifier, java.lang.String category)

        UMLGeneralizationEnumeration exts = classifier.getGeneralizations();
        UMLGeneralization generalization;
        UMLGeneralizableElement zuper;
        String zuperName;
        while (exts.hasMoreElements()) {
            generalization = exts.getNextUMLGeneralization();
            zuper = generalization.getSupertype();
            zuperName = zuper.getQualifiedName();
            error(category + " " + classifier.getQualifiedName() + " cannot extend " + zuperName);
        }
    
public voidsetSuppress(boolean suppress)

        mySuppressMessages = suppress;