diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java index 065f67de9eb0..1db1e60e6c2c 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/CodeInsightTestFixture.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2010 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -99,6 +99,8 @@ public interface CodeInsightTestFixture extends IdeaProjectTestFixture { void enableInspections(Class... inspections); + void enableInspections(@NotNull Collection> inspections); + void disableInspections(InspectionProfileEntry... inspections); /** diff --git a/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java b/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java index 094dac59b953..8191e2810cc7 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2012 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -252,10 +252,15 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig @Override public void enableInspections(final Class... inspections) { + enableInspections(Arrays.asList(inspections)); + } + + @Override + public void enableInspections(@NotNull final Collection> inspections) { final ArrayList tools = new ArrayList(); - for (Class clazz : inspections) { + for (Class clazz : inspections) { try { - LocalInspectionTool inspection = (LocalInspectionTool)clazz.getConstructor().newInstance(); + LocalInspectionTool inspection = clazz.getConstructor().newInstance(); tools.add(inspection); } catch (Exception e) {