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


Java RemoteStatusChangeNodeDecorator类代码示例

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


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

示例1: RemoteRevisionsCache

import com.intellij.openapi.vcs.changes.ui.RemoteStatusChangeNodeDecorator; //导入依赖的package包/类
@SuppressWarnings("UnusedDeclaration") // initialized as a Service
private RemoteRevisionsCache(final Project project) {
  myProject = project;
  myLock = new Object();

  myRemoteRevisionsNumbersCache = new RemoteRevisionsNumbersCache(myProject);
  myRemoteRevisionsStateCache = new RemoteRevisionsStateCache(myProject);

  myChangeDecorator = new RemoteStatusChangeNodeDecorator(this);

  myVcsManager = ProjectLevelVcsManager.getInstance(project);
  MessageBusConnection connection = myProject.getMessageBus().connect();
  connection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED, this);
  connection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED_IN_PLUGIN, this);
  myKinds = new HashMap<String, RemoteDifferenceStrategy>();

  final VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject);
  myControlledCycle = new ControlledCycle(project, new Getter<Boolean>() {
    @Override
    public Boolean get() {
      final boolean shouldBeDone = vcsConfiguration.isChangedOnServerEnabled() && myVcsManager.hasActiveVcss();

      if (shouldBeDone) {
        boolean somethingChanged = myRemoteRevisionsNumbersCache.updateStep();
        somethingChanged |= myRemoteRevisionsStateCache.updateStep();
        if (somethingChanged) {
          ApplicationManager.getApplication().runReadAction(new Runnable() {
            @Override
            public void run() {
              if (!myProject.isDisposed()) {
                myProject.getMessageBus().syncPublisher(REMOTE_VERSION_CHANGED).run();
              }
            }
          });
        }
      }
      return shouldBeDone;
    }
  }, "Finishing \"changed on server\" update", DEFAULT_REFRESH_INTERVAL);

  updateRoots();

  if ((! myProject.isDefault()) && vcsConfiguration.isChangedOnServerEnabled()) {
    ((ProjectLevelVcsManagerImpl) myVcsManager).addInitializationRequest(VcsInitObject.REMOTE_REVISIONS_CACHE,
                                                                         new Runnable() {
                                                                           public void run() {
                                                                             // do not start if there're no vcses
                                                                             if (! myVcsManager.hasActiveVcss() || ! vcsConfiguration. isChangedOnServerEnabled()) return;
                                                                             myControlledCycle.startIfNotStarted(-1);
                                                                           }
                                                                         });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:54,代码来源:RemoteRevisionsCache.java

示例2: getChangesNodeDecorator

import com.intellij.openapi.vcs.changes.ui.RemoteStatusChangeNodeDecorator; //导入依赖的package包/类
public RemoteStatusChangeNodeDecorator getChangesNodeDecorator() {
  return myChangeDecorator;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:RemoteRevisionsCache.java

示例3: RemoteRevisionsCache

import com.intellij.openapi.vcs.changes.ui.RemoteStatusChangeNodeDecorator; //导入依赖的package包/类
private RemoteRevisionsCache(final Project project) {
  myProject = project;
  myLock = new Object();

  myRemoteRevisionsNumbersCache = new RemoteRevisionsNumbersCache(myProject);
  myRemoteRevisionsStateCache = new RemoteRevisionsStateCache(myProject);

  myChangeDecorator = new RemoteStatusChangeNodeDecorator(this);

  myVcsManager = ProjectLevelVcsManager.getInstance(project);
  myConnection = myProject.getMessageBus().connect();
  myConnection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED, this);
  myConnection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED_IN_PLUGIN, this);
  myKinds = new HashMap<String, RemoteDifferenceStrategy>();
  Disposer.register(project, new Disposable() {
    public void dispose() {
      myConnection.disconnect();
    }
  });
  final VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject);
  myControlledCycle = new ControlledCycle(project, new Getter<Boolean>() {
    @Override
    public Boolean get() {
      final boolean shouldBeDone = vcsConfiguration.isChangedOnServerEnabled() && myVcsManager.hasActiveVcss();

      if (shouldBeDone) {
        boolean somethingChanged = myRemoteRevisionsNumbersCache.updateStep();
        somethingChanged |= myRemoteRevisionsStateCache.updateStep();
        if (somethingChanged) {
          myProject.getMessageBus().syncPublisher(REMOTE_VERSION_CHANGED).run();
        }
      }
      return shouldBeDone;
    }
  }, "Finishing \"changed on server\" update", DEFAULT_REFRESH_INTERVAL);

  updateRoots();

  if ((! myProject.isDefault()) && vcsConfiguration.isChangedOnServerEnabled()) {
    ((ProjectLevelVcsManagerImpl) myVcsManager).addInitializationRequest(VcsInitObject.REMOTE_REVISIONS_CACHE,
                                                                         new Runnable() {
                                                                           public void run() {
                                                                             // do not start if there're no vcses
                                                                             if (! myVcsManager.hasActiveVcss() || ! vcsConfiguration. isChangedOnServerEnabled()) return;
                                                                             myControlledCycle.startIfNotStarted(-1);
                                                                           }
                                                                         });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:50,代码来源:RemoteRevisionsCache.java

示例4: RemoteRevisionsCache

import com.intellij.openapi.vcs.changes.ui.RemoteStatusChangeNodeDecorator; //导入依赖的package包/类
private RemoteRevisionsCache(final Project project) {
  myProject = project;
  myLock = new Object();

  myRemoteRevisionsNumbersCache = new RemoteRevisionsNumbersCache(myProject);
  myRemoteRevisionsStateCache = new RemoteRevisionsStateCache(myProject);

  myChangeDecorator = new RemoteStatusChangeNodeDecorator(this);

  myVcsManager = ProjectLevelVcsManager.getInstance(project);
  MessageBusConnection connection = myProject.getMessageBus().connect();
  connection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED, this);
  connection.subscribe(ProjectLevelVcsManager.VCS_CONFIGURATION_CHANGED_IN_PLUGIN, this);
  myKinds = new HashMap<>();

  final VcsConfiguration vcsConfiguration = VcsConfiguration.getInstance(myProject);
  myControlledCycle = new ControlledCycle(project, new Getter<Boolean>() {
    @Override
    public Boolean get() {
      final boolean shouldBeDone = vcsConfiguration.isChangedOnServerEnabled() && myVcsManager.hasActiveVcss();

      if (shouldBeDone) {
        boolean somethingChanged = myRemoteRevisionsNumbersCache.updateStep();
        somethingChanged |= myRemoteRevisionsStateCache.updateStep();
        if (somethingChanged) {
          ApplicationManager.getApplication().runReadAction(new Runnable() {
            @Override
            public void run() {
              if (!myProject.isDisposed()) {
                myProject.getMessageBus().syncPublisher(REMOTE_VERSION_CHANGED).run();
              }
            }
          });
        }
      }
      return shouldBeDone;
    }
  }, "Finishing \"changed on server\" update", DEFAULT_REFRESH_INTERVAL);

  updateRoots();

  if ((! myProject.isDefault()) && vcsConfiguration.isChangedOnServerEnabled()) {
    ((ProjectLevelVcsManagerImpl) myVcsManager).addInitializationRequest(VcsInitObject.REMOTE_REVISIONS_CACHE,
                                                                         new Runnable() {
                                                                           public void run() {
                                                                             // do not start if there're no vcses
                                                                             if (! myVcsManager.hasActiveVcss() || ! vcsConfiguration. isChangedOnServerEnabled()) return;
                                                                             myControlledCycle.startIfNotStarted(-1);
                                                                           }
                                                                         });
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:53,代码来源:RemoteRevisionsCache.java


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