mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
isValidName new method
This commit is contained in:
parent
17dbc7cbe6
commit
16f27bb89f
1 changed files with 10 additions and 6 deletions
|
@ -9,6 +9,10 @@ import java.lang.reflect.InvocationTargetException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IProjectDescription;
|
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.IStatus;
|
||||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||||
import org.eclipse.core.runtime.Platform;
|
import org.eclipse.core.runtime.Platform;
|
||||||
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.core.runtime.SubProgressMonitor;
|
import org.eclipse.core.runtime.SubProgressMonitor;
|
||||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||||
import org.eclipse.jface.dialogs.MessageDialog;
|
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.BasicNewProjectResourceWizard;
|
||||||
import org.eclipse.ui.wizards.newresource.BasicNewResourceWizard;
|
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
|
* 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
|
* @see Wizard#createPages
|
||||||
*/
|
*/
|
||||||
public void addPages() {
|
public void addPages() {
|
||||||
fMainPage= new CProjectWizardPage(CUIPlugin.getResourceString(PREFIX));
|
fMainPage= new CProjectWizardPage(this, CUIPlugin.getResourceString(PREFIX));
|
||||||
fMainPage.setTitle(wz_title);
|
fMainPage.setTitle(wz_title);
|
||||||
fMainPage.setDescription(wz_desc);
|
fMainPage.setDescription(wz_desc);
|
||||||
addPage(fMainPage);
|
addPage(fMainPage);
|
||||||
|
@ -115,6 +115,10 @@ public abstract class CProjectWizard extends BasicNewResourceWizard implements I
|
||||||
|
|
||||||
protected abstract void doRunEpilogue(IProgressMonitor monitor);
|
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
|
* Gets the project location path from the main page
|
||||||
* Overwrite this method if you do not have a main page
|
* Overwrite this method if you do not have a main page
|
||||||
|
|
Loading…
Add table
Reference in a new issue