Package org.eclipse.core.resources

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


*/
public class TooManyBeansInFileRuleTest extends AbstractRuleTest {

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

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

    assertHasMarkerWithText(markers, TooManyBeansInFileRule.INFO_MESSAGE);
  }

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

  @Override
  String getRuleId() {
View Full Code Here

  private static final String SUBSTRING_OF_INFO_MESSAGE = "instead of a value element";

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

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

    assertHasMarkerWithText(markers, SUBSTRING_OF_INFO_MESSAGE);
  }

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

  @Override
  String getRuleId() {
View Full Code Here

*/
public class ImportElementsAtTopRuleTest extends AbstractRuleTest {

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

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

    assertHasMarkerWithText(markers, ImportElementsAtTopRule.INFO_MESSAGE);
  }

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

  @Override
  String getRuleId() {
View Full Code Here

  private static final String SUBSTRING_OF_INFO_MESSAGE = "Consider using bean inheritance";

  private void checkMarkerNotCreated(String fileName) throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", fileName);
    IMarker[] markers = resource.findMarkers(null, false, IResource.DEPTH_ZERO);
    assertNotHasMarkerWithText(markers, RefElementRule.INFO_MESSAGE);
  }

  public void testMarkerCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices", "src/bean-inheritance-positive.xml");
View Full Code Here

    assertNotHasMarkerWithText(markers, RefElementRule.INFO_MESSAGE);
  }

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

  public void testMarkerNotCreated1() throws Exception {
    checkMarkerNotCreated("src/bean-inheritance-negative-1.xml");
View Full Code Here

public class ParentBeanSpecifiesAbstractClassRuleTest extends AbstractRuleTest {

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

  public void testMarkerNotCreated() throws Exception {
    IResource resource = createPredefinedProjectAndGetResource("bestpractices",
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.