1 11 package org.eclipse.core.runtime.content; 12 13 import java.io.*; 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.core.runtime.QualifiedName; 16 import org.eclipse.core.runtime.preferences.IScopeContext; 17 18 27 public interface IContentType extends IContentTypeSettings { 28 32 public static final int IGNORE_PRE_DEFINED = 0x01; 33 37 public static final int IGNORE_USER_DEFINED = 0x02; 38 41 public static final int FILE_NAME_SPEC = 0x04; 42 45 public static final int FILE_EXTENSION_SPEC = 0x08; 46 47 53 public IContentType getBaseType(); 54 55 70 public IContentDescription getDefaultDescription(); 71 72 87 public IContentDescription getDescriptionFor(InputStream contents, QualifiedName[] options) throws IOException; 88 89 107 public IContentDescription getDescriptionFor(Reader contents, QualifiedName[] options) throws IOException; 108 109 118 public String getDefaultCharset(); 119 120 143 public String [] getFileSpecs(int type); 144 145 151 public String getId(); 152 153 158 public String getName(); 159 160 169 public boolean isAssociatedWith(String fileName); 170 171 181 public boolean isAssociatedWith(String fileName, IScopeContext context); 182 183 196 public boolean isKindOf(IContentType another); 197 198 210 public IContentTypeSettings getSettings(IScopeContext context) throws CoreException; 211 } 212 | Popular Tags |