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