modifier insertion

This commit is contained in:
Max Medvedev
2012-11-13 09:09:46 +04:00
parent 20d0a93a36
commit 9ac4ac2d57

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 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.
@@ -280,8 +280,11 @@ public class GrModifierListImpl extends GrStubElementBase<GrModifierListStub> im
PsiElement anchor = null;
for (int i = modifiers.length - 1; i >= 0; i--) {
PsiElement modifier = modifiers[i];
if (PRIORITY.get(modifier.getText()) <= myPriority) {
final int otherPriority = PRIORITY.get(modifier.getText());
if (otherPriority <= myPriority) {
anchor = modifier;
}
else if (otherPriority > myPriority && anchor != null) {
break;
}
}