1 11 12 package org.eclipse.pde.internal.ui.wizards; 13 14 import org.eclipse.core.runtime.IStatus; 15 import org.eclipse.core.runtime.Status; 16 import org.eclipse.jface.viewers.IStructuredSelection; 17 import org.eclipse.pde.internal.ui.PDEPlugin; 18 import org.eclipse.pde.internal.ui.PDEUIMessages; 19 import org.eclipse.ui.dialogs.WizardNewFileCreationPage; 20 21 25 public class PDEWizardNewFileCreationPage extends WizardNewFileCreationPage { 26 27 31 public PDEWizardNewFileCreationPage(String pageName, 32 IStructuredSelection selection) { 33 super(pageName, selection); 34 } 35 36 39 protected boolean validatePage() { 40 String filename = getFileName().trim(); 41 if (filename.length() == 0) { 43 setErrorMessage(null); 45 return false; 46 } 47 if (filename.charAt(0) == '.') { 49 setErrorMessage(PDEUIMessages.PDEWizardNewFileCreationPage_errorMsgStartsWithDot); 50 return false; 51 } 52 return super.validatePage(); 54 } 55 56 59 protected IStatus validateLinkedResource() { 60 return new Status(IStatus.OK, PDEPlugin.getPluginId(), IStatus.OK, "", null); } 62 63 66 protected void createLinkTarget() { 67 } 69 70 71 } 72 | Popular Tags |