-
Notifications
You must be signed in to change notification settings - Fork 400
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged branch idea243.release into idea243.x
- Loading branch information
Showing
6 changed files
with
38 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...a-impl/src/org/jetbrains/plugins/scala/components/TypeAwareWidgetModuleRootListener.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jetbrains.plugins.scala.components | ||
|
||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.roots.{ModuleRootEvent, ModuleRootListener} | ||
|
||
private final class TypeAwareWidgetModuleRootListener(project: Project) extends ModuleRootListener { | ||
override def rootsChanged(event: ModuleRootEvent): Unit = { | ||
if (!event.isCausedByWorkspaceModelChangesOnly) return | ||
TypeAwareWidgetUpdater.updateWidget(project) | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
scala/scala-impl/src/org/jetbrains/plugins/scala/components/TypeAwareWidgetUpdater.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.jetbrains.plugins.scala.components | ||
|
||
import com.intellij.openapi.project.Project | ||
import com.intellij.openapi.wm.WindowManager | ||
import com.intellij.openapi.wm.impl.status.widget.StatusBarWidgetsManager | ||
|
||
object TypeAwareWidgetUpdater { | ||
def updateWidget(project: Project): Unit = { | ||
if (project.isDisposed) return | ||
project.getService(classOf[StatusBarWidgetsManager]).updateWidget(classOf[TypeAwareWidgetFactory]) | ||
val statusBar = WindowManager.getInstance().getStatusBar(project) | ||
if (statusBar eq null) return | ||
statusBar.updateWidget(TypeAwareWidgetFactory.ID) | ||
} | ||
} |