本文整理汇总了Java中com.intellij.diff.DiffContext.getUserData方法的典型用法代码示例。如果您正苦于以下问题:Java DiffContext.getUserData方法的具体用法?Java DiffContext.getUserData怎么用?Java DiffContext.getUserData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.diff.DiffContext
的用法示例。
在下文中一共展示了DiffContext.getUserData方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTextSettings
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@NotNull
public static TextDiffSettings getTextSettings(@NotNull DiffContext context) {
TextDiffSettings settings = context.getUserData(TextDiffSettingsHolder.KEY);
if (settings == null) {
settings = TextDiffSettings.getSettings(context.getUserData(DiffUserDataKeys.PLACE));
context.putUserData(TextDiffSettingsHolder.KEY, settings);
if (DiffUtil.isUserDataFlagSet(DiffUserDataKeys.DO_NOT_IGNORE_WHITESPACES, context)) {
settings.setIgnorePolicy(IgnorePolicy.DEFAULT);
}
}
return settings;
}
示例2: initSettings
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@NotNull
private static SvnDiffSettings initSettings(@NotNull DiffContext context) {
SvnDiffSettings settings = context.getUserData(SvnDiffSettingsHolder.KEY);
if (settings == null) {
settings = SvnDiffSettings.getSettings();
context.putUserData(SvnDiffSettingsHolder.KEY, settings);
}
return settings;
}
示例3: initPropertyContext
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@NotNull
private MyPropertyContext initPropertyContext(@NotNull DiffContext context) {
MyPropertyContext propertyContext = context.getUserData(PROPERTY_CONTEXT_KEY);
if (propertyContext == null) {
propertyContext = new MyPropertyContext();
context.putUserData(PROPERTY_CONTEXT_KEY, propertyContext);
}
return propertyContext;
}
示例4: readContextData
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
private static void readContextData(@Nonnull DiffContext context,
@Nonnull FileEditor editor,
@Nonnull TransferableFileEditorState state) {
Map<String, Map<String, String>> map = context.getUserData(TRANSFERABLE_FILE_EDITOR_STATE);
Map<String, String> options = map != null ? map.get(state.getEditorId()) : null;
if (options == null) return;
state.setTransferableOptions(options);
editor.setState(state);
}
示例5: writeContextData
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
private static void writeContextData(@Nonnull DiffContext context, @Nonnull TransferableFileEditorState state) {
Map<String, Map<String, String>> map = context.getUserData(TRANSFERABLE_FILE_EDITOR_STATE);
if (map == null) {
map = ContainerUtil.newHashMap();
context.putUserData(TRANSFERABLE_FILE_EDITOR_STATE, map);
}
map.put(state.getEditorId(), state.getTransferableOptions());
}
示例6: getTextSettings
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@Nonnull
public static TextDiffSettings getTextSettings(@Nonnull DiffContext context) {
TextDiffSettings settings = context.getUserData(TextDiffSettingsHolder.KEY);
if (settings == null) {
settings = TextDiffSettings.getSettings(context.getUserData(DiffUserDataKeys.PLACE));
context.putUserData(TextDiffSettingsHolder.KEY, settings);
if (DiffUtil.isUserDataFlagSet(DiffUserDataKeys.DO_NOT_IGNORE_WHITESPACES, context)) {
settings.setIgnorePolicy(IgnorePolicy.DEFAULT);
}
}
return settings;
}
示例7: getDiffSettings
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@Nonnull
public static DiffSettings getDiffSettings(@Nonnull DiffContext context) {
DiffSettings settings = context.getUserData(DiffSettingsHolder.KEY);
if (settings == null) {
settings = DiffSettings.getSettings(context.getUserData(DiffUserDataKeys.PLACE));
context.putUserData(DiffSettingsHolder.KEY, settings);
}
return settings;
}
示例8: processContextHints
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
public void processContextHints(@NotNull DiffRequest request, @NotNull DiffContext context) {
Side side = context.getUserData(DiffUserDataKeys.PREFERRED_FOCUS_SIDE);
if (side != null) setCurrentSide(side);
}
示例9: getCustomNotifications
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
public static List<JComponent> getCustomNotifications(@NotNull DiffContext context, @NotNull DiffRequest request) {
List<JComponent> requestComponents = request.getUserData(DiffUserDataKeys.NOTIFICATIONS);
List<JComponent> contextComponents = context.getUserData(DiffUserDataKeys.NOTIFICATIONS);
return ContainerUtil.concat(ContainerUtil.notNullize(contextComponents), ContainerUtil.notNullize(requestComponents));
}
示例10: canShow
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@Override
public boolean canShow(@NotNull DiffContext context, @NotNull DiffRequest request) {
if (context.getUserData(CrucibleUserDataKeys.REVIEW) == null) return false;
if (request.getUserData(ChangeDiffRequestProducer.CHANGE_KEY) == null) return false;
return SimpleDiffViewer.canShowRequest(context, request);
}
示例11: getCustomNotifications
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@Nonnull
public static List<JComponent> getCustomNotifications(@Nonnull DiffContext context, @Nonnull DiffRequest request) {
List<JComponent> requestComponents = request.getUserData(DiffUserDataKeys.NOTIFICATIONS);
List<JComponent> contextComponents = context.getUserData(DiffUserDataKeys.NOTIFICATIONS);
return ContainerUtil.concat(ContainerUtil.notNullize(contextComponents), ContainerUtil.notNullize(requestComponents));
}