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