iterate over: correct offset to detect template applicability

This commit is contained in:
Anna Kozlova
2012-02-02 21:17:52 +04:00
parent e497b81929
commit 24ec63e74e
6 changed files with 79 additions and 0 deletions
@@ -0,0 +1,11 @@
import java.lang.annotation.Annotation;
// "Iterate" "true"
class Test {
void foo() {
for (Annotation annotation : getClass().getAnnotations()) {
}
}
}
@@ -0,0 +1,11 @@
import java.lang.annotation.Annotation;
// "Iterate" "true"
class Test {
void foo() {
for (Annotation annotation : getClass().getAnnotations()) {
}
}
}
@@ -0,0 +1,6 @@
// "Iterate" "true"
class Test {
void foo() {
getClass().getAnnotatio<caret>ns()
}
}
@@ -0,0 +1,6 @@
// "Iterate" "true"
class Test {
void foo() {
getClass().getAnnotations()<caret>
}
}
@@ -0,0 +1,31 @@
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.codeInsight.daemon.quickFix;
public class IterateOverTest extends LightQuickFix15TestCase {
public void test() throws Exception { doAllTests(); }
@Override
protected String getBasePath() {
return "/codeInsight/daemonCodeAnalyzer/quickFix/iterateOver";
}
}