mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+4
-3
@@ -5,6 +5,7 @@ import com.intellij.compiler.CompilerConfiguration;
|
||||
import com.intellij.compiler.CompilerIOUtil;
|
||||
import com.intellij.compiler.make.MakeUtil;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.Application;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.compiler.*;
|
||||
import com.intellij.openapi.compiler.ex.CompileContextEx;
|
||||
@@ -106,13 +107,13 @@ public class TranslatingCompilerFilesMonitor implements ApplicationComponent {
|
||||
}
|
||||
};
|
||||
private final ProjectManager myProjectManager;
|
||||
private Semaphore myInitializationInProgress = new Semaphore();
|
||||
private final Semaphore myInitializationInProgress = new Semaphore();
|
||||
|
||||
public TranslatingCompilerFilesMonitor(VirtualFileManager vfsManager, ProjectManager projectManager) {
|
||||
public TranslatingCompilerFilesMonitor(VirtualFileManager vfsManager, ProjectManager projectManager, Application application) {
|
||||
myProjectManager = projectManager;
|
||||
|
||||
projectManager.addProjectManagerListener(new MyProjectManagerListener());
|
||||
vfsManager.addVirtualFileListener(new MyVfsListener());
|
||||
vfsManager.addVirtualFileListener(new MyVfsListener(), application);
|
||||
}
|
||||
|
||||
public static TranslatingCompilerFilesMonitor getInstance() {
|
||||
|
||||
@@ -6,7 +6,7 @@ import com.intellij.debugger.engine.DebuggerManagerThreadImpl;
|
||||
import com.intellij.debugger.engine.events.DebuggerCommandImpl;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.compiler.ex.CompilerPathsEx;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.fileTypes.FileTypeManager;
|
||||
import com.intellij.openapi.fileTypes.FileTypes;
|
||||
import com.intellij.openapi.fileTypes.StdFileTypes;
|
||||
@@ -29,14 +29,12 @@ import java.util.Map;
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
public class HotSwapManager implements ProjectComponent{
|
||||
|
||||
private final Project myProject;
|
||||
public class HotSwapManager extends AbstractProjectComponent {
|
||||
private final Map<DebuggerSession, Long> myTimeStamps = new HashMap<DebuggerSession, Long>();
|
||||
private static final String CLASS_EXTENSION = ".class";
|
||||
|
||||
public HotSwapManager(Project project, DebuggerManagerEx manager) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
manager.addDebuggerManagerListener(new DebuggerManagerListener() {
|
||||
public void sessionCreated(DebuggerSession session) {
|
||||
myTimeStamps.put(session, Long.valueOf(System.currentTimeMillis()));
|
||||
@@ -48,23 +46,11 @@ public class HotSwapManager implements ProjectComponent{
|
||||
});
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "HotSwapManager";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
private long getTimeStamp(DebuggerSession session) {
|
||||
Long tStamp = myTimeStamps.get(session);
|
||||
return tStamp != null ? tStamp.longValue() : 0;
|
||||
|
||||
@@ -4,14 +4,14 @@ import com.intellij.CommonBundle;
|
||||
import com.intellij.execution.ExecutionException;
|
||||
import com.intellij.execution.RunnerRegistry;
|
||||
import com.intellij.execution.executors.DefaultRunExecutor;
|
||||
import com.intellij.execution.runners.ProgramRunner;
|
||||
import com.intellij.execution.runners.ExecutionEnvironment;
|
||||
import com.intellij.execution.runners.ProgramRunner;
|
||||
import com.intellij.execution.util.ExecutionErrorDialog;
|
||||
import com.intellij.ide.DataManager;
|
||||
import com.intellij.openapi.actionSystem.DataConstants;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.module.ModuleUtil;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -29,8 +29,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public final class JavadocGenerationManager implements JDOMExternalizable, ProjectComponent {
|
||||
private final Project myProject;
|
||||
public final class JavadocGenerationManager extends AbstractProjectComponent implements JDOMExternalizable {
|
||||
private final JavadocConfiguration myConfiguration;
|
||||
|
||||
public static JavadocGenerationManager getInstance(Project project) {
|
||||
@@ -38,21 +37,10 @@ public final class JavadocGenerationManager implements JDOMExternalizable, Proje
|
||||
}
|
||||
|
||||
JavadocGenerationManager(Project project) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
myConfiguration = new JavadocConfiguration(project);
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public void initComponent() { }
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void generateJavadoc(final PsiDirectory directory, DataContext dataContext) {
|
||||
Component component = (Component)dataContext.getData(DataConstants.CONTEXT_COMPONENT);
|
||||
final PsiPackage aPackage = directory != null ? JavaDirectoryService.getInstance().getPackage(directory) : null;
|
||||
|
||||
@@ -15,7 +15,7 @@ import com.intellij.navigation.NavigationItem;
|
||||
import com.intellij.openapi.actionSystem.IdeActions;
|
||||
import com.intellij.openapi.actionSystem.MouseShortcut;
|
||||
import com.intellij.openapi.actionSystem.Shortcut;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.openapi.editor.EditorFactory;
|
||||
@@ -31,9 +31,9 @@ import com.intellij.openapi.fileEditor.FileEditorManagerListener;
|
||||
import com.intellij.openapi.keymap.Keymap;
|
||||
import com.intellij.openapi.keymap.KeymapManager;
|
||||
import com.intellij.openapi.project.DumbAwareRunnable;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.DumbService;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.MultiLineLabelUI;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
@@ -55,8 +55,7 @@ import java.awt.event.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CtrlMouseHandler implements ProjectComponent {
|
||||
private final Project myProject;
|
||||
public class CtrlMouseHandler extends AbstractProjectComponent {
|
||||
private final TextAttributes ourReferenceAttributes;
|
||||
private RangeHighlighter myHighlighter;
|
||||
private Editor myHighlighterView;
|
||||
@@ -161,7 +160,7 @@ public class CtrlMouseHandler implements ProjectComponent {
|
||||
|
||||
public CtrlMouseHandler(final Project project, StartupManager startupManager, EditorColorsManager colorsManager,
|
||||
FileEditorManager fileEditorManager) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
startupManager.registerPostStartupActivity(new DumbAwareRunnable(){
|
||||
public void run() {
|
||||
EditorEventMulticaster eventMulticaster = EditorFactory.getInstance().getEventMulticaster();
|
||||
@@ -178,17 +177,6 @@ public class CtrlMouseHandler implements ProjectComponent {
|
||||
return "CtrlMouseHandler";
|
||||
}
|
||||
|
||||
public void initComponent() { }
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
private static BrowseMode getBrowseMode(final int modifiers) {
|
||||
if ( modifiers != 0 ) {
|
||||
final Keymap activeKeymap = KeymapManager.getInstance().getActiveKeymap();
|
||||
|
||||
@@ -23,7 +23,7 @@ public class RunManagerImpl extends RunManagerEx implements JDOMExternalizable,
|
||||
|
||||
private final Map<String, ConfigurationType> myTypesByName = new LinkedHashMap<String, ConfigurationType>();
|
||||
|
||||
private Map<String, RunnerAndConfigurationSettingsImpl> myConfigurations =
|
||||
private final Map<String, RunnerAndConfigurationSettingsImpl> myConfigurations =
|
||||
new LinkedHashMap<String, RunnerAndConfigurationSettingsImpl>(); // template configurations are not included here
|
||||
private final Map<Integer, Boolean> mySharedConfigurations = new TreeMap<Integer, Boolean>();
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.localVcs.LocalVcsItemsLocker;
|
||||
import com.intellij.openapi.localVcs.LocalVcsServices;
|
||||
import com.intellij.openapi.localVcs.LvcsRevision;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class DeprecatedLvcsServicesImpl extends LocalVcsServices implements ProjectComponent {
|
||||
public LocalVcsItemsLocker getUpToDateRevisionProvider() {
|
||||
@@ -20,6 +21,7 @@ public class DeprecatedLvcsServicesImpl extends LocalVcsServices implements Proj
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "LvcsBasedUpToDateVersionProvider";
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class LocalHistoryComponent extends LocalHistory implements ProjectCompon
|
||||
private LocalHistoryService myService;
|
||||
private IdeaGateway myGateway;
|
||||
|
||||
private AtomicBoolean isInitialized = new AtomicBoolean();
|
||||
private final AtomicBoolean isInitialized = new AtomicBoolean();
|
||||
private Runnable myShutdownTask;
|
||||
|
||||
@TestOnly
|
||||
|
||||
@@ -29,14 +29,14 @@ public class LocalHistoryService {
|
||||
IdeaGateway gw,
|
||||
LocalHistoryConfiguration c,
|
||||
StartupManager sm,
|
||||
ProjectRootManagerEx rm,
|
||||
ProjectRootManagerEx projectRootManager,
|
||||
VirtualFileManagerEx fm,
|
||||
CommandProcessor cp) {
|
||||
myVcs = vcs;
|
||||
myGateway = gw;
|
||||
myConfiguration = c;
|
||||
myStartupManager = sm;
|
||||
myRootManager = rm;
|
||||
myRootManager = projectRootManager;
|
||||
myFileManager = fm;
|
||||
myCommandProcessor = cp;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.intellij.openapi.fileEditor.FileEditor;
|
||||
* author: lesya
|
||||
*/
|
||||
class Redo extends UndoOrRedo{
|
||||
public Redo(UndoManagerImpl manager, FileEditor editor) throws NothingToUndoException {
|
||||
Redo(UndoManagerImpl manager, FileEditor editor) throws NothingToUndoException {
|
||||
super(manager, editor);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.project;
|
||||
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.ui.popup.BalloonHandler;
|
||||
import com.intellij.util.Alarm;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -12,12 +12,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author peter
|
||||
*/
|
||||
public class DumbModeIndicator implements ProjectComponent {
|
||||
private final Project myProject;
|
||||
public class DumbModeIndicator extends AbstractProjectComponent {
|
||||
private final Alarm myAlarm;
|
||||
|
||||
public DumbModeIndicator(Project project) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
myAlarm = new Alarm(project);
|
||||
}
|
||||
|
||||
@@ -44,17 +43,8 @@ public class DumbModeIndicator implements ProjectComponent {
|
||||
});
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return DumbModeIndicator.class.getSimpleName();
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -38,6 +38,7 @@ import com.intellij.openapi.util.InvalidDataException;
|
||||
import com.intellij.openapi.util.JDOMExternalizable;
|
||||
import com.intellij.openapi.util.WriteExternalException;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ProjectReloadStateImpl extends ProjectReloadState implements ProjectComponent, JDOMExternalizable {
|
||||
|
||||
@@ -55,6 +56,7 @@ public class ProjectReloadStateImpl extends ProjectReloadState implements Projec
|
||||
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "ProjectReloadState";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.intellij.platform;
|
||||
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.project.DumbAwareRunnable;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
@@ -11,11 +11,9 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class FilesystemToolwindowOpener implements ProjectComponent {
|
||||
private final Project myProject;
|
||||
|
||||
public class FilesystemToolwindowOpener extends AbstractProjectComponent {
|
||||
public FilesystemToolwindowOpener(final Project project) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
@@ -36,17 +34,8 @@ public class FilesystemToolwindowOpener implements ProjectComponent {
|
||||
});
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "FilesystemToolwindowOpener";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,8 @@ import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
|
||||
import com.intellij.util.Consumer;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -33,8 +33,8 @@ public class UpdateRequestsQueue {
|
||||
private final List<Runnable> myWaitingUpdateCompletionQueue;
|
||||
private final ProjectLevelVcsManager myPlVcsManager;
|
||||
private boolean myUpdateUnversionedRequested;
|
||||
private ScheduledSlowlyClosingAlarm mySharedExecutor;
|
||||
private StartupManager myStartupManager;
|
||||
private final ScheduledSlowlyClosingAlarm mySharedExecutor;
|
||||
private final StartupManager myStartupManager;
|
||||
|
||||
public UpdateRequestsQueue(final Project project, final ScheduledExecutorService executor, final LocalChangesUpdater delegate) {
|
||||
mySharedExecutor = ControlledAlarmFactory.createScheduledOnSharedThread(project, "Local changes update", executor);
|
||||
@@ -42,7 +42,7 @@ public class UpdateRequestsQueue {
|
||||
myDelegate = delegate;
|
||||
myProject = project;
|
||||
myPlVcsManager = ProjectLevelVcsManager.getInstance(myProject);
|
||||
myStartupManager = StartupManagerImpl.getInstance(myProject);
|
||||
myStartupManager = StartupManager.getInstance(myProject);
|
||||
myLock = new Object();
|
||||
myWaitingUpdateCompletionQueue = new ArrayList<Runnable>();
|
||||
// not initialized
|
||||
|
||||
+4
-17
@@ -5,7 +5,7 @@
|
||||
package com.intellij.openapi.vcs.impl;
|
||||
|
||||
import com.intellij.openapi.components.*;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vcs.ProjectLevelVcsManager;
|
||||
import org.jdom.Element;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -24,12 +24,11 @@ import org.jetbrains.annotations.NotNull;
|
||||
,@Storage(id = "dir", file = "$PROJECT_CONFIG_DIR$/vcs.xml", scheme = StorageScheme.DIRECTORY_BASED)
|
||||
}
|
||||
)
|
||||
public class VcsDirectoryMappingStorage implements ProjectComponent, PersistentStateComponent<Element> {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.vcs.impl.VcsDirectoryMappingStorage");
|
||||
|
||||
public class VcsDirectoryMappingStorage extends AbstractProjectComponent implements PersistentStateComponent<Element> {
|
||||
private final ProjectLevelVcsManager myVcsManager;
|
||||
|
||||
public VcsDirectoryMappingStorage(final ProjectLevelVcsManager vcsManager) {
|
||||
public VcsDirectoryMappingStorage(final ProjectLevelVcsManager vcsManager, Project project) {
|
||||
super(project);
|
||||
myVcsManager = vcsManager;
|
||||
}
|
||||
|
||||
@@ -43,21 +42,9 @@ public class VcsDirectoryMappingStorage implements ProjectComponent, PersistentS
|
||||
((ProjectLevelVcsManagerImpl) myVcsManager).readDirectoryMappings(state);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NonNls
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return "VcsDirectoryMappings";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ package com.intellij.lang.ant.config.impl;
|
||||
import com.intellij.lang.ant.AntLanguageExtension;
|
||||
import com.intellij.lang.ant.AntSupport;
|
||||
import com.intellij.lang.ant.psi.changes.AntChangeVisitor;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.pom.PomModel;
|
||||
import com.intellij.pom.PomModelAspect;
|
||||
@@ -24,13 +24,10 @@ import com.intellij.pom.xml.XmlAspect;
|
||||
import com.intellij.pom.xml.XmlChangeSet;
|
||||
import com.intellij.pom.xml.events.XmlChange;
|
||||
import com.intellij.psi.xml.XmlFile;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class AntProjectComponent implements ProjectComponent {
|
||||
|
||||
|
||||
public class AntProjectComponent extends AbstractProjectComponent {
|
||||
public AntProjectComponent(final XmlAspect xmlAspect, PomModel pomModel, Project project) {
|
||||
super(project);
|
||||
pomModel.addModelListener(new PomModelListener() {
|
||||
public void modelChanged(final PomModelEvent event) {
|
||||
final PomChangeSet changeSet = event.getChangeSet(xmlAspect);
|
||||
@@ -55,23 +52,4 @@ public class AntProjectComponent implements ProjectComponent {
|
||||
}
|
||||
}, project);
|
||||
}
|
||||
|
||||
public void projectOpened() {
|
||||
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NonNls
|
||||
@NotNull
|
||||
public String getComponentName() {
|
||||
return getClass().getName();
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import com.intellij.openapi.actionSystem.impl.SimpleDataContext;
|
||||
import com.intellij.openapi.compiler.CompileContext;
|
||||
import com.intellij.openapi.compiler.CompileTask;
|
||||
import com.intellij.openapi.compiler.CompilerManager;
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.keymap.Keymap;
|
||||
import com.intellij.openapi.keymap.ex.KeymapManagerEx;
|
||||
import com.intellij.openapi.project.Project;
|
||||
@@ -35,13 +35,12 @@ import java.awt.*;
|
||||
* @author Eugene Zhuravlev
|
||||
* Date: Apr 24, 2007
|
||||
*/
|
||||
public class AntToolwindowRegistrar implements ProjectComponent {
|
||||
public class AntToolwindowRegistrar extends AbstractProjectComponent {
|
||||
private AntExplorer myAntExplorer;
|
||||
private final Project myProject;
|
||||
private final ToolWindowManager myToolWindowManager;
|
||||
|
||||
public AntToolwindowRegistrar(Project project, ToolWindowManager toolWindowManager) {
|
||||
myProject = project;
|
||||
super(project);
|
||||
myToolWindowManager = toolWindowManager;
|
||||
}
|
||||
|
||||
@@ -112,10 +111,4 @@ public class AntToolwindowRegistrar implements ProjectComponent {
|
||||
public String getComponentName() {
|
||||
return "AntToolwindowRegistrar";
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
}
|
||||
|
||||
+5
-12
@@ -4,7 +4,7 @@
|
||||
|
||||
package com.intellij.uiDesigner.clientProperties;
|
||||
|
||||
import com.intellij.openapi.components.ProjectComponent;
|
||||
import com.intellij.openapi.components.AbstractProjectComponent;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.InvalidDataException;
|
||||
@@ -21,7 +21,7 @@ import java.util.*;
|
||||
/**
|
||||
* @author yole
|
||||
*/
|
||||
public class ClientPropertiesManager implements ProjectComponent, JDOMExternalizable {
|
||||
public class ClientPropertiesManager extends AbstractProjectComponent implements JDOMExternalizable {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.uiDesigner.clientProperties.ClientPropertiesManager");
|
||||
|
||||
@NonNls private static final String ELEMENT_PROPERTIES = "properties";
|
||||
@@ -39,9 +39,11 @@ public class ClientPropertiesManager implements ProjectComponent, JDOMExternaliz
|
||||
private final Map<String, List<ClientProperty>> myPropertyMap = new TreeMap<String, List<ClientProperty>>();
|
||||
|
||||
public ClientPropertiesManager() {
|
||||
super(null);
|
||||
}
|
||||
|
||||
private ClientPropertiesManager(final Map<String, List<ClientProperty>> propertyMap) {
|
||||
this();
|
||||
myPropertyMap.putAll(propertyMap);
|
||||
}
|
||||
|
||||
@@ -73,20 +75,11 @@ public class ClientPropertiesManager implements ProjectComponent, JDOMExternaliz
|
||||
}
|
||||
}
|
||||
|
||||
public void projectClosed() {
|
||||
}
|
||||
|
||||
@NotNull @NonNls
|
||||
public String getComponentName() {
|
||||
return COMPONENT_NAME;
|
||||
}
|
||||
|
||||
public void initComponent() {
|
||||
}
|
||||
|
||||
public void disposeComponent() {
|
||||
}
|
||||
|
||||
public static class ClientProperty implements Comparable {
|
||||
private final String myName;
|
||||
private final String myClass;
|
||||
@@ -208,7 +201,7 @@ public class ClientPropertiesManager implements ProjectComponent, JDOMExternaliz
|
||||
|
||||
public ClientProperty[] getConfiguredProperties(Class componentClass) {
|
||||
final List<ClientProperty> list = myPropertyMap.get(componentClass.getName());
|
||||
if (list == null) return new ClientProperty[0];
|
||||
if (list == null) return new ClientProperty[0];
|
||||
return list.toArray(new ClientProperty[list.size()]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user