本文整理汇总了Java中org.openide.loaders.ExtensionList.addMimeType方法的典型用法代码示例。如果您正苦于以下问题:Java ExtensionList.addMimeType方法的具体用法?Java ExtensionList.addMimeType怎么用?Java ExtensionList.addMimeType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openide.loaders.ExtensionList
的用法示例。
在下文中一共展示了ExtensionList.addMimeType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initExtensions
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
final void initExtensions() {
ExtensionList list = new ExtensionList();
Set mimes = new HashSet<String>();
for (Language language : LanguageRegistry.getInstance()) {
if(language.useCustomEditorKit()) {
//do not try to load files which has their own editor support and dataobject
continue;
}
mimes.add(language.getMimeType());
list.addMimeType(language.getMimeType());
}
setExtensions(list);
registeredMimes = mimes;
initialized = true;
}
示例2: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
/** Does initialization. Initializes display name,
* extension list and the actions. */
@Override
protected void initialize () {
super.initialize();
ExtensionList ext = getExtensions();
ext.addExtension (ENT_EXT);
ext.addMimeType (EntityDataObject.MIME_TYPE);
ext.addMimeType ("application/xml-external-parsed-entity"); // http://www.ietf.org/rfc/rfc3023.txt // NOI18N
setExtensions (ext);
}
示例3: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addMimeType(SQL_MIME_TYPE);
setExtensions(extensions);
}
示例4: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(JAVA_EXTENSION);
extensions.addMimeType(JAVA_MIME_TYPE);
setExtensions(extensions);
}
示例5: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
/** Initizalized loader, i.e. its extension list. Overrides superclass method. */
@Override
protected void initialize () {
super.initialize();
ExtensionList extensions = new ExtensionList ();
extensions.addMimeType(PDF_MIME_TYPE);
extensions.addMimeType("application/x-pdf"); //NOI18N
extensions.addMimeType("application/vnd.pdf"); //NOI18N
extensions.addMimeType("application/acrobat"); //NOI18N
extensions.addMimeType("text/pdf"); //NOI18N
extensions.addMimeType("text/x-pdf"); //NOI18N
setExtensions (extensions);
}
示例6: ImageDataLoader
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
/** Creates new image loader. */
public ImageDataLoader() {
// Set the representation class.
super("org.netbeans.modules.image.ImageDataObject"); // NOI18N
ExtensionList ext = new ExtensionList();
ext.addMimeType(GIF_MIME_TYPE);
ext.addMimeType(JPEG_MIME_TYPE);
ext.addMimeType(PNG_MIME_TYPE);
setExtensions(ext);
}
示例7: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".ldbg");
extensions.addExtension(".linterp");
extensions.addMimeType(LexerDebuggerEditorKit.LEXER_DEBUGGER_MIME_TYPE);
setExtensions(extensions);
}
示例8: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".pdbg");
extensions.addExtension(".pinterp");
extensions.addMimeType(ParserDebuggerEditorKit.PARSER_DEBUGGER_MIME_TYPE);
setExtensions(extensions);
}
示例9: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".g");
extensions.addExtension(".g3");
extensions.addExtension(".g4");
extensions.addMimeType(GrammarEditorKit.GRAMMAR_MIME_TYPE);
setExtensions(extensions);
}
示例10: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".st");
extensions.addExtension(".stg");
extensions.addMimeType(StringTemplateEditorKit.TEMPLATE_MIME_TYPE);
setExtensions(extensions);
}
示例11: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".go");
extensions.addMimeType(GoEditorKit.GO_MIME_TYPE);
setExtensions(extensions);
}
示例12: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList ext = getExtensions();
ext.addExtension(EXT);
ext.addMimeType(MIME);
setExtensions(ext);
}
示例13: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
@Override
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addExtension(".dot");
extensions.addExtension(".gv");
extensions.addMimeType("text/x-graphviz");
setExtensions(extensions);
}
示例14: initialize
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
protected void initialize() {
super.initialize();
ExtensionList extensions = new ExtensionList();
extensions.addMimeType(JAR_MIME_TYPE);
setExtensions(extensions);
}
示例15: JShellLoader
import org.openide.loaders.ExtensionList; //导入方法依赖的package包/类
public JShellLoader() {
super("org.netbeans.modules.jshell.env.JShellDataObject");
ExtensionList extensions = new ExtensionList();
extensions.addMimeType("text/x-repl");
setExtensions(extensions);
}