Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Managing multiple messages using MessageManager
Managing multiple messages using MessageManager [message #470940] Tue, 04 December 2007 07:58 Go to next message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

I posted this in RCP group but didn't get any reply. Since the article I
referred has referenced to ua-dev, I am posting here. Thanks in
anticipation.

I referred this article
< http://www.eclipse.org/eclipse/platform-ua/proposals/forms/e nhancements-3.3/index.html>
and tried the class provided in examples project
(org.eclipse.ui.forms.examples.internal.rcp.ErrorMessagesPag e).

Is there any other way of displaying the messages but with hyperlinks? I
mean, I like a tooltip with a ‘X’ button in a corner. I thought of
implementing the ToolTip example given in
< http://www.ibm.com/developerworks/library/os-eclipse-forms/i ndex.html>
but I am not sure which ToolTip he is referring to.
org.eclipse.swt.widgets.ToolTip is not related to any form but he is
overriding createToolTipContentArea(). Do you know how?

Moreover, the way the errors are displayed in ErrorMessagesPage is not
good. When we click on hyperlink ('2 errors detected') and on an error
message hyperlink, the shell closes. But if I click on '2 errors
hyperlink' and click elsewhere on the editor, the shell remains as such.
How do we close it? Is there a way to listen to click event for editor? I
also witnessed that when this shell pops up, the editor loses focus but I
don't know how to listen to editor events. One more situation: when this
shell is displayed, is there a way to stop the yellow tooltip box from
appearing when mouse is hovered? There is no need for both the boxes at
the same time.

I appreciate your help.
Re: Managing multiple messages using MessageManager [message #470942 is a reply to message #470940] Tue, 04 December 2007 14:29 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Vel wrote:
> I posted this in RCP group but didn't get any reply. Since the article I
> referred has referenced to ua-dev, I am posting here. Thanks in
> anticipation.
>
> I referred this article
> < http://www.eclipse.org/eclipse/platform-ua/proposals/forms/e nhancements-3.3/index.html>
> and tried the class provided in examples project
> (org.eclipse.ui.forms.examples.internal.rcp.ErrorMessagesPag e).
>
> Is there any other way of displaying the messages but with hyperlinks? I
> mean, I like a tooltip with a �X� button in a corner. I thought of
> implementing the ToolTip example given in
> < http://www.ibm.com/developerworks/library/os-eclipse-forms/i ndex.html>
> but I am not sure which ToolTip he is referring to.
> org.eclipse.swt.widgets.ToolTip is not related to any form but he is
> overriding createToolTipContentArea(). Do you know how?
>
> Moreover, the way the errors are displayed in ErrorMessagesPage is not
> good. When we click on hyperlink ('2 errors detected') and on an error
> message hyperlink, the shell closes. But if I click on '2 errors
> hyperlink' and click elsewhere on the editor, the shell remains as such.
> How do we close it? Is there a way to listen to click event for editor?
> I also witnessed that when this shell pops up, the editor loses focus
> but I don't know how to listen to editor events. One more situation:
> when this shell is displayed, is there a way to stop the yellow tooltip
> box from appearing when mouse is hovered? There is no need for both the
> boxes at the same time.
>
> I appreciate your help.
>

Instead of creating a Shell, you might want to try using a
org.eclipse.jface.dialogs.PopupDialog to contain the error message
hyperlinks. It is a "lighter-weight" widget than a Shell and seems to
have more intuitive behavior for this kind of situation.

Hope this helps,
Eric
Re: Managing multiple messages using MessageManager [message #470943 is a reply to message #470942] Tue, 04 December 2007 22:10 Go to previous messageGo to next message
Adam Archer is currently offline Adam ArcherFriend
Messages: 30
Registered: July 2009
Member
Vel,

The shell you are talking about is simply an example implementation (note
it's in o.e.ui.forms.examples) of a hyperlink listener that you could use
and is not intended as a fully functional solution. This is completely
independent of the IMessageManager and is not part of the forms API.

With respect to the tooltip extension from the article you referenced, I
believe it is an extension to org.eclipse.jface.window.ToolTip, not
org.eclipse.swt.widgets.ToolTip. You may want to look into using that for
your implementation or, try the jface PopupDialog as Eric suggested.

The document you referred to is the proposal for new features in 3.3
forms. For a more client centric take on the features see the Eclipse
Corner article available here:

http://www.eclipse.org/articles/article.php?file=Article-For ms33/index.html

Good luck!

Adam
Re: Managing multiple messages using MessageManager [message #470949 is a reply to message #470943] Wed, 05 December 2007 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

Thanks for your input.

I implemented the jface PopupDialog approach and found a simple trouble.
The dialog opens fine, displays fine. But the when I click on the editor,
though the dialog closes, my editor or any field in the editor (my editor
has a form) is not gaining focus. I have to click once more so that it
gains focus. Can you help me in this?

Do you know any article that discuss about passing a model object to an
editor? Say, I am listing account numbers on a view. I click on account
number and the editor that opens should have the account details. How is
this achieved? You don't have to explain everything. References to few
articles or books (is it in Eclipse RCP book?) would be of great help.
Re: Managing multiple messages using MessageManager [message #470951 is a reply to message #470943] Wed, 05 December 2007 13:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

I forgot to attach the code.

public class MessagePopupDialog extends PopupDialog {

private IMessageManager messageManager;

public MessagePopupDialog(Shell parent, IMessageManager messageManager) {
super(parent, SWT.NONE, true, true, true,
true, "Title text", null);
this.messageManager = messageManager;

}

One more question. Is there a way to prevent the tooptip from appearing
when mouse is hovered over the hyperlink? I don't see a method to suppress
it either in form or MessageManager.
Re: Managing multiple messages using MessageManager [message #471284 is a reply to message #470949] Wed, 05 December 2007 14:34 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Vel wrote:
> Do you know any article that discuss about passing a model object to an
> editor? Say, I am listing account numbers on a view. I click on account
> number and the editor that opens should have the account details. How is
> this achieved? You don't have to explain everything. References to few
> articles or books (is it in Eclipse RCP book?) would be of great help.
>

You have to have some mechanism of translating a model object reference
into an IFile or an IEditorInput; then you can use one of the
org.eclipse.ui.ide.IDE.openEditor() methods to open the editor for that
file.

Hope this helps,
Eric
Re: Managing multiple messages using MessageManager [message #594406 is a reply to message #470940] Tue, 04 December 2007 14:29 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Vel wrote:
> I posted this in RCP group but didn't get any reply. Since the article I
> referred has referenced to ua-dev, I am posting here. Thanks in
> anticipation.
>
> I referred this article
> < http://www.eclipse.org/eclipse/platform-ua/proposals/forms/e nhancements-3.3/index.html>
> and tried the class provided in examples project
> (org.eclipse.ui.forms.examples.internal.rcp.ErrorMessagesPag e).
>
> Is there any other way of displaying the messages but with hyperlinks? I
> mean, I like a tooltip with a �X� button in a corner. I thought of
> implementing the ToolTip example given in
> < http://www.ibm.com/developerworks/library/os-eclipse-forms/i ndex.html>
> but I am not sure which ToolTip he is referring to.
> org.eclipse.swt.widgets.ToolTip is not related to any form but he is
> overriding createToolTipContentArea(). Do you know how?
>
> Moreover, the way the errors are displayed in ErrorMessagesPage is not
> good. When we click on hyperlink ('2 errors detected') and on an error
> message hyperlink, the shell closes. But if I click on '2 errors
> hyperlink' and click elsewhere on the editor, the shell remains as such.
> How do we close it? Is there a way to listen to click event for editor?
> I also witnessed that when this shell pops up, the editor loses focus
> but I don't know how to listen to editor events. One more situation:
> when this shell is displayed, is there a way to stop the yellow tooltip
> box from appearing when mouse is hovered? There is no need for both the
> boxes at the same time.
>
> I appreciate your help.
>

Instead of creating a Shell, you might want to try using a
org.eclipse.jface.dialogs.PopupDialog to contain the error message
hyperlinks. It is a "lighter-weight" widget than a Shell and seems to
have more intuitive behavior for this kind of situation.

Hope this helps,
Eric
Re: Managing multiple messages using MessageManager [message #594415 is a reply to message #470942] Tue, 04 December 2007 22:10 Go to previous message
Adam Archer is currently offline Adam ArcherFriend
Messages: 30
Registered: July 2009
Member
Vel,

The shell you are talking about is simply an example implementation (note
it's in o.e.ui.forms.examples) of a hyperlink listener that you could use
and is not intended as a fully functional solution. This is completely
independent of the IMessageManager and is not part of the forms API.

With respect to the tooltip extension from the article you referenced, I
believe it is an extension to org.eclipse.jface.window.ToolTip, not
org.eclipse.swt.widgets.ToolTip. You may want to look into using that for
your implementation or, try the jface PopupDialog as Eric suggested.

The document you referred to is the proposal for new features in 3.3
forms. For a more client centric take on the features see the Eclipse
Corner article available here:

http://www.eclipse.org/articles/article.php?file=Article-For ms33/index.html

Good luck!

Adam
Re: Managing multiple messages using MessageManager [message #594448 is a reply to message #470943] Wed, 05 December 2007 13:32 Go to previous message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

Thanks for your input.

I implemented the jface PopupDialog approach and found a simple trouble.
The dialog opens fine, displays fine. But the when I click on the editor,
though the dialog closes, my editor or any field in the editor (my editor
has a form) is not gaining focus. I have to click once more so that it
gains focus. Can you help me in this?

Do you know any article that discuss about passing a model object to an
editor? Say, I am listing account numbers on a view. I click on account
number and the editor that opens should have the account details. How is
this achieved? You don't have to explain everything. References to few
articles or books (is it in Eclipse RCP book?) would be of great help.
Re: Managing multiple messages using MessageManager [message #594455 is a reply to message #470943] Wed, 05 December 2007 13:39 Go to previous message
Eclipse UserFriend
Originally posted by: velganesh.subramanian.iflexsolutions.com

I forgot to attach the code.

public class MessagePopupDialog extends PopupDialog {

private IMessageManager messageManager;

public MessagePopupDialog(Shell parent, IMessageManager messageManager) {
super(parent, SWT.NONE, true, true, true,
true, "Title text", null);
this.messageManager = messageManager;

}

One more question. Is there a way to prevent the tooptip from appearing
when mouse is hovered over the hyperlink? I don't see a method to suppress
it either in form or MessageManager.
Re: Managing multiple messages using MessageManager [message #605367 is a reply to message #470949] Wed, 05 December 2007 14:34 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3070
Registered: July 2009
Senior Member
Vel wrote:
> Do you know any article that discuss about passing a model object to an
> editor? Say, I am listing account numbers on a view. I click on account
> number and the editor that opens should have the account details. How is
> this achieved? You don't have to explain everything. References to few
> articles or books (is it in Eclipse RCP book?) would be of great help.
>

You have to have some mechanism of translating a model object reference
into an IFile or an IEditorInput; then you can use one of the
org.eclipse.ui.ide.IDE.openEditor() methods to open the editor for that
file.

Hope this helps,
Eric
Previous Topic:Context sensitive help when focus on view tab
Next Topic:UA Documentation
Goto Forum:
  


Current Time: Fri Apr 26 18:00:57 GMT 2024

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

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

Back to the top