本文整理汇总了Java中org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration类的典型用法代码示例。如果您正苦于以下问题:Java DefaultTextEditorConfiguration类的具体用法?Java DefaultTextEditorConfiguration怎么用?Java DefaultTextEditorConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DefaultTextEditorConfiguration类属于org.eclipse.che.ide.api.editor.editorconfig包,在下文中一共展示了DefaultTextEditorConfiguration类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEditor
import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; //导入依赖的package包/类
@Override
public TextEditor getEditor() {
if (editorBuilder == null) {
Log.debug(
AbstractTextEditorProvider.class,
"No builder registered for default editor type - giving up.");
return null;
}
final TextEditor editor = editorBuilder.buildEditor();
editor.initialize(new DefaultTextEditorConfiguration());
return editor;
}
示例2: createEditor
import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; //导入依赖的package包/类
@Override
public Promise<EditorPartPresenter> createEditor(VirtualFile file) {
if (file instanceof File) {
File resource = (File) file;
Promise<ServerCapabilities> promise =
registry.getOrInitializeServer(resource.getProject().getPath(), file);
return promise.then(
new Function<ServerCapabilities, EditorPartPresenter>() {
@Override
public EditorPartPresenter apply(ServerCapabilities capabilities)
throws FunctionException {
if (editorBuilder == null) {
Log.debug(
AbstractTextEditorProvider.class,
"No builder registered for default editor type - giving up.");
return null;
}
final TextEditor editor = editorBuilder.buildEditor();
TextEditorConfiguration configuration =
capabilities == null
? new DefaultTextEditorConfiguration()
: editorConfigurationFactory.build(editor, capabilities);
editor.initialize(configuration);
return editor;
}
});
}
return null;
}
示例3: buildEditor
import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; //导入依赖的package包/类
@Override
public TextEditor buildEditor() {
final OrionEditorPresenter editor = orionTextEditorProvider.get();
editor.initialize(new DefaultTextEditorConfiguration());
return editor;
}
示例4: getEditorConfiguration
import org.eclipse.che.ide.api.editor.editorconfig.DefaultTextEditorConfiguration; //导入依赖的package包/类
/** Returns configuration for initializing an editor returned by {@link #getEditor()} method. */
protected TextEditorConfiguration getEditorConfiguration() {
return new DefaultTextEditorConfiguration();
}