Merge branch 'python-fixes'
authorAndrey Vlasovskikh <andrey.vlasovskikh@jetbrains.com>
Wed, 12 Mar 2014 09:46:21 +0000 (13:46 +0400)
committerAndrey Vlasovskikh <andrey.vlasovskikh@jetbrains.com>
Wed, 12 Mar 2014 09:46:21 +0000 (13:46 +0400)
Conflicts:
python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java

1  2 
python/src/com/jetbrains/python/inspections/PyPropertyDefinitionInspection.java
python/src/com/jetbrains/python/inspections/PyRaisingNewStyleClassInspection.java
python/src/com/jetbrains/python/inspections/quickfix/AddFunctionQuickFix.java
python/src/com/jetbrains/python/psi/impl/PyClassImpl.java

index 3bf92c9484a229f5da5e8739bdc2db788f4eb9f9,d27ea683cba5d354b1d60a5387d71d83be9bc50d..69106cc057d3ace92d6d279e5d052f712a93e254
@@@ -116,11 -102,11 +116,11 @@@ public class AddFunctionQuickFix  imple
          }
        }
        // else: no arglist, use empty args
-       PyFunction function = builder.buildFunction(project, LanguageLevel.forFile(file.getVirtualFile()));
 -      PyFunction function = builder.buildFunction(project, myPyFile.getLanguageLevel());
++      PyFunction function = builder.buildFunction(project, LanguageLevel.forElement(file));
  
        // add to the bottom
 -      function = (PyFunction) myPyFile.add(function);
 -      showTemplateBuilder(function);
 +      function = (PyFunction) file.add(function);
 +      showTemplateBuilder(function, file);
      }
      catch (IncorrectOperationException ignored) {
        // we failed. tell about this