From caedc289623b45775502c10d533f345492dbd170 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 3 Sep 2019 11:48:28 +0200 Subject: [PATCH] decouple IdeFrameImpl and JFrame (part 4): restore compatibility GitOrigin-RevId: 2a469e5c5cece993414072afae4125c34f16f08d --- .../com/intellij/ide/impl/NewProjectUtil.java | 4 +- .../StopBackgroundProcessesAction.java | 19 +--- .../src/com/intellij/openapi/wm/IdeFrame.java | 3 +- .../intellij/openapi/wm/WindowManager.java | 5 +- .../hprof/action/AnalysisRunnable.kt | 6 +- .../com/intellij/idea/ApplicationLoader.kt | 2 +- .../com/intellij/openapi/ui/FrameWrapper.java | 3 + .../openapi/wm/ex/WindowManagerEx.java | 2 + .../openapi/wm/impl/IdeFrameImpl.java | 89 ++++++++++++++++++- .../openapi/wm/impl/ProjectFrameHelper.java | 24 ++++- .../openapi/wm/impl/TestWindowManager.java | 1 + .../openapi/wm/impl/WindowManagerImpl.java | 70 ++++++++------- .../openapi/wm/impl/WindowWatcher.java | 17 +++- .../impl/welcomeScreen/FlatWelcomeFrame.java | 2 + .../wm/impl/welcomeScreen/WelcomeFrame.java | 2 + .../platform-resources/src/brokenPlugins.txt | 3 +- .../svn/auth/SvnAuthenticationNotifier.kt | 20 ++--- 17 files changed, 198 insertions(+), 74 deletions(-) diff --git a/java/idea-ui/src/com/intellij/ide/impl/NewProjectUtil.java b/java/idea-ui/src/com/intellij/ide/impl/NewProjectUtil.java index 14578f9e476e..19a3f247f27e 100644 --- a/java/idea-ui/src/com/intellij/ide/impl/NewProjectUtil.java +++ b/java/idea-ui/src/com/intellij/ide/impl/NewProjectUtil.java @@ -32,7 +32,7 @@ import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.wm.*; import com.intellij.openapi.wm.ex.IdeFrameEx; -import com.intellij.openapi.wm.impl.ProjectFrameHelper; +import com.intellij.openapi.wm.impl.IdeFrameImpl; import com.intellij.pom.java.LanguageLevel; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.NotNull; @@ -165,7 +165,7 @@ public class NewProjectUtil { if (lastFocusedFrame instanceof IdeFrameEx) { boolean fullScreen = ((IdeFrameEx)lastFocusedFrame).isInFullScreen(); if (fullScreen) { - newProject.putUserData(ProjectFrameHelper.SHOULD_OPEN_IN_FULL_SCREEN, Boolean.TRUE); + newProject.putUserData(IdeFrameImpl.SHOULD_OPEN_IN_FULL_SCREEN, Boolean.TRUE); } } } diff --git a/platform/lang-impl/src/com/intellij/execution/actions/StopBackgroundProcessesAction.java b/platform/lang-impl/src/com/intellij/execution/actions/StopBackgroundProcessesAction.java index b8e2dae5eba0..01db465311a6 100644 --- a/platform/lang-impl/src/com/intellij/execution/actions/StopBackgroundProcessesAction.java +++ b/platform/lang-impl/src/com/intellij/execution/actions/StopBackgroundProcessesAction.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.actions; import com.intellij.icons.AllIcons; @@ -29,7 +15,6 @@ import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.ui.popup.ListItemDescriptorAdapter; import com.intellij.openapi.util.Pair; import com.intellij.openapi.wm.IdeFrame; -import com.intellij.openapi.wm.WindowManager; import com.intellij.openapi.wm.ex.StatusBarEx; import com.intellij.openapi.wm.ex.WindowManagerEx; import com.intellij.ui.components.JBList; @@ -111,7 +96,7 @@ public class StopBackgroundProcessesAction extends DumbAwareAction implements An @NotNull private static List> getCancellableProcesses(@Nullable Project project) { - IdeFrame frame = ((WindowManagerEx)WindowManager.getInstance()).findFrameFor(project); + IdeFrame frame = WindowManagerEx.getInstanceEx().findFrameFor(project); StatusBarEx statusBar = frame == null ? null : (StatusBarEx)frame.getStatusBar(); if (statusBar == null) return Collections.emptyList(); diff --git a/platform/platform-api/src/com/intellij/openapi/wm/IdeFrame.java b/platform/platform-api/src/com/intellij/openapi/wm/IdeFrame.java index bbc7dea6ab59..2590200b0024 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/IdeFrame.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/IdeFrame.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.openapi.wm; import com.intellij.openapi.actionSystem.DataKey; @@ -13,6 +13,7 @@ import java.io.File; public interface IdeFrame { DataKey KEY = DataKey.create("IdeFrame"); + @Nullable StatusBar getStatusBar(); Rectangle suggestChildFrameBounds(); diff --git a/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java b/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java index 4b4a24dc8b52..0346fb44ca5b 100644 --- a/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java +++ b/platform/platform-api/src/com/intellij/openapi/wm/WindowManager.java @@ -70,11 +70,10 @@ public abstract class WindowManager { return null; } - /** - * @return Frame, could be {@code null} in test environment. - */ + @Nullable public abstract JFrame getFrame(@Nullable Project project); + @Nullable public abstract IdeFrame getIdeFrame(@Nullable Project project); /** diff --git a/platform/platform-impl/src/com/intellij/diagnostic/hprof/action/AnalysisRunnable.kt b/platform/platform-impl/src/com/intellij/diagnostic/hprof/action/AnalysisRunnable.kt index fecaf67af983..53df2a6d8957 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/hprof/action/AnalysisRunnable.kt +++ b/platform/platform-impl/src/com/intellij/diagnostic/hprof/action/AnalysisRunnable.kt @@ -115,8 +115,10 @@ class AnalysisRunnable(val hprofPath: Path, private var reportShown = false override fun actionPerformed(e: AnActionEvent, notification: Notification) { - val parentComponent = WindowManager.getInstance().getFrame(e.project) - if (reportShown) return + val parentComponent = WindowManager.getInstance().getFrame(e.project) ?: return + if (reportShown) { + return + } reportShown = true UIUtil.invokeLaterIfNeeded { diff --git a/platform/platform-impl/src/com/intellij/idea/ApplicationLoader.kt b/platform/platform-impl/src/com/intellij/idea/ApplicationLoader.kt index f3c3d56f9fad..b3462b503edd 100644 --- a/platform/platform-impl/src/com/intellij/idea/ApplicationLoader.kt +++ b/platform/platform-impl/src/com/intellij/idea/ApplicationLoader.kt @@ -550,7 +550,7 @@ private fun reportPluginError() { val description = event.description if (PluginManagerCore.EDIT == description) { val ideFrame = WindowManagerEx.getInstanceEx().findFrameFor(null) - PluginManagerConfigurableProxy.showPluginConfigurable(ideFrame as JFrame, null) + PluginManagerConfigurableProxy.showPluginConfigurable(ideFrame?.component, null) return@Notification } diff --git a/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java b/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java index 33f8ac7c2eae..f40684c84dfd 100644 --- a/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java +++ b/platform/platform-impl/src/com/intellij/openapi/ui/FrameWrapper.java @@ -388,6 +388,7 @@ public class FrameWrapper implements Disposable, DataProvider { return getRootPane(); } + @Nullable @Override public StatusBar getStatusBar() { StatusBar ownerBar = myOwner != null ? myOwner.myStatusBar : null; @@ -422,6 +423,7 @@ public class FrameWrapper implements Disposable, DataProvider { return myOwner.getNorthExtension(key); } + @Nullable @Override public BalloonLayout getBalloonLayout() { return null; @@ -478,6 +480,7 @@ public class FrameWrapper implements Disposable, DataProvider { return getRootPane(); } + @Nullable @Override public StatusBar getStatusBar() { return null; diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/ex/WindowManagerEx.java b/platform/platform-impl/src/com/intellij/openapi/wm/ex/WindowManagerEx.java index 4b25de737c6c..bf20dd86d11c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/ex/WindowManagerEx.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/ex/WindowManagerEx.java @@ -27,6 +27,7 @@ public abstract class WindowManagerEx extends WindowManager { return (WindowManagerEx)WindowManager.getInstance(); } + @Nullable @Override public abstract IdeFrameImpl getFrame(@Nullable Project project); @@ -57,6 +58,7 @@ public abstract class WindowManagerEx extends WindowManager { public abstract Window getMostRecentFocusedWindow(); + @Nullable public abstract IdeFrame findFrameFor(@Nullable Project project); @NotNull diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java index b61b781e266c..5765113e3076 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/IdeFrameImpl.java @@ -3,7 +3,13 @@ package com.intellij.openapi.wm.impl; import com.intellij.diagnostic.LoadingPhase; import com.intellij.ide.ui.UISettings; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Key; import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.wm.IdeFrame; +import com.intellij.openapi.wm.IdeRootPaneNorthExtension; +import com.intellij.openapi.wm.StatusBar; +import com.intellij.ui.BalloonLayout; import com.intellij.util.ui.GraphicsUtil; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.StartupUiUtil; @@ -14,12 +20,18 @@ import org.jetbrains.annotations.Nullable; import javax.accessibility.AccessibleContext; import javax.swing.*; import java.awt.*; +import java.io.File; +import java.util.Objects; @ApiStatus.Internal -public final class IdeFrameImpl extends JFrame { +public final class IdeFrameImpl extends JFrame implements IdeFrame { + public static final Key SHOULD_OPEN_IN_FULL_SCREEN = Key.create("should.open.in.full.screen"); + static final String NORMAL_STATE_BOUNDS = "normalBounds"; + @Nullable private FrameHelper myFrameHelper; + @Nullable private FrameDecorator myFrameDecorator; interface FrameHelper { @@ -30,6 +42,14 @@ public final class IdeFrameImpl extends JFrame { void setTitle(String title); void releaseFrame(); + + void updateView(); + + @Nullable + Project getProject(); + + @NotNull + IdeFrame getHelper(); } interface FrameDecorator { @@ -129,7 +149,9 @@ public final class IdeFrameImpl extends JFrame { } public void releaseFrame() { - myFrameHelper.releaseFrame(); + if (myFrameHelper != null) { + myFrameHelper.releaseFrame(); + } } protected final class AccessibleIdeFrameImpl extends AccessibleJFrame { @@ -146,4 +168,67 @@ public final class IdeFrameImpl extends JFrame { } return null; } + + /** + * @deprecated Use {@link ProjectFrameHelper#updateView()} instead. + */ + @Deprecated + public void updateView() { + if (myFrameHelper != null) { + myFrameHelper.updateView(); + } + } + + /** + * @deprecated Use {@link ProjectFrameHelper#updateView()} instead. + */ + @Override + @Deprecated + @ApiStatus.ScheduledForRemoval(inVersion = "2020.1") + public Project getProject() { + return myFrameHelper == null ? null : myFrameHelper.getProject(); + } + + // deprecated stuff - as IdeFrame must be implemented (a lot of instanceof checks for JFrame) + + @Nullable + @Override + public StatusBar getStatusBar() { + return myFrameHelper == null ? null : myFrameHelper.getHelper().getStatusBar(); + } + + @Override + public Rectangle suggestChildFrameBounds() { + return Objects.requireNonNull(myFrameHelper).getHelper().suggestChildFrameBounds(); + } + + @Override + public void setFrameTitle(String title) { + if (myFrameHelper != null) { + myFrameHelper.getHelper().setFrameTitle(title); + } + } + + @Override + public void setFileTitle(String fileTitle, File ioFile) { + if (myFrameHelper != null) { + myFrameHelper.getHelper().setFileTitle(fileTitle, ioFile); + } + } + + @Override + public IdeRootPaneNorthExtension getNorthExtension(String key) { + return myFrameHelper == null ? null : myFrameHelper.getHelper().getNorthExtension(key); + } + + @Override + public JComponent getComponent() { + return getRootPane(); + } + + @Nullable + @Override + public BalloonLayout getBalloonLayout() { + return myFrameHelper == null ? null : myFrameHelper.getHelper().getBalloonLayout(); + } } diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.java index 5ed377e2c783..ec7e6fd864c2 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ProjectFrameHelper.java @@ -19,7 +19,6 @@ import com.intellij.openapi.project.DumbAwareRunnable; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupManager; import com.intellij.openapi.util.Disposer; -import com.intellij.openapi.util.Key; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; @@ -62,8 +61,6 @@ import java.util.Set; public final class ProjectFrameHelper implements IdeFrameEx, AccessibleContextAccessor, DataProvider { private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.wm.impl.IdeFrameImpl"); - public static final Key SHOULD_OPEN_IN_FULL_SCREEN = Key.create("should.open.in.full.screen"); - private static boolean ourUpdatingTitle; private String myTitle; @@ -145,6 +142,23 @@ public final class ProjectFrameHelper implements IdeFrameEx, AccessibleContextAc ProjectFrameHelper.this.dispose(); } + @Override + public void updateView() { + ProjectFrameHelper.this.updateView(); + } + + @Nullable + @Override + public Project getProject() { + return myProject; + } + + @NotNull + @Override + public IdeFrame getHelper() { + return ProjectFrameHelper.this; + } + @Override public void setTitle(String title) { if (ourUpdatingTitle) { @@ -286,6 +300,7 @@ public final class ProjectFrameHelper implements IdeFrameEx, AccessibleContextAc }); } + @Nullable @Override public IdeStatusBarImpl getStatusBar() { return myRootPane == null ? null : myRootPane.getStatusBar(); @@ -453,7 +468,7 @@ public final class ProjectFrameHelper implements IdeFrameEx, AccessibleContextAc addWidget(statusBar, new ColumnSelectionModePanel(project), StatusBar.Anchors.after(encodingPanel.ID())); addWidget(statusBar, new ToggleReadOnlyAttributePanel(), StatusBar.Anchors.after(StatusBar.StandardWidgets.COLUMN_SELECTION_MODE_PANEL)); - for (StatusBarWidgetProvider widgetProvider: StatusBarWidgetProvider.EP_NAME.getExtensions()) { + for (StatusBarWidgetProvider widgetProvider: StatusBarWidgetProvider.EP_NAME.getExtensionList()) { StatusBarWidget widget = widgetProvider.getWidget(project); if (widget == null) { continue; @@ -542,6 +557,7 @@ public final class ProjectFrameHelper implements IdeFrameEx, AccessibleContextAc return b; } + @Nullable @Override public final BalloonLayout getBalloonLayout() { return myBalloonLayout; diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/TestWindowManager.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/TestWindowManager.java index 6d8ce9b9b43f..6f6c38bfb909 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/TestWindowManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/TestWindowManager.java @@ -83,6 +83,7 @@ public final class TestWindowManager extends WindowManagerEx { return null; } + @Nullable @Override public final IdeFrameImpl getFrame(final Project project) { return null; diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.java index ac79b6e73954..95ffe9f241d5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowManagerImpl.java @@ -389,13 +389,12 @@ public final class WindowManagerImpl extends WindowManagerEx implements Persiste } assert false : "Cannot find status bar for " + c; - return null; } @Override - public IdeFrame findFrameFor(@Nullable final Project project) { - IdeFrame frame = null; + public IdeFrame findFrameFor(@Nullable Project project) { + IdeFrame frame; if (project != null) { frame = project.isDefault() ? WelcomeFrame.getInstance() : getFrameHelper(project); if (frame == null) { @@ -403,69 +402,80 @@ public final class WindowManagerImpl extends WindowManagerEx implements Persiste } } else { - Container eachParent = getMostRecentFocusedWindow(); - while(eachParent != null) { - if (eachParent instanceof IdeFrame) { - frame = (IdeFrame)eachParent; - break; - } - eachParent = eachParent.getParent(); - } - + frame = ProjectFrameHelper.getFrameHelper(getMostRecentFocusedWindow()); if (frame == null) { frame = tryToFindTheOnlyFrame(); } } - return frame; } + @Nullable private static IdeFrame tryToFindTheOnlyFrame() { - IdeFrame candidate = null; - final Frame[] all = Frame.getFrames(); - for (Frame each : all) { - if (each instanceof IdeFrame) { + IdeFrameImpl candidate = null; + for (Frame each : Frame.getFrames()) { + if (each instanceof IdeFrameImpl) { if (candidate == null) { - candidate = (IdeFrame)each; - } else { + candidate = (IdeFrameImpl)each; + } + else { candidate = null; break; } } } - return candidate; + return candidate == null ? null : ((IdeRootPane)candidate.getRootPane()).getFrameHelper(); } @Override public final IdeFrameImpl getFrame(@Nullable Project project) { // no assert! otherwise WindowWatcher.suggestParentWindow fails for default project //LOG.assertTrue(myProject2Frame.containsKey(project)); - return getFrameHelper(project).getFrame(); + ProjectFrameHelper helper = getFrameHelper(project); + return helper == null ? null : helper.getFrame(); } + @Nullable public ProjectFrameHelper getFrameHelper(@Nullable Project project) { return myProjectToFrame.get(project); } @Override - public IdeFrame getIdeFrame(@Nullable final Project project) { + @Nullable + public IdeFrame getIdeFrame(@Nullable Project project) { if (project != null) { return getFrameHelper(project); } - final Window window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); - final Component parent = UIUtil.findUltimateParent(window); - if (parent instanceof IdeFrame) return (IdeFrame)parent; - final Frame[] frames = Frame.getFrames(); - for (Frame each : frames) { - if (each instanceof IdeFrame) { - return (IdeFrame)each; + Window window = KeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); + IdeFrame result = getIdeFrame(UIUtil.findUltimateParent(window)); + if (result != null) { + return result; + } + + for (Frame each : Frame.getFrames()) { + result = getIdeFrame(each); + if (result != null) { + return result; } } return null; } + @Nullable + private static IdeFrame getIdeFrame(@NotNull Component component) { + if (component instanceof IdeFrameImpl) { + return ((IdeRootPane)((IdeFrameImpl)component).getContentPane()).getFrameHelper(); + } + else if (component instanceof IdeFrame) { + return (IdeFrame)component; + } + else { + return null; + } + } + @Nullable @ApiStatus.Internal public ProjectFrameHelper getAndRemoveRootFrame() { @@ -553,7 +563,7 @@ public final class WindowManagerImpl extends WindowManagerEx implements Persiste frame.getFrame().setVisible(true); if (FrameInfoHelper.isFullScreenSupportedInCurrentOs() && - ((frameInfo != null && frameInfo.getFullScreen()) || ProjectFrameHelper.SHOULD_OPEN_IN_FULL_SCREEN.get(project) == Boolean.TRUE)) { + ((frameInfo != null && frameInfo.getFullScreen()) || IdeFrameImpl.SHOULD_OPEN_IN_FULL_SCREEN.get(project) == Boolean.TRUE)) { frame.toggleFullScreen(true); } } diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowWatcher.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowWatcher.java index 0d2380b3998a..1e64a58f4ecd 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/WindowWatcher.java @@ -8,6 +8,7 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.wm.FocusWatcher; +import com.intellij.openapi.wm.IdeFrame; import com.intellij.openapi.wm.ex.WindowManagerEx; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NonNls; @@ -218,7 +219,21 @@ public final class WindowWatcher implements PropertyChangeListener{ synchronized (myLock) { Window window = getFocusedWindowForProject(project); if (window == null) { - return project == null ? null : (Window)windowManager.findFrameFor(project); + if (project == null) { + return null; + } + else { + IdeFrame frame = windowManager.findFrameFor(project); + if (frame == null) { + return null; + } + else if (frame instanceof Window) { + return (Window)frame; + } + else { + return ((ProjectFrameHelper)frame).getFrame(); + } + } } LOG.assertTrue(window.isDisplayable()); diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrame.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrame.java index f559ae56cc4f..e2ad2f2223df 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrame.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/FlatWelcomeFrame.java @@ -183,6 +183,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame, Disposable, Ac DimensionService.getInstance().setLocation(WelcomeFrame.DIMENSION_KEY, middle, null); } + @Nullable @Override public StatusBar getStatusBar() { return null; @@ -852,6 +853,7 @@ public class FlatWelcomeFrame extends JFrame implements IdeFrame, Disposable, Ac return arrow; } + @Nullable @Override public BalloonLayout getBalloonLayout() { return myBalloonLayout; diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeFrame.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeFrame.java index a73de5123497..0a08d4c341f5 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeFrame.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/welcomeScreen/WelcomeFrame.java @@ -200,12 +200,14 @@ public final class WelcomeFrame extends JFrame implements IdeFrame, AccessibleCo }, ModalityState.NON_MODAL); } + @Nullable @Override public StatusBar getStatusBar() { Container pane = getContentPane(); return pane instanceof JComponent ? UIUtil.findComponentOfType((JComponent)pane, IdeStatusBarImpl.class) : null; } + @Nullable @Override public BalloonLayout getBalloonLayout() { return myBalloonLayout; diff --git a/platform/platform-resources/src/brokenPlugins.txt b/platform/platform-resources/src/brokenPlugins.txt index 20bd7172f3e2..65f5f750d4d3 100644 --- a/platform/platform-resources/src/brokenPlugins.txt +++ b/platform/platform-resources/src/brokenPlugins.txt @@ -127,4 +127,5 @@ com.jetbrains.edu 2.7-2019.2-2140 "Classic Icon" 1.3 1.2 1.1 1.0 com.intellij.flex.uiDesigner 183.3795.13 "Node.js Remote Interpreter" 192.6262.9 -project_manager 1.0 \ No newline at end of file +project_manager 1.0 +com.mabdurrahman.intellij.customtitle 0.0.3 0.0.2 0.0.1 \ No newline at end of file diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/auth/SvnAuthenticationNotifier.kt b/plugins/svn4idea/src/org/jetbrains/idea/svn/auth/SvnAuthenticationNotifier.kt index 83306ec8cb8e..ced90fd905e1 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/auth/SvnAuthenticationNotifier.kt +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/auth/SvnAuthenticationNotifier.kt @@ -1,4 +1,4 @@ -// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.idea.svn.auth import com.intellij.concurrency.JobScheduler @@ -109,15 +109,15 @@ class SvnAuthenticationNotifier(private val myVcs: SvnVcs) : GenericNotifierImpl } private fun showAlreadyChecking() { - val frameFor = WindowManagerEx.getInstanceEx().findFrameFor(myProject) - if (frameFor != null) { - val component = frameFor.component - val point = component.mousePosition ?: Point((component.width * 0.7).toInt(), 0) + val frameFor = WindowManagerEx.getInstanceEx().findFrameFor(myProject) ?: return + val component = frameFor.component + val point = component.mousePosition ?: Point((component.width * 0.7).toInt(), 0) - SwingUtilities.convertPointToScreen(point, component) - JBPopupFactory.getInstance().createHtmlTextBalloonBuilder("Already checking...", MessageType.WARNING, null).createBalloon().show( - RelativePoint(point), Balloon.Position.below) - } + SwingUtilities.convertPointToScreen(point, component) + JBPopupFactory.getInstance() + .createHtmlTextBalloonBuilder("Already checking...", MessageType.WARNING, null) + .createBalloon() + .show(RelativePoint(point), Balloon.Position.below) } private fun onStateChangedToSuccess(obj: AuthenticationRequest) { @@ -233,7 +233,7 @@ class SvnAuthenticationNotifier(private val myVcs: SvnVcs) : GenericNotifierImpl CommonProxy.getInstance().select(URI(url.toString())) } catch (e: URISyntaxException) { - LOG.info("wrong URL: " + url.toString()) + LOG.info("wrong URL: $url") return false }