Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to implement a MessageDialog
How to implement a MessageDialog [message #332682] Tue, 04 November 2008 19:19 Go to next message
Mikael Petterson is currently offline Mikael PettersonFriend
Messages: 158
Registered: July 2009
Senior Member
Hi,

When I open a file in the workspace into the eclipse editor and start
editing it will be checkout ( that is what our clearcase plug-in does.)

I am not sure how this works but we have class called ClearcaseProvider
that extends RepositoryProvider.
ClearcaseProvider has a private final class:

private final class CheckOutOperation implements IRecursiveOperation {
public IStatus visit(IResource resource, IProgressMonitor monitor) {
}
}

This visit() is called and it is in here a need to generate a
MessageDialog.

MessageDialog(Shell parentShell, String dialogTitle, Image
dialogTitleImage, String dialogMessage, int dialogImageType, String[]
dialogButtonLabels, int defaultIndex)

Since I have no window ( or do I?) how shall I set my parentShell
parameter when I create my MessageDialog.

cheers,

//mike
Re: How to implement a MessageDialog [message #332683 is a reply to message #332682] Tue, 04 November 2008 21:44 Go to previous message
Nicolas Bihan is currently offline Nicolas BihanFriend
Messages: 49
Registered: July 2009
Member
I would try something like that :

Display.getCurrent().getActiveShell()

or from PlatformUI

Nicolas

Mikael Petterson a écrit :
> Hi,
>
> When I open a file in the workspace into the eclipse editor and start
> editing it will be checkout ( that is what our clearcase plug-in does.)
>
> I am not sure how this works but we have class called ClearcaseProvider
> that extends RepositoryProvider.
> ClearcaseProvider has a private final class:
>
> private final class CheckOutOperation implements IRecursiveOperation {
> public IStatus visit(IResource resource, IProgressMonitor monitor) {
> }
> }
>
> This visit() is called and it is in here a need to generate a
> MessageDialog.
>
> MessageDialog(Shell parentShell, String dialogTitle, Image
> dialogTitleImage, String dialogMessage, int dialogImageType, String[]
> dialogButtonLabels, int defaultIndex)
> Since I have no window ( or do I?) how shall I set my parentShell
> parameter when I create my MessageDialog.
>
> cheers,
>
> //mike
>
>
>
Previous Topic:Headless build fails to fine imported package.
Next Topic:External Jars of an IProject
Goto Forum:
  


Current Time: Sat Apr 20 03:55:34 GMT 2024

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

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

Back to the top