mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 09:03:31 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
+2
-2
@@ -29,9 +29,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
* @author Denis Zhdanov
|
||||
* @since 7/18/13 12:40 PM
|
||||
*/
|
||||
public interface CompilerOptionsManager {
|
||||
public interface CompilerOptionsFilter {
|
||||
|
||||
ExtensionPointName<CompilerOptionsManager> EP_NAME = ExtensionPointName.create("com.intellij.compiler.optionsManager");
|
||||
ExtensionPointName<CompilerOptionsFilter> EP_NAME = ExtensionPointName.create("com.intellij.compiler.optionsManager");
|
||||
|
||||
enum Setting {
|
||||
RESOURCE_PATTERNS, CLEAR_OUTPUT_DIR_ON_REBUILD, ADD_NOT_NULL_ASSERTIONS, AUTO_SHOW_FIRST_ERROR_IN_EDITOR,
|
||||
@@ -40,7 +40,7 @@ import java.awt.event.ItemEvent;
|
||||
import java.awt.event.ItemListener;
|
||||
import java.util.*;
|
||||
|
||||
import static com.intellij.compiler.options.CompilerOptionsManager.*;
|
||||
import static com.intellij.compiler.options.CompilerOptionsFilter.*;
|
||||
|
||||
public class CompilerUIConfigurable implements SearchableConfigurable, Configurable.NoScroll {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.compiler.options.CompilerUIConfigurable");
|
||||
@@ -110,9 +110,9 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
}
|
||||
|
||||
private void tweakControls(@NotNull Project project) {
|
||||
CompilerOptionsManager[] managers = CompilerOptionsManager.EP_NAME.getExtensions();
|
||||
CompilerOptionsFilter[] managers = CompilerOptionsFilter.EP_NAME.getExtensions();
|
||||
boolean showExternalBuildSetting = true;
|
||||
for (CompilerOptionsManager manager : managers) {
|
||||
for (CompilerOptionsFilter manager : managers) {
|
||||
showExternalBuildSetting = manager.isAvailable(Setting.EXTERNAL_BUILD, project);
|
||||
if (!showExternalBuildSetting) {
|
||||
myDisabledSettings.add(Setting.EXTERNAL_BUILD);
|
||||
@@ -126,7 +126,7 @@ public class CompilerUIConfigurable implements SearchableConfigurable, Configura
|
||||
myDisabledSettings.add(setting);
|
||||
}
|
||||
else {
|
||||
for (CompilerOptionsManager manager : managers) {
|
||||
for (CompilerOptionsFilter manager : managers) {
|
||||
if (!manager.isAvailable(setting, project)) {
|
||||
myDisabledSettings.add(setting);
|
||||
break;
|
||||
|
||||
+3
-3
@@ -223,8 +223,8 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se
|
||||
addArtifactsConfig();
|
||||
}
|
||||
|
||||
ProjectStructureConfigurableAdder[] adders = ProjectStructureConfigurableAdder.EP_NAME.getExtensions();
|
||||
for (ProjectStructureConfigurableAdder adder : adders) {
|
||||
ProjectStructureConfigurableContributor[] adders = ProjectStructureConfigurableContributor.EP_NAME.getExtensions();
|
||||
for (ProjectStructureConfigurableContributor adder : adders) {
|
||||
for (Configurable configurable : adder.getExtraProjectConfigurables(myProject, myContext)) {
|
||||
addConfigurable(configurable, true);
|
||||
}
|
||||
@@ -234,7 +234,7 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se
|
||||
addJdkListConfig();
|
||||
addGlobalLibrariesConfig();
|
||||
|
||||
for (ProjectStructureConfigurableAdder adder : adders) {
|
||||
for (ProjectStructureConfigurableContributor adder : adders) {
|
||||
for (Configurable configurable : adder.getExtraPlatformConfigurables(myProject, myContext)) {
|
||||
addConfigurable(configurable, true);
|
||||
}
|
||||
|
||||
+2
-2
@@ -24,8 +24,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ProjectStructureConfigurableAdder {
|
||||
public static final ExtensionPointName<ProjectStructureConfigurableAdder> EP_NAME = ExtensionPointName.create("com.intellij.projectStructureConfigurableAdder");
|
||||
public abstract class ProjectStructureConfigurableContributor {
|
||||
public static final ExtensionPointName<ProjectStructureConfigurableContributor> EP_NAME = ExtensionPointName.create("com.intellij.projectStructureConfigurableAdder");
|
||||
|
||||
@NotNull
|
||||
public List<? extends Configurable> getExtraProjectConfigurables(@NotNull Project project, @NotNull StructureConfigurableContext context) {
|
||||
+1
@@ -20,6 +20,7 @@ import com.intellij.openapi.extensions.ExtensionPoint
|
||||
import com.intellij.openapi.extensions.Extensions
|
||||
import com.intellij.openapi.externalSystem.ExternalSystemManager
|
||||
import com.intellij.openapi.externalSystem.model.DataNode
|
||||
import com.intellij.openapi.externalSystem.model.ProjectSystemId
|
||||
import com.intellij.openapi.externalSystem.model.project.ProjectData
|
||||
import com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManager
|
||||
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil
|
||||
|
||||
+7
-3
@@ -17,6 +17,7 @@ package com.intellij.openapi.externalSystem.test
|
||||
|
||||
import com.intellij.openapi.externalSystem.model.DataNode
|
||||
import com.intellij.openapi.externalSystem.model.ProjectKeys
|
||||
import com.intellij.openapi.externalSystem.model.ProjectSystemId
|
||||
import com.intellij.openapi.externalSystem.model.project.*
|
||||
import com.intellij.openapi.externalSystem.model.task.TaskData
|
||||
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil
|
||||
@@ -58,14 +59,16 @@ class ExternalProjectBuilder extends BuilderSupport {
|
||||
protected Object createNode(Object name, Map attributes) {
|
||||
switch (name) {
|
||||
case 'project':
|
||||
ProjectData projectData = new ProjectData(TEST_EXTERNAL_SYSTEM_ID, projectDir.path, projectDir.path)
|
||||
ProjectSystemId projectSystemId = attributes.projectSystemId ?: TEST_EXTERNAL_SYSTEM_ID
|
||||
ProjectData projectData = new ProjectData(projectSystemId, projectDir.path, projectDir.path)
|
||||
projectData.name = attributes.name ?: 'project'
|
||||
projectNode = new DataNode<ProjectData>(ProjectKeys.PROJECT, projectData, null)
|
||||
return projectNode
|
||||
case 'module':
|
||||
ProjectSystemId projectSystemId = attributes.projectSystemId ?: TEST_EXTERNAL_SYSTEM_ID
|
||||
String moduleFilePath = attributes.moduleFilePath ?: projectDir.path
|
||||
String externalConfigPath = attributes.externalConfigPath ?: projectDir.path
|
||||
ModuleData moduleData = new ModuleData(TEST_EXTERNAL_SYSTEM_ID,
|
||||
ModuleData moduleData = new ModuleData(projectSystemId,
|
||||
ModuleTypeId.JAVA_MODULE,
|
||||
attributes.name ?: name as String,
|
||||
moduleFilePath,
|
||||
@@ -80,7 +83,8 @@ class ExternalProjectBuilder extends BuilderSupport {
|
||||
return parentNode.createChild(ProjectKeys.LIBRARY_DEPENDENCY, data)
|
||||
case 'task':
|
||||
DataNode<ExternalConfigPathAware> parentNode = current as DataNode
|
||||
TaskData data = new TaskData(TEST_EXTERNAL_SYSTEM_ID, attributes.name, parentNode.data.linkedExternalProjectPath, null)
|
||||
ProjectSystemId projectSystemId = attributes.projectSystemId ?: TEST_EXTERNAL_SYSTEM_ID
|
||||
TaskData data = new TaskData(projectSystemId, attributes.name, parentNode.data.linkedExternalProjectPath, null)
|
||||
return parentNode.createChild(ProjectKeys.TASK, data)
|
||||
case 'contentRoot':
|
||||
DataNode<ModuleData> parentNode = current as DataNode
|
||||
|
||||
+1
-1
@@ -115,7 +115,7 @@ public class MavenProjectsManagerWatcher {
|
||||
if (mavenProject != null) {
|
||||
VirtualFile file = mavenProject.getFile();
|
||||
|
||||
if (myManager.isManagedFile(file)) {
|
||||
if (myManager.isManagedFile(file) && myManager.getModules(mavenProject).isEmpty()) {
|
||||
myManager.removeManagedFiles(Collections.singletonList(file));
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -21,9 +21,8 @@ public class OpenLocalTerminalAction extends AnAction implements DumbAware {
|
||||
|
||||
@Override
|
||||
public void update(final AnActionEvent e) {
|
||||
boolean enabled = SystemInfo.isUnix;
|
||||
e.getPresentation().setVisible(enabled);
|
||||
e.getPresentation().setEnabled(enabled);
|
||||
e.getPresentation().setVisible(true);
|
||||
e.getPresentation().setEnabled(true);
|
||||
}
|
||||
|
||||
public void actionPerformed(final AnActionEvent e) {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
interface="com.intellij.compiler.DependencyProcessor"/>
|
||||
|
||||
<extensionPoint name="compiler.optionsManager"
|
||||
interface="com.intellij.compiler.options.CompilerOptionsManager"/>
|
||||
interface="com.intellij.compiler.options.CompilerOptionsFilter"/>
|
||||
|
||||
<extensionPoint name="compiler.resourceCompilerExtension"
|
||||
interface="com.intellij.compiler.impl.resourceCompiler.ResourceCompilerExtension"/>
|
||||
@@ -79,7 +79,7 @@
|
||||
<extensionPoint name="codeInsight.wordCompletionFilter" beanClass="com.intellij.lang.LanguageExtensionPoint"/>
|
||||
|
||||
<extensionPoint name="projectStructureConfigurableFilter" interface="com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurableFilter"/>
|
||||
<extensionPoint name="projectStructureConfigurableAdder" interface="com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurableAdder"/>
|
||||
<extensionPoint name="projectStructureConfigurableAdder" interface="com.intellij.openapi.roots.ui.configuration.ProjectStructureConfigurableContributor"/>
|
||||
|
||||
<extensionPoint name="compiler" area="IDEA_PROJECT" interface="com.intellij.openapi.compiler.Compiler"/>
|
||||
<extensionPoint name="compilerFactory" area="IDEA_PROJECT" interface="com.intellij.openapi.compiler.CompilerFactory"/>
|
||||
|
||||
Reference in New Issue
Block a user