1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

isValidName new method

This commit is contained in:
Alain Magloire 2002-11-13 16:44:11 +00:00
parent 17dbc7cbe6
commit 16f27bb89f

View file

@ -9,6 +9,10 @@ import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.utils.ui.swt.IValidation;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
@ -23,6 +27,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.MessageDialog;
@ -38,11 +43,6 @@ import org.eclipse.ui.actions.WorkspaceModifyDelegatingOperation;
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.internal.ui.CPluginImages;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.utils.ui.swt.IValidation;
/**
* C Project wizard that creates a new project resource in
@ -92,7 +92,7 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
* @see Wizard#createPages
*/
public void addPages() {
fMainPage= new CProjectWizardPage(CUIPlugin.getResourceString(PREFIX));
fMainPage= new CProjectWizardPage(this, CUIPlugin.getResourceString(PREFIX));
fMainPage.setTitle(wz_title);
fMainPage.setDescription(wz_desc);
addPage(fMainPage);
@ -115,6 +115,10 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
protected abstract void doRunEpilogue(IProgressMonitor monitor);
protected IStatus isValidName(String name) {
return new Status(IStatus.OK, CUIPlugin.PLUGIN_ID, 0, "", null);
}
/**
* Gets the project location path from the main page
* Overwrite this method if you do not have a main page