• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RefreshableOnComponent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.openapi.vcs.ui.RefreshableOnComponent的典型用法代码示例。如果您正苦于以下问题:Java RefreshableOnComponent类的具体用法?Java RefreshableOnComponent怎么用?Java RefreshableOnComponent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RefreshableOnComponent类属于com.intellij.openapi.vcs.ui包,在下文中一共展示了RefreshableOnComponent类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createVcsHandler

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@NotNull
@Override
protected CheckinHandler createVcsHandler(final CheckinProjectPanel panel) {
  return new CheckinHandler() {
    @Nullable
    public RefreshableOnComponent getAfterCheckinConfigurationPanel(Disposable parentDisposable) {
      final Project project = panel.getProject();
      final CvsVcs2 cvs = CvsVcs2.getInstance(project);
      final ProjectLevelVcsManager vcsManager = ProjectLevelVcsManager.getInstance(project);
      final Collection<VirtualFile> roots = panel.getRoots();
      final Collection<FilePath> files = new HashSet<FilePath>();
      for (VirtualFile root : roots) {
        final VcsRoot vcsRoot = vcsManager.getVcsRootObjectFor(root);
        if (vcsRoot == null || vcsRoot.getVcs() != cvs) {
          continue;
        }
        files.add(VcsContextFactory.SERVICE.getInstance().createFilePathOn(root));
      }
      return new AdditionalOptionsPanel(CvsConfiguration.getInstance(project), files, project);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CvsCheckinHandlerFactory.java


示例2: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkUpToDate = new JCheckBox(VcsBundle.message("checkbox.checkin.options.check.files.up.to.date"));

  return new RefreshableOnComponent() {
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkUpToDate, BorderLayout.WEST);
      return panel;
    }

    public void refresh() {
    }

    public void saveState() {
      myVcsConfiguration.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT = checkUpToDate.isSelected();
    }

    public void restoreState() {
      checkUpToDate.setSelected(myVcsConfiguration.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT);
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:CheckRemoteStatusCheckinHandlerFactory.java


示例3: getAfterCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
public RefreshableOnComponent getAfterCheckinConfigurationPanel(Disposable disposable) {
    return new RefreshableOnComponent() {
        public JComponent getComponent() {
            return panel;
        }

        public void refresh() {
        }

        public void saveState() {
        }

        public void restoreState() {
        }
    };
}
 
开发者ID:janotav,项目名称:ali-idea-plugin,代码行数:17,代码来源:AliCheckinHandler.java


示例4: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox optimizeBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.optimize.imports"));
  CheckinHandlerUtil.disableWhenDumb(myProject, optimizeBox, "Impossible until indices are up-to-date");
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(optimizeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT = optimizeBox.isSelected();
    }

    @Override
    public void restoreState() {
      optimizeBox.setSelected(getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:OptimizeImportsBeforeCheckinHandler.java


示例5: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox cleanupCodeCb = new NonFocusableCheckBox(VcsBundle.message("before.checkin.cleanup.code"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel cbPanel = new JPanel(new BorderLayout());
      cbPanel.add(cleanupCodeCb, BorderLayout.WEST);
      CheckinHandlerUtil
        .disableWhenDumb(myProject, cleanupCodeCb, "Code analysis is impossible until indices are up-to-date");
      return cbPanel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT = cleanupCodeCb.isSelected();
    }

    @Override
    public void restoreState() {
      cleanupCodeCb.setSelected(VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:CodeCleanupCheckinHandlerFactory.java


示例6: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox reformatBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.reformat.code"));

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(reformatBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().REFORMAT_BEFORE_PROJECT_COMMIT = reformatBox.isSelected();
    }

    @Override
    public void restoreState() {
      reformatBox.setSelected(getSettings().REFORMAT_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ReformatBeforeCheckinHandler.java


示例7: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox rearrangeBox = new NonFocusableCheckBox(VcsBundle.message("checkbox.checkin.options.rearrange.code"));
  CheckinHandlerUtil.disableWhenDumb(myProject, rearrangeBox, "Impossible until indices are up-to-date");
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(rearrangeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().REARRANGE_BEFORE_PROJECT_COMMIT = rearrangeBox.isSelected();
    }

    @Override
    public void restoreState() {
      rearrangeBox.setSelected(getSettings().REARRANGE_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:RearrangeBeforeCheckinHandler.java


示例8: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkBox = new NonFocusableCheckBox(VcsBundle.message("before.checkin.standard.options.check.smells"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkBox);
      CheckinHandlerUtil.disableWhenDumb(myProject, checkBox, "Code analysis is impossible until indices are up-to-date");
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT = checkBox.isSelected();
    }

    @Override
    public void restoreState() {
      checkBox.setSelected(getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:CodeAnalysisBeforeCheckinHandler.java


示例9: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkUpToDate = new JCheckBox(VcsBundle.message("checkbox.checkin.options.check.files.up.to.date"));

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkUpToDate, BorderLayout.WEST);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      myVcsConfiguration.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT = checkUpToDate.isSelected();
    }

    @Override
    public void restoreState() {
      checkUpToDate.setSelected(myVcsConfiguration.CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:CheckRemoteStatusCheckinHandlerFactory.java


示例10: refresh

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public void refresh() {
  ChangeListManager.getInstance(myProject).invokeAfterUpdate(new Runnable() {
    @Override
    public void run() {
      myBrowser.rebuildList();
      for (RefreshableOnComponent component : myAdditionalComponents) {
        component.refresh();
      }
    }
  }, InvokeAfterUpdateMode.SILENT, "commit dialog", ModalityState.current());   // title not shown for silently
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CommitChangeListDialog.java


示例11: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
    final JCheckBox codestyleBox = new JCheckBox("Code Style Hook");
    codestyleBox.setEnabled(false);
    codestyleBox.setSelected(true);

    return new RefreshableOnComponent() {
        @Override
        public JComponent getComponent() {
            final JPanel panel = new JPanel(new GridLayout(1, 0));
            panel.add(codestyleBox);
            return panel;
        }

        @Override
        public void refresh() {
        }

        @Override
        public void saveState() {
        }

        @Override
        public void restoreState() {
        }
    };

}
 
开发者ID:stephanos,项目名称:idea-codestyle-hook-plugin,代码行数:30,代码来源:BeforeCheckinHandler.java


示例12: refresh

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
public void refresh() {
  ChangeListManager.getInstance(myProject).invokeAfterUpdate(new Runnable() {
    public void run() {
      myBrowser.rebuildList();
      for (RefreshableOnComponent component : myAdditionalComponents) {
        component.refresh();
      }
    }
  }, InvokeAfterUpdateMode.SILENT, "commit dialog", ModalityState.current());   // title not shown for silently
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:CommitChangeListDialog.java


示例13: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox optimizeBox = new JCheckBox(VcsBundle.message("checkbox.checkin.options.optimize.imports"));

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(optimizeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT = optimizeBox.isSelected();
    }

    @Override
    public void restoreState() {
      optimizeBox.setSelected(getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:OptimizeImportsBeforeCheckinHandler.java


示例14: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox reformatBox = new JCheckBox(VcsBundle.message("checkbox.checkin.options.reformat.code"));

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(reformatBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().REFORMAT_BEFORE_PROJECT_COMMIT = reformatBox.isSelected();
    }

    @Override
    public void restoreState() {
      reformatBox.setSelected(getSettings().REFORMAT_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:ReformatBeforeCheckinHandler.java


示例15: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkBox = new JCheckBox(VcsBundle.message("before.checkin.standard.options.check.smells"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkBox);
      refreshEnable(checkBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT = checkBox.isSelected();
    }

    @Override
    public void restoreState() {
      checkBox.setSelected(getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:29,代码来源:CodeAnalysisBeforeCheckinHandler.java


示例16: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox cleanupCodeCb = new NonFocusableCheckBox(VcsBundle.message("before.checkin.cleanup.code"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel cbPanel = new JPanel(new BorderLayout());
      cbPanel.add(cleanupCodeCb, BorderLayout.WEST);
      CheckinHandlerUtil
              .disableWhenDumb(myProject, cleanupCodeCb, "Code analysis is impossible until indices are up-to-date");
      return cbPanel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT = cleanupCodeCb.isSelected();
    }

    @Override
    public void restoreState() {
      cleanupCodeCb.setSelected(VcsConfiguration.getInstance(myProject).CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:CodeCleanupCheckinHandlerFactory.java


示例17: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkBox = new JCheckBox(VcsBundle.message("before.checkin.standard.options.check.smells"));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      JPanel panel = new JPanel(new BorderLayout());
      panel.add(checkBox);
      CheckinHandlerUtil.disableWhenDumb(myProject, checkBox, "Code analysis is impossible until indices are up-to-date");
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT = checkBox.isSelected();
    }

    @Override
    public void restoreState() {
      checkBox.setSelected(getSettings().CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT);
    }
  };
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:CodeAnalysisBeforeCheckinHandler.java


示例18: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
@Nullable
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox optimizeBox = new JCheckBox(VcsBundle.message("checkbox.checkin.options.optimize.imports"));
  CheckinHandlerUtil.disableWhenDumb(myProject, optimizeBox, "Impossible until indices are up-to-date");

  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      final JPanel panel = new JPanel(new GridLayout(1, 0));
      panel.add(optimizeBox);
      return panel;
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT = optimizeBox.isSelected();
    }

    @Override
    public void restoreState() {
      optimizeBox.setSelected(getSettings().OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT);
    }
  };

}
 
开发者ID:consulo,项目名称:consulo,代码行数:31,代码来源:OptimizeImportsBeforeCheckinHandler.java


示例19: createAdditionalOptionsPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Nullable
RefreshableOnComponent createAdditionalOptionsPanel(CheckinProjectPanel panel, PairConsumer<Object, Object> additionalDataConsumer);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:CheckinEnvironment.java


示例20: getBeforeCheckinConfigurationPanel

import com.intellij.openapi.vcs.ui.RefreshableOnComponent; //导入依赖的package包/类
@Override
public RefreshableOnComponent getBeforeCheckinConfigurationPanel() {
  final JCheckBox checkBox = new JCheckBox(VcsBundle.message("before.checkin.new.todo.check", ""));
  return new RefreshableOnComponent() {
    @Override
    public JComponent getComponent() {
      JPanel panel = new JPanel(new BorderLayout(4, 0));
      panel.add(checkBox, BorderLayout.WEST);
      setFilterText(myConfiguration.myTodoPanelSettings.todoFilterName);
      if (myConfiguration.myTodoPanelSettings.todoFilterName != null) {
        myTodoFilter = TodoConfiguration.getInstance().getTodoFilter(myConfiguration.myTodoPanelSettings.todoFilterName);
      }

      final Consumer<TodoFilter> consumer = new Consumer<TodoFilter>() {
        @Override
        public void consume(TodoFilter todoFilter) {
          myTodoFilter = todoFilter;
          final String name = todoFilter == null ? null : todoFilter.getName();
          myConfiguration.myTodoPanelSettings.todoFilterName = name;
          setFilterText(name);
        }
      };
      final LinkLabel linkLabel = new LinkLabel("Configure", null);
      linkLabel.setListener(new LinkListener() {
        @Override
        public void linkSelected(LinkLabel aSource, Object aLinkData) {
          DefaultActionGroup group = SetTodoFilterAction.createPopupActionGroup(myProject, myConfiguration.myTodoPanelSettings, consumer);
          ActionPopupMenu popupMenu = ActionManager.getInstance().createActionPopupMenu(ActionPlaces.TODO_VIEW_TOOLBAR, group);
          popupMenu.getComponent().show(linkLabel, 0, linkLabel.getHeight());
        }
      }, null);
      panel.add(linkLabel, BorderLayout.CENTER);

      CheckinHandlerUtil.disableWhenDumb(myProject, checkBox, "TODO check is impossible until indices are up-to-date");
      return panel;
    }

    private void setFilterText(final String filterName) {
      if (filterName == null) {
        checkBox.setText(VcsBundle.message("before.checkin.new.todo.check", IdeBundle.message("action.todo.show.all")));
      } else {
        checkBox.setText(VcsBundle.message("before.checkin.new.todo.check", "Filter: " + filterName));
      }
    }

    @Override
    public void refresh() {
    }

    @Override
    public void saveState() {
      myConfiguration.CHECK_NEW_TODO = checkBox.isSelected();
    }

    @Override
    public void restoreState() {
      checkBox.setSelected(myConfiguration.CHECK_NEW_TODO);
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:61,代码来源:TodoCheckinHandler.java



注:本文中的com.intellij.openapi.vcs.ui.RefreshableOnComponent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TestState3类代码示例发布时间:2022-05-22
下一篇:
Java Generics类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap