org.glassmaker.eclipse/org.glassmaker.ui.editor/src/main/java/org/glassmaker/ui/editor/wizards/NewCardFileWizardPage.java
private boolean extensionValidForContentType(String fileName) {
		boolean valid = false;

		IContentType type = getContentType();
		// there is currently an extension
		if (fileName.lastIndexOf('.') != -1) {
			// check what content types are associated with current extension
			IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(fileName);
			int i = 0;
			while (i < types.length && !valid) {
				valid = types[i].isKindOf(type);
				++i;
			}
		} else
			valid = true; // no extension so valid
		return valid;
	}
private boolean extensionValidForContentType(String fileName) {
		boolean valid = false;

		IContentType type = getContentType();
		// there is currently an extension
		if (fileName.lastIndexOf('.') != -1) {
			// check what content types are associated with current extension
			IContentType[] types = Platform.getContentTypeManager().findContentTypesFor(fileName);
			int i = 0;
			while (i < types.length && !valid) {
				valid = types[i].isKindOf(type);
				++i;
			}
		} else
			valid = true; // no extension so valid
		return valid;
	}
private boolean extensionValidForContentType ( String fileName ) { boolean valid = false ; IContentType type = getContentType ( ) ; // there is currently an extension if ( fileName . lastIndexOf ( ' ' ) != - 1 ) { // check what content types are associated with current extension IContentType [ ] types = Platform . getContentTypeManager ( ) . findContentTypesFor ( fileName ) ; int i = 0 ; while ( i < types . length && ! valid ) { valid = types [ i ] . isKindOf ( type ) ; ++ i ; } } else valid = true ; // no extension so valid return valid ; }
Verifies if fileName is valid name for content type. Takes base content
type into consideration.

@param fileName
@return true if extension is valid for this content type
Verifies if fileName is valid name for content type . Takes base content type into consideration .