Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangLong.intValue()


            final String filename = Util.stringValue(fileLine.elementAt(0));
            final OtpErlangLong lineL = (OtpErlangLong) fileLine.elementAt(1);
            if (!filename.isEmpty()) {
                int line = 1;
                try {
                    line = lineL.intValue();
                } catch (final OtpErlangRangeException e) {
                    ErlLogger.error(e);
                }
                if (line <= 0) {
                    line = 1;
View Full Code Here


            if (t.arity() > 0) {
                final OtpErlangObject element = t.elementAt(0);
                if (element instanceof OtpErlangLong) {
                    final OtpErlangLong l = (OtpErlangLong) element;
                    try {
                        final int d = l.intValue();
                        if (d == 0 || d == 1 || d == 2) {
                            return;
                        }
                    } catch (final OtpErlangRangeException e) {
                    }
View Full Code Here

            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>();
View Full Code Here

            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 {
View Full Code Here

                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);
View Full Code Here

                    final OtpErlangAtom mod = (OtpErlangAtom) ieval.elementAt(3);
                    final String module = mod.atomValue();
                    final OtpErlangLong lin = (OtpErlangLong) ieval.elementAt(2);
                    s = module;
                    try {
                        final int line = lin.intValue();
                        s += ":" + line; //$NON-NLS-1$
                    } catch (final OtpErlangRangeException e) {
                    }
                    break;
                case 2:
View Full Code Here

                    final OtpErlangTuple ieval = (OtpErlangTuple) t2.elementAt(0);
                    final OtpErlangAtom mod = (OtpErlangAtom) ieval.elementAt(3);
                    final String module = mod.atomValue();
                    final OtpErlangLong lin = (OtpErlangLong) ieval.elementAt(2);
                    try {
                        final int line = lin.intValue();
                        gotoModuleLine(module, line);
                    } catch (final OtpErlangRangeException e1) {
                    }

                }
View Full Code Here

                    final OtpErlangAtom m = (OtpErlangAtom) frame.elementAt(0);
                    final OtpErlangAtom f = (OtpErlangAtom) frame.elementAt(1);
                    final OtpErlangLong a = (OtpErlangLong) frame.elementAt(2);
                    try {
                        stackFrames.add(new ErlangUninterpretedStackFrame(m.atomValue(),
                                new ErlangFunction(f.atomValue(), a.intValue()), this,
                                getDebugTarget()));
                    } catch (final OtpErlangRangeException e) {
                        ErlLogger.error(e);
                    }
                }
View Full Code Here

            } catch (final OtpErlangRangeException e) {
                lin = -1;
            }
            final String mod = m.atomValue();
            try {
                stackFrameNo = n.intValue();
            } catch (final OtpErlangRangeException e) {
                stackFrameNo = -1;
            }
            stackFrames.add(new ErlangStackFrame(mod, this, target, lin, null, bindings,
                    stackFrameNo));
View Full Code Here

            final OtpErlangTuple t = (OtpErlangTuple) o;
            final OtpErlangLong l1 = (OtpErlangLong) t.elementAt(1);
            final OtpErlangAtom b = (OtpErlangAtom) t.elementAt(2);
            text = Util.stringValue(t.elementAt(0));
            try {
                removeNext = l1.intValue();
            } catch (final OtpErlangRangeException e) {
                removeNext = 0;
            }
            addNewLine = b.booleanValue();
        } else {
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.