Package org.jitterbit.ui.util.find

Examples of org.jitterbit.ui.util.find.SearchAndReplaceTextTarget


        public final SearchAndReplaceTextTarget text;

        public MappingTarget(NodeMapping mapping) {
            this.mapping = mapping;
            String translatedExpression = mapping.getTranslatedExpression(expressionTranslator);
            text = new SearchAndReplaceTextTarget(translatedExpression);
        }
View Full Code Here


        return null;
    }

    private SearchAndReplaceTextTarget createTextTargetForScript(Script script) {
        String expression = getExpression(script);
        return new SearchAndReplaceTextTarget(expression);
    }
View Full Code Here

    }

    @Override
    public void replace(Match match, String replacement) {
        ScriptMatch scriptMatch = (ScriptMatch) match;
        SearchAndReplaceTextTarget target = getTextToReplace(scriptMatch);
        target.replace(scriptMatch.textLocation, replacement);
        handleReplace(scriptMatch.script, target);
    }
View Full Code Here

        }
        return replacedMatches;
    }

    private void replaceAllInScript(Script script, TextSearchParameters searchParams, List<ScriptMatch> bin) {
        SearchAndReplaceTextTarget text = createTextTargetForScript(script);
        List<TextSearchMatch> replacedOccurrances = text.replaceAll(searchParams);
        if (!replacedOccurrances.isEmpty()) {
            for (TextSearchMatch textMatch : replacedOccurrances) {
                bin.add(new ScriptMatch(script, scripts, textMatch));
            }
            handleReplace(script, text);
View Full Code Here

        }
        return next;
    }

    private ScriptMatch searchInScript(Script script, TextSearchParameters params) {
        SearchAndReplaceTextTarget target = createTextTargetForScript(script);
        TextSearchMatch textMatch = target.nextMatch(params);
        if (textMatch != null) {
            currentText = target;
            return new ScriptMatch(script, scripts, textMatch);
        }
        return null;
View Full Code Here

TOP

Related Classes of org.jitterbit.ui.util.find.SearchAndReplaceTextTarget

Copyright © 2018 www.massapicom. 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.