mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
deprecate Extensions.getExtensions(ExtensionPointName, AreaInstance) in favour of ExtensionPointName.getExtensionList(AreaInstance)
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2017 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.
|
||||
*/
|
||||
// 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.compiler;
|
||||
|
||||
import com.intellij.CommonBundle;
|
||||
@@ -24,7 +22,6 @@ import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleManager;
|
||||
@@ -453,7 +450,7 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
|
||||
}
|
||||
|
||||
final Set<FileType> types = new HashSet<>();
|
||||
for (BackendCompiler compiler : Extensions.getExtensions(BackendCompiler.EP_NAME, myProject)) {
|
||||
for (BackendCompiler compiler : BackendCompiler.EP_NAME.getExtensions(myProject)) {
|
||||
myRegisteredCompilers.add(compiler);
|
||||
types.addAll(compiler.getCompilableFileTypes());
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.intellij.openapi.compiler.*;
|
||||
import com.intellij.openapi.compiler.util.InspectionValidator;
|
||||
import com.intellij.openapi.compiler.util.InspectionValidatorWrapper;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.fileTypes.FileType;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
import com.intellij.openapi.module.Module;
|
||||
@@ -72,7 +71,7 @@ public class CompilerManagerImpl extends CompilerManager {
|
||||
myEventPublisher = messageBus.syncPublisher(CompilerTopics.COMPILATION_STATUS);
|
||||
|
||||
// predefined compilers
|
||||
for(Compiler compiler: Extensions.getExtensions(Compiler.EP_NAME, myProject)) {
|
||||
for(Compiler compiler: Compiler.EP_NAME.getExtensions(myProject)) {
|
||||
addCompiler(compiler);
|
||||
}
|
||||
for (CompilerFactory factory : CompilerFactory.EP_NAME.getExtensionList(project)) {
|
||||
|
||||
@@ -1,23 +1,8 @@
|
||||
/*
|
||||
* 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.compiler.options;
|
||||
|
||||
import com.intellij.compiler.CompilerSettingsFactory;
|
||||
import com.intellij.openapi.compiler.CompilerBundle;
|
||||
import com.intellij.openapi.extensions.Extensions;
|
||||
import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.options.SearchableConfigurable;
|
||||
@@ -89,7 +74,7 @@ public class CompilerConfigurable implements SearchableConfigurable.Parent, Conf
|
||||
@Override
|
||||
public Configurable[] getConfigurables() {
|
||||
if (myKids == null) {
|
||||
final CompilerSettingsFactory[] factories = Extensions.getExtensions(CompilerSettingsFactory.EP_NAME, myProject);
|
||||
final CompilerSettingsFactory[] factories = CompilerSettingsFactory.EP_NAME.getExtensions(myProject);
|
||||
myKids = ContainerUtil.mapNotNull(factories,
|
||||
(NullableFunction<CompilerSettingsFactory, Configurable>)factory -> factory.create(myProject), new Configurable[0]);
|
||||
}
|
||||
|
||||
@@ -1,22 +1,8 @@
|
||||
/*
|
||||
* 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.openapi.compiler;
|
||||
|
||||
import com.intellij.openapi.extensions.ProjectExtensionPointName;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
|
||||
/**
|
||||
* Base interface for a custom compiler which participates in the IDEA build process.
|
||||
@@ -25,8 +11,8 @@ import com.intellij.openapi.extensions.ExtensionPointName;
|
||||
* @see CompilerManager#removeCompiler(Compiler)
|
||||
*/
|
||||
public interface Compiler {
|
||||
ExtensionPointName<Compiler> EP_NAME = ExtensionPointName.create("com.intellij.compiler");
|
||||
|
||||
ProjectExtensionPointName<Compiler> EP_NAME = new ProjectExtensionPointName<>("com.intellij.compiler");
|
||||
|
||||
/**
|
||||
* Returns the description of the compiler. All registered compilers should have unique description.
|
||||
*
|
||||
@@ -37,7 +23,7 @@ public interface Compiler {
|
||||
|
||||
/**
|
||||
* Called before compilation starts. If at least one of registered compilers returned false, compilation won't start.
|
||||
*
|
||||
*
|
||||
* @param scope the scope on which the compilation is started.
|
||||
* @return true if everything is ok, false otherwise
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user