How to implement a MessageDialog [message #332682] |
Tue, 04 November 2008 19:19  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03022 seconds