本文整理汇总了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);
}
});
}
}
示例2: getChangesNodeDecorator
import com.intellij.openapi.vcs.changes.ui.RemoteStatusChangeNodeDecorator; //导入依赖的package包/类
public RemoteStatusChangeNodeDecorator getChangesNodeDecorator() {
return myChangeDecorator;
}
示例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);
}
});
}
}
示例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);
}
});
}
}