protected org.eclipse.swt.widgets.Widget ModelSetMultipleRule3( boolean before, Widget widget, StyleRule styleRule1, StyleRule styleRule2, StyleRule styleRule3) { if (!before) viewer.setContents(widget); widget.getStyleRules().add(styleRule1); widget.getStyleRules().add(styleRule2); widget.getStyleRules().add(styleRule3); if (before) viewer.setContents(widget); return SWTUtils.getWidget(viewer, widget); }
protected org.eclipse.swt.widgets.Widget ModelMoveThreeRule( boolean before, Widget widget, StyleRule styleRule1, StyleRule styleRule2, StyleRule styleRule3, String propertyName) { if (!before) viewer.setContents(widget); widget.getStyleRules().add(styleRule1); widget.getStyleRules().add(styleRule2); widget.getStyleRules().add(styleRule3); widget.getStyleRules().move(2, 1); // widget = TestUtils.switchFirstAndSecondRule(widget, propertyName); if (before) viewer.setContents(widget); return SWTUtils.getWidget(viewer, widget); }
protected org.eclipse.swt.widgets.Widget ModelRemoveRuleByRename3( boolean before, Widget widget, StyleRule styleRule1, StyleRule styleRule2, StyleRule styleRule3, String propertyName) { if (!before) viewer.setContents(widget); widget.getStyleRules().add(styleRule1); widget.getStyleRules().add(styleRule2); widget.getStyleRules().add(styleRule3); widget = TestUtils.removeFirstRuleByRename(widget, propertyName); if (before) viewer.setContents(widget); return SWTUtils.getWidget(viewer, widget); }
protected org.eclipse.swt.widgets.Widget ModelSetRule( boolean before, Widget widget, StyleRule styleRule) { if (!before) viewer.setContents(widget); widget.getStyleRules().add(styleRule); if (before) viewer.setContents(widget); return SWTUtils.getWidget(viewer, widget); // Button swtButton = (Button) SWTUtils.getWidget(viewer,widget); // Assert.assertEquals(expected, swtButton.getText()); }