From e28dea8f57cf621e0a15555ae536c35d441a3557 Mon Sep 17 00:00:00 2001 From: irengrig Date: Thu, 29 Oct 2009 18:58:24 +0300 Subject: [PATCH] VCS: mark different queues with annotation. to find later =) --- .../openapi/progress/AbstractTaskQueue.java | 1 + .../openapi/progress/BackgroundTaskQueue.java | 1 + .../openapi/progress/ProgressManagerQueue.java | 1 + .../com/intellij/openapi/progress/SomeQueue.java | 26 ++++++++++++++++++++++ .../vcs/changes/LazyRefreshingSelfQueue.java | 2 ++ .../openapi/vcs/changes/UpdateRequestsQueue.java | 2 ++ .../src/org/jetbrains/idea/svn/RequestsMerger.java | 2 ++ .../jetbrains/idea/svn/history/ZipperUpdater.java | 2 ++ 8 files changed, 37 insertions(+) create mode 100644 platform/platform-api/src/com/intellij/openapi/progress/SomeQueue.java diff --git a/platform/platform-api/src/com/intellij/openapi/progress/AbstractTaskQueue.java b/platform/platform-api/src/com/intellij/openapi/progress/AbstractTaskQueue.java index 0233087d3c..ec5cc5507a 100644 --- a/platform/platform-api/src/com/intellij/openapi/progress/AbstractTaskQueue.java +++ b/platform/platform-api/src/com/intellij/openapi/progress/AbstractTaskQueue.java @@ -21,6 +21,7 @@ import com.intellij.openapi.diagnostic.Logger; import java.util.LinkedList; import java.util.Queue; +@SomeQueue public abstract class AbstractTaskQueue { private final static Logger LOG = Logger.getInstance("#com.intellij.openapi.progress.AbstractTaskQueue"); diff --git a/platform/platform-api/src/com/intellij/openapi/progress/BackgroundTaskQueue.java b/platform/platform-api/src/com/intellij/openapi/progress/BackgroundTaskQueue.java index 19b96d9fba..611e93cf74 100644 --- a/platform/platform-api/src/com/intellij/openapi/progress/BackgroundTaskQueue.java +++ b/platform/platform-api/src/com/intellij/openapi/progress/BackgroundTaskQueue.java @@ -27,6 +27,7 @@ import java.util.Queue; /** * @author yole */ +@SomeQueue public class BackgroundTaskQueue { private final Project myProject; private final Queue myQueue = new LinkedList(); diff --git a/platform/platform-api/src/com/intellij/openapi/progress/ProgressManagerQueue.java b/platform/platform-api/src/com/intellij/openapi/progress/ProgressManagerQueue.java index ca84323f4d..144b6cd364 100644 --- a/platform/platform-api/src/com/intellij/openapi/progress/ProgressManagerQueue.java +++ b/platform/platform-api/src/com/intellij/openapi/progress/ProgressManagerQueue.java @@ -20,6 +20,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; import org.jetbrains.annotations.NotNull; +@SomeQueue public class ProgressManagerQueue extends AbstractTaskQueue { private final ProgressManager myProgressManager; private final Task.Backgroundable myTask; diff --git a/platform/platform-api/src/com/intellij/openapi/progress/SomeQueue.java b/platform/platform-api/src/com/intellij/openapi/progress/SomeQueue.java new file mode 100644 index 0000000000..3f1c67a03e --- /dev/null +++ b/platform/platform-api/src/com/intellij/openapi/progress/SomeQueue.java @@ -0,0 +1,26 @@ +/* + * Copyright 2000-2009 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.openapi.progress; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.SOURCE) +@Target({ElementType.TYPE}) +public @interface SomeQueue { +} diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LazyRefreshingSelfQueue.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LazyRefreshingSelfQueue.java index 2d4cf89fa0..1108842a80 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LazyRefreshingSelfQueue.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/LazyRefreshingSelfQueue.java @@ -18,6 +18,7 @@ package com.intellij.openapi.vcs.changes; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; +import com.intellij.openapi.progress.SomeQueue; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.Pair; import com.intellij.util.Consumer; @@ -31,6 +32,7 @@ import java.util.*; * 2. if checker returns TRUE -> those whose timestamp is older than required * */ +@SomeQueue public class LazyRefreshingSelfQueue { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.LazyRefreshingSelfQueue"); diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdateRequestsQueue.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdateRequestsQueue.java index 2f8b9ae50f..29cbfd9429 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdateRequestsQueue.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/UpdateRequestsQueue.java @@ -21,6 +21,7 @@ import com.intellij.lifecycle.ScheduledSlowlyClosingAlarm; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.SomeQueue; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupManager; import com.intellij.openapi.vcs.ProjectLevelVcsManager; @@ -36,6 +37,7 @@ import java.util.concurrent.ScheduledExecutorService; * Tries to zip several update requests into one (if starts and see several requests in the queue) * own inner synchronization */ +@SomeQueue public class UpdateRequestsQueue { private final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.changes.UpdateRequestsQueue"); private final Project myProject; diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/RequestsMerger.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/RequestsMerger.java index a50480d7fb..6498bef75e 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/RequestsMerger.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/RequestsMerger.java @@ -16,6 +16,7 @@ package org.jetbrains.idea.svn; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.SomeQueue; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.Consumer; @@ -36,6 +37,7 @@ import java.util.Map; * - if request had been submitted while refresh action was in progress, new refresh action is initiated right after first refresh action finishes * */ +@SomeQueue public class RequestsMerger { private static final Logger LOG = Logger.getInstance("#org.jetbrains.idea.svn.RequestsMerger"); private static final int ourDelay = 300; diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/ZipperUpdater.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/ZipperUpdater.java index 20f254cd79..82db8ca8d3 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/ZipperUpdater.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/ZipperUpdater.java @@ -15,8 +15,10 @@ */ package org.jetbrains.idea.svn.history; +import com.intellij.openapi.progress.SomeQueue; import com.intellij.util.Alarm; +@SomeQueue public class ZipperUpdater { private final Alarm myAlarm; private boolean myRaised; -- 2.11.4.GIT