mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
skipForDefaultProject = true by default
This commit is contained in:
+2
-3
@@ -81,7 +81,6 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se
|
||||
}
|
||||
|
||||
private final Project myProject;
|
||||
private final ModuleManager myModuleManager;
|
||||
private final FacetStructureConfigurable myFacetStructureConfigurable;
|
||||
private final ArtifactsStructureConfigurable myArtifactsStructureConfigurable;
|
||||
|
||||
@@ -109,13 +108,13 @@ public class ProjectStructureConfigurable extends BaseConfigurable implements Se
|
||||
|
||||
private final JLabel myEmptySelection = new JLabel("<html><body><center>Select a setting to view or edit its details here</center></body></html>", JLabel.CENTER);
|
||||
|
||||
public ProjectStructureConfigurable(final Project project, final ModuleManager moduleManager, final ProjectLibrariesConfigurable projectLibrariesConfigurable,
|
||||
public ProjectStructureConfigurable(final Project project,
|
||||
final ProjectLibrariesConfigurable projectLibrariesConfigurable,
|
||||
final GlobalLibrariesConfigurable globalLibrariesConfigurable,
|
||||
final ModuleStructureConfigurable moduleStructureConfigurable,
|
||||
FacetStructureConfigurable facetStructureConfigurable,
|
||||
ArtifactsStructureConfigurable artifactsStructureConfigurable) {
|
||||
myProject = project;
|
||||
myModuleManager = moduleManager;
|
||||
myFacetStructureConfigurable = facetStructureConfigurable;
|
||||
myArtifactsStructureConfigurable = artifactsStructureConfigurable;
|
||||
|
||||
|
||||
@@ -37,10 +37,12 @@ public class ComponentConfig {
|
||||
@Tag("headless-implementation-class")
|
||||
public String headlessImplementationClass;
|
||||
|
||||
//todo: empty tag means TRUE
|
||||
@Tag(value = "skipForDefaultProject", textIfEmpty="true")
|
||||
public boolean skipForDefaultProject;
|
||||
|
||||
@Tag(value = "loadForDefaultProject", textIfEmpty="true")
|
||||
public boolean loadForDefaultProject;
|
||||
|
||||
@Property(surroundWithTag = false)
|
||||
@MapAnnotation(surroundWithTag = false, entryTagName = "option", keyAttributeName = "name", valueAttributeName = "value")
|
||||
public Map<String,String> options = new HashMap<String, String>();
|
||||
|
||||
+5
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 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.
|
||||
@@ -32,7 +32,10 @@ class ComponentManagerConfigurator {
|
||||
}
|
||||
|
||||
private void loadSingleConfig(final boolean defaultProject, final ComponentConfig config, final PluginDescriptor descriptor) {
|
||||
if (defaultProject && config.skipForDefaultProject) return;
|
||||
if (defaultProject) {
|
||||
if (config.skipForDefaultProject || !config.loadForDefaultProject)
|
||||
return;
|
||||
}
|
||||
if (!myComponentManager.isComponentSuitable(config.options)) return;
|
||||
|
||||
myComponentManager.registerComponent(config, descriptor);
|
||||
|
||||
@@ -29,7 +29,6 @@ import com.intellij.openapi.fileEditor.FileEditorManagerEvent;
|
||||
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Disposer;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.openapi.wm.WindowManager;
|
||||
import com.intellij.openapi.wm.ex.WindowManagerEx;
|
||||
import com.intellij.openapi.wm.impl.IdeFrameImpl;
|
||||
@@ -52,9 +51,6 @@ public class EditorTracker extends AbstractProjectComponent {
|
||||
private final WindowManager myWindowManager;
|
||||
private final EditorFactory myEditorFactory;
|
||||
|
||||
@SuppressWarnings({"FieldCanBeLocal", "UnusedDeclaration"})
|
||||
private final ToolWindowManager myToolwindowManager;
|
||||
|
||||
private final Map<Window, List<Editor>> myWindowToEditorsMap = new HashMap<Window, List<Editor>>();
|
||||
private final Map<Window, WindowFocusListener> myWindowToWindowFocusListenerMap = new HashMap<Window, WindowFocusListener>();
|
||||
private final Map<Editor, Window> myEditorToWindowMap = new HashMap<Editor, Window>();
|
||||
@@ -65,14 +61,12 @@ public class EditorTracker extends AbstractProjectComponent {
|
||||
private IdeFrameImpl myIdeFrame;
|
||||
private Window myActiveWindow = null;
|
||||
|
||||
//todo:
|
||||
//toolwindow manager is unfortunately needed since
|
||||
//it actually initializes frame in WindowManager
|
||||
public EditorTracker(Project project, final WindowManager windowManager, final EditorFactory editorFactory, ToolWindowManager toolwindowManager) {
|
||||
public EditorTracker(Project project,
|
||||
final WindowManager windowManager,
|
||||
final EditorFactory editorFactory) {
|
||||
super(project);
|
||||
myWindowManager = windowManager;
|
||||
myEditorFactory = editorFactory;
|
||||
myToolwindowManager = toolwindowManager;
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
|
||||
@@ -29,8 +29,6 @@ public abstract class DirectoryIndex {
|
||||
return ServiceManager.getService(project, DirectoryIndex.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@TestOnly
|
||||
public abstract void checkConsistency();
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -47,6 +48,8 @@ public class ChangeListsScopesProvider implements CustomScopesProvider {
|
||||
@NotNull
|
||||
@Override
|
||||
public List<NamedScope> getCustomScopes() {
|
||||
|
||||
if (myProject.isDefault()) return Collections.emptyList();
|
||||
final ChangeListManager changeListManager = ChangeListManager.getInstance(myProject);
|
||||
|
||||
final List<NamedScope> result = new ArrayList<NamedScope>();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.util;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -24,11 +24,11 @@ public abstract class PropertiesComponent {
|
||||
public abstract void unsetValue(String name);
|
||||
|
||||
public static PropertiesComponent getInstance(Project project) {
|
||||
return project.getComponent(PropertiesComponent.class);
|
||||
return ServiceManager.getService(project, PropertiesComponent.class);
|
||||
}
|
||||
|
||||
public static PropertiesComponent getInstance() {
|
||||
return ApplicationManager.getApplication().getComponent(PropertiesComponent.class);
|
||||
return ServiceManager.getService(PropertiesComponent.class);
|
||||
}
|
||||
|
||||
public final boolean isTrueValue(@NonNls String name) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2011 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.
|
||||
|
||||
@@ -43,7 +43,12 @@ public class ShowSettingsUtilImpl extends ShowSettingsUtil {
|
||||
private static final String PREFER_CLASSIC_OPTIONS_EDITOR = "PREFER_CLASSIC_OPTIONS_EDITOR";
|
||||
|
||||
public void showSettingsDialog(Project project, ConfigurableGroup[] group) {
|
||||
_showSettingsDialog(project, group, null);
|
||||
try {
|
||||
_showSettingsDialog(project, group, null);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static void _showSettingsDialog(final Project project, ConfigurableGroup[] group, Configurable toSelect) {
|
||||
@@ -144,7 +149,7 @@ public class ShowSettingsUtilImpl extends ShowSettingsUtil {
|
||||
return ConfigurableExtensionPointUtil.findProjectConfigurable(project, confClass);
|
||||
}
|
||||
|
||||
public boolean editConfigurable(Project project, String dimensionServiceKey, Configurable configurable) {
|
||||
public boolean editConfigurable(Project project, String dimensionServiceKey, @NotNull Configurable configurable) {
|
||||
return editConfigurable(null, project, configurable, dimensionServiceKey, null);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.ide.util;
|
||||
|
||||
import com.intellij.openapi.components.ApplicationComponent;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
|
||||
@@ -23,10 +22,5 @@ import com.intellij.openapi.components.Storage;
|
||||
name = "PropertiesComponent",
|
||||
storages = {@Storage(
|
||||
file = "$APP_CONFIG$/options.xml")})
|
||||
public class AppPropertiesComponentImpl extends PropertiesComponentImpl implements ApplicationComponent {
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
public class AppPropertiesComponentImpl extends PropertiesComponentImpl {
|
||||
}
|
||||
|
||||
+1
-13
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.ide.util;
|
||||
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
|
||||
@@ -23,16 +22,5 @@ import com.intellij.openapi.components.Storage;
|
||||
name = "PropertiesComponent",
|
||||
storages = {@Storage(
|
||||
file = "$WORKSPACE_FILE$")})
|
||||
public class ProjectPropertiesComponentImpl extends PropertiesComponentImpl implements ProjectComponent {
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
public class ProjectPropertiesComponentImpl extends PropertiesComponentImpl {
|
||||
}
|
||||
|
||||
@@ -2,6 +2,11 @@
|
||||
<errorHandler implementation="com.intellij.diagnostic.ITNReporter"/>
|
||||
<appStarter implementation="com.intellij.openapi.diff.DiffApplication"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.AppPropertiesComponentImpl"/>
|
||||
<projectService serviceInterface="com.intellij.ide.util.PropertiesComponent"
|
||||
serviceImplementation="com.intellij.ide.util.ProjectPropertiesComponentImpl"/>
|
||||
|
||||
<applicationService serviceInterface="com.intellij.openapi.actionSystem.JBAwtEventQueue"
|
||||
serviceImplementation="com.intellij.openapi.actionSystem.impl.JBAwtEventQueueImpl"/>
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
serviceImplementation="com.intellij.openapi.vcs.IssueNavigationConfiguration"/>
|
||||
<projectService serviceInterface="com.intellij.openapi.diff.DirDiffManager"
|
||||
serviceImplementation="com.intellij.openapi.diff.impl.dir.DirDiffManagerImpl"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.VcsConfiguration"/>
|
||||
<projectService serviceImplementation="com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationSettings"/>
|
||||
|
||||
<selectInTarget implementation="com.intellij.openapi.vcs.changes.SelectInChangesViewTarget"/>
|
||||
|
||||
|
||||
@@ -40,24 +40,29 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.roots.ProjectRootManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.roots.impl.ProjectRootManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.roots.impl.DirectoryIndex</interface-class>
|
||||
<implementation-class>com.intellij.openapi.roots.impl.DirectoryIndexImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.psi.PsiManager</interface-class>
|
||||
<implementation-class>com.intellij.psi.impl.PsiManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<interface-class>com.intellij.psi.PsiDocumentManager</interface-class>
|
||||
<implementation-class>com.intellij.psi.impl.PsiDocumentManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.module.ModuleManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.module.impl.ModuleManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
@@ -87,9 +92,11 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.pom.tree.TreeAspect</interface-class>
|
||||
<implementation-class>com.intellij.pom.tree.TreeAspect</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.psi.impl.source.PostprocessReformattingAspect</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
<!-- <skipForDefaultProject/> -->
|
||||
</component>
|
||||
|
||||
@@ -97,9 +104,11 @@
|
||||
<interface-class>com.intellij.codeInsight.daemon.DaemonCodeAnalyzer</interface-class>
|
||||
<implementation-class>com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.codeInsight.daemon.impl.EditorTracker</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.codeInsight.daemon.impl.GeneralHighlightingPassFactory</implementation-class>
|
||||
@@ -176,6 +185,7 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.pom.wrappers.PsiEventWrapperAspect</interface-class>
|
||||
<implementation-class>com.intellij.pom.wrappers.PsiEventWrapperAspect</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
||||
@@ -5,11 +5,6 @@
|
||||
<implementation-class>com.intellij.openapi.application.impl.ApplicationInfoImpl</implementation-class>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.ide.util.PropertiesComponent</interface-class>
|
||||
<implementation-class>com.intellij.ide.util.AppPropertiesComponentImpl</implementation-class>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.fileTypes.FileTypeManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.fileTypes.impl.FileTypeManagerImpl</implementation-class>
|
||||
@@ -132,12 +127,6 @@
|
||||
</application-components>
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
<interface-class>com.intellij.ide.util.PropertiesComponent</interface-class>
|
||||
<implementation-class>com.intellij.ide.util.ProjectPropertiesComponentImpl</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<implementation-class>com.intellij.notification.EventLog$ProjectTracker</implementation-class>
|
||||
<skipForDefaultProject/>
|
||||
@@ -157,6 +146,7 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.vcs.FileStatusManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.impl.FileStatusManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
@@ -166,6 +156,7 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.vfs.encoding.EncodingProjectManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vfs.encoding.EncodingProjectManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.components.impl.ServiceManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.platform.FilesystemToolwindowOpener</implementation-class>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.components.impl.ServiceManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
</project-components>
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.profile.codeInspection.InspectionProjectProfileManager</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
</project-components>
|
||||
</components>
|
||||
@@ -11,14 +11,11 @@
|
||||
</component>
|
||||
</application-components>
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.vcs.VcsConfiguration</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
</component>
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.vcs.ProjectLevelVcsManager</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.impl.ProjectLevelVcsManagerImpl</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.vcs.changes.VcsChangeDetailsManager</interface-class>
|
||||
@@ -105,9 +102,6 @@
|
||||
<component><interface-class>com.intellij.openapi.vcs.impl.VcsBaseContentProvider</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.impl.VcsFileStatusProvider</implementation-class>
|
||||
</component>
|
||||
<component><interface-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationSettings</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationSettings</implementation-class>
|
||||
</component>
|
||||
<component><interface-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotation</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vcs.contentAnnotation.VcsContentAnnotationImpl</implementation-class></component>
|
||||
<component><interface-class>com.intellij.openapi.vcs.contentAnnotation.ContentAnnotationCache</interface-class>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.pom.xml.XmlAspect</interface-class>
|
||||
<implementation-class>com.intellij.pom.xml.impl.XmlAspectImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
||||
@@ -16,9 +16,8 @@
|
||||
package com.intellij.openapi.vcs;
|
||||
|
||||
import com.intellij.ide.todo.TodoPanelSettings;
|
||||
import com.intellij.lifecycle.PeriodicalTasksCloser;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
@@ -49,7 +48,7 @@ import java.util.List;
|
||||
)
|
||||
}
|
||||
)
|
||||
public final class VcsConfiguration implements PersistentStateComponent<Element>, ProjectComponent {
|
||||
public final class VcsConfiguration implements PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.VcsConfiguration");
|
||||
|
||||
@NonNls private static final String VALUE_ATTR = "value";
|
||||
@@ -144,10 +143,6 @@ public final class VcsConfiguration implements PersistentStateComponent<Element>
|
||||
private final PerformInBackgroundOption myCheckoutOption = new CheckoutInBackgroundOption();
|
||||
private final PerformInBackgroundOption myAddRemoveOption = new AddRemoveInBackgroundOption();
|
||||
|
||||
public static VcsConfiguration createEmptyConfiguration() {
|
||||
return new VcsConfiguration();
|
||||
}
|
||||
|
||||
private VcsConfiguration() {
|
||||
}
|
||||
|
||||
@@ -219,28 +214,7 @@ public final class VcsConfiguration implements PersistentStateComponent<Element>
|
||||
}
|
||||
|
||||
public static VcsConfiguration getInstance(Project project) {
|
||||
return PeriodicalTasksCloser.getInstance().safeGetComponent(project, VcsConfiguration.class);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "VcsManagerConfiguration";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
|
||||
return ServiceManager.getService(project, VcsConfiguration.class);
|
||||
}
|
||||
|
||||
public void saveCommitMessage(final String comment) {
|
||||
|
||||
+6
-2
@@ -127,12 +127,16 @@ public class VcsManagerConfigurable extends SearchableConfigurable.Parent.Abstra
|
||||
|
||||
result.add(myGeneralPanel);
|
||||
result.add(new VcsBackgroundOperationsConfigurationPanel(myProject));
|
||||
result.add(new IgnoredSettingsPanel(myProject));
|
||||
if (!myProject.isDefault()) {
|
||||
result.add(new IgnoredSettingsPanel(myProject));
|
||||
}
|
||||
/*if (!myProject.isDefault()) {
|
||||
result.add(new CacheSettingsPanel(myProject));
|
||||
}*/
|
||||
result.add(new IssueNavigationConfigurationPanel(myProject));
|
||||
result.add(new ChangelistConflictConfigurable(ChangeListManagerImpl.getInstanceImpl(myProject)));
|
||||
if (!myProject.isDefault()) {
|
||||
result.add(new ChangelistConflictConfigurable(ChangeListManagerImpl.getInstanceImpl(myProject)));
|
||||
}
|
||||
VcsDescriptor[] vcses = ProjectLevelVcsManager.getInstance(myProject).getAllVcss();
|
||||
|
||||
if (vcses.length > 0) {
|
||||
|
||||
@@ -94,6 +94,7 @@ public class AllVcses implements AllVcsesI, Disposable {
|
||||
final VcsEP ep = myExtensions.get(name);
|
||||
if (ep != null) {
|
||||
final AbstractVcs vcs1 = ep.getVcs(myProject);
|
||||
LOG.assertTrue(vcs1 != null, name);
|
||||
addVcs(vcs1);
|
||||
return vcs1;
|
||||
}
|
||||
|
||||
+4
-1
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.jetbrains.android.dom;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.impl.source.xml.XmlElementDescriptorProvider;
|
||||
@@ -70,7 +71,9 @@ public class AndroidDomElementDescriptorProvider implements XmlElementDescriptor
|
||||
}
|
||||
|
||||
public XmlElementDescriptor getDescriptor(XmlTag tag) {
|
||||
final DomElement domElement = DomManager.getDomManager(tag.getProject()).getDomElement(tag);
|
||||
Project project = tag.getProject();
|
||||
if (project.isDefault()) return null;
|
||||
final DomElement domElement = DomManager.getDomManager(project).getDomElement(tag);
|
||||
String className = null;
|
||||
if (domElement instanceof LayoutViewElement) {
|
||||
className = AndroidUtils.VIEW_CLASS_NAME;
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.maddyhome.idea.copyright.CopyrightManager</implementation-class>
|
||||
<implementation-class>com.maddyhome.idea.copyright.CopyrightManager</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
</project-components>
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ import com.intellij.execution.ui.ConsoleViewContentType;
|
||||
import com.intellij.notification.NotificationGroup;
|
||||
import com.intellij.notification.impl.NotificationsConfiguration;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.diff.impl.patch.formove.FilePathComparator;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
@@ -95,7 +96,7 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
|
||||
private static final VcsKey ourKey = createKey(NAME);
|
||||
|
||||
private final ChangeProvider myChangeProvider;
|
||||
private final CheckinEnvironment myCheckinEnvironment;
|
||||
private final GitCheckinEnvironment myCheckinEnvironment;
|
||||
private final RollbackEnvironment myRollbackEnvironment;
|
||||
private final GitUpdateEnvironment myUpdateEnvironment;
|
||||
private final GitAnnotationProvider myAnnotationProvider;
|
||||
@@ -137,8 +138,6 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
|
||||
}
|
||||
|
||||
public GitVcs(@NotNull Project project,
|
||||
@NotNull final GitChangeProvider gitChangeProvider,
|
||||
@NotNull final GitCheckinEnvironment gitCheckinEnvironment,
|
||||
@NotNull final ProjectLevelVcsManager gitVcsManager,
|
||||
@NotNull final GitAnnotationProvider gitAnnotationProvider,
|
||||
@NotNull final GitDiffProvider gitDiffProvider,
|
||||
@@ -149,8 +148,8 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
|
||||
super(project, NAME);
|
||||
myVcsManager = gitVcsManager;
|
||||
myAppSettings = gitSettings;
|
||||
myChangeProvider = gitChangeProvider;
|
||||
myCheckinEnvironment = gitCheckinEnvironment;
|
||||
myChangeProvider = project.isDefault() ? null : ServiceManager.getService(project, GitChangeProvider.class);
|
||||
myCheckinEnvironment = project.isDefault() ? null : ServiceManager.getService(project, GitCheckinEnvironment.class);
|
||||
myAnnotationProvider = gitAnnotationProvider;
|
||||
myDiffProvider = gitDiffProvider;
|
||||
myHistoryProvider = gitHistoryProvider;
|
||||
@@ -163,7 +162,7 @@ public class GitVcs extends AbstractVcs<CommittedChangeList> {
|
||||
myCommittedChangeListProvider = new GitCommittedChangeListProvider(myProject);
|
||||
myOutgoingChangesProvider = new GitOutgoingChangesProvider(myProject);
|
||||
myTreeDiffProvider = new GitTreeDiffProvider(myProject);
|
||||
myCommitAndPushExecutor = new GitCommitAndPushExecutor(gitCheckinEnvironment);
|
||||
myCommitAndPushExecutor = new GitCommitAndPushExecutor(myCheckinEnvironment);
|
||||
myReferenceTracker = new GitReferenceTracker(myProject, this, myReferenceListeners.getMulticaster());
|
||||
myTaskQueue = new BackgroundTaskQueue(myProject, GitBundle.getString("task.queue.title"));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ package org.jetbrains.idea.maven.execution;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.fileEditor.FileDocumentManager;
|
||||
@@ -33,20 +34,20 @@ import org.jetbrains.idea.maven.project.MavenConsoleImpl;
|
||||
import org.jetbrains.idea.maven.project.MavenGeneralSettings;
|
||||
import org.jetbrains.idea.maven.project.MavenProjectsManager;
|
||||
import org.jetbrains.idea.maven.utils.MavenLog;
|
||||
import org.jetbrains.idea.maven.utils.SimpleProjectComponent;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@State(name = "MavenRunner", storages = {@Storage( file = "$WORKSPACE_FILE$")})
|
||||
public class MavenRunner extends SimpleProjectComponent implements PersistentStateComponent<MavenRunnerSettings> {
|
||||
public class MavenRunner implements PersistentStateComponent<MavenRunnerSettings> {
|
||||
private MavenRunnerSettings mySettings = new MavenRunnerSettings();
|
||||
private final Project myProject;
|
||||
|
||||
public static MavenRunner getInstance(Project project) {
|
||||
return project.getComponent(MavenRunner.class);
|
||||
return ServiceManager.getService(project, MavenRunner.class);
|
||||
}
|
||||
|
||||
public MavenRunner(final Project project) {
|
||||
super(project);
|
||||
myProject = project;
|
||||
}
|
||||
|
||||
public MavenRunnerSettings getSettings() {
|
||||
|
||||
+3
-7
@@ -16,21 +16,17 @@
|
||||
package org.jetbrains.idea.maven.project;
|
||||
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import org.jetbrains.idea.maven.utils.SimpleProjectComponent;
|
||||
|
||||
@State(name = "MavenImportPreferences", storages = {@Storage( file = "$WORKSPACE_FILE$")})
|
||||
public class MavenWorkspaceSettingsComponent extends SimpleProjectComponent implements PersistentStateComponent<MavenWorkspaceSettings> {
|
||||
public class MavenWorkspaceSettingsComponent implements PersistentStateComponent<MavenWorkspaceSettings> {
|
||||
private MavenWorkspaceSettings mySettings = new MavenWorkspaceSettings();
|
||||
|
||||
public static MavenWorkspaceSettingsComponent getInstance(Project project) {
|
||||
return project.getComponent(MavenWorkspaceSettingsComponent.class);
|
||||
}
|
||||
|
||||
public MavenWorkspaceSettingsComponent(Project project) {
|
||||
super(project);
|
||||
return ServiceManager.getService(project, MavenWorkspaceSettingsComponent.class);
|
||||
}
|
||||
|
||||
public MavenWorkspaceSettings getState() {
|
||||
|
||||
@@ -103,6 +103,9 @@
|
||||
|
||||
<annotator language="XML" implementationClass="org.jetbrains.idea.maven.dom.annotator.MavenDomGutterAnnotator"/>
|
||||
<virtualFileSystem key="maven-properties" implementationClass="org.jetbrains.idea.maven.vfs.MavenPropertiesVirtualFileSystem"/>
|
||||
|
||||
<projectService serviceImplementation="org.jetbrains.idea.maven.project.MavenWorkspaceSettingsComponent"/>
|
||||
<projectService serviceImplementation="org.jetbrains.idea.maven.execution.MavenRunner"/>
|
||||
</extensions>
|
||||
|
||||
<application-components>
|
||||
@@ -112,16 +115,9 @@
|
||||
</application-components>
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.maven.project.MavenWorkspaceSettingsComponent</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.maven.project.MavenProjectsManager</implementation-class>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.maven.execution.MavenRunner</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.maven.indices.MavenProjectIndicesManager</implementation-class>
|
||||
|
||||
@@ -1,22 +1,4 @@
|
||||
<idea-plugin xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<application-components>
|
||||
<component>
|
||||
<interface-class>com.intellij.spellchecker.state.CachedDictionaryState</interface-class>
|
||||
<implementation-class>com.intellij.spellchecker.state.CachedDictionaryState</implementation-class>
|
||||
</component>
|
||||
</application-components>
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
<interface-class>com.intellij.spellchecker.state.ProjectDictionaryState</interface-class>
|
||||
<implementation-class>com.intellij.spellchecker.state.ProjectDictionaryState</implementation-class>
|
||||
</component>
|
||||
<component>
|
||||
<interface-class>com.intellij.spellchecker.state.AggregatedDictionaryState</interface-class>
|
||||
<implementation-class>com.intellij.spellchecker.state.AggregatedDictionaryState</implementation-class>
|
||||
</component>
|
||||
</project-components>
|
||||
|
||||
|
||||
<actions>
|
||||
<group id="com.intellij.spellchecker.actions.SpellingPopupActionGroup"
|
||||
@@ -50,5 +32,9 @@
|
||||
<spellchecker.support implementation="com.intellij.spellchecker.tokenizer.SpellcheckingStrategy"/>
|
||||
<spellchecker.support implementation="com.intellij.spellchecker.tokenizer.HtmlSpellcheckingStrategy"/>
|
||||
<spellchecker.bundledDictionaryProvider implementation="com.intellij.spellchecker.DefaultBundledDictionariesProvider"/>
|
||||
|
||||
<projectService serviceImplementation="com.intellij.spellchecker.state.ProjectDictionaryState"/>
|
||||
<projectService serviceImplementation="com.intellij.spellchecker.state.AggregatedDictionaryState"/>
|
||||
<applicationService serviceImplementation="com.intellij.spellchecker.state.CachedDictionaryState"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public class AggregatedDictionaryState {
|
||||
|
||||
public void loadState() {
|
||||
assert project != null;
|
||||
cachedDictionaryState = ServiceManager.getService(project, CachedDictionaryState.class);
|
||||
cachedDictionaryState = ServiceManager.getService(CachedDictionaryState.class);
|
||||
projectDictionaryState = ServiceManager.getService(project, ProjectDictionaryState.class);
|
||||
currentUser = System.getProperty("user.name");
|
||||
retrieveDictionaries();
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
<resource-bundle>org.jetbrains.idea.svn.SvnBundle</resource-bundle>
|
||||
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.svn.SvnConfiguration</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>org.jetbrains.idea.svn.SvnFileUrlMappingImpl</implementation-class>
|
||||
<option name="workspace" value="true"/>
|
||||
@@ -119,6 +115,7 @@
|
||||
<checkoutProvider implementation="org.jetbrains.idea.svn.checkout.SvnCheckoutProvider"/>
|
||||
<applicationService serviceInterface="org.jetbrains.idea.svn.SvnApplicationSettings"
|
||||
serviceImplementation="org.jetbrains.idea.svn.SvnApplicationSettings"/>
|
||||
<projectService serviceImplementation="org.jetbrains.idea.svn.SvnConfiguration"/>
|
||||
<projectService serviceInterface="org.jetbrains.idea.svn.SvnBranchConfigurationManager"
|
||||
serviceImplementation="org.jetbrains.idea.svn.SvnBranchConfigurationManager"/>
|
||||
<projectService serviceInterface="org.jetbrains.idea.svn.history.LoadedRevisionsCache"
|
||||
|
||||
@@ -17,10 +17,12 @@
|
||||
|
||||
package org.jetbrains.idea.svn;
|
||||
|
||||
import com.intellij.lifecycle.PeriodicalTasksCloser;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.PersistentStateComponent;
|
||||
import com.intellij.openapi.components.ServiceManager;
|
||||
import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.progress.ProgressIndicator;
|
||||
import com.intellij.openapi.progress.ProgressManager;
|
||||
@@ -28,11 +30,9 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.*;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.openapi.vcs.annotate.AnnotationListener;
|
||||
import com.intellij.util.io.DataExternalizer;
|
||||
import org.jdom.Attribute;
|
||||
import org.jdom.DataConversionException;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.idea.svn.dialogs.SvnAuthenticationProvider;
|
||||
import org.jetbrains.idea.svn.dialogs.SvnInteractiveAuthenticationProvider;
|
||||
import org.jetbrains.idea.svn.update.MergeRootInfo;
|
||||
@@ -53,7 +53,15 @@ import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.util.*;
|
||||
|
||||
public class SvnConfiguration implements ProjectComponent, JDOMExternalizable {
|
||||
@State(
|
||||
name = "SvnConfiguration",
|
||||
storages = {
|
||||
@Storage(
|
||||
file = "$WORKSPACE_FILE$"
|
||||
)
|
||||
}
|
||||
)
|
||||
public class SvnConfiguration implements PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance("org.jetbrains.idea.svn.SvnConfiguration");
|
||||
public final static int ourMaxAnnotateRevisionsDefault = 500;
|
||||
|
||||
@@ -104,8 +112,30 @@ public class SvnConfiguration implements ProjectComponent, JDOMExternalizable {
|
||||
private final List<AnnotationListener> myAnnotationListeners;
|
||||
private SvnInteractiveAuthenticationProvider myInteractiveProvider;
|
||||
|
||||
@Override
|
||||
public Element getState() {
|
||||
Element element = new Element("state");
|
||||
try {
|
||||
writeExternal(element);
|
||||
}
|
||||
catch (WriteExternalException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
return element;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadState(Element state) {
|
||||
try {
|
||||
readExternal(state);
|
||||
}
|
||||
catch (InvalidDataException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static SvnConfiguration getInstance(final Project project) {
|
||||
return PeriodicalTasksCloser.getInstance().safeGetComponent(project, SvnConfiguration.class);
|
||||
return ServiceManager.getService(project, SvnConfiguration.class);
|
||||
}
|
||||
|
||||
public SvnConfiguration(final Project project) {
|
||||
@@ -378,23 +408,6 @@ public class SvnConfiguration implements ProjectComponent, JDOMExternalizable {
|
||||
element.setAttribute("maxAnnotateRevisions", "" + myMaxAnnotateRevisions);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "SvnConfiguration";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public boolean isKeepLocks() {
|
||||
return myIsKeepLocks;
|
||||
}
|
||||
|
||||
@@ -180,8 +180,7 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
return Boolean.valueOf(System.getProperty(systemParameterName));
|
||||
}
|
||||
|
||||
public SvnVcs(final Project project, MessageBus bus, SvnConfiguration svnConfiguration, final ChangeListManager changeListManager,
|
||||
final VcsDirtyScopeManager vcsDirtyScopeManager) {
|
||||
public SvnVcs(final Project project, MessageBus bus, SvnConfiguration svnConfiguration) {
|
||||
super(project, VCS_NAME);
|
||||
LOG.debug("ct");
|
||||
myRootsToWorkingCopies = new RootsToWorkingCopies(myProject);
|
||||
@@ -221,7 +220,8 @@ public class SvnVcs extends AbstractVcs<CommittedChangeList> {
|
||||
};
|
||||
}
|
||||
|
||||
myFrameStateListener = new MyFrameStateListener(changeListManager, vcsDirtyScopeManager);
|
||||
myFrameStateListener = project.isDefault() ? null : new MyFrameStateListener(ChangeListManager.getInstance(project),
|
||||
VcsDirtyScopeManager.getInstance(project));
|
||||
myWorkingCopiesContent = new WorkingCopiesContent(this);
|
||||
|
||||
// remove used some time before old notification group ids
|
||||
|
||||
@@ -19,11 +19,13 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.psi.JavaPsiFacade</interface-class>
|
||||
<implementation-class>com.intellij.psi.impl.JavaPsiFacadeImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.pom.java.PomJavaAspect</interface-class>
|
||||
<implementation-class>com.intellij.pom.java.impl.PomJavaAspectImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<component>
|
||||
<interface-class>com.intellij.compiler.CompilerConfiguration</interface-class>
|
||||
<implementation-class>com.intellij.compiler.CompilerConfigurationImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.compiler.impl.CompilerCacheManager</implementation-class>
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<project-components>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.components.impl.ServiceManagerImpl</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
</project-components>
|
||||
|
||||
@@ -45,6 +46,7 @@
|
||||
|
||||
<component>
|
||||
<implementation-class>com.intellij.profile.codeInspection.InspectionProjectProfileManager</implementation-class>
|
||||
<loadForDefaultProject/>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.util.xml.impl;
|
||||
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.impl.source.xml.XmlElementDescriptorProvider;
|
||||
import com.intellij.psi.xml.XmlTag;
|
||||
import com.intellij.psi.PsiElement;
|
||||
@@ -32,7 +33,9 @@ public class DomDescriptorProvider implements XmlElementDescriptorProvider {
|
||||
|
||||
@Nullable
|
||||
public XmlElementDescriptor getDescriptor(final XmlTag tag) {
|
||||
final DomElement domElement = DomManager.getDomManager(tag.getProject()).getDomElement(tag);
|
||||
Project project = tag.getProject();
|
||||
if (project.isDefault()) return null;
|
||||
final DomElement domElement = DomManager.getDomManager(project).getDomElement(tag);
|
||||
if (domElement != null) {
|
||||
final DefinesXml definesXml = domElement.getAnnotation(DefinesXml.class);
|
||||
if (definesXml != null) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public abstract class XmlSchemaProvider {
|
||||
@Nullable
|
||||
public static XmlFile findSchema(@NotNull @NonNls String namespace, @Nullable Module module, @NotNull PsiFile file) {
|
||||
final boolean dumb = DumbService.getInstance(file.getProject()).isDumb();
|
||||
|
||||
if (file.getProject().isDefault()) return null;
|
||||
for (XmlSchemaProvider provider: Extensions.getExtensions(EP_NAME)) {
|
||||
if (dumb && !DumbService.isDumbAware(provider)) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user