Package org.erlide.wrangler.refactoring.duplicatedcode.ui.elements

Examples of org.erlide.wrangler.refactoring.duplicatedcode.ui.elements.DuplicatedCodeInstanceElement


                final AbstractResultTreeObject selection = (AbstractResultTreeObject) tsel
                        .getFirstElement();
                copyGeneralisedToClipboard.setText(selection.getSuggestedCode());

                if (selection instanceof DuplicatedCodeInstanceElement) {
                    final DuplicatedCodeInstanceElement dcie = (DuplicatedCodeInstanceElement) selection;
                    copyFunCallToClipboard.setText(dcie.getReplicationFunction());
                }

            }
        });
View Full Code Here


            final OtpErlangLong endLine = (OtpErlangLong) secondElement.elementAt(1);
            final OtpErlangLong endCol = (OtpErlangLong) secondElement.elementAt(2);

            final String fileNameStr = fileName.stringValue();
            final IFile file = WranglerUtils.getFileFromPath(fileNameStr);
            final DuplicatedCodeInstanceElement instance = new DuplicatedCodeInstanceElement(
                    file, startLine.intValue(), startCol.intValue(), endLine.intValue(),
                    endCol.intValue() + 1);
            instance.setSuggestedCode(suggStr);
            if (values.containsKey(file)) {
                values.get(file).add(instance);
            } else {
                final ArrayList<DuplicatedCodeInstanceElement> dupList = new ArrayList<DuplicatedCodeInstanceElement>();
                dupList.add(instance);
View Full Code Here

            final OtpErlangLong endLine = (OtpErlangLong) secondElement.elementAt(1);
            final OtpErlangLong endCol = (OtpErlangLong) secondElement.elementAt(2);

            final String fileNameStr = fileName.stringValue();
            final IFile file = WranglerUtils.getFileFromPath(fileNameStr);
            final DuplicatedCodeInstanceElement instance = new DuplicatedCodeInstanceElement(
                    file, startLine.intValue(), startCol.intValue(), endLine.intValue(),
                    endCol.intValue() + 1);
            instance.setSuggestedCode(suggStr);
            instance.setReplicationFunction(replicationFunction);
            if (values.containsKey(file)) {
                values.get(file).add(instance);
            } else {
                final ArrayList<DuplicatedCodeInstanceElement> dupList = new ArrayList<DuplicatedCodeInstanceElement>();
                dupList.add(instance);
View Full Code Here

                        .elementAt(0);
                endColumn = (OtpErlangLong) ((OtpErlangTuple) actPos.elementAt(1))
                        .elementAt(1);

                final IErlSelection sel = GlobalParameters.getWranglerSelection();
                instances.add(new DuplicatedCodeInstanceElement((IFile) sel
                        .getErlElement().getResource(), startLine.intValue(), startColumn
                        .intValue(), endLine.intValue(), endColumn.intValue() + 1));
            }

            final DuplicatedCodeInstanceElement defaultInstance = instances.get(0);

            final DuplicatedCodeElement result = new DuplicatedCodeElement(
                    defaultInstance);

            for (final DuplicatedCodeInstanceElement instance : instances) {
View Full Code Here

TOP

Related Classes of org.erlide.wrangler.refactoring.duplicatedcode.ui.elements.DuplicatedCodeInstanceElement

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.