Search in sources :

Example 1 with DesignerEditorPanelFacade

use of com.intellij.designer.DesignerEditorPanelFacade in project android by JetBrains.

the class AnalysisResultsManager method updateToolWindow.

@Override
protected void updateToolWindow(@Nullable DesignerEditorPanelFacade designer) {
    myContent.update(designer);
    if (designer == null) {
        myToolWindow.setAvailable(false, null);
    } else {
        DesignerEditorPanelFacade activeDesigner = getActiveDesigner();
        if (activeDesigner != null && activeDesigner instanceof CapturePanel && activeDesigner.getClientProperty(getComponentName()) == null) {
            activeDesigner.putClientProperty(getComponentName(), myContent);
        }
        myToolWindow.setIcon(getIcon());
        myToolWindow.setAvailable(true, null);
        myToolWindow.show(null);
    }
}
Also used : DesignerEditorPanelFacade(com.intellij.designer.DesignerEditorPanelFacade)

Example 2 with DesignerEditorPanelFacade

use of com.intellij.designer.DesignerEditorPanelFacade in project android by JetBrains.

the class AnalysisResultsManager method getContentFromDesigner.

@Nullable
private AnalysisResultsContent getContentFromDesigner() {
    DesignerEditorPanelFacade activeDesigner = getActiveDesigner();
    if (activeDesigner != null && activeDesigner instanceof CapturePanel) {
        Object property = activeDesigner.getClientProperty(getComponentName());
        if (property instanceof LightToolWindow) {
            LightToolWindow lightToolWindow = (LightToolWindow) property;
            Object content = lightToolWindow.getContent();
            if (content instanceof AnalysisResultsContent) {
                return (AnalysisResultsContent) content;
            }
        } else if (property instanceof AnalysisResultsContent) {
            return (AnalysisResultsContent) property;
        }
    }
    return null;
}
Also used : LightToolWindow(com.intellij.designer.LightToolWindow) DesignerEditorPanelFacade(com.intellij.designer.DesignerEditorPanelFacade) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

DesignerEditorPanelFacade (com.intellij.designer.DesignerEditorPanelFacade)2 LightToolWindow (com.intellij.designer.LightToolWindow)1 Nullable (org.jetbrains.annotations.Nullable)1