IDEA-85423 IntelliJ behaves erratically when exiting the GUI designer

This commit is contained in:
Alexander Lobas
2014-09-08 19:06:54 +04:00
parent b2885c7854
commit bdfe46bffc
3 changed files with 10 additions and 11 deletions
@@ -26,7 +26,6 @@ import org.jetbrains.annotations.Nullable;
* @author Alexander Lobas
*/
public abstract class AbstractToolWindowManager extends LightToolWindowManager {
protected AbstractToolWindowManager(Project project, FileEditorManager fileEditorManager) {
super(project, fileEditorManager);
}
@@ -16,6 +16,7 @@
package com.intellij.uiDesigner.designSurface;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.designer.DesignerEditorPanelFacade;
import com.intellij.ide.DeleteProvider;
import com.intellij.ide.highlighter.XmlFileHighlighter;
import com.intellij.ide.palette.PaletteDragEventListener;
@@ -41,6 +42,7 @@ import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.DialogBuilder;
import com.intellij.openapi.ui.ThreeComponentsSplitter;
import com.intellij.openapi.util.Ref;
import com.intellij.openapi.vfs.ReadonlyStatusHandler;
import com.intellij.openapi.vfs.VirtualFile;
@@ -94,7 +96,7 @@ import java.util.Map;
* @author Anton Katilin
* @author Vladimir Kondratyev
*/
public final class GuiEditor extends JPanel implements DataProvider, ModuleProvider {
public final class GuiEditor extends JPanel implements DesignerEditorPanelFacade, DataProvider, ModuleProvider {
private static final Logger LOG = Logger.getInstance("#com.intellij.uiDesigner.GuiEditor");
private final Project myProject;
@@ -362,6 +364,11 @@ public final class GuiEditor extends JPanel implements DataProvider, ModuleProvi
new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, KeyEvent.SHIFT_MASK)), myGlassLayer);
}
@Override
public ThreeComponentsSplitter getContentSplitter() {
return null; // TODO: Auto-generated method stub
}
@NotNull
public SelectionState getSelectionState() {
return mySelectionState;
@@ -24,7 +24,6 @@ import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.FileEditorManagerEvent;
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.ui.Splitter;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vfs.VirtualFile;
@@ -65,7 +64,6 @@ public class UIDesignerToolWindowManager implements ProjectComponent {
private PropertyInspector myPropertyInspector;
private final FileEditorManager myFileEditorManager;
private ToolWindow myToolWindow;
private boolean myToolWindowReady = false;
private boolean myToolWindowDisposed = false;
private final List<TreeSelectionListener> myPendingListeners = ContainerUtil.createLockFreeCopyOnWriteList();
@@ -77,15 +75,10 @@ public class UIDesignerToolWindowManager implements ProjectComponent {
}
public void projectOpened() {
StartupManager.getInstance(myProject).registerPostStartupActivity(new Runnable() {
public void run() {
myToolWindowReady = true;
}
});
}
private void checkInitToolWindow() {
if (myToolWindowReady && !myToolWindowDisposed && myToolWindow == null) {
if (!myToolWindowDisposed && myToolWindow == null) {
initToolWindow();
}
}
@@ -139,7 +132,7 @@ public class UIDesignerToolWindowManager implements ProjectComponent {
myQueue.cancelAllUpdates();
myQueue.queue(new Update("update") {
public void run() {
if (!myToolWindowReady || myToolWindowDisposed) return;
if (myToolWindowDisposed) return;
GuiEditor activeFormEditor = newEditor != null ? newEditor.getEditor() : null;
if (myToolWindow == null) {
if (activeFormEditor == null) return;