Package de.fu_berlin.inf.dpp.activities.business

Examples of de.fu_berlin.inf.dpp.activities.business.TextEditActivity


        result = prime * result + ((text == null) ? 0 : text.hashCode());
        return result;
    }

    public List<TextEditActivity> toTextEdit(SPath path, User source) {
        return Collections.singletonList(new TextEditActivity(source,
            getPosition(), getText(), "", path));
    }
View Full Code Here


                lastOp = operation;
                continue;
            }

            if (isReplace(lastOp, operation)) {
                result.add(new TextEditActivity(source, lastOp.getPosition(),
                    operation.getText(), lastOp.getText(), path));
                lastOp = null;
                continue;
            } else {
                // Cannot combine two operations to a replace
View Full Code Here

        assert false;
        return null;
    }

    public IActivity getActivity(ISarosSession sarosSession) {
        return new TextEditActivity(sarosSession.getUser(source), offset, text,
            replacedText, path.toSPath(sarosSession));
    }
View Full Code Here

        result = prime * result + ((text == null) ? 0 : text.hashCode());
        return result;
    }

    public List<TextEditActivity> toTextEdit(SPath path, User source) {
        return Collections.singletonList(new TextEditActivity(source,
            getPosition(), "", getText(), path));
    }
View Full Code Here

        final List<User> remoteUsersWithReadOnlyAccess = sarosSession
            .getRemoteUsersWithReadOnlyAccess();
        final List<User> remoteUsers = sarosSession.getRemoteUsers();
        if (activity instanceof TextEditActivity) {
            TextEditActivity textEdit = (TextEditActivity) activity;

            result.add(new QueueItem(host, jupiterClient.generate(textEdit)));

            /**
             * This activityDataObject still needs to be sent to all users with
View Full Code Here

            for (int i = 0; i < replaceLength; i++)
                sb.append("?");
            replacedText = sb.toString();
        }

        TextEditActivity textEdit = new TextEditActivity(
            sarosSession.getLocalUser(), offset, text, replacedText, path);

        if (!this.hasWriteAccess) {
            /**
             * TODO If we don't have {@link User.Permission#WRITE_ACCESS}, then
View Full Code Here

         * users with {@link User.Permission#WRITE_ACCESS}
         *
         * TODO If the UndoManager knows which changes were ours, we could
         * revert just those
         */
        IActivity textEditActivity = new TextEditActivity(localUser, offset,
            newContent, oldContent, path);

        IActivity saveActivity = new EditorActivity(localUser, Type.Saved, path);

        fireActivity(textEditActivity);
View Full Code Here

TOP

Related Classes of de.fu_berlin.inf.dpp.activities.business.TextEditActivity

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.