本文整理匯總了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();
}