From aaed1ccb910f6f4a9ea2f96894d99b6e35a59ef9 Mon Sep 17 00:00:00 2001 From: Daniil Ovchinnikov Date: Tue, 3 Apr 2018 15:22:12 +0200 Subject: [PATCH] make Query accept wildcard processor: update query executor base classes --- .../application/QueryExecutorBase.java | 20 +++---------------- .../src/com/intellij/util/QueryExecutor.java | 18 ++--------------- 2 files changed, 5 insertions(+), 33 deletions(-) diff --git a/platform/core-api/src/com/intellij/openapi/application/QueryExecutorBase.java b/platform/core-api/src/com/intellij/openapi/application/QueryExecutorBase.java index 57678d33f877..6d4f3ce734f6 100644 --- a/platform/core-api/src/com/intellij/openapi/application/QueryExecutorBase.java +++ b/platform/core-api/src/com/intellij/openapi/application/QueryExecutorBase.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 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. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.application; import com.intellij.openapi.project.DumbService; @@ -56,7 +42,7 @@ public abstract class QueryExecutorBase implements QueryExecutor } @Override - public final boolean execute(@NotNull final Params queryParameters, @NotNull final Processor consumer) { + public final boolean execute(@NotNull final Params queryParameters, @NotNull final Processor consumer) { final AtomicBoolean toContinue = new AtomicBoolean(true); final Processor wrapper = result -> { if (!toContinue.get()) { @@ -97,5 +83,5 @@ public abstract class QueryExecutorBase implements QueryExecutor /** * Find some results according to queryParameters and feed them to consumer. If consumer returns false, stop. */ - public abstract void processQuery(@NotNull Params queryParameters, @NotNull Processor consumer); + public abstract void processQuery(@NotNull Params queryParameters, @NotNull Processor consumer); } diff --git a/platform/core-api/src/com/intellij/util/QueryExecutor.java b/platform/core-api/src/com/intellij/util/QueryExecutor.java index 63eec6c45d2a..f4efc2b81df8 100644 --- a/platform/core-api/src/com/intellij/util/QueryExecutor.java +++ b/platform/core-api/src/com/intellij/util/QueryExecutor.java @@ -1,18 +1,4 @@ -/* - * 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. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.util; import org.jetbrains.annotations.NotNull; @@ -30,5 +16,5 @@ public interface QueryExecutor { * Find some results according to queryParameters and feed them to consumer. If consumer returns false, stop. * @return false if the searching should be stopped immediately. This should happen only when consumer has returned false. */ - boolean execute(@NotNull Param queryParameters, @NotNull Processor consumer); + boolean execute(@NotNull Param queryParameters, @NotNull Processor consumer); }