@Override public void go(AcceptsOneWidget container) { container.setWidget(view); String currentThemeId = preferencesManager.getValue(PREF_IDE_GENERAL_THEME); if (currentThemeId == null || currentThemeId.isEmpty()) { currentThemeId = themeAgent.getCurrentThemeId(); } view.setThemes(themeAgent.getThemes(), currentThemeId); view.setAskBeforeClosingTab( Boolean.parseBoolean(preferencesManager.getValue(PREF_IDE_GENERAL_TAB_CLOSING))); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class); pagePresenter.go(container); verify(appContext).getWorkspace(); verify(container).setWidget(eq(pageView)); verify(configuration, atLeastOnce()).getHost(); verify(configuration, atLeastOnce()).getPort(); verify(configuration, atLeastOnce()).getConnectionProperties(); verify(pageView).setHost(eq(HOST)); verify(pageView).setPort(eq(PORT)); verify(pageView).setBinaryPath(nullable(String.class)); verify(pageView).setDevHost(eq(false)); verify(pageView).setPortEnableState(eq(true)); verify(pageView).setHostEnableState(eq(true)); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { view = clientFactory.getSeattleView(); dbService = clientFactory.getDbService(); analytics = clientFactory.getAnalytics(); view.setPresenter(this); localStorage = Storage.getLocalStorageIfSupported(); buildStationList(); getCameras(); timer = new Timer() { @Override public void run() { getFlowData(); timer = null; } }; timer.schedule(250); if (Consts.ANALYTICS_ENABLED) { analytics.trackView("/Seattle"); } panel.setWidget(view); }
@Override public void start(AcceptsOneWidget panel, final EventBus eventBus) { view = clientFactory.getCameraView(); this.eventBus = eventBus; analytics = clientFactory.getAnalytics(); view.setPresenter(this); Place place = clientFactory.getPlaceController().getWhere(); if (place instanceof CameraPlace) { CameraPlace cameraPlace = (CameraPlace) place; cameraId = cameraPlace.getId(); cameraItem = cameraPlace.getCameraItem(); view.showProgressIndicator(); view.renderCameraImage(cameraItem.getUrl()); } if (Consts.ANALYTICS_ENABLED) { analytics.trackView("/Camera/" + cameraId); } panel.setWidget(view); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { view = clientFactory.getTacomaView(); dbService = clientFactory.getDbService(); analytics = clientFactory.getAnalytics(); view.setPresenter(this); localStorage = Storage.getLocalStorageIfSupported(); buildStationList(); getCameras(); getFlowData(); if (Consts.ANALYTICS_ENABLED) { analytics.trackView("/Tacoma"); } panel.setWidget(view); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class); presenter.go(container); verify(container).setWidget(eq(view)); verify(view).setWorkingDirectory(eq(WORK_DIR)); verify(view).setGwtModule(eq(GWT_MODULE)); verify(view).setCodeServerAddress(eq(CODE_SERVER_ADDRESS)); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { ImportPresenter importPresenter = presenterFactory.getImportPresenter(); importPresenter.bind(); switch (importPlace.getType()) { case CONTENT: importPresenter.importFolder(); break; case EDIT_ITEMS: importPresenter.updateImportedObjects(importPlace.getBatchId()); break; case EDIT_PARENT: importPresenter.selectParent(importPlace.getBatchId()); break; default: // HISTORY importPresenter.selectBatchFromHistory(); break; } panel.setWidget(importPresenter.getUI()); }
@Override public void start(AcceptsOneWidget containerWidget, EventBus eventBus) { this.eventBus = eventBus; ActionsMenuBar view = init(name); containerWidget.setWidget(view.asWidget()); }
@Override public void start(AcceptsOneWidget containerWidget, EventBus eventBus) { this.eventBus = eventBus; view = clientFactory.getInteractiveDownloadDataView(); view.setName(name); view.setPresenter(this); containerWidget.setWidget(view.asWidget()); init(); // Get the grid and generate dependent widgets AsyncCallback gridCallback = onGotGrid; Util.getRPCService().getGrid(dsID, varID, gridCallback); }
@Override public void start(AcceptsOneWidget containerWidget, EventBus eventBus) { this.eventBus = eventBus; OutputControlPanel view = init(name); containerWidget.setWidget(view.asWidget()); }
@Override public void start(final AcceptsOneWidget containerWidget, EventBus eventBus) { if (place.getLectureId() == null || place.getCourseId() == null) { Places.goHome(); return; } LectureView.get().init(place); LectureView.get().show(containerWidget); }
@Override public void start(final AcceptsOneWidget containerWidget, EventBus eventBus) { if (place.getCourseId() == null) { Places.goHome(); return; } CourseView.get().init(place); CourseView.get().show(containerWidget); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { view = clientFactory.getAnalyticsView(); view.setPresenter(this); panel.setWidget(view.asWidget()); }
@Override public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) { setView(App.getClientFactory().getNavView()); super.start(acceptsOneWidget, eventBus); listenForListChanges(); App.getNoteListService().refreshNoteLists(new AppCallback<ListResponse<NoteList>>() { @Override public void handleSuccess(ListResponse<NoteList> result) { getView().populateLists(result.list); } }); }
@Test public void pageShouldBeInitialized() throws Exception { AcceptsOneWidget container = mock(AcceptsOneWidget.class); presenter.resetFrom(command); presenter.setFieldStateActionDelegate(fieldStateDelegate); presenter.go(container); verify(container).setWidget(view); verify(view).setMainClass(MAIN_CLASS_PATH); verify(view).setCommandLine(COMMAND_LINE); verify(fieldStateDelegate).updatePreviewURLState(false); }
@Override public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) { setView(App.getClientFactory().getAddNoteView()); super.start(acceptsOneWidget, eventBus); App.getEventBus().addHandler(NoteListsModifiedEvent.TYPE, new NoteListsModifiedEventHandler() { @Override public void onNoteListsModified(Map<Long, NoteList> noteLists) { getView().stopProcessing(); populateLists(noteLists.values(), null); } }); App.getEventBus().addHandler(NoteListAddedEvent.TYPE, new NoteListAddedHandler() { @Override public void onNoteListAdded(ArrayList<NoteList> allLists, NoteList noteList) { populateLists(allLists, noteList); getView().focusOnSaveButton(); } }); // Fetch lists App.getNoteListService().refreshNoteLists(new AppCallback<ListResponse<NoteList>>( getView()) { @Override public void handleSuccess(ListResponse<NoteList> result) { getView().stopProcessing(); populateLists(result.list, getSelectedList()); } }); }
@Override public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) { setView(getView()); super.start(acceptsOneWidget, eventBus); user = App.getAppModel().getMe(); viewProfile(); }
@Override public void start(AcceptsOneWidget acceptsOneWidget, EventBus eventBus) { setView(App.getClientFactory().getUserView()); super.start(acceptsOneWidget, eventBus); this.showingUser = App.getAppModel().getMe(); getView().showUser(showingUser); }
@Override public void start(AcceptsOneWidget panel, EventBus eventBus) { panel.setWidget(editor.getUI()); Record[] digitalObjects = place.getDigitalObjects(); if (digitalObjects != null) { editor.edit(place.getEditorId(), digitalObjects); } else { editor.edit(place.getEditorId(), place.getPids()); } }
@Override public void start(AcceptsOneWidget panel, final EventBus eventBus) { view = clientFactory.getAboutView(); this.eventBus = eventBus; analytics = clientFactory.getAnalytics(); view.setPresenter(this); if (Consts.ANALYTICS_ENABLED) { analytics.trackView("/About"); } panel.setWidget(view); }
@Override public void start(AcceptsOneWidget panel, final EventBus eventBus) { view = clientFactory.getMenuView(); this.eventBus = eventBus; view.setPresenter(this); view.render(createTopicsList()); panel.setWidget(view); }
@Override public void start(AcceptsOneWidget panel, final EventBus eventBus) { view = clientFactory.getSettingsView(); this.eventBus = eventBus; analytics = clientFactory.getAnalytics(); view.setPresenter(this); if (Consts.ANALYTICS_ENABLED) { analytics.trackView("/Settings"); } panel.setWidget(view); }
@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(); }
@Override public void go(AcceptsOneWidget container) { container.setWidget(view); final ProjectWizardMode wizardMode = ProjectWizardMode.parse(context.get(WIZARD_MODE_KEY)); final String projectName = dataObject.getName(); if (CREATE == wizardMode && projectName != null) { updateDelegate.updateControls(); } updateView(); validateCoordinates(); }
/** {@inheritDoc} */ @Override public void go(AcceptsOneWidget container) { container.setWidget(view); refreshTable(); setSchemas(); }
@Inject public PartStackViewImpl( PartStackUIResources resources, CoreLocalizationConstant localizationConstant) { this.resources = resources; this.localizationConstant = localizationConstant; initWidget(UI_BINDER.createAndBindUi(this)); partStackContent.getElement().getStyle().setPosition(Style.Position.ABSOLUTE); tabs = new HashMap<>(); partViewContainer = new AcceptsOneWidget() { @Override public void setWidget(IsWidget widget) { partStackContent.add(widget); } }; addDomHandler(this, MouseDownEvent.getType()); addDomHandler(this, ContextMenuEvent.getType()); setMaximized(false); addMaximizeButton(); addHideButton(); addMenuButton(); }
@Override public void go(AcceptsOneWidget container) { final Resource resource = appContext.getResource(); Preconditions.checkState(resource != null); final Optional<Project> project = resource.getRelatedProject(); isPlainJava = JAVAC.equals(project.get().getType()); setReadOnlyMod(); container.setWidget(view); if (!categories.isEmpty()) { view.renderNodes(); return; } classpathContainer .getClasspathEntries(project.get().getLocation().toString()) .then( new Operation<List<ClasspathEntryDto>>() { @Override public void apply(List<ClasspathEntryDto> entries) throws OperationException { categories.clear(); for (ClasspathEntryDto entry : entries) { if (SOURCE == entry.getEntryKind()) { categories.put(entry.getPath(), entry); } } view.setData(categories); view.renderNodes(); } }); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class); pagePresenter.go(container); verify(container).setWidget(eq(pageView)); verify(configuration, times(3)).getConnectionProperties(); }
@Override public void go(AcceptsOneWidget container) { container.setWidget(view); updateView(); view.setInputsEnableState(true); view.focusInUrlInput(); }
@Override public void go(final AcceptsOneWidget container) { selectedProjectImporter = null; view.reset(); container.setWidget(view); loadImporters(); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = mock(AcceptsOneWidget.class); presenter.go(container); verify(view).setGoals(anySetOf(CommandGoal.class)); verify(container).setWidget(view); }
@Override public void go(AcceptsOneWidget container) { container.setWidget(view); view.setWorkingDirectory(editedCommandModel.getWorkingDirectory()); view.setArguments(editedCommandModel.getArguments()); }
@Test public void pageSouldBeShown() throws Exception { AcceptsOneWidget acceptsOneWidget = mock(AcceptsOneWidget.class); presenter.go(acceptsOneWidget); verify(view).showDialog(); verify(acceptsOneWidget).setWidget(view); }
/** {@inheritDoc} */ @Override public void go(AcceptsOneWidget container) { mainMenu.go(view.getMenuPanel()); toolbarPresenter.go(view.getToolbarPanel()); bottomMenu.go(view.getStatusPanel()); container.setWidget(view); }
/** {@inheritDoc} */ @Override public void go(AcceptsOneWidget container) { container.setWidget(view); List<ExtensionDescription> extensions = new ArrayList<>(); for (ExtensionDescription ed : extensionRegistry.getExtensionDescriptions().values()) { extensions.add(ed); } view.setExtensions(extensions); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = Mockito.mock(AcceptsOneWidget.class); pagePresenter.go(container); verify(container).setWidget(eq(pageView)); verify(configuration, atLeastOnce()).getConnectionProperties(); verify(pageView).setScriptPath(nullable(String.class)); }
@Test public void testGo() throws Exception { AcceptsOneWidget container = mock(AcceptsOneWidget.class); manager.go(container); verify(container).setWidget(eq(view)); }
@Test public void methodGoShouldBePerformed() { AcceptsOneWidget container = mock(AcceptsOneWidget.class); findResultPresenter.go(container); verify(container).setWidget(view); }
@Override public void go(@NotNull AcceptsOneWidget container) { container.setWidget(view); if (Strings.isNullOrEmpty(dataObject.getName()) && Strings.isNullOrEmpty(dataObject.getSource().getLocation())) { ignoreChanges = true; view.unmarkURL(); view.unmarkName(); view.setURLErrorMessage(null); } view.setProjectName(dataObject.getName()); view.setProjectDescription(dataObject.getDescription()); view.setProjectUrl(dataObject.getSource().getLocation()); view.setKeepDirectoryChecked(false); view.setBranchChecked(false); view.setDirectoryName(""); view.setBranchName(""); view.enableDirectoryNameField(false); view.enableBranchNameField(false); view.highlightDirectoryNameField(false); view.setInputsEnableState(true); view.focusInUrlInput(); ignoreChanges = false; }
@Override public void go(AcceptsOneWidget container) { container.setWidget(view); final ProjectWizardMode wizardMode = ProjectWizardMode.parse(context.get(WIZARD_MODE_KEY)); final String projectName = dataObject.getName(); if (CREATE == wizardMode && projectName != null) { updateDelegate.updateControls(); } updateView(); validateAttributes(); }