当前位置: 首页>>代码示例>>Java>>正文


Java DiffContext.getUserData方法代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:TextDiffViewerUtil.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SvnDiffViewer.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:SvnDiffViewer.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:11,代码来源:TransferableFileEditorStateSupport.java

示例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());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:TransferableFileEditorStateSupport.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:TextDiffViewerUtil.java

示例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;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:DiffUtil.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:FocusTrackerSupport.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DiffUtil.java

示例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);
}
 
开发者ID:ktisha,项目名称:Crucible4IDEA,代码行数:7,代码来源:CommentsDiffTool.java

示例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));
}
 
开发者ID:consulo,项目名称:consulo,代码行数:7,代码来源:DiffUtil.java


注:本文中的com.intellij.diff.DiffContext.getUserData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。