Package com.salesforce.ide.core.model

Examples of com.salesforce.ide.core.model.ApexCodeLocation


        if (runTestFailure == null) {
            logger.warn("Unable to set error marker - run test failure is null");
            return;
        }

        ApexCodeLocation apexCodeLocation =
                getLocationFromStackLine(runTestFailure.getName(), runTestFailure.getStackTrace());
        int line = apexCodeLocation != null ? apexCodeLocation.getLine() : 0;
        int charStart = apexCodeLocation != null ? apexCodeLocation.getColumn() : 0;
        int charEnd = charStart + 1;
        MarkerUtils.getInstance().clearRunTestFailureMarkers(resource);
        MarkerUtils.getInstance().applyRunTestFailureMarker(resource, line, charStart, charEnd,
            runTestFailure.getMessage());
    }
View Full Code Here


                        | Pattern.CASE_INSENSITIVE);
        final Matcher matcher = pattern.matcher(stackTrace);
        matcher.find();
        String line = matcher.group(1);
        String column = matcher.group(2);
        return new ApexCodeLocation(name, line, column);
    }
View Full Code Here

        for (ICodeLocationExt codeLocation : codeLocationExt) {
            TreeItem uncoveredLineTreeItem = new TreeItem(rootComponentTreeItem, SWT.NONE);
            uncoveredLineTreeItem.setText("Line " + codeLocation.getLine() + ", Column " + codeLocation.getColumn()
                    + " not covered");
            ApexCodeLocation location =
                    new ApexCodeLocation(componentFile, codeLocation.getLine(), codeLocation.getColumn());
            uncoveredLineTreeItem.setData("location", location);
            uncoveredLineTreeItem.setData("line", codeLocation.getLine());
            uncoveredLineTreeItem.setImage(warningIcon);
        }
    }
View Full Code Here

            return;
        }

        String stacktrace = testFailure.getStackTrace();
        TreeItem stacktraceTreeItem = new TreeItem(messageTreeItem, SWT.NONE);
        ApexCodeLocation location = getLocationFromStackLine(testFailure.getName(), stacktrace);

        IFile file = getCoverageResultTargetComponentFile(testFailure.getName(), testFailure.getType());
        if (file != null) {
            location.setFile(file);
        }

        stacktraceTreeItem.setData("location", location);
        stacktraceTreeItem.setData("line", "1");
        stacktraceTreeItem.setText(stacktrace);
View Full Code Here

                column = column.substring(0, column.indexOf("\n"));
            }
        } catch (Exception e) {
            logger.warn("Unable to get location from stacktrace", e);
        }
        return new ApexCodeLocation(name, line, column);
    }
View Full Code Here

TOP

Related Classes of com.salesforce.ide.core.model.ApexCodeLocation

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.