Examples of ReplaceText


Examples of jsx.ui.Patch.ReplaceText

                        if (nextItemInPrev == -1) {
                            if (prevItemInNext == -1) {
                                if (prevItem instanceof VirtualText && nextItem instanceof VirtualText) {
                                    nextItem.dom = prevItem.dom;
                                    patches.add(new ReplaceText(prevItem, (VirtualText) nextItem));
                                } else {
                                    patches.add(new ReplaceChild(context, prevItem, nextItem));
                                }
                                prevPosition++;
                            } else {
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

            return;
        }

        final String searchText = display.getFilterTextBox().getValue();
        boolean caseSensitive = display.getCaseSensitiveChk().getValue();
        ReplaceText action =
                new ReplaceText(transUnits, searchText, replacement,
                        caseSensitive);
        PreviewReplaceText previewAction = new PreviewReplaceText(action);
        dispatcher.execute(previewAction,
                new AsyncCallback<PreviewReplaceTextResult>() {
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

        }

        final String searchText = display.getFilterTextBox().getValue();
        final String replacement = display.getReplacementTextBox().getValue();
        boolean caseSensitive = display.getCaseSensitiveChk().getValue();
        ReplaceText action =
                new ReplaceText(transUnits, searchText, replacement,
                        caseSensitive);
        dispatcher.execute(action, new AsyncCallback<UpdateTransUnitResult>() {

            @Override
            public void onFailure(Throwable e) {
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

    @Test
    public void testExecute() throws Exception {
        TransUnit transUnit =
                TestFixture.makeTransUnit(1, ContentState.NeedReview, "target");
        PreviewReplaceText action =
                new PreviewReplaceText(new ReplaceText(transUnit, "target",
                        "replace", true));

        PreviewReplaceTextResult result = handler.execute(action, null);

        verify(identity).checkLoggedIn();
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

    @Test
    public void canReplaceTextCaseInsensitively() throws ActionException {
        TransUnit transUnit =
                transUnitBuilder.addTargets("abc", "AbC", "ABC").build();
        ReplaceText action =
                new ReplaceText(transUnit, "abc", "123", CASE_INSENSITIVE);

        handler.execute(action, context);

        ArgumentCaptor<UpdateTransUnit> captor =
                ArgumentCaptor.forClass(UpdateTransUnit.class);
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

    @Test
    public void canReplaceTextCaseSensitively() throws ActionException {
        TransUnit transUnit =
                transUnitBuilder.addTargets("abc", "AbC", "ABC").build();
        ReplaceText action =
                new ReplaceText(transUnit, "abc", "123", CASE_SENSITIVE);

        handler.execute(action, context);

        ArgumentCaptor<UpdateTransUnit> captor =
                ArgumentCaptor.forClass(UpdateTransUnit.class);
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

    }

    @Test(expectedExceptions = { ActionException.class })
    public void willThrowExceptionIfSearchTextIsEmpty() throws ActionException {
        TransUnit transUnit = transUnitBuilder.build();
        ReplaceText action =
                new ReplaceText(transUnit, "", "123", CASE_SENSITIVE);
        handler.execute(action, context);
    }
View Full Code Here

Examples of org.zanata.webtrans.shared.rpc.ReplaceText

    }

    @Test(expectedExceptions = { ActionException.class })
    public void willThrowExceptionIfReplaceTextIsEmpty() throws ActionException {
        TransUnit transUnit = transUnitBuilder.build();
        ReplaceText action =
                new ReplaceText(transUnit, "abc", null, CASE_SENSITIVE);
        handler.execute(action, context);
    }
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.