Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2007, 2008 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
package org.eclipse.pde.internal.ua.ui.wizards.toc;
import  org.eclipse.swt.widgets.Composite;
PDEWizardNewFileCreationPage
public class TocHTMLWizardPage extends WizardNewFileCreationPage {
	private String fLastFilename;

Parameters:
pageName
selection
	public TocHTMLWizardPage(String pageNameIStructuredSelection selection) {
		super(pageNameselection);
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#validatePage()
	 */
	protected boolean validatePage() {
		// Verify the filename is non-empty
		if (.length() == 0) {
			// Reset previous error message set if any
			return false;
		}
		// Verify the file name does not begin with a dot
		if (.charAt(0) == '.') {
			return false;
		}
		if(!HelpEditorUtil.hasValidPageExtension(new Path()))
		{	String message = NLS.bind(
				HelpEditorUtil.getPageExtensionList());
			return false;
		}
		// Perform default validation
		return super.validatePage();
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#validateLinkedResource()
	 */
		return new Status(...""null); //$NON-NLS-1$
	}
	/* (non-Javadoc)
	 * @see org.eclipse.ui.dialogs.WizardNewFileCreationPage#createLinkTarget()
	 */
	protected void createLinkTarget() {
		// NO-OP
	}
	protected void createAdvancedControls(Composite parent) {
		// NO-OP
	}
	public String getFileName() {
		if (getControl() != null && getControl().isDisposed()) {
			return ;
		}
		return super.getFileName();
	}
New to GrepCode? Check out our FAQ X