本文整理汇总了Java中org.guvnor.m2repo.client.event.M2RepoRefreshEvent类的典型用法代码示例。如果您正苦于以下问题:Java M2RepoRefreshEvent类的具体用法?Java M2RepoRefreshEvent怎么用?Java M2RepoRefreshEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
M2RepoRefreshEvent类属于org.guvnor.m2repo.client.event包,在下文中一共展示了M2RepoRefreshEvent类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testRefresh
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@Test
public void testRefresh() {
when(menuRefreshButton.addClickHandler(any(ClickHandler.class))).thenAnswer(new Answer() {
public Object answer(InvocationOnMock aInvocation) throws Throwable {
clickHandler = (ClickHandler) aInvocation.getArguments()[0];
return null;
}
});
final MenuCustom refresh = (MenuCustom) presenter.getMenus().getItems().get(1);
refresh.build();
clickHandler.onClick(new ClickEvent() {
});
verify(refreshEvents).fire(any(M2RepoRefreshEvent.class));
}
示例2: getMenus
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
return MenuFactory.newTopLevelMenu( AppConstants.INSTANCE.Upload() )
.respondsWith( new Command() {
@Override
public void execute() {
UploadFormPresenter uploadFormPresenter = iocManager.lookupBean( UploadFormPresenter.class ).getInstance();
uploadFormPresenter.showView();
}
} )
.endMenu()
.newTopLevelMenu( AppConstants.INSTANCE.Refresh() )
.respondsWith( new Command() {
@Override
public void execute() {
refreshEvents.fire( new M2RepoRefreshEvent() );
}
} )
.endMenu()
.build();
}
示例3: getMenus
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@WorkbenchMenu
public Menus getMenus() {
return MenuFactory.newTopLevelMenu(translationService.getTranslation(AppConstants.M2RepoPerspective_Upload))
.respondsWith(() -> {
UploadFormPresenter uploadFormPresenter = uploadFormPresenterProvider.get();
uploadFormPresenter.showView();
})
.endMenu()
.newTopLevelMenu(translationService.getTranslation(AppConstants.M2RepoPerspective_Refresh))
.respondsWith(() -> refreshEvents.fire(new M2RepoRefreshEvent()))
.endMenu()
.build();
}
示例4: M2RepoEditorPresenter
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@Inject
public M2RepoEditorPresenter(final Event<M2RepoRefreshEvent> refreshEvents,
final UploadFormPresenter uploadFormPresenter,
final MavenRepositoryPagedJarTable view) {
this.refreshEvents = refreshEvents;
this.uploadFormPresenter = uploadFormPresenter;
this.view = view;
}
示例5: refreshEvent
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
public void refreshEvent(@Observes final M2RepoRefreshEvent event) {
view.refresh();
}
示例6: onRefresh
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@Override
public void onRefresh() {
refreshEvents.fire(new M2RepoRefreshEvent());
}
示例7: setup
import org.guvnor.m2repo.client.event.M2RepoRefreshEvent; //导入依赖的package包/类
@Before
public void setup() {
doNothing().when(refreshEvents).fire(any(M2RepoRefreshEvent.class));
}