Merge branch 'master' of git.labs.intellij.net:idea/ultimate

This commit is contained in:
Ekaterina Tuzova
2011-02-15 13:25:13 +03:00
6 changed files with 17 additions and 15 deletions
+5 -4
View File
@@ -1,13 +1,13 @@
import org.jetbrains.jps.Jps
import org.jetbrains.jps.LayoutInfo
import org.jetbrains.jps.Module
import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome
import org.jetbrains.jps.LayoutInfo
includeTargets << new File("${guessHome(this as Script)}/community/build/scripts/utils.gant")
includeTargets << new File("${guessHome(this)}/build/scripts/libLicenses.gant")
includeTool << Jps
requireProperty("buildNumber", requireProperty("build.number", "104.SNAPSHOT"))
requireProperty("buildNumber", requireProperty("build.number", "106.SNAPSHOT"))
setProperty("ch", "$home/community")
setProperty("dryRun", false)
@@ -24,7 +24,9 @@ setProperty("pluginFilter", [
"JSInspections",
"JSIntentionPowerPack",
"SpellChecker", "spellchecker",
"less", "sass", "haml",
"less", "sass",
"yaml", "yaml-plugin",
"haml", "haml-plugin",
"hg4idea",
"tasks", "tasks-core", "tasks-api", "jira-connector",
"github",
@@ -48,7 +50,6 @@ private List platformImplementationModules() {
"xml",
"lvcs-impl",
"images",
"yaml",
"dom-impl"
]
}
+3 -2
View File
@@ -1922,8 +1922,9 @@ class ModuleRedeclarator(object):
def hasRegularPythonExt(name):
"Does name end with .py or .pyc?"
return name.endswith(".py") or name.endswith(".pyc")
"Does name end with .py?"
return name.endswith(".py") # Note that the standard library on MacOS X 10.6 is shipped only as .pyc files, so we need to
# have them processed by the generator in order to have any code insight for the standard library.
def buildOutputName(subdir, name):
global action
@@ -13,7 +13,7 @@ import com.jetbrains.python.refactoring.classes.pushDown.PyPushDownHandler;
import com.jetbrains.python.refactoring.extractmethod.PyExtractMethodHandler;
import com.jetbrains.python.refactoring.introduce.constant.ConstantIntroduceHandler;
import com.jetbrains.python.refactoring.introduce.field.FieldIntroduceHandler;
import com.jetbrains.python.refactoring.introduce.variable.VariableIntroduceHandler;
import com.jetbrains.python.refactoring.introduce.variable.PyIntroduceVariableHandler;
/**
* @author Alexey.Ivanov
@@ -21,7 +21,7 @@ import com.jetbrains.python.refactoring.introduce.variable.VariableIntroduceHand
public class RefactoringProvider extends RefactoringSupportProvider {
@Override
public RefactoringActionHandler getIntroduceVariableHandler() {
return new VariableIntroduceHandler();
return new PyIntroduceVariableHandler();
}
@Override
@@ -17,7 +17,7 @@ import com.jetbrains.python.actions.AddFieldQuickFix;
import com.jetbrains.python.psi.*;
import com.jetbrains.python.psi.impl.PyFunctionBuilder;
import com.jetbrains.python.refactoring.introduce.IntroduceHandler;
import com.jetbrains.python.refactoring.introduce.variable.VariableIntroduceHandler;
import com.jetbrains.python.refactoring.introduce.variable.PyIntroduceVariableHandler;
import com.jetbrains.python.testing.PythonUnitTestUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -83,7 +83,7 @@ public class FieldIntroduceHandler extends IntroduceHandler {
} else if (initInConstructor == InitPlace.SET_UP) {
return addFieldToSetUp(project, clazz, declaration);
}
return VariableIntroduceHandler.doIntroduceVariable(expression, declaration, occurrences, replaceAll);
return PyIntroduceVariableHandler.doIntroduceVariable(expression, declaration, occurrences, replaceAll);
}
private boolean inConstructor(@Nullable PyClass clazz, @NotNull PsiElement expression) {
@@ -12,8 +12,8 @@ import java.util.List;
/**
* @author Alexey.Ivanov
*/
public class VariableIntroduceHandler extends IntroduceHandler {
public VariableIntroduceHandler() {
public class PyIntroduceVariableHandler extends IntroduceHandler {
public PyIntroduceVariableHandler() {
super(new VariableValidator(), PyBundle.message("refactoring.introduce.variable.dialog.title"));
}
@@ -4,7 +4,7 @@ import com.intellij.psi.util.PsiTreeUtil;
import com.jetbrains.python.fixtures.PyLightFixtureTestCase;
import com.jetbrains.python.psi.PyCallExpression;
import com.jetbrains.python.psi.PyExpression;
import com.jetbrains.python.refactoring.introduce.variable.VariableIntroduceHandler;
import com.jetbrains.python.refactoring.introduce.variable.PyIntroduceVariableHandler;
import java.util.Collection;
@@ -42,7 +42,7 @@ public class PyIntroduceVariableTest extends PyLightFixtureTestCase {
private void doTestSuggestions(Class<? extends PyExpression> parentClass, String... expectedNames) {
myFixture.configureByFile("/refactoring/introduceVariable/" + getTestName(true) + ".py");
VariableIntroduceHandler handler = new VariableIntroduceHandler();
PyIntroduceVariableHandler handler = new PyIntroduceVariableHandler();
PyExpression expr = PsiTreeUtil.getParentOfType(myFixture.getFile().findElementAt(myFixture.getEditor().getCaretModel().getOffset()), parentClass);
final Collection<String> names = handler.getSuggestedNames(expr);
for (String expectedName : expectedNames) {
@@ -52,7 +52,7 @@ public class PyIntroduceVariableTest extends PyLightFixtureTestCase {
private void doTest() {
myFixture.configureByFile("/refactoring/introduceVariable/" + getTestName(true) + ".py");
VariableIntroduceHandler handler = new VariableIntroduceHandler();
PyIntroduceVariableHandler handler = new PyIntroduceVariableHandler();
handler.performAction(myFixture.getProject(), myFixture.getEditor(), myFixture.getFile(), "a", true, false, false);
myFixture.checkResultByFile("/refactoring/introduceVariable/" + getTestName(true) + ".after.py");
}