com.intellij.util.Time Java Examples

The following examples show how to use com.intellij.util.Time. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestLineMarkerContributor.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private static Date getSinceDate() {
  return new Date(System.currentTimeMillis() - Time.DAY);
}
 
Example #2
Source File: TestLineMarkerContributor.java    From flutter-intellij with BSD 3-Clause "New" or "Revised" License 4 votes vote down vote up
private static Date getSinceDate() {
  return new Date(System.currentTimeMillis() - Time.DAY);
}
 
Example #3
Source File: TreeUiTest.java    From consulo with Apache License 2.0 4 votes vote down vote up
public void testClear() throws Exception {
  getBuilder().getUi().setClearOnHideDelay(Time.SECOND);

  buildStructure(myRoot);

  assertTree("+/\n");

  final DefaultMutableTreeNode openApiNode = findNode("openapi", false);
  final DefaultMutableTreeNode ideNode = findNode("ide", false);
  final DefaultMutableTreeNode runnerNode = findNode("runner", false);
  final DefaultMutableTreeNode rcpNode = findNode("rcp", false);

  assertNull(openApiNode);
  assertNull(ideNode);
  assertNull(runnerNode);
  assertNull(rcpNode);

  buildNode(myOpenApi, true);
  buildNode(myIde, true);
  buildNode(myRunner, false);

  hideTree();

  assertNull(findNode("openapi", true));
  assertNull(findNode("ide", true));
  assertNull(findNode("runner", false));
  assertNull(findNode("rcp", false));

  showTree();

  assertTree("-/\n" + " -com\n" + "  -intellij\n" + "   [openapi]\n" + " -jetbrains\n" + "  -fabrique\n" + "   [ide]\n" + " +org\n" + " -xUnit\n" + "  runner\n");

  getMyBuilder().myWasCleanedUp = false;
  hideTree();
  showTree();

  assertTree("-/\n" + " -com\n" + "  -intellij\n" + "   [openapi]\n" + " -jetbrains\n" + "  -fabrique\n" + "   [ide]\n" + " +org\n" + " -xUnit\n" + "  runner\n");

  buildNode(myFabrique.myElement, true, false);
  assertTree("-/\n" + " -com\n" + "  -intellij\n" + "   openapi\n" + " -jetbrains\n" + "  -[fabrique]\n" + "   ide\n" + " +org\n" + " -xUnit\n" + "  runner\n");
}