use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class GitImporterPagePresenterTest method testGo.
@Test
public void testGo() {
AcceptsOneWidget container = mock(AcceptsOneWidget.class);
presenter.go(container);
verify(container).setWidget(eq(view));
verify(view).setProjectName(anyString());
verify(view).setProjectDescription(anyString());
verify(view).setProjectUrl(anyString());
verify(view).setInputsEnableState(eq(true));
verify(view).focusInUrlInput();
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class GithubImporterPagePresenterTest method testGo.
@Test
public void testGo() throws Exception {
String importerDescription = "description";
AcceptsOneWidget container = mock(AcceptsOneWidget.class);
ProjectImporterDescriptor projectImporter = mock(ProjectImporterDescriptor.class);
//when(wizardContext.getData(ImportProjectWizard.PROJECT_IMPORTER)).thenReturn(projectImporter);
when(projectImporter.getDescription()).thenReturn(importerDescription);
presenter.go(container);
verify(view).setInputsEnableState(eq(true));
verify(container).setWidget(eq(view));
verify(view).focusInUrlInput();
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class TargetsPresenter method onTargetSelected.
@Override
public void onTargetSelected(final Target target) {
selectedTarget = target;
if (target == null) {
view.showHintPanel();
return;
}
final CategoryPage page = categoryPageRegistry.getCategoryPage(target.getCategory());
if (page == null) {
view.showHintPanel();
return;
}
page.go(new AcceptsOneWidget() {
@Override
public void setWidget(IsWidget widget) {
view.setPropertiesPanel(widget.asWidget());
page.setCurrentSelection(target);
}
});
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class ProcessesPanelPresenter method addOutputConsole.
private void addOutputConsole(final String id, final ProcessTreeNode processNode, final OutputConsole outputConsole, final boolean machineConsole) {
consoles.put(id, outputConsole);
consoleCommands.put(outputConsole, id);
outputConsole.go(new AcceptsOneWidget() {
@Override
public void setWidget(final IsWidget widget) {
view.addProcessNode(processNode);
view.addWidget(id, outputConsole.getTitle(), outputConsole.getTitleIcon(), widget, machineConsole);
if (!MACHINE_NODE.equals(processNode.getType())) {
ProcessTreeNode node = view.getNodeById(id);
view.selectNode(node);
notifyTreeNodeSelected(node);
}
}
});
outputConsole.addActionDelegate(this);
}
use of com.google.gwt.user.client.ui.AcceptsOneWidget in project che by eclipse.
the class DevelopmentCategoryPresenterTest method testGo.
@Test
public void testGo() throws Exception {
AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class);
arbitraryCategoryPresenter.go(container);
verify(container).setWidget(eq(developmentView));
}
Aggregations