mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +02:00
additional fix for [Bug 184185] New CDTWizard extension mechanism should use abstract classes instead of interfaces
This commit is contained in:
parent
e3448230ed
commit
5961aaeb02
4 changed files with 12 additions and 12 deletions
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.managedbuilder.ui.wizards.ICBuildWizardHandler;
|
|||
import org.eclipse.cdt.ui.newui.CDTPrefUtil;
|
||||
import org.eclipse.cdt.ui.newui.PageLayout;
|
||||
import org.eclipse.cdt.ui.wizards.CDTMainWizardPage;
|
||||
import org.eclipse.cdt.ui.wizards.ICWizardHandler;
|
||||
import org.eclipse.cdt.ui.wizards.CWizardHandler;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.SelectionAdapter;
|
||||
import org.eclipse.swt.events.SelectionEvent;
|
||||
|
@ -32,7 +32,7 @@ import org.eclipse.swt.widgets.TreeItem;
|
|||
|
||||
public class PreferredToolchainsTab extends AbstractCBuildPropertyTab {
|
||||
|
||||
protected ICWizardHandler h_selected = null;
|
||||
protected CWizardHandler h_selected = null;
|
||||
// widgets
|
||||
private Tree tree;
|
||||
private Composite right;
|
||||
|
@ -65,7 +65,7 @@ public class PreferredToolchainsTab extends AbstractCBuildPropertyTab {
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
TreeItem[] tis = tree.getSelection();
|
||||
if (tis == null || tis.length == 0) return;
|
||||
switchTo((ICWizardHandler)tis[0].getData());
|
||||
switchTo((CWizardHandler)tis[0].getData());
|
||||
}});
|
||||
|
||||
right = new Composite(c, SWT.NONE);
|
||||
|
@ -122,7 +122,7 @@ public class PreferredToolchainsTab extends AbstractCBuildPropertyTab {
|
|||
h_selected.updatePreferred(CDTPrefUtil.getPreferredTCs());
|
||||
}
|
||||
|
||||
private void switchTo(ICWizardHandler h) {
|
||||
private void switchTo(CWizardHandler h) {
|
||||
if (h == null) return;
|
||||
if (h_selected != null) h_selected.handleUnSelection();
|
||||
h_selected = h;
|
||||
|
|
|
@ -56,7 +56,7 @@ implements IExecutableExtension, IWizardWithMemory
|
|||
|
||||
private String lastProjectName = null;
|
||||
private IPath lastProjectLocation = null;
|
||||
private ICWizardHandler savedHandler = null;
|
||||
private CWizardHandler savedHandler = null;
|
||||
|
||||
protected List localPages = new ArrayList(); // replacing Wizard.pages since we have to delete them
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
private Label right_label;
|
||||
|
||||
private ProjectContentsArea locationArea;
|
||||
public ICWizardHandler h_selected = null;
|
||||
public CWizardHandler h_selected = null;
|
||||
|
||||
/**
|
||||
* Creates a new project creation wizard page.
|
||||
|
@ -143,7 +143,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
public void widgetSelected(SelectionEvent e) {
|
||||
TreeItem[] tis = tree.getSelection();
|
||||
if (tis == null || tis.length == 0) return;
|
||||
switchTo((ICWizardHandler)tis[0].getData(), (EntryDescriptor)tis[0].getData(DESC));
|
||||
switchTo((CWizardHandler)tis[0].getData(), (EntryDescriptor)tis[0].getData(DESC));
|
||||
setPageComplete(validatePage());
|
||||
}});
|
||||
|
||||
|
@ -401,7 +401,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
return locationArea.isDefault();
|
||||
}
|
||||
|
||||
public static ICWizardHandler updateData(Tree tree, Composite right, Button show_sup, IWizardItemsListListener ls, IWizard wizard) {
|
||||
public static CWizardHandler updateData(Tree tree, Composite right, Button show_sup, IWizardItemsListListener ls, IWizard wizard) {
|
||||
// remember selected item
|
||||
TreeItem[] sel = tree.getSelection();
|
||||
String savedStr = (sel.length > 0) ? sel[0].getText() : null;
|
||||
|
@ -449,7 +449,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
}
|
||||
}
|
||||
tree.setSelection(target);
|
||||
return (ICWizardHandler)target.getData();
|
||||
return (CWizardHandler)target.getData();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
if (wd2.getId().equals(wd1.getParentId())) {
|
||||
found = true;
|
||||
wd1.setParentId(null);
|
||||
ICWizardHandler h = wd2.getHandler();
|
||||
CWizardHandler h = wd2.getHandler();
|
||||
if (h == null && !wd1.isCategory())
|
||||
break;
|
||||
|
||||
|
@ -514,7 +514,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
// orphan elements (with not-existing parentId) are ignored
|
||||
}
|
||||
|
||||
private void switchTo(ICWizardHandler h, EntryDescriptor ed) {
|
||||
private void switchTo(CWizardHandler h, EntryDescriptor ed) {
|
||||
|
||||
if (h == null) h = ed.getHandler();
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
* - processing data received from config page
|
||||
*
|
||||
*/
|
||||
public class CWizardHandler implements ICWizardHandler {
|
||||
public class CWizardHandler implements Cloneable {
|
||||
protected static final Image IMG0 = CPluginImages.get(CPluginImages.IMG_EMPTY);
|
||||
protected static final Image IMG1 = CPluginImages.get(CPluginImages.IMG_PREFERRED);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue