Examples of IMessageManager


Examples of org.eclipse.ui.forms.IMessageManager

        refresh = false;
      }
    }

    private int validateDependencyName(String name, String key) {
      IMessageManager msgManager = getManagedForm().getMessageManager();
      if(name == null) {
        String msg = UIPlugin.getLocalString("_UI_Dependency_name_missing");
        msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
        return IMessageProvider.ERROR;
      }

      int syntaxSeverity = IMessageProvider.NONE;
      String syntax = null;
      try {
        ModuleName.create(name, true);
      }
      catch(IllegalArgumentException e) {
        syntaxSeverity = IMessageProvider.WARNING;
        try {
          ModuleName.create(name, false);
        }
        catch(IllegalArgumentException e2) {
          syntaxSeverity = IMessageProvider.ERROR;
          e = e2;
        }
        syntax = MetadataModel.getBadNameMessage(e, true);
      }
      if(syntax != null)
        msgManager.addMessage(key, syntax, null, syntaxSeverity);
      return syntaxSeverity;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.