Package de.fu_berlin.inf.dpp.activities.serializable

Examples of de.fu_berlin.inf.dpp.activities.serializable.TextEditActivityDataObject


        LinkedHashMap<SPathDataObject, ViewportActivityDataObject> viewport = new LinkedHashMap<SPathDataObject, ViewportActivityDataObject>();

        for (IActivityDataObject activityDataObject : toOptimize) {

            if (activityDataObject instanceof TextEditActivityDataObject) {
                TextEditActivityDataObject textEdit = (TextEditActivityDataObject) activityDataObject;
                textEdit = joinTextEdits(result, textEdit);
                result.add(textEdit);
            } else if (activityDataObject instanceof TextSelectionActivityDataObject) {
                selection = (TextSelectionActivityDataObject) activityDataObject;
            } else if (activityDataObject instanceof ViewportActivityDataObject) {
View Full Code Here


            return textEdit;
        }

        IActivityDataObject lastActivity = result.get(result.size() - 1);
        if (lastActivity instanceof TextEditActivityDataObject) {
            TextEditActivityDataObject lastTextEdit = (TextEditActivityDataObject) lastActivity;

            if (((lastTextEdit.getSource() == null) || lastTextEdit.getSource()
                .equals(textEdit.getSource()))
                && (textEdit.getOffset() == lastTextEdit.getOffset()
                    + lastTextEdit.getText().length())) {
                result.remove(lastTextEdit);
                textEdit = new TextEditActivityDataObject(
                    lastTextEdit.getSource(),
                    lastTextEdit.getOffset(),
                    lastTextEdit.getText() + textEdit.getText(),
                    lastTextEdit.getReplacedText() + textEdit.getReplacedText(),
                    lastTextEdit.getPath());
            }
        }

        return textEdit;
    }
View Full Code Here

    public void dispatch(IActivityReceiver receiver) {
        receiver.receive(this);
    }

    public IActivityDataObject getActivityDataObject(ISarosSession sarosSession) {
        return new TextEditActivityDataObject(source.getJID(), offset, text,
            replacedText, path.toSPathDataObject(sarosSession));
    }
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.activities.serializable.TextEditActivityDataObject

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.