public static PalettePanel getInstance(DesignerEditorPanel designer) {
    PaletteToolWindowManager manager = getInstance(designer.getProject());
    if (manager.isEditorMode()) {
      return (PalettePanel)manager.getContent(designer);
    }
    return manager.myToolWindowPanel;
  }
public static PalettePanel getInstance(DesignerEditorPanel designer)