本文整理汇总了Java中com.intellij.openapi.fileEditor.EditorDataProvider类的典型用法代码示例。如果您正苦于以下问题:Java EditorDataProvider类的具体用法?Java EditorDataProvider怎么用?Java EditorDataProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EditorDataProvider类属于com.intellij.openapi.fileEditor包,在下文中一共展示了EditorDataProvider类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getData
import com.intellij.openapi.fileEditor.EditorDataProvider; //导入依赖的package包/类
@Override
@Nullable
public final Object getData(@NotNull String dataId, @NotNull Editor editor, @NotNull Caret caret) {
for (final EditorDataProvider dataProvider : myDataProviders) {
final Object o = dataProvider.getData(dataId, editor, caret);
if (o != null) return o;
}
return null;
}
示例2: registerExtraEditorDataProvider
import com.intellij.openapi.fileEditor.EditorDataProvider; //导入依赖的package包/类
@Override
public void registerExtraEditorDataProvider(@NotNull final EditorDataProvider provider, Disposable parentDisposable) {
myDataProviders.add(provider);
if (parentDisposable != null) {
Disposer.register(parentDisposable, new Disposable() {
@Override
public void dispose() {
myDataProviders.remove(provider);
}
});
}
}
示例3: getData
import com.intellij.openapi.fileEditor.EditorDataProvider; //导入依赖的package包/类
@Nullable
public final Object getData(@NotNull String dataId, @NotNull Editor editor, @NotNull VirtualFile file) {
for (final EditorDataProvider dataProvider : myDataProviders) {
final Object o = dataProvider.getData(dataId, editor, file);
if (o != null) return o;
}
return null;
}
示例4: getData
import com.intellij.openapi.fileEditor.EditorDataProvider; //导入依赖的package包/类
@Override
@Nullable
public final Object getData(@Nonnull Key dataId, @Nonnull Editor editor, @Nonnull Caret caret) {
for (final EditorDataProvider dataProvider : myDataProviders) {
final Object o = dataProvider.getData(dataId, editor, caret);
if (o != null) return o;
}
return null;
}
示例5: registerExtraEditorDataProvider
import com.intellij.openapi.fileEditor.EditorDataProvider; //导入依赖的package包/类
@Override
public void registerExtraEditorDataProvider(@Nonnull final EditorDataProvider provider, Disposable parentDisposable) {
myDataProviders.add(provider);
if (parentDisposable != null) {
Disposer.register(parentDisposable, () -> myDataProviders.remove(provider));
}
}