本文整理匯總了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);
}
};
}
示例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);
}
};
}
示例3: addPropagateSelectionListener
import com.intellij.execution.testframework.sm.runner.ui.PropagateSelectionHandler; //導入依賴的package包/類
public void addPropagateSelectionListener(final PropagateSelectionHandler handler) {
myPropagateSelectionHandlers.add(handler);
}
示例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);
}
}
示例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());
}
示例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());
}