Examples of findMarkers()


Examples of org.eclipse.core.resources.IResource.findMarkers()

    IDocument document = getDocument(editor);
    AbstractMarkerAnnotationModel annotationModel = getAnnotationModel(editor);

    if (resource != null && annotationModel != null && resource.exists()) {
      try {
        IMarker[] allMarkers = resource.findMarkers(
            IBreakpoint.BREAKPOINT_MARKER, true,
            IResource.DEPTH_ZERO);
        if (allMarkers != null) {
          for (int i = 0; i < allMarkers.length; i++) {
            if (includesRulerLine(editor,
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

        return null;
      }

      IResource resource = node.getSourceModule().getUnderlyingResource();
      if (resource != null) {
        IMarker[] markers = resource.findMarkers(
            DefaultProblem.MARKER_TYPE_PROBLEM, true,
            IResource.DEPTH_ONE);
        ProblemDesc[] problems = new ProblemDesc[markers.length];
        for (int i = 0; i < markers.length; ++i) {
          problems[i] = new ProblemDesc(markers[i].getAttribute("id",//$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

                    }
                    IResource sourceFile = getSourceFile(
                        pro, qualifiedName, sourceName);
                    if (sourceFile != null) {
                      IMarker[] problemMarkers = null;
                      problemMarkers = sourceFile
                          .findMarkers(
                              IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER,
                              true,
                              IResource.DEPTH_INFINITE);
                      for (IMarker problemMarker : problemMarkers) {
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

  public void updateMessage() {
    if (cEditor != null && cEditor.getResourceFile() != null && cEditor.getResourceFile().exists()) {
      try {
        IResource resource = cEditor.getResourceFile();
        IMarker[] markers = resource.findMarkers(SpringCore.MARKER_ID, true, IResource.DEPTH_ONE);
        message = null;
        messageType = IMessageProvider.NONE;

        if (markers.length > 0) {
          int errorCount = 0;
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

*/
public class RefElementRuleTest extends AbstractRuleTest {

  public void testMarkerCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/ref-element-positive.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertHasMarkerWithText(markers, RefElementRule.INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/ref-element-negative.xml");
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

    assertHasMarkerWithText(markers, RefElementRule.INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/ref-element-negative.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertNotHasMarkerWithText(markers, RefElementRule.INFO_MESSAGE);
  }

  @Override
  String getRuleId() {
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

*/
public class AvoidDriverManagerDataSourceRuleTest extends AbstractRuleTest {

  public void testMarkerCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/drivermanager-positive.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertHasMarkerWithText(markers, AvoidDriverManagerDataSource.INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/drivermanager-negative.xml");
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

    assertHasMarkerWithText(markers, AvoidDriverManagerDataSource.INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/drivermanager-negative.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertNotHasMarkerWithText(markers, AvoidDriverManagerDataSource.INFO_MESSAGE);
  }

  @Override
  String getRuleId() {
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

  private static final String INFO_MESSAGE = "Consider using namespace syntax";

  public void testMarkerCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/namespaces-positive.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertHasMarkerWithText(markers, INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/namespaces-negative.xml");
View Full Code Here

Examples of org.eclipse.core.resources.IResource.findMarkers()

    assertHasMarkerWithText(markers, INFO_MESSAGE);
  }

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/namespaces-negative.xml");
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertNotHasMarkerWithText(markers, INFO_MESSAGE);
  }

  @Override
  String getRuleId() {
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.