[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.rcp] Re: Verification of install

Absolutely,

I do thing like this in my WorkbenchWindowAdvisor.preWindowOpen() method. I check for catastrophic errors at this point - lack of expected connected devices, database errors, etc, and if there are errors, issue an error dialog and then exit:

    public void preWindowOpen() {
    	if (some catastrophic error) {
    		MessageDialog.openError (getWindowConfigurer()
				.getWindow().getShell(),
    			"Invalid system configuration",
    			"Blah, Blah, Blah");
    		PlatformUI.getWorkbench().close();
    	}

I also do more non-catastrophic checks in my WorkbenchWindowAdvisor.postWindowOpen() class. By this time the main workbench window is up and the messages displayed are just warnings


Bianca wrote:
Hello,

in my rcp app I need to verify some things before the app starts (e.g. that some system variable is set, that certain files exist etc). Is there a preferred place to do this in an rcp app - which also uses a login splash? At the moment I check all this in the main plugin's Activator.init method.

When I detect an error I want to show a popup message - actually the same as you get when Eclipse can't start: "An error has occurred. See the log file..." Can I do that?

Kind regards
Bianca