diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java
index 324248e3895b..279547f26e7b 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerImpl.java
@@ -147,18 +147,9 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
Disposer.register(project, myFileStatusMap);
DaemonProgressIndicator.setDebug(LOG.isDebugEnabled());
-
assert !myInitialized : "Double Initializing";
Disposer.register(myProject, new StatusBarUpdater(myProject));
- //myDaemonListeners = new DaemonListeners(myProject, this, editorTracker, editorFactory,
- // psiDocumentManager, commandProcessor,
- // editorColorsManager, application,
- // inspectionProfileManager, inspectionProjectProfileManager,
- // todoConfiguration, actionManagerEx,
- // virtualFileManager, namedScopeManager,
- // dependencyValidationManager);
- //Disposer.register(myProject, myDaemonListeners);
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
@@ -782,7 +773,8 @@ public class DaemonCodeAnalyzerImpl extends DaemonCodeAnalyzer implements JDOMEx
}
public boolean canChangeFileSilently(@NotNull PsiFileSystemItem file) {
- return DaemonListeners.getInstance(myProject).canChangeFileSilently(file);
+ DaemonListeners listeners = DaemonListeners.getInstance(myProject);
+ return listeners == null || listeners.canChangeFileSilently(file);
}
@Override
diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java
index eb212a531d1d..6c724764afa6 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/DaemonListeners.java
@@ -145,6 +145,8 @@ public class DaemonListeners implements Disposable {
myVcsDirtyScopeManager = vcsDirtyScopeManager;
myFileStatusManager = fileStatusManager;
myActionManager = actionManagerEx;
+ myTooltipController = tooltipController;
+
boolean replaced = ((UserDataHolderEx)myProject).replace(DAEMON_INITIALIZED, null, Boolean.TRUE);
LOG.assertTrue(replaced, "Daemon listeners already initialized for the project "+myProject);
@@ -152,8 +154,8 @@ public class DaemonListeners implements Disposable {
myDaemonEventPublisher = messageBus.syncPublisher(DaemonCodeAnalyzer.DAEMON_EVENT_TOPIC);
final MessageBusConnection connection = messageBus.connect();
+ if (project.isDefault()) return;
EditorEventMulticaster eventMulticaster = editorFactory.getEventMulticaster();
-
eventMulticaster.addDocumentListener(new DocumentAdapter() {
// clearing highlighters before changing document because change can damage editor highlighters drastically, so we'll clear more than necessary
@Override
@@ -185,7 +187,6 @@ public class DaemonListeners implements Disposable {
}, this);
eventMulticaster.addEditorMouseMotionListener(new MyEditorMouseMotionListener(), this);
- myTooltipController = tooltipController;
eventMulticaster.addEditorMouseListener(new MyEditorMouseListener(myTooltipController), this);
EditorTrackerListener editorTrackerListener = new EditorTrackerListener() {
diff --git a/platform/platform-resources/src/componentSets/Lang.xml b/platform/platform-resources/src/componentSets/Lang.xml
index 77bf33d71370..47ab235a591f 100644
--- a/platform/platform-resources/src/componentSets/Lang.xml
+++ b/platform/platform-resources/src/componentSets/Lang.xml
@@ -109,7 +109,7 @@
com.intellij.codeInsight.daemon.DaemonCodeAnalyzer
com.intellij.codeInsight.daemon.impl.DaemonCodeAnalyzerImpl
-
+
com.intellij.codeInsight.daemon.impl.DaemonListeners