Package org.eclipse.ui.forms

Examples of org.eclipse.ui.forms.IMessageManager.addMessage()


        allRepos.clear();

        try {
            allRepos.addAll(Central.getWorkspace().getPlugins(Repository.class));
        } catch (Exception e) {
            messages.addMessage(MESSAGE_KEY, "Repository List: Unable to load OSGi Repositories. " + e.getMessage(), e, IMessageProvider.ERROR, viewer.getControl());

            // Load the repos and clear the error message if the Workspace is initialised later.
            Central.onWorkspaceInit(new Function<Workspace,Void>() {
                @Override
                public Void run(final Workspace ws) {
View Full Code Here


    final Button button1 = toolkit.createButton(form.getBody(),
        "Add general error", SWT.CHECK);
    button1.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        if (button1.getSelection()) {
          mmng.addMessage("saveError", "Save Error", null,
              IMessageProvider.ERROR);
        } else {
          mmng.removeMessage("saveError");
        }
      }
View Full Code Here

    final Button button2 = toolkit.createButton(form.getBody(),
        "Add static message", SWT.CHECK);
    button2.addSelectionListener(new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        if (button2.getSelection()) {
          mmng.addMessage("info", "Secondary info", null,
              IMessageProvider.NONE);
        } else {
          mmng.removeMessage("info");
        }
      }
View Full Code Here

  void showGeneralError(boolean show, String msgKey) {
    IMessageManager msgManager = getManagedForm().getMessageManager();
    if(show) {
      String msg = UIPlugin.getLocalString(msgKey);
      msgManager.addMessage(msgKey, msg, null, IMessageProvider.ERROR);
    }
    else
      msgManager.removeMessage(msgKey);
    msgManager.update();
  }
View Full Code Here

    int validateModuleName(String name, String key, Control control) {
      IMessageManager msgManager = getManagedForm().getMessageManager();
      if(name == null) {
        String msg = UIPlugin.getLocalString("_UI_Module_name_missing");
        if(control == null)
          msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, msg, null, IMessageProvider.ERROR, control);
        return IMessageProvider.ERROR;
      }
View Full Code Here

      if(name == null) {
        String msg = UIPlugin.getLocalString("_UI_Module_name_missing");
        if(control == null)
          msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, msg, null, IMessageProvider.ERROR, control);
        return IMessageProvider.ERROR;
      }

      int syntaxSeverity = IMessageProvider.NONE;
      String syntax = null;
View Full Code Here

          syntaxSeverity = IMessageProvider.ERROR;
        }
      }
      if(syntax != null)
        if(control == null)
          msgManager.addMessage(key, syntax, null, syntaxSeverity);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, syntax, null, syntaxSeverity, control);
      else if(control != null)
        msgManager.removeMessage(DEFAULT_MESSAGE_KEY, control);
      return syntaxSeverity;
View Full Code Here

      }
      if(syntax != null)
        if(control == null)
          msgManager.addMessage(key, syntax, null, syntaxSeverity);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, syntax, null, syntaxSeverity, control);
      else if(control != null)
        msgManager.removeMessage(DEFAULT_MESSAGE_KEY, control);
      return syntaxSeverity;
    }
View Full Code Here

    int validateOwnerName(String name, String key, Control control) {
      IMessageManager msgManager = getManagedForm().getMessageManager();
      if(name == null) {
        String msg = UIPlugin.getLocalString("_UI_Module_owner_missing");
        if(control == null)
          msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, msg, null, IMessageProvider.ERROR, control);
        return IMessageProvider.ERROR;
      }
View Full Code Here

      if(name == null) {
        String msg = UIPlugin.getLocalString("_UI_Module_owner_missing");
        if(control == null)
          msgManager.addMessage(key, msg, null, IMessageProvider.ERROR);
        else
          msgManager.addMessage(DEFAULT_MESSAGE_KEY, msg, null, IMessageProvider.ERROR, control);
        return IMessageProvider.ERROR;
      }

      int syntaxSeverity = IMessageProvider.NONE;
      String syntax = null;
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.