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


Java ReadonlyStatusHandlerImpl类代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl的典型用法代码示例。如果您正苦于以下问题:Java ReadonlyStatusHandlerImpl类的具体用法?Java ReadonlyStatusHandlerImpl怎么用?Java ReadonlyStatusHandlerImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ReadonlyStatusHandlerImpl类属于com.intellij.openapi.vcs.readOnlyHandler包,在下文中一共展示了ReadonlyStatusHandlerImpl类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: refreshFileStatusFromDocument

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
@Override
public void refreshFileStatusFromDocument(@NotNull final VirtualFile virtualFile, @NotNull final Document doc) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("refreshFileStatusFromDocument: file.getModificationStamp()=" + virtualFile.getModificationStamp() + ", document.getModificationStamp()=" + doc.getModificationStamp());
  }
  FileStatus cachedStatus = myFileStatusManager.getCachedStatus(virtualFile);
  if (cachedStatus == null || cachedStatus == FileStatus.NOT_CHANGED || !isDocumentModified(virtualFile)) {
    final AbstractVcs vcs = myVcsManager.getVcsFor(virtualFile);
    if (vcs == null) return;
    if (cachedStatus == FileStatus.MODIFIED && !isDocumentModified(virtualFile)) {
      if (!((ReadonlyStatusHandlerImpl) ReadonlyStatusHandlerImpl.getInstance(myProject)).getState().SHOW_DIALOG) {
        RollbackEnvironment rollbackEnvironment = vcs.getRollbackEnvironment();
        if (rollbackEnvironment != null) {
          rollbackEnvironment.rollbackIfUnchanged(virtualFile);
        }
      }
    }
    myFileStatusManager.fileStatusChanged(virtualFile);
    ChangeProvider cp = vcs.getChangeProvider();
    if (cp != null && cp.isModifiedDocumentTrackingRequired()) {
      myDirtyScopeManager.fileDirty(virtualFile);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:VcsFileStatusProvider.java

示例2: refreshFileStatusFromDocument

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
public void refreshFileStatusFromDocument(final VirtualFile file, final Document doc) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("refreshFileStatusFromDocument: file.getModificationStamp()=" + file.getModificationStamp() + ", document.getModificationStamp()=" + doc.getModificationStamp());
  }
  FileStatus cachedStatus = myFileStatusManager.getCachedStatus(file);
  if (cachedStatus == null || cachedStatus == FileStatus.NOT_CHANGED || !isDocumentModified(file)) {
    final AbstractVcs vcs = myVcsManager.getVcsFor(file);
    if (vcs == null) return;
    if (cachedStatus == FileStatus.MODIFIED && !isDocumentModified(file)) {
      if (!((ReadonlyStatusHandlerImpl) ReadonlyStatusHandlerImpl.getInstance(myProject)).getState().SHOW_DIALOG) {
        RollbackEnvironment rollbackEnvironment = vcs.getRollbackEnvironment();
        if (rollbackEnvironment != null) {
          rollbackEnvironment.rollbackIfUnchanged(file);
        }
      }
    }
    myFileStatusManager.fileStatusChanged(file);
    ChangeProvider cp = vcs.getChangeProvider();
    if (cp != null && cp.isModifiedDocumentTrackingRequired()) {
      myDirtyScopeManager.fileDirty(file);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:VcsFileStatusProvider.java

示例3: refreshFileStatusFromDocument

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
@Override
public void refreshFileStatusFromDocument(@Nonnull final VirtualFile virtualFile, @Nonnull final Document doc) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("refreshFileStatusFromDocument: file.getModificationStamp()=" + virtualFile.getModificationStamp() + ", document.getModificationStamp()=" + doc.getModificationStamp());
  }
  FileStatus cachedStatus = myFileStatusManager.getCachedStatus(virtualFile);
  if (cachedStatus == null || cachedStatus == FileStatus.NOT_CHANGED || !isDocumentModified(virtualFile)) {
    final AbstractVcs vcs = myVcsManager.getVcsFor(virtualFile);
    if (vcs == null) return;
    if (cachedStatus == FileStatus.MODIFIED && !isDocumentModified(virtualFile)) {
      if (!((ReadonlyStatusHandlerImpl) ReadonlyStatusHandlerImpl.getInstance(myProject)).getState().SHOW_DIALOG) {
        RollbackEnvironment rollbackEnvironment = vcs.getRollbackEnvironment();
        if (rollbackEnvironment != null) {
          rollbackEnvironment.rollbackIfUnchanged(virtualFile);
        }
      }
    }
    myFileStatusManager.fileStatusChanged(virtualFile);
    ChangeProvider cp = vcs.getChangeProvider();
    if (cp != null && cp.isModifiedDocumentTrackingRequired()) {
      myDirtyScopeManager.fileDirty(virtualFile);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:VcsFileStatusProvider.java

示例4: reopenFiles

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
@Override
public void reopenFiles(List<FilePath> paths) {
  final ReadonlyStatusHandlerImpl readonlyStatusHandler = (ReadonlyStatusHandlerImpl)ReadonlyStatusHandler.getInstance(myProject);
  final boolean savedOption = readonlyStatusHandler.getState().SHOW_DIALOG;
  readonlyStatusHandler.getState().SHOW_DIALOG = false;
  try {
    readonlyStatusHandler.ensureFilesWritable(collectFiles(paths));
  }
  finally {
    readonlyStatusHandler.getState().SHOW_DIALOG = savedOption;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ChangeListManagerImpl.java

示例5: reopenFiles

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
public void reopenFiles(List<FilePath> paths) {
  final ReadonlyStatusHandlerImpl readonlyStatusHandler = (ReadonlyStatusHandlerImpl)ReadonlyStatusHandlerImpl.getInstance(myProject);
  final boolean savedOption = readonlyStatusHandler.getState().SHOW_DIALOG;
  readonlyStatusHandler.getState().SHOW_DIALOG = false;
  try {
    readonlyStatusHandler.ensureFilesWritable(collectFiles(paths));
  }
  finally {
    readonlyStatusHandler.getState().SHOW_DIALOG = savedOption;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:ChangeListManagerImpl.java

示例6: getOptions

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
@NotNull
@Override
public Collection<BooleanOptionDescription> getOptions(@Nullable Project project) {
  if (project == null || ProjectLevelVcsManager.getInstance(project).getAllVcss().length == 0) {
    return Collections.emptyList();
  }
  VcsConfiguration vcs = VcsConfiguration.getInstance(project);
  if (vcs == null) {
    return Collections.emptyList();
  }
  ArrayList<BooleanOptionDescription> options = new ArrayList<BooleanOptionDescription>();

  String id = "project.propVCSSupport.Mappings"; // process Version Control settings
  options.add(option(vcs, id, "Limit history by " + vcs.MAXIMUM_HISTORY_ROWS + " rows", "LIMIT_HISTORY"));
  options.add(option(vcs, id, "Show directories with changed descendants", "SHOW_DIRTY_RECURSIVELY"));
  options.add(option(vcs, id, "Store on shelf base revision texts for files under DVCS", "INCLUDE_TEXT_INTO_SHELF"));
  VcsContentAnnotationSettings vcsCA = VcsContentAnnotationSettings.getInstance(project);
  if (vcsCA != null) {
    options.add(option(vcsCA, id, "Show changed in last " + vcsCA.getLimitDays() + " days", "isShow", "setShow"));
  }
  options.add(option(vcs, id, "Notify about VCS root errors", "SHOW_VCS_ERROR_NOTIFICATIONS"));
  options.add(option(vcs, id, "Commit message right margin " + vcs.COMMIT_MESSAGE_MARGIN_SIZE + " columns", "USE_COMMIT_MESSAGE_MARGIN"));
  options.add(option(vcs, id, ApplicationBundle.message("checkbox.wrap.typing.on.right.margin"), "WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN"));

  id = "project.propVCSSupport.Confirmation"; // process Version Control / Confirmation settings
  ReadonlyStatusHandler vcsROSH = ReadonlyStatusHandler.getInstance(project);
  if (vcsROSH instanceof ReadonlyStatusHandlerImpl) {
    options.add(option(((ReadonlyStatusHandlerImpl)vcsROSH).getState(), id, "Show \"Clear Read-only Status\" Dialog", "SHOW_DIALOG"));
  }
  options.add(option(vcs, id, "Confirmation: Suggest to move uncommitted changes to another changelist", "OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT"));
  options.add(option(vcs, id, "Confirmation: Force non-empty checkin comments", "FORCE_NON_EMPTY_COMMENT"));
  options.add(option(vcs, id, "Confirmation: Clear initial commit message", "CLEAR_INITIAL_COMMIT_MESSAGE"));

  id = "project.propVCSSupport.Background"; // process Version Control / Background settings
  options.add(option(vcs, id, "Perform in background: update from VCS", "PERFORM_UPDATE_IN_BACKGROUND"));
  options.add(option(vcs, id, "Perform in background: commit to VCS", "PERFORM_COMMIT_IN_BACKGROUND"));
  options.add(option(vcs, id, "Perform in background: checkout from VCS", "PERFORM_CHECKOUT_IN_BACKGROUND"));
  options.add(option(vcs, id, "Perform in background: Edit/Checkout", "PERFORM_EDIT_IN_BACKGROUND"));
  options.add(option(vcs, id, "Perform in background: Add/Remove", "PERFORM_ADD_REMOVE_IN_BACKGROUND"));
  options.add(option(vcs, id, "Perform in background: revert", "PERFORM_ROLLBACK_IN_BACKGROUND"));

  if (!project.isDefault()) {
    // process Version Control / Changelist Conflicts settings
    options.add(tracker(project, "Changelists: Enable changelist conflict tracking", "TRACKING_ENABLED"));
    options.add(tracker(project, "Changelists: Show conflict resolving dialog", "SHOW_DIALOG"));
    options.add(tracker(project, "Changelists: Highlight files with conflicts", "HIGHLIGHT_CONFLICTS"));
    options.add(tracker(project, "Changelists: Highlight files from non-active changelists", "HIGHLIGHT_NON_ACTIVE_CHANGELIST"));
  }
  return Collections.unmodifiableCollection(options);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:51,代码来源:VcsOptionsTopHitProvider.java

示例7: getReadOnlyStatusHandler

import com.intellij.openapi.vcs.readOnlyHandler.ReadonlyStatusHandlerImpl; //导入依赖的package包/类
private ReadonlyStatusHandlerImpl getReadOnlyStatusHandler() {
  return ((ReadonlyStatusHandlerImpl)ReadonlyStatusHandler.getInstance(myProject));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:VcsGeneralConfigurationPanel.java


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