Correcting error messages when creating a rss account (original patch from Atul Aggarwal).

cusax-fix
Vincent Lucas 18 years ago
parent 5d577059d4
commit 56ffcf820f

@ -34,6 +34,8 @@ public class RssAccRegWizzActivator
* A currently valid reference to the configuration service.
*/
private static ConfigurationService configService;
private static UIService uiService;
/**
* Starts this bundle.
@ -48,8 +50,7 @@ public void start(BundleContext bc)
ServiceReference uiServiceRef = bundleContext
.getServiceReference(UIService.class.getName());
UIService uiService
= (UIService) bundleContext.getService(uiServiceRef);
uiService = (UIService) bundleContext.getService(uiServiceRef);
WizardContainer wizardContainer
= uiService.getAccountRegWizardContainer();
@ -107,6 +108,16 @@ public static ProtocolProviderFactory getRssProtocolProviderFactory()
return (ProtocolProviderFactory) bundleContext.getService(serRefs[0]);
}
/**
* Returns the <tt>UIService</tt>.
*
* @return the <tt>UIService</tt>
*/
public static UIService getUIService()
{
return uiService;
}
/**
* Returns the bundleContext that we received when we were started.

@ -183,19 +183,19 @@ public ProtocolProviderService installAccount(
RssAccRegWizzActivator.bundleContext
.getService(serRef);
}
catch (IllegalArgumentException exc)
catch (IllegalArgumentException e)
{
new ErrorDialog(null,
Resources.getString("error"),
exc.getMessage(),
exc).showDialog();
RssAccRegWizzActivator.getUIService().getPopupDialog()
.showMessagePopupDialog(e.getMessage(),
Resources.getString("error"),
PopupDialog.ERROR_MESSAGE);
}
catch (IllegalStateException exc)
catch (IllegalStateException e)
{
new ErrorDialog(null,
Resources.getString("error"),
exc.getMessage(),
exc).showDialog();
RssAccRegWizzActivator.getUIService().getPopupDialog()
.showMessagePopupDialog(e.getMessage(),
Resources.getString("error"),
PopupDialog.ERROR_MESSAGE);
}
return protocolProvider;

Loading…
Cancel
Save