any
any

Reputation: 355

changing the logo of wizards of special plugin

When I set the logo for my java plugin, the logo of other windows of eclipse are changed.

I have a class which extends Wizard and implements IObjectActionDelegate. Then, I have override the run function and write the below code in it.

wizard = new StartWizard();
dialog = new WizardDialog(Display.getDefault().getActiveShell(), wizard);
Bundle bundle = Platform.getBundle("Plugin");
URL url = FileLocator.find(bundle, new Path("icon/Logo.png"), null);
ImageDescriptor desc = ImageDescriptor.createFromURL(url);
Image image = desc.createImage();
WizardDialog.setDefaultImage(image);

I have read the solution set forth to the similar post on Only changing the logo of special plugin. The problem is that I have extended Wizard and cannot extend WizardDialog instead.

Upvotes: 0

Views: 31

Answers (1)

greg-449
greg-449

Reputation: 111162

Since you are creating WizardDialog yourself you can actually extend that class if you want.

In a Wizard you can get the current Shell by calling:

Shell shell = getContainer().getShell();

shell.setImage(your image);

It looks like the wizard addPages method would be suitable for this code.

Upvotes: 1

Related Questions