Example usage for org.aspectj.ajde.core IBuildMessageHandler isIgnoring

List of usage examples for org.aspectj.ajde.core IBuildMessageHandler isIgnoring

Introduction

In this page you can find the example usage for org.aspectj.ajde.core IBuildMessageHandler isIgnoring.

Prototype

boolean isIgnoring(IMessage.Kind kind);

Source Link

Document

Signal whether this will ignore messages of a given type.

Usage

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testDefaultSettingsMessagesThatAreIgnored() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();
    assertTrue("by default should be ignoring 'INFO' messages but " + //$NON-NLS-1$
            "are not", handler.isIgnoring(IMessage.INFO)); //$NON-NLS-1$
    assertTrue("by default should be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "are not", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredAfterWorkbenchPreferenceSet() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();

    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$

    AspectJPreferences.setShowWeaveMessagesOption(project, false);
    assertTrue("by default should be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "are not", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$      
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredAfterProjectPreferenceSet() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();

    AspectJPreferences.setUsingProjectSettings(project, true);

    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$

    AspectJPreferences.setShowWeaveMessagesOption(project, false);
    assertTrue("by default should be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "are not", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$      
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredIfWorkbenchPreferenceAlreadySet() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    // remove the "compiler" instance associated with this project
    AspectJPlugin.getDefault().getCompilerFactory().removeCompilerForProject(project);
    // decide to show weaveinfo messages
    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$   
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredIfWorkbenchPreferenceAlreadySet_2() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    // decide to show weaveinfo messages
    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    // remove the "compiler" instance associated with this project
    AspectJPlugin.getDefault().getCompilerFactory().removeCompilerForProject(project);
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$   
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredIProjectPreferenceAlreadySet() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    // remove the "compiler" instance associated with this project
    AspectJPlugin.getDefault().getCompilerFactory().removeCompilerForProject(project);
    AspectJPreferences.setUsingProjectSettings(project, true);
    // decide to show weaveinfo messages
    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$   
}

From source file:org.eclipse.ajdt.ui.tests.ajde.UIMessageHandlerTest.java

License:Open Source License

public void testShowWeaveInfoMessagesAreNotIgnoredIProjectPreferenceAlreadySet_2() throws Exception {
    IProject project = createPredefinedProject("Bean Example"); //$NON-NLS-1$
    AspectJPreferences.setUsingProjectSettings(project, true);
    // decide to show weaveinfo messages
    AspectJPreferences.setShowWeaveMessagesOption(project, true);
    // remove the "compiler" instance associated with this project
    AspectJPlugin.getDefault().getCompilerFactory().removeCompilerForProject(project);
    IBuildMessageHandler handler = AspectJPlugin.getDefault().getCompilerFactory()
            .getCompilerForProject(project).getMessageHandler();
    assertFalse("should not be ignoring 'WEAVEINFO' messages but " + //$NON-NLS-1$
            "still are", handler.isIgnoring(IMessage.WEAVEINFO)); //$NON-NLS-1$   
}