Examples of UndoLink


Examples of org.zanata.webtrans.client.ui.UndoLink

            public void onSuccess(final UpdateTransUnitResult result) {
                if (result.getUpdateInfoList().isEmpty()) {
                    eventBus.fireEvent(new NotificationEvent(Info, messages
                            .noTranslationToMerge()));
                } else {
                    final UndoLink undoLink = undoLinkProvider.get();
                    undoLink.prepareUndoFor(result);

                    List<String> rowIndicesOrNull =
                            Lists.transform(result.getUpdateInfoList(),
                                    SuccessRowIndexOrNullFunction.FUNCTION);
                    Iterable<String> successRowIndices =
View Full Code Here

Examples of org.zanata.webtrans.client.ui.UndoLink

                                        updatedTU.getId().toString()),
                        goToRowLink));
                int rowIndexOnPage =
                        navigationService.findRowIndexById(updatedTU.getId());
                if (rowIndexOnPage != NavigationService.UNDEFINED) {
                    UndoLink undoLink = undoLinkProvider.get();
                    undoLink.prepareUndoFor(result);
                    targetContentsPresenter.addUndoLink(rowIndexOnPage,
                            undoLink);
                    navigationService.updateDataModel(updatedTU);
                    targetContentsPresenter.confirmSaved(updatedTU);
                    targetContentsPresenter.setFocus();
View Full Code Here

Examples of org.zanata.webtrans.client.ui.UndoLink

                            messages.replacedTextInMultipleTextFlows(
                                    searchText, replacement,
                                    updateInfoList.size());
                }

                final UndoLink undoLink = undoLinkProvider.get();
                undoLink.prepareUndoFor(result);
                undoLink.setUndoCallback(new UndoLink.UndoCallback() {
                    @Override
                    public void preUndo() {
                        executePreUndo(updateInfoList);
                    }
View Full Code Here

Examples of org.zanata.webtrans.client.ui.UndoLink

        verify(spyPresenter).copySource(editor, selectedTU.getId());
    }

    @Test
    public void canAddUndoLink() {
        UndoLink undoLink = mock(UndoLink.class);

        presenter.addUndoLink(0, undoLink);

        verify(display).addUndo(undoLink);
    }
View Full Code Here

Examples of org.zanata.webtrans.client.ui.UndoLink

                Lists.newArrayList(makeTransUnit(1, ContentState.New),
                        makeTransUnit(2, ContentState.NeedReview),
                        makeTransUnit(3, ContentState.New),
                        makeTransUnit(4, ContentState.NeedReview));
        mockCurrentPageToReturn(currentPageRows);
        UndoLink undoLink = mock(UndoLink.class);
        DocumentId documentId = new DocumentId(new Long(0), "");
        when(undoLinkProvider.get()).thenReturn(undoLink);

        // When:
        MergeOptions opts = MergeOptions.allFuzzy();
View Full Code Here

Examples of org.zanata.webtrans.client.ui.UndoLink

        // Given:
        // there is untranslated text flow on page
        List<TransUnit> currentPageRows =
                Lists.newArrayList(makeTransUnit(1, ContentState.New));
        mockCurrentPageToReturn(currentPageRows);
        UndoLink undoLink = mock(UndoLink.class);
        when(undoLinkProvider.get()).thenReturn(undoLink);

        // When:
        MergeOptions opts = MergeOptions.allFuzzy();
        opts.setDifferentProject(MergeRule.REJECT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.