use of com.intellij.history.core.LocalHistoryFacade in project intellij-community by JetBrains.
the class RevisionsTest method testAfterRevisionForRootEntry.
@Test
public void testAfterRevisionForRootEntry() {
RootEntry root = new RootEntry();
LocalHistoryFacade facade = new InMemoryLocalHistoryFacade();
ChangeSet cs = addChangeSet(facade, createFile(root, "f1"));
addChangeSet(facade, createFile(root, "f2"));
Revision r = new ChangeRevision(facade, root, "", cs, false);
RootEntry e = (RootEntry) r.findEntry();
assertEquals(e.getClass(), RootEntry.class);
assertNotNull(e.findEntry("f1"));
assertNull(e.findEntry("f2"));
}
use of com.intellij.history.core.LocalHistoryFacade in project intellij-community by JetBrains.
the class HistoryDialog method init.
protected void init() {
LocalHistoryFacade facade = LocalHistoryImpl.getInstanceImpl().getFacade();
myModel = createModel(facade);
setTitle(myModel.getTitle());
JComponent root = createComponent();
setComponent(root);
setPreferredFocusedComponent(showRevisionsList() ? myRevisionsList.getComponent() : myDiffView);
myUpdateQueue = new MergingUpdateQueue(getClass() + ".revisionsUpdate", 500, true, root, this, null, false);
myUpdateQueue.setRestartTimerOnAdd(true);
facade.addListener(new LocalHistoryFacade.Listener() {
public void changeSetFinished() {
scheduleRevisionsUpdate(null);
}
}, this);
scheduleRevisionsUpdate(null);
}
use of com.intellij.history.core.LocalHistoryFacade in project intellij-community by JetBrains.
the class LocalHistoryAction method update.
@Override
public void update(@NotNull AnActionEvent e) {
Presentation p = e.getPresentation();
if (e.getProject() == null) {
p.setEnabledAndVisible(false);
} else {
p.setVisible(true);
p.setText(getText(e), true);
LocalHistoryFacade vcs = getVcs();
IdeaGateway gateway = getGateway();
p.setEnabled(vcs != null && gateway != null && isEnabled(vcs, gateway, e));
}
}
Aggregations