Package org.eclipse.ui.forms

Examples of org.eclipse.ui.forms.IManagedForm


   * @return list with unhandled errors
   */
  public List<ValidationError> handleValidationErrors(List<ValidationError> errors) {
    List<ValidationError> unhandled = new ArrayList<ValidationError>();
    unhandled.addAll(errors);
    IManagedForm form = getManagedForm();
    if (form != null) {
      form.getMessageManager().removeAllMessages();
      _hasError = false;
      _canLeave = true;
      if (errors != null) {
        Iterator<ValidationError> it = errors.iterator();
        while (it.hasNext()) {
          ValidationError error = it.next();
          String[] propHints = error.getPropertyHints();
          for (int i = 0; i < propHints.length; i++) {
            String propHint = propHints[i];         
            Control control = _fields.get(propHint);
            if (control != null) {
              addError(form.getMessageManager(), propHint, error, control);
              unhandled.remove(error);
            }
          }
        }
      }
View Full Code Here


    }
    return unhandled;
  }
 
  public void resetValidationMessages() {
    IManagedForm form = getManagedForm();
    if (form != null) {
      form.getMessageManager().removeAllMessages();
    }
    _hasError = false;
  }
View Full Code Here

        messageFixesMap.put(message, fixes);
    }

    void reportProblemsInHeader() {
        IManagedForm mform = getManagedForm();
        if (mform == null)
            return;

        IMessageManager manager = mform.getMessageManager();
        manager.removeMessages();

        for (Entry<String,Integer> entry : messageSeverityMap.entrySet()) {
            // severities in IMessageProvider are 1 higher than in IMarker
            int mappedSeverity = entry.getValue() + 1;
View Full Code Here

        messageFixesMap.put(message, fixes);
    }

    void reportProblemsInHeader() {
        IManagedForm mform = getManagedForm();
        if (mform == null)
            return;

        IMessageManager manager = mform.getMessageManager();
        manager.removeMessages();

        for (Entry<String,Integer> entry : messageSeverityMap.entrySet()) {
            // severities in IMessageProvider are 1 higher than in IMarker
            int mappedSeverity = entry.getValue() + 1;
View Full Code Here

                for (Iterator<?> iter = pages.iterator(); iter.hasNext();)
                {
                    IFormPage page = (IFormPage) iter.next();
                    if (page != null)
                    {
                        IManagedForm managedForm = page.getManagedForm();
                        if (managedForm != null)
                        {
                            managedForm.refresh();
                            IFormPart[] parts = managedForm.getParts();
                            for (IFormPart part : parts)
                            {
                                part.refresh();
                            }
                        }
View Full Code Here

        return JavaCore.create(resource.getProject());
    }

    private IFormPage getFormPage() {
        IManagedForm managedForm = formPart.getManagedForm();
        if (managedForm == null)
            return null;

        Object container = managedForm.getContainer();
        if (!(container instanceof IFormPage))
            return null;
        return (IFormPage) container;
    }
View Full Code Here

    newDevDepSinceLastSave = false;
   
    if (!validJson) {
      setActivePage(jsonEditorIndex);
     
      IManagedForm headerForm = getHeaderForm();
      if (headerForm != null) {
        headerForm.getMessageManager().update();
      }
    }
  }
View Full Code Here

  private void addMessage(String id, String message, int type) {
    addMessage(id, message, type, null);
  }
 
  private void addMessage(String id, String message, int type, Object data) {
    IManagedForm headerForm = getHeaderForm();
    if (headerForm != null) {
      headerForm.getMessageManager().addMessage(id, message, data, type);
    }
  }
View Full Code Here

      headerForm.getMessageManager().addMessage(id, message, data, type);
    }
  }
 
  private void removeMessage(String id) {
    IManagedForm headerForm = getHeaderForm();
    if (headerForm != null) {
      headerForm.getMessageManager().removeMessage(id);
    }
  }
View Full Code Here

    public void commitFormPages(boolean onSave) {
        IFormPage[] pages = getPages();
        for (int i = 0; i < pages.length; i++) {
            IFormPage page = pages[i];
            IManagedForm mform = page.getManagedForm();
            if (mform != null && mform.isDirty())
                mform.commit(true);
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.forms.IManagedForm

Copyright © 2018 www.massapicom. 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.