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);
}
}
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;
}
Aggregations