[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: How to get form MessageManager?

Hi,

what I did to make it work was to create a ManagedForm:

IMessageManager manager = new ManagedForm(m_formToolkit, m_form).getMessageManager();

In all my code I'm using m_form instead of the managed form being created. It recognized no side effects. I used the message manager a lot. I implemented a bridge between Databinding and the message manager, to get validation messages to be shown in the message area. Works like a charm :)

-Thomas


JMaslac schrieb:
Hi,

I'm using eclipse forms. I have a view and in it I've created a form. The question is - how can I get/create MessageManager that's associated with that form?

My code is as follows:

----
  public void createPartControl(final Composite p_parent) {

    m_formToolkit = new FormToolkit(p_parent.getDisplay());
    m_form = m_formToolkit.createForm(p_parent);
    m_formBody = m_form.getBody();
....
-----

I've seen how it's done in org.eclipse.ui.forms.example's ErrorMessagesPage.java (managedForm.getMessageManager();) but that doesn't help me much. At least I don't see how because I don't have managed form in my program.

Thanks,

Josip