當前位置: 首頁>>代碼示例>>Java>>正文


Java PropagateSelectionHandler類代碼示例

本文整理匯總了Java中com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler的典型用法代碼示例。如果您正苦於以下問題:Java PropagateSelectionHandler類的具體用法?Java PropagateSelectionHandler怎麽用?Java PropagateSelectionHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PropagateSelectionHandler類屬於com.intellij.execution.testframework.sm.runner.ui包,在下文中一共展示了PropagateSelectionHandler類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createSelectMeListener

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
/**
 * On event - change selection and probably requests focus. Is used when we want
 * navigate from other component to this
 * @return Listener
 */
public PropagateSelectionHandler createSelectMeListener() {
  return new PropagateSelectionHandler() {
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy,
                                  @NotNull final Object sender,
                                  final boolean requestFocus) {
      selectProxy(selectedTestProxy, sender, requestFocus);
    }
  };
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:StatisticsPanel.java

示例2: createSelectMeListener

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
/**
 * On event - change selection and probably requests focus. Is used when we want
 * navigate from other component to this
 * @return Listener
 */
public PropagateSelectionHandler createSelectMeListener() {
  return new PropagateSelectionHandler() {
    public void handlePropagateSelectionRequest(@javax.annotation.Nullable final SMTestProxy selectedTestProxy,
                                  @Nonnull final Object sender,
                                  final boolean requestFocus) {
      selectProxy(selectedTestProxy, sender, requestFocus);
    }
  };
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:15,代碼來源:StatisticsPanel.java

示例3: addPropagateSelectionListener

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
public void addPropagateSelectionListener(final PropagateSelectionHandler handler) {
  myPropagateSelectionHandlers.add(handler);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:StatisticsPanel.java

示例4: fireOnPropagateSelection

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
private void fireOnPropagateSelection(final SMTestProxy selectedTestProxy) {
  for (PropagateSelectionHandler handler : myPropagateSelectionHandlers) {
    handler.handlePropagateSelectionRequest(selectedTestProxy, this, true);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:StatisticsPanel.java

示例5: testChangeSelectionAction

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<SMTestProxy>();
  final Ref<Boolean> focusRequestedRef = new Ref<Boolean>();

  myStatisticsPanel.addPropagateSelectionListener(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @NotNull final Object sender,
                                  final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  // create data fixture
  final SMTestProxy rootSuite = createSuiteProxy("rootSuite");
  final SMTestProxy suite1 = createSuiteProxy("suite1", rootSuite);
  final SMTestProxy test1 = createTestProxy("test1", suite1);

  //on test
  myStatisticsPanel.selectProxy(suite1);
  myStatisticsPanel.selectRow(0);
  assertEquals(test1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on Total
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:61,代碼來源:SMTRunnerStatisticsPanelTest.java

示例6: testChangeSelectionAction

import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
public void testChangeSelectionAction() {
  final Marker onSelectedHappend = new Marker();
  final Ref<SMTestProxy> proxyRef = new Ref<SMTestProxy>();
  final Ref<Boolean> focusRequestedRef = new Ref<Boolean>();

  myStatisticsPanel.addPropagateSelectionListener(new PropagateSelectionHandler() {
    @Override
    public void handlePropagateSelectionRequest(@Nullable final SMTestProxy selectedTestProxy, @Nonnull final Object sender, final boolean requestFocus) {
      onSelectedHappend.set();
      proxyRef.set(selectedTestProxy);
      focusRequestedRef.set(requestFocus);
    }
  });

  // create data fixture
  final SMTestProxy rootSuite = createSuiteProxy("rootSuite");
  final SMTestProxy suite1 = createSuiteProxy("suite1", rootSuite);
  final SMTestProxy test1 = createTestProxy("test1", suite1);

  //on test
  myStatisticsPanel.selectProxy(suite1);
  myStatisticsPanel.selectRow(1);
  assertEquals(test1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(test1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on suite
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(1);
  assertEquals(suite1, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(suite1, proxyRef.get());
  assertTrue(focusRequestedRef.get());

  //on Total
  //reset markers
  onSelectedHappend.reset();
  proxyRef.set(null);
  focusRequestedRef.set(null);

  myStatisticsPanel.selectProxy(rootSuite);
  myStatisticsPanel.selectRow(0);
  assertEquals(rootSuite, myStatisticsPanel.getSelectedItem());

  myStatisticsPanel.showSelectedProxyInTestsTree();
  assertTrue(onSelectedHappend.isSet());
  assertEquals(rootSuite, proxyRef.get());
  assertTrue(focusRequestedRef.get());
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:60,代碼來源:SMTRunnerStatisticsPanelTest.java


注:本文中的com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。