本文整理汇总了Java中org.netbeans.modules.editor.indent.spi.IndentTask类的典型用法代码示例。如果您正苦于以下问题:Java IndentTask类的具体用法?Java IndentTask怎么用?Java IndentTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IndentTask类属于org.netbeans.modules.editor.indent.spi包,在下文中一共展示了IndentTask类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getLookup
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public Lookup getLookup(final MimePath mimePath) {
if (mimePath.size() == 1) {
return new ProxyLookup() {
private final AtomicBoolean initialized = new AtomicBoolean();
@Override
protected void beforeLookup(Template<?> template) {
super.beforeLookup(template);
final Class<?> clz = template.getType();
if (IndentTask.Factory.class.isAssignableFrom(clz) ||
ReformatTask.Factory.class.isAssignableFrom(clz) ||
TypedTextInterceptor.Factory.class.isAssignableFrom(clz)) {
if (!initialized.getAndSet(true)) {
final IndentReformatTaskFactoriesProvider provider = IndentReformatTaskFactoriesProvider.get(mimePath);
if (provider != null) {
final IndentTask.Factory legacyIndenter = provider.getIndentTaskFactory();
final ReformatTask.Factory legacyFormatter = provider.getReformatTaskFactory();
final TypedTextInterceptor.Factory legacyAutoIndenter = provider.getTypedTextInterceptorFactory();
if (LOG.isLoggable(Level.FINE)) {
LOG.log(
Level.FINE,
"''{0}'' uses legacyIndenter={1}, legacyFormatter={2}, legacyAutoIndenter={3}", //NOI18N
new Object[]{
mimePath.getPath(),
legacyIndenter,
legacyFormatter,
legacyAutoIndenter});
}
setLookups(Lookups.fixed(legacyIndenter, legacyFormatter, legacyAutoIndenter));
}
}
}
}
};
}
return null;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:39,代码来源:LegacyFormattersProvider.java
示例2: getIndentTaskFactory
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask.Factory getIndentTaskFactory() {
if (indentTaskFactory == null) {
indentTaskFactory = new IndentTask.Factory() {
public IndentTask createTask(Context context) {
Formatter formatter = getFormatter();
if (formatter != null && context.document() instanceof BaseDocument) {
return new Indenter(context, formatter);
} else {
return null;
}
}
};
}
return indentTaskFactory;
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:LegacyFormattersProvider.java
示例3: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
if (!NoJavacHelper.hasWorkingJavac())
return null;
return new Reindenter(context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:Reindenter.java
示例4: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask createTask (org.netbeans.modules.editor.indent.spi.Context context) {
return new GLFIndentTask (context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:IndentFactory.java
示例5: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask createTask(Context context) {
return new GsfIndentTask(context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:GsfIndentTaskFactory.java
示例6: registerFormatterIndenter
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
private static void registerFormatterIndenter(LayerBuilder b, String mimeType) {
instanceFile(b, "Editors/" + mimeType, null, GsfReformatTaskFactory.class, null, ReformatTask.Factory.class).write(); //NOI18N
instanceFile(b, "Editors/" + mimeType, null, GsfIndentTaskFactory.class, null, IndentTask.Factory.class).write(); //NOI18N
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:LanguageRegistrationProcessor.java
示例7: hasFactories
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
boolean hasFactories() {
Lookup lookup = MimeLookup.getLookup(mimePath);
return handler().isIndent()
? (lookup.lookup(IndentTask.Factory.class) != null)
: (lookup.lookup(ReformatTask.Factory.class) != null);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:TaskHandler.java
示例8: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask createTask(Context context) {
return (lastCreatedTask = new TestIndentTask(context));
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:IndentTest.java
示例9: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
return new CssIndentTask(context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:CssIndentTaskFactory.java
示例10: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask createTask(Context context) {
return new XMLIndentTask(context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:XMLIndentTaskFactory.java
示例11: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
public IndentTask createTask(Context context) {
return new HtmlIndentTask(context);
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:HtmlIndentTaskFactory.java
示例12: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
return new ProtobufIndentTask(context);
}
开发者ID:mwillema,项目名称:protobuf-netbeans-plugin,代码行数:5,代码来源:ProtobufIndentTask.java
示例13: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
return new GrammarIndentTask(context);
}
开发者ID:tunnelvisionlabs,项目名称:goworks,代码行数:5,代码来源:GrammarIndentTask.java
示例14: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
return new TemplateIndentTask(context);
}
开发者ID:tunnelvisionlabs,项目名称:goworks,代码行数:5,代码来源:TemplateIndentTask.java
示例15: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context context) {
return new GoIndentTask(context);
}
开发者ID:tunnelvisionlabs,项目名称:goworks,代码行数:5,代码来源:GoIndentTask.java
示例16: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context cntxt) {
return new MirahIndentTask(cntxt);
}
开发者ID:shannah,项目名称:mirah-nbm,代码行数:5,代码来源:MirahIndentTaskFactory.java
示例17: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context cntxt) {
return new clsIndentTask(cntxt);
}
开发者ID:daimor,项目名称:NBStudio,代码行数:5,代码来源:clsIndentTaskFactory.java
示例18: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context cntxt) {
return new macIndentTask(cntxt);
}
开发者ID:daimor,项目名称:NBStudio,代码行数:5,代码来源:macIndentTaskFactory.java
示例19: createTask
import org.netbeans.modules.editor.indent.spi.IndentTask; //导入依赖的package包/类
@Override
public IndentTask createTask(Context cntxt) {
return new DRLIndentTask(cntxt);
}
开发者ID:bdamer,项目名称:drools-netbeans-plugin,代码行数:5,代码来源:DRLIndentTask.java
注:本文中的org.netbeans.modules.editor.indent.spi.IndentTask类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论