private void runStatisticsService() { StatisticsService statisticsService = StatisticsUploadAssistant.getStatisticsService(); if (System.currentTimeMillis() - Time.DAY > ((FeatureUsageTrackerImpl)FeatureUsageTracker.getInstance()).getFirstRunTime()) { return; } if (StatisticsUploadAssistant.isSendAllowed() && StatisticsUploadAssistant.isTimeToSend()) { runWithDelay(statisticsService); } }
public static boolean isShouldShowNotification() { return UsageStatisticsPersistenceComponent.getInstance().isShowNotification() && (System.currentTimeMillis() - Time.DAY > ((FeatureUsageTrackerImpl)FeatureUsageTracker.getInstance()).getFirstRunTime()); }
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"); }
public static boolean showNotification() { return UsageStatisticsPersistenceComponent.getInstance().isShowNotification() && (System.currentTimeMillis() - Time.DAY > ((FeatureUsageTrackerImpl)FeatureUsageTracker.getInstance()).getFirstRunTime()) ; }