mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 22:22:11 +02:00
3d step for [Bug 184185] New CDTWizard extension mechanism should use abstract classes instead of interfaces
This commit is contained in:
parent
b9e741c953
commit
e3448230ed
5 changed files with 11 additions and 10 deletions
|
@ -17,13 +17,13 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
import org.eclipse.cdt.managedbuilder.core.ITargetPlatform;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.ui.properties.ManagedBuilderUIImages;
|
||||
import org.eclipse.cdt.ui.wizards.ICNewWizard;
|
||||
import org.eclipse.cdt.ui.wizards.CNewWizard;
|
||||
import org.eclipse.cdt.ui.wizards.IWizardItemsListListener;
|
||||
import org.eclipse.cdt.utils.Platform;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
||||
public abstract class AbstractCWizard implements ICNewWizard {
|
||||
public abstract class AbstractCWizard extends CNewWizard {
|
||||
|
||||
private static final String os = Platform.getOS();
|
||||
private static final String arch = Platform.getOSArch();
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute kind="java" basedOn="org.eclipse.cdt.managedbuilder.ui.wizards.ICNewWizard"/>
|
||||
<meta.attribute kind="java" basedOn="org.eclipse.cdt.ui.wizards.CNewWizard"/>
|
||||
</appInfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
|
|
|
@ -418,9 +418,9 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
|
|||
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
||||
for (int k = 0; k < elements.length; k++) {
|
||||
if (elements[k].getName().equals(ELEMENT_NAME)) {
|
||||
ICNewWizard w = null;
|
||||
CNewWizard w = null;
|
||||
try {
|
||||
w = (ICNewWizard) elements[k].createExecutableExtension(CLASS_NAME);
|
||||
w = (CNewWizard) elements[k].createExecutableExtension(CLASS_NAME);
|
||||
} catch (CoreException e) {
|
||||
System.out.println(UIMessages.getString("CMainWizardPage.5") + e.getLocalizedMessage()); //$NON-NLS-1$
|
||||
return null;
|
||||
|
|
|
@ -22,7 +22,7 @@ import org.eclipse.swt.widgets.Composite;
|
|||
* items in "Project types" list (left pane on
|
||||
* the 1st page in any CDT new project wizard)
|
||||
*/
|
||||
public interface ICNewWizard {
|
||||
public abstract class CNewWizard {
|
||||
/**
|
||||
* Creates tree items to be displayed in left pane.
|
||||
*
|
||||
|
@ -33,7 +33,7 @@ public interface ICNewWizard {
|
|||
* @param supportedOnly - whether display supported types only
|
||||
* @param wizard - New Project wizard to be passed to ICWizardHandler
|
||||
*/
|
||||
public EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard);
|
||||
public abstract EntryDescriptor[] createItems(boolean supportedOnly, IWizard wizard);
|
||||
|
||||
/**
|
||||
* Implementor will be informed about widget where additional
|
||||
|
@ -46,5 +46,6 @@ public interface ICNewWizard {
|
|||
* May be null if notification is not required
|
||||
* or implementor does not really support it.
|
||||
*/
|
||||
public void setDependentControl(Composite parent, IWizardItemsListListener page);
|
||||
public void setDependentControl(Composite parent, IWizardItemsListListener page){
|
||||
}
|
||||
}
|
|
@ -19,13 +19,13 @@ import org.eclipse.cdt.core.templateengine.TemplateInfo;
|
|||
import org.eclipse.cdt.ui.templateengine.Template;
|
||||
import org.eclipse.cdt.ui.templateengine.TemplateEngineUI;
|
||||
import org.eclipse.cdt.ui.wizards.EntryDescriptor;
|
||||
import org.eclipse.cdt.ui.wizards.ICNewWizard;
|
||||
import org.eclipse.cdt.ui.wizards.CNewWizard;
|
||||
import org.eclipse.cdt.ui.wizards.IWizardItemsListListener;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class TemplateCNewWizard implements ICNewWizard {
|
||||
public class TemplateCNewWizard extends CNewWizard {
|
||||
/**
|
||||
* Creates and returns an array of items to be displayed
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue