Examples of EditorFilter


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

        return display.isFocused();
    }

    @Override
    public void searchTerm(String searchTerm) {
        EditorFilter editorFilter = QueryParser.parse(searchTerm);
        boolean invalidBefore =
                invalidDateFormat(editorFilter.getLastModifiedBefore());
        boolean invalidAfter =
                invalidDateFormat(editorFilter.getLastModifiedAfter());
        if (invalidBefore || invalidAfter) {
            eventBus.fireEvent(new NotificationEvent(
                    NotificationEvent.Severity.Warning,
                    "Invalid date, expected format yyyy-mm-dd"));

            display.selectPartialText(invalidBefore ? editorFilter
                    .getLastModifiedBefore() : editorFilter
                    .getLastModifiedAfter());
        } else {
            HistoryToken newToken = history.getHistoryToken();
            populateHistoryTokenForEditorFilter(newToken, editorFilter);
            history.newItem(newToken);
View Full Code Here

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

        log.info("action: {}", action);
        int targetOffset = action.getOffset();
        int targetPageIndex = targetOffset / action.getCount();
        GetTransUnitsNavigationResult navigationResult = null;
        EditorFilter editorFilter = action.getEditorFilter();
        FilterConstraints constraints =
                FilterConstraints
                        .builder()
                        .filterBy(editorFilter.getTextInContent())
                        .lastModifiedBy(editorFilter.getLastModifiedByUser())
                        .targetChangedBefore(
                                parseDateIfPresent(editorFilter
                                        .getLastModifiedBefore()))
                        .targetChangedAfter(
                                parseDateIfPresent(editorFilter
                                        .getLastModifiedAfter()))
                        .resourceIdIs(editorFilter.getResId())
                        .msgContext(editorFilter.getMsgContext())
                        .sourceCommentContains(editorFilter.getSourceComment())
                        .targetCommentContains(editorFilter.getTransComment())
                        .caseSensitive(false).checkInSource(true)
                        .checkInTarget(true)
                        .includeStates(action.getFilterStates()).build();
        if (action.isNeedReloadIndex()) {
            GetTransUnitsNavigation getTransUnitsNavigation =
View Full Code Here

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

        configHolder.setFilterByHasError(newHistoryToken.isFilterHasError());

        DocumentId documentId =
                documentListPresenter.getDocumentId(newHistoryToken
                        .getDocumentPath());
        EditorFilter editorFilter = getEditorFilterFromToken(newHistoryToken);
        if (!getTransUnitActionContextHolder.isContextInitialized()
                && documentId != null) {
            DocumentInfo documentInfo =
                    documentListPresenter.getDocumentInfo(documentId);
            // if editor is not yet initialized, we want to load document with
View Full Code Here

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

        appPresenter.showView(newHistoryToken.getView());
    }

    private static EditorFilter getEditorFilterFromToken(
            HistoryToken newHistoryToken) {
        return new EditorFilter(newHistoryToken.getEditorTextSearch(),
                newHistoryToken.getResId(),
                newHistoryToken.getChangedBefore(),
                newHistoryToken.getChangedAfter(),
                newHistoryToken.getLastModifiedBy(),
                newHistoryToken.getSourceComment(),
View Full Code Here

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

                    .getProjectSearchReplacement());
        }
    }

    protected void processMessageFilterOptions(HistoryToken token) {
        EditorFilter newEditorToken = getEditorFilterFromToken(token);
        EditorFilter oldEditorToken =
                getEditorFilterFromToken(currentHistoryState);
        boolean editorFilterChanged =
                !Objects.equal(newEditorToken, oldEditorToken);
        if (!equal(token.isFilterUntranslated(),
                currentHistoryState.isFilterUntranslated())
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.