eclipse plugin: Remove redundant help system code
This commit is contained in:
parent
7bb904d6c7
commit
39bf3ff681
6 changed files with 14 additions and 10 deletions
|
@ -40,6 +40,7 @@ public class WizardUtils
|
|||
x += ((shell.getBounds().width - wizardDialog.getShell().getBounds().width)/2);
|
||||
y += ((shell.getBounds().height - wizardDialog.getShell().getBounds().height)/2);
|
||||
wizardDialog.getShell().setLocation(x, y);
|
||||
|
||||
wizardDialog.setHelpAvailable(true);
|
||||
WesnothPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(wizardDialog.getShell(),
|
||||
"org.wesnoth.help.wizardHelp"); //$NON-NLS-1$
|
||||
|
|
|
@ -8,8 +8,8 @@ import org.eclipse.core.runtime.Path;
|
|||
import org.eclipse.jface.wizard.WizardPage;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
|
||||
import org.wesnoth.WesnothPlugin;
|
||||
import org.wesnoth.Messages;
|
||||
import org.wesnoth.WesnothPlugin;
|
||||
|
||||
|
||||
public class NewWizardPageTemplate extends WizardPage
|
||||
|
|
|
@ -13,8 +13,10 @@ import org.eclipse.core.resources.IResource;
|
|||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.wizard.IWizardPage;
|
||||
import org.eclipse.jface.wizard.Wizard;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.INewWizard;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.wesnoth.WesnothPlugin;
|
||||
|
||||
public abstract class NewWizardTemplate extends Wizard implements INewWizard
|
||||
{
|
||||
|
@ -38,6 +40,16 @@ public abstract class NewWizardTemplate extends Wizard implements INewWizard
|
|||
initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createPageControls( Composite pageContainer )
|
||||
{
|
||||
setHelpAvailable( true );
|
||||
WesnothPlugin.getDefault().getWorkbench().getHelpSystem().setHelp( pageContainer,
|
||||
"org.wesnoth.wizardHelp"); //$NON-NLS-1$
|
||||
|
||||
super.createPageControls( pageContainer );
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if the current workbench selection is a suitable campaign to use.
|
||||
*/
|
||||
|
|
|
@ -11,7 +11,6 @@ package org.wesnoth.wizards.campaign;
|
|||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
|
||||
import org.wesnoth.Messages;
|
||||
import org.wesnoth.WesnothPlugin;
|
||||
|
||||
|
||||
public class CampaignPage0 extends WizardNewProjectCreationPage
|
||||
|
@ -26,8 +25,5 @@ public class CampaignPage0 extends WizardNewProjectCreationPage
|
|||
super.createControl(parent);
|
||||
setTitle(Messages.CampaignPage0_1);
|
||||
setMessage(Messages.CampaignPage0_2);
|
||||
|
||||
WesnothPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getShell(),
|
||||
"org.wesnoth.wizardHelp"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ public class EmptyProjectNewWizard extends NewWizardTemplate
|
|||
|
||||
public EmptyProjectNewWizard() {
|
||||
setWindowTitle(Messages.EmptyProjectNewWizard_0);
|
||||
setNeedsProgressMonitor(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,7 +10,6 @@ package org.wesnoth.wizards.emptyproject;
|
|||
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.ui.dialogs.WizardNewProjectCreationPage;
|
||||
import org.wesnoth.WesnothPlugin;
|
||||
import org.wesnoth.Messages;
|
||||
|
||||
|
||||
|
@ -26,8 +25,5 @@ public class EmptyProjectPage0 extends WizardNewProjectCreationPage
|
|||
super.createControl(parent);
|
||||
setTitle(Messages.EmptyProjectPage0_1);
|
||||
setMessage(Messages.EmptyProjectPage0_2);
|
||||
|
||||
WesnothPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getShell(),
|
||||
"org.wesnoth.wizardHelp"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue