Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » MessageManager doesn't display message in header on Form open(If during creation of a Form, a messages logged with MessageManager fail to appear in the Form header)
MessageManager doesn't display message in header on Form open [message #1795229] Tue, 18 September 2018 19:08
Glenn Burkhardt is currently offline Glenn BurkhardtFriend
Messages: 12
Registered: April 2017
Junior Member
We use MessageManager to decorate controls in a Form, and to display a consolidation of the error messages (roll up) in the header of the Form. We do this by adding validators to the data bindings of the controls, and add a listener to the status of the bindings. The listener posts the error messages to the MessageManager.

However, if, when the Form is being created and the related bindings are established, a validation error occurs, messages posted to the MessageManager are not displayed in the header. This is because of a check in MessageManager.update:

if (form.getHead().getBounds().height == 0 || mergedList.isEmpty() || mergedList == null) {

We establish the bindings in the "createPartControl" method of an EditorPart. When the bindings are created, the validators run, and we check the binding status for error, and post a message to the MessageManager. But the Form layout has not yet been computed, so the height of the header is zero.

My question whether there's any good reason for the check for height to be non-zero. It looks to me as though the only real action of the MessageManager.update is to call form.setMessage(), and that shouldn't depend on the height. In fact, if that check is commented out, it all works the way I expect (and want).

Any ideas on why that check in MessageManager.update exists, or why it shouldn't be removed?

Thanks.
Previous Topic:Project missing .project/ Wrong project location
Next Topic:The project was not built since its build path is incomplete - Eclipse Oxygen
Goto Forum:
  


Current Time: Tue Mar 19 07:01:19 GMT 2024

Powered by FUDForum. Page generated in 0.03208 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top