本文整理汇总了Java中com.intellij.diff.DiffContext.putUserData方法的典型用法代码示例。如果您正苦于以下问题:Java DiffContext.putUserData方法的具体用法?Java DiffContext.putUserData怎么用?Java DiffContext.putUserData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.diff.DiffContext
的用法示例。
在下文中一共展示了DiffContext.putUserData方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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());
}
示例5: 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;
}
示例6: 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;
}
示例7: updateContextHints
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
public void updateContextHints(@NotNull DiffRequest request, @NotNull DiffContext context) {
context.putUserData(DiffUserDataKeys.PREFERRED_FOCUS_SIDE, myCurrentSide);
}
示例8: updateContextHints
import com.intellij.diff.DiffContext; //导入方法依赖的package包/类
@Override
public void updateContextHints(@Nonnull DiffRequest request, @Nonnull DiffContext context) {
context.putUserData(DiffUserDataKeys.PREFERRED_FOCUS_SIDE, myCurrentSide);
}