diff --git a/.idea/libraries/Mocks.xml b/.idea/libraries/Mocks.xml index 43f8726a0ce2..4064a7028c03 100644 --- a/.idea/libraries/Mocks.xml +++ b/.idea/libraries/Mocks.xml @@ -1,8 +1,7 @@ - - + @@ -10,6 +9,7 @@ + diff --git a/.idea/libraries/pty4j.xml b/.idea/libraries/pty4j.xml index 6ff8d23d1170..828736292f94 100644 --- a/.idea/libraries/pty4j.xml +++ b/.idea/libraries/pty4j.xml @@ -1,11 +1,11 @@ - + - + diff --git a/build/scripts/libLicenses.gant b/build/scripts/libLicenses.gant index 89a3e152b7fb..88f3bf933756 100644 --- a/build/scripts/libLicenses.gant +++ b/build/scripts/libLicenses.gant @@ -279,7 +279,7 @@ libraryLicense(name: "Plexus Utils", libraryName: "plexus-utils-1.5.5.jar", vers libraryLicense(name: "pockets", attachedTo: "python-helpers", version: "0.2.4", license: "BSD", url: "http://pockets.readthedocs.org/") libraryLicense(name: "protobuf", version: "2.5.0", license: "New BSD", url: "http://code.google.com/p/protobuf/", licenseUrl: "https://github.com/google/protobuf/blob/master/LICENSE") libraryLicense(name: "proxy-vole", libraryName: "proxy-vole", version: "20131209", license: "New BSD License", url: "http://code.google.com/p/proxy-vole/", licenseUrl: "http://opensource.org/licenses/BSD-3-Clause") -libraryLicense(name: "pty4j", libraryName: "pty4j", version: "0.7", license: "Eclipse Public License v1.0", url: "https://github.com/traff/pty4j") +libraryLicense(name: "pty4j", libraryName: "pty4j", version: "0.7.1", license: "Eclipse Public License v1.0", url: "https://github.com/traff/pty4j") libraryLicense(name: "PureJavaComm", libraryName: "purejavacomm", version: "0.0.16", license: "BSD", url: "http://www.sparetimelabs.com/purejavacomm") libraryLicense(name: "ReflectASM", libraryName: "reflectasm-1.0.7.jar", version: "1.0.7", license: "BSD", url: "https://github.com/EsotericSoftware/reflectasm", licenseUrl: "http://opensource.org/licenses/BSD-3-Clause") libraryLicense(name: "Relax NG Object Model", libraryName: "rngom-20051226-patched.jar", license: "MIT", url: "http://java.net/projects/rngom/", licenseUrl: "http://www.opensource.org/licenses/mit-license.php") diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/JumpToObjectAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/JumpToObjectAction.java index 31077e578bc1..c891b6a1a800 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/JumpToObjectAction.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/JumpToObjectAction.java @@ -21,6 +21,8 @@ import com.intellij.debugger.engine.JVMNameUtil; import com.intellij.debugger.engine.evaluation.EvaluationContextImpl; import com.intellij.debugger.engine.events.SuspendContextCommandImpl; import com.intellij.debugger.impl.DebuggerContextImpl; +import com.intellij.debugger.impl.DebuggerUtilsEx; +import com.intellij.debugger.jdi.MethodBytecodeUtil; import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; import com.intellij.debugger.ui.impl.watch.NodeDescriptorImpl; import com.intellij.debugger.ui.tree.ValueDescriptor; @@ -32,6 +34,11 @@ import com.intellij.psi.PsiClass; import com.intellij.util.containers.ContainerUtil; import com.sun.jdi.*; import org.jetbrains.annotations.Nullable; +import org.jetbrains.org.objectweb.asm.MethodVisitor; +import org.jetbrains.org.objectweb.asm.Opcodes; + +import java.util.List; +import java.util.concurrent.atomic.AtomicReference; public class JumpToObjectAction extends DebuggerAction{ private static final Logger LOG = Logger.getInstance("#com.intellij.debugger.actions.JumpToObjectAction"); @@ -96,7 +103,35 @@ public class JumpToObjectAction extends DebuggerAction{ } if(type instanceof ClassType) { final ClassType clsType = (ClassType)type; - final Location location = ContainerUtil.getFirstItem(clsType.allLineLocations()); + Location lambdaLocation = null; + if (DebuggerUtilsEx.isLambdaClassName(clsType.name())) { + List notConstructorMethods = ContainerUtil.filter(clsType.methods(), m -> !m.isConstructor()); + if (notConstructorMethods.size() == 1) { + AtomicReference locationRef = new AtomicReference<>(); + MethodBytecodeUtil.visit(clsType, notConstructorMethods.get(0), new MethodVisitor(Opcodes.ASM5) { + @Override + public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) { + ReferenceType cls = ContainerUtil.getFirstItem(clsType.virtualMachine().classesByName(owner)); + if (cls != null) { + Method method = ContainerUtil.getFirstItem(cls.methodsByName(name)); + if (method != null) { + try { + Location loc = ContainerUtil.getFirstItem(method.allLineLocations()); + if (loc != null) { + locationRef.set(loc); + } + } + catch (AbsentInformationException e) { + LOG.debug(e); + } + } + } + } + }); + lambdaLocation = locationRef.get(); + } + } + final Location location = lambdaLocation != null ? lambdaLocation : ContainerUtil.getFirstItem(clsType.allLineLocations()); if (location != null) { return ApplicationManager.getApplication().runReadAction(new Computable() { @Override @@ -118,10 +153,7 @@ public class JumpToObjectAction extends DebuggerAction{ } } } - catch (ClassNotPreparedException e) { - LOG.debug(e); - } - catch (AbsentInformationException e) { + catch (ClassNotPreparedException | AbsentInformationException e) { LOG.debug(e); } return null; diff --git a/java/debugger/impl/src/com/intellij/debugger/jdi/LocalVariablesUtil.java b/java/debugger/impl/src/com/intellij/debugger/jdi/LocalVariablesUtil.java index a510307b67a7..0b3998dff70f 100644 --- a/java/debugger/impl/src/com/intellij/debugger/jdi/LocalVariablesUtil.java +++ b/java/debugger/impl/src/com/intellij/debugger/jdi/LocalVariablesUtil.java @@ -150,13 +150,12 @@ public class LocalVariablesUtil { com.sun.jdi.Method method = frameProxy.location().method(); final int firstLocalVariableSlot = getFirstLocalsSlot(method); - final int firstArgsSlot = getFirstArgsSlot(method); // gather code variables names - MultiMap namesMap = calcNames(new SimpleStackFrameContext(frameProxy, process), firstLocalVariableSlot, firstArgsSlot); + MultiMap namesMap = calcNames(new SimpleStackFrameContext(frameProxy, process), firstLocalVariableSlot); // first add arguments - int slot = firstArgsSlot; + int slot = getFirstArgsSlot(method); List typeNames = method.argumentTypeNames(); List argValues = frameProxy.getArgumentValues(); for (int i = 0; i < argValues.size(); i++) { @@ -317,9 +316,7 @@ public class LocalVariablesUtil { } @NotNull - private static MultiMap calcNames(@NotNull final StackFrameContext context, - final int firstLocalsSlot, - final int firstArgsSlot) { + private static MultiMap calcNames(@NotNull final StackFrameContext context, final int firstLocalsSlot) { return ApplicationManager.getApplication().runReadAction(new Computable>() { @Override public MultiMap compute() { @@ -329,7 +326,7 @@ public class LocalVariablesUtil { PsiElement method = DebuggerUtilsEx.getContainingMethod(element); if (method != null) { MultiMap res = new MultiMap<>(); - int slot = Math.max(0, firstArgsSlot + firstLocalsSlot - getFirstLocalsSlot(method)); + int slot = Math.max(0, firstLocalsSlot - getParametersStackSize(method)); for (PsiParameter parameter : DebuggerUtilsEx.getParameters(method)) { res.putValue(slot, parameter.getName()); slot += getTypeSlotSize(parameter.getType()); @@ -481,11 +478,8 @@ public class LocalVariablesUtil { } } - private static int getFirstLocalsSlot(PsiElement method) { + private static int getParametersStackSize(PsiElement method) { int startSlot = 0; - if (method instanceof PsiModifierListOwner) { - startSlot = ((PsiModifierListOwner)method).hasModifierProperty(PsiModifier.STATIC) ? 0 : 1; - } for (PsiParameter parameter : DebuggerUtilsEx.getParameters(method)) { startSlot += getTypeSlotSize(parameter.getType()); } diff --git a/java/debugger/impl/src/com/intellij/debugger/jdi/MethodBytecodeUtil.java b/java/debugger/impl/src/com/intellij/debugger/jdi/MethodBytecodeUtil.java new file mode 100644 index 000000000000..2ddcdfa137f9 --- /dev/null +++ b/java/debugger/impl/src/com/intellij/debugger/jdi/MethodBytecodeUtil.java @@ -0,0 +1,88 @@ +/* + * Copyright 2000-2016 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.debugger.jdi; + +import com.sun.jdi.ClassType; +import com.sun.jdi.Method; +import com.sun.jdi.ReferenceType; +import org.jetbrains.org.objectweb.asm.*; + +import java.io.ByteArrayOutputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +/** + * @author egor + */ +public class MethodBytecodeUtil { + private MethodBytecodeUtil() { + } + + /** + * Allows to use ASM MethodVisitor with jdi method bytecode + */ + public static void visit(ClassType classType, Method method, MethodVisitor methodVisitor) { + try { + try (ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos)) { + dos.writeInt(0xCAFEBABE); // magic + dos.writeInt(Opcodes.V1_8); // version + dos.writeShort(classType.constantPoolCount()); // constant_pool_count + dos.write(classType.constantPool()); // constant_pool + + // we generate and put code attribute right after the constant pool + byte[] bytecodes = method.bytecodes(); + int codeSize = dos.size(); + dos.writeShort(0); // max_stack + dos.writeShort(0); // max_locals + dos.writeInt(bytecodes.length); // code_length + dos.write(bytecodes); // code + dos.writeShort(0); // exception_table_length + dos.writeShort(0); // attributes_count + codeSize = dos.size() - codeSize; + + ClassReader clsReader = new ClassReader(bos.toByteArray()); + ClassWriter clsWriter = new ClassWriter(clsReader, 0); + clsWriter.visit(Opcodes.V1_8, + Opcodes.ACC_PUBLIC, + classType.name(), + classType.signature(), + classType.superclass().name(), + classType.interfaces().stream().map(ReferenceType::name).toArray(String[]::new)); + MethodVisitor mv = clsWriter.visitMethod(Opcodes.ACC_PUBLIC, method.name(), method.signature(), method.signature(), null); + mv.visitAttribute(createCode(clsReader, codeSize)); + + new ClassReader(clsWriter.toByteArray()).accept(new ClassVisitor(Opcodes.ASM5) { + @Override + public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { + return methodVisitor; + } + }, 0); + } + } + catch (IOException ignored) { + } + } + + private static Attribute createCode(ClassReader cr, int len) { + return new Attribute("Code") { + @Override + public Attribute read(ClassReader cr, int off, int len, char[] buf, int codeOff, Label[] labels) { + return super.read(cr, off, len, buf, codeOff, labels); + } + }.read(cr, cr.header, len, null, 0, null); + } + +} diff --git a/java/execution/impl/src/com/intellij/execution/JavaTestFrameworkRunnableState.java b/java/execution/impl/src/com/intellij/execution/JavaTestFrameworkRunnableState.java index c33265b8aa2f..bd132c4e5899 100644 --- a/java/execution/impl/src/com/intellij/execution/JavaTestFrameworkRunnableState.java +++ b/java/execution/impl/src/com/intellij/execution/JavaTestFrameworkRunnableState.java @@ -156,7 +156,6 @@ public abstract class JavaTestFrameworkRunnableState { - root.flush(); deleteTempFiles(); clear(); }; diff --git a/java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoverySearchHelper.java b/java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoverySearchHelper.java index f58e5fbf17b6..d07583664baa 100644 --- a/java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoverySearchHelper.java +++ b/java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoverySearchHelper.java @@ -19,7 +19,6 @@ import com.intellij.codeInsight.TestFrameworks; import com.intellij.codeInsight.actions.FormatChangedTextUtil; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.vcs.changes.Change; @@ -28,6 +27,7 @@ import com.intellij.openapi.vcs.changes.ContentRevision; import com.intellij.openapi.vcs.changes.LocalChangeList; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; +import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.diff.FilesTooBigForDiffException; @@ -99,7 +99,9 @@ public class TestDiscoverySearchHelper { }); } - return patterns; + final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project); + final GlobalSearchScope searchScope = GlobalSearchScope.projectScope(project); + return new HashSet<>(ContainerUtil.filter(patterns, fqn -> psiFacade.findClass(fqn, searchScope) != null)); } private static void collectPatterns(final Project project, diff --git a/java/idea-ui/src/com/intellij/ide/util/projectWizard/SdkSettingsStep.java b/java/idea-ui/src/com/intellij/ide/util/projectWizard/SdkSettingsStep.java index 82af0c7c085f..3bdcba56fc97 100644 --- a/java/idea-ui/src/com/intellij/ide/util/projectWizard/SdkSettingsStep.java +++ b/java/idea-ui/src/com/intellij/ide/util/projectWizard/SdkSettingsStep.java @@ -56,9 +56,15 @@ public class SdkSettingsStep extends ModuleWizardStep { private final JPanel myJdkPanel; public SdkSettingsStep(SettingsStep settingsStep, @NotNull ModuleBuilder moduleBuilder, - @NotNull Condition sdkFilter) { + @NotNull Condition sdkTypeIdFilter) { - this(settingsStep.getContext(), moduleBuilder, sdkFilter); + this(settingsStep, moduleBuilder, sdkTypeIdFilter, null); + } + + public SdkSettingsStep(SettingsStep settingsStep, @NotNull ModuleBuilder moduleBuilder, + @NotNull Condition sdkTypeIdFilter, @Nullable Condition sdkFilter) { + + this(settingsStep.getContext(), moduleBuilder, sdkTypeIdFilter, sdkFilter); if (!isEmpty()) { settingsStep.addSettingsField(getSdkFieldLabel(settingsStep.getContext().getProject()), myJdkPanel); } @@ -66,7 +72,8 @@ public class SdkSettingsStep extends ModuleWizardStep { public SdkSettingsStep(WizardContext context, @NotNull ModuleBuilder moduleBuilder, - @NotNull Condition sdkFilter) { + @NotNull Condition sdkTypeIdFilter, + @Nullable Condition sdkFilter) { myModuleBuilder = moduleBuilder; myWizardContext = context; @@ -74,7 +81,11 @@ public class SdkSettingsStep extends ModuleWizardStep { Project project = myWizardContext.getProject(); myModel.reset(project); - myJdkComboBox = new JdkComboBox(myModel, sdkFilter, sdkFilter, false); + if (sdkFilter == null) { + sdkFilter = JdkComboBox.getSdkFilter(sdkTypeIdFilter); + } + + myJdkComboBox = new JdkComboBox(myModel, sdkFilter, sdkTypeIdFilter, false); myJdkPanel = new JPanel(new GridBagLayout()); final PropertiesComponent component = project == null ? PropertiesComponent.getInstance() : PropertiesComponent.getInstance(project); @@ -91,7 +102,7 @@ public class SdkSettingsStep extends ModuleWizardStep { } }); - Sdk sdk = getPreselectedSdk(project, component.getValue(selectedJdkProperty), sdkFilter); + Sdk sdk = getPreselectedSdk(project, component.getValue(selectedJdkProperty), sdkTypeIdFilter); myJdkComboBox.setSelectedJdk(sdk); JButton button = new JButton("Ne\u001Bw..."); @@ -103,7 +114,7 @@ public class SdkSettingsStep extends ModuleWizardStep { myJdkPanel.add(myJdkComboBox, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, CENTER, HORIZONTAL, JBUI.emptyInsets(), 0, 0)); myJdkPanel.add(myJdkComboBox.getSetUpButton(), new GridBagConstraints(1, 0, 1, 1, 0, 0, WEST, NONE, JBUI.insetsLeft(4), 0, 0)); if (myJdkComboBox.getItemCount() == 0) { - SdkType type = ContainerUtil.find(SdkType.getAllTypes(), sdkFilter); + SdkType type = ContainerUtil.find(SdkType.getAllTypes(), sdkTypeIdFilter); if (type != null && type.getDownloadSdkUrl() != null) { HyperlinkLabel label = new HyperlinkLabel("Download " + type.getPresentableName()); label.setHyperlinkTarget(type.getDownloadSdkUrl()); diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java index 765e5704489b..f43b142cb80d 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java @@ -55,7 +55,7 @@ public class JdkComboBox extends ComboBoxWithWidePopup { private static final Icon EMPTY_ICON = EmptyIcon.create(1, 16); @Nullable - private final Condition myFilter; + private final Condition myFilter; @Nullable private final Condition myCreationFilter; private JButton mySetUpButton; @@ -66,11 +66,11 @@ public class JdkComboBox extends ComboBoxWithWidePopup { public JdkComboBox(@NotNull final ProjectSdksModel jdkModel, @Nullable Condition filter) { - this(jdkModel, filter, filter, false); + this(jdkModel, getSdkFilter(filter), filter, false); } public JdkComboBox(@NotNull final ProjectSdksModel jdkModel, - @Nullable Condition filter, + @Nullable Condition filter, @Nullable Condition creationFilter, boolean addSuggestedItems) { super(new JdkComboBoxModel(jdkModel, filter, addSuggestedItems)); @@ -280,7 +280,7 @@ public class JdkComboBox extends ComboBoxWithWidePopup { final ProjectSdksModel projectJdksModel = ProjectStructureConfigurable.getInstance(project).getProjectJdksModel(); List projectJdks = new ArrayList(projectJdksModel.getProjectSdks().values()); if (myFilter != null) { - projectJdks = ContainerUtil.filter(projectJdks, getSdkFilter(myFilter)); + projectJdks = ContainerUtil.filter(projectJdks, myFilter); } Collections.sort(projectJdks, (o1, o2) -> o1.getName().compareToIgnoreCase(o2.getName())); for (Sdk projectJdk : projectJdks) { @@ -289,11 +289,11 @@ public class JdkComboBox extends ComboBoxWithWidePopup { } private static class JdkComboBoxModel extends DefaultComboBoxModel { - public JdkComboBoxModel(final ProjectSdksModel jdksModel, @Nullable Condition sdkFilter, boolean addSuggested) { + public JdkComboBoxModel(final ProjectSdksModel jdksModel, @Nullable Condition sdkFilter, boolean addSuggested) { Sdk[] jdks = jdksModel.getSdks(); Arrays.sort(jdks, (s1, s2) -> s1.getName().compareToIgnoreCase(s2.getName())); for (Sdk jdk : jdks) { - if (sdkFilter == null || sdkFilter.value(jdk.getSdkType())) { + if (sdkFilter == null || sdkFilter.value(jdk)) { addElement(new JdkComboBoxItem(jdk)); } } @@ -302,10 +302,10 @@ public class JdkComboBox extends ComboBoxWithWidePopup { } } - protected void addSuggestedItems(@Nullable Condition sdkFilter, Sdk[] jdks) { + protected void addSuggestedItems(@Nullable Condition sdkFilter, Sdk[] jdks) { SdkType[] types = SdkType.getAllTypes(); for (SdkType type : types) { - if (sdkFilter == null || sdkFilter.value(type) && ContainerUtil.find(jdks, sdk -> sdk.getSdkType() == type) == null) { + if (sdkFilter == null || ContainerUtil.find(jdks, sdkFilter) == null) { String homePath = type.suggestHomePath(); if (homePath != null && type.isValidSdkHome(homePath)) { addElement(new SuggestedJdkItem(type, homePath)); @@ -321,7 +321,7 @@ public class JdkComboBox extends ComboBoxWithWidePopup { } } - private static Condition getSdkFilter(@Nullable final Condition filter) { + public static Condition getSdkFilter(@Nullable final Condition filter) { return filter == null ? Conditions.alwaysTrue() : (Condition)sdk -> filter.value(sdk.getSdkType()); } diff --git a/java/java-analysis-api/src/com/intellij/codeInsight/intention/QuickFixFactory.java b/java/java-analysis-api/src/com/intellij/codeInsight/intention/QuickFixFactory.java index 8b0c21974870..0375803c77f0 100644 --- a/java/java-analysis-api/src/com/intellij/codeInsight/intention/QuickFixFactory.java +++ b/java/java-analysis-api/src/com/intellij/codeInsight/intention/QuickFixFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -255,8 +255,7 @@ public abstract class QuickFixFactory { public abstract IntentionAction createSafeDeleteFix(@NotNull PsiElement element); @Nullable - public abstract List registerOrderEntryFixes(@NotNull QuickFixActionRegistrar registrar, - @NotNull PsiReference reference); + public abstract List registerOrderEntryFixes(@NotNull QuickFixActionRegistrar registrar, @NotNull PsiReference reference); @NotNull public abstract IntentionAction createAddMissingRequiredAnnotationParametersFix(@NotNull PsiAnnotation annotation, @@ -274,5 +273,5 @@ public abstract class QuickFixFactory { @NotNull public IntentionAction createWrapWithOptionalFix(@Nullable PsiType type, @NotNull PsiExpression expression) { throw new UnsupportedOperationException(); - }; -} + } +} \ No newline at end of file diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java index 9610b22aaac3..5de1e5611046 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightUtil.java @@ -1521,6 +1521,9 @@ public class HighlightUtil extends HighlightUtilBase { } else { aClass = PsiTreeUtil.getParentOfType(expr, PsiClass.class); + if (aClass instanceof PsiAnonymousClass && PsiTreeUtil.isAncestor(((PsiAnonymousClass)aClass).getArgumentList(), expr, false)) { + aClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true); + } } if (aClass == null) return null; @@ -2981,7 +2984,8 @@ public class HighlightUtil extends HighlightUtilBase { LAMBDA_EXPRESSIONS(LanguageLevel.JDK_1_8, "feature.lambda.expressions"), TYPE_ANNOTATIONS(LanguageLevel.JDK_1_8, "feature.type.annotations"), RECEIVERS(LanguageLevel.JDK_1_8, "feature.type.receivers"), - REFS_AS_RESOURCE(LanguageLevel.JDK_1_9, "feature.try.with.resources.refs"); + REFS_AS_RESOURCE(LanguageLevel.JDK_1_9, "feature.try.with.resources.refs"), + MODULES(LanguageLevel.JDK_1_9, "feature.modules"); private final LanguageLevel level; private final String key; @@ -3007,4 +3011,4 @@ public class HighlightUtil extends HighlightUtilBase { return null; } -} +} \ No newline at end of file diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightVisitorImpl.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightVisitorImpl.java index d65d195af7c8..388c819d202a 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightVisitorImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightVisitorImpl.java @@ -1598,19 +1598,27 @@ public class HighlightVisitorImpl extends JavaElementVisitor implements Highligh if (!myHolder.hasErrorResults()) myHolder.add(AnnotationsHighlightUtil.checkReceiverType(parameter)); } + @Override + public void visitModule(PsiJavaModule module) { + super.visitModule(module); + if (!myHolder.hasErrorResults()) myHolder.add(checkFeature(module, Feature.MODULES)); + if (!myHolder.hasErrorResults()) myHolder.add(ModuleHighlightUtil.checkFileName(module, myFile)); + if (!myHolder.hasErrorResults()) myHolder.add(ModuleHighlightUtil.checkFileDuplicates(module, myFile)); + if (!myHolder.hasErrorResults()) myHolder.add(ModuleHighlightUtil.checkFileLocation(module, myFile)); + } + @Nullable private HighlightInfo checkFeature(@NotNull PsiElement element, @NotNull Feature feature) { return HighlightUtil.checkFeature(element, feature, myLanguageLevel, myFile); } protected void prepareToRunAsInspection(@NotNull HighlightInfoHolder holder) { - myHolder = holder; + PsiFile file = holder.getContextFile(); + JavaSdkVersion sdkVersion = JavaVersionService.getInstance().getJavaSdkVersion(file); - final PsiFile file = holder.getContextFile(); + myHolder = holder; myFile = file; myLanguageLevel = PsiUtil.getLanguageLevel(file); - myJavaSdkVersion = ObjectUtils.notNull(JavaVersionService.getInstance().getJavaSdkVersion(file), - JavaSdkVersion.fromLanguageLevel(myLanguageLevel)); - + myJavaSdkVersion = sdkVersion != null ? sdkVersion : JavaSdkVersion.fromLanguageLevel(myLanguageLevel); } } \ No newline at end of file diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ModuleHighlightUtil.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ModuleHighlightUtil.java new file mode 100644 index 000000000000..078e2fdff13d --- /dev/null +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/ModuleHighlightUtil.java @@ -0,0 +1,99 @@ +/* + * Copyright 2000-2016 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.impl.analysis; + +import com.intellij.codeInsight.daemon.JavaErrorMessages; +import com.intellij.codeInsight.daemon.impl.HighlightInfo; +import com.intellij.codeInsight.daemon.impl.HighlightInfoType; +import com.intellij.codeInsight.daemon.impl.quickfix.MoveFileFix; +import com.intellij.codeInsight.daemon.impl.quickfix.QuickFixAction; +import com.intellij.codeInsight.intention.QuickFixFactory; +import com.intellij.openapi.module.Module; +import com.intellij.openapi.module.impl.scopes.ModulesScope; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.roots.ProjectFileIndex; +import com.intellij.openapi.util.TextRange; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiFile; +import com.intellij.psi.PsiJavaModule; +import com.intellij.psi.PsiJavaModuleReference; +import com.intellij.psi.search.FilenameIndex; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.Collection; +import java.util.Collections; + +public class ModuleHighlightUtil { + private static final String MODULE_FILE_NAME = "module-info.java"; + + @Nullable + static HighlightInfo checkFileName(@NotNull PsiJavaModule element, @NotNull PsiFile file) { + if (!MODULE_FILE_NAME.equals(file.getName())) { + String message = JavaErrorMessages.message("module.file.wrong.name"); + HighlightInfo info = HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(range(element)).description(message).create(); + QuickFixAction.registerQuickFixAction(info, factory().createRenameFileFix(MODULE_FILE_NAME)); + return info; + } + + return null; + } + + @Nullable + static HighlightInfo checkFileDuplicates(@NotNull PsiJavaModule element, @NotNull PsiFile file) { + VirtualFile vFile = file.getVirtualFile(); + if (vFile != null) { + Project project = file.getProject(); + Module module = ProjectFileIndex.SERVICE.getInstance(project).getModuleForFile(vFile); + if (module != null) { + Collection others = + FilenameIndex.getVirtualFilesByName(project, MODULE_FILE_NAME, new ModulesScope(Collections.singleton(module), project)); + if (others.size() > 1) { + String message = JavaErrorMessages.message("module.file.duplicate"); + return HighlightInfo.newHighlightInfo(HighlightInfoType.ERROR).range(range(element)).description(message).create(); + //todo show duplicates quick fix + } + } + } + + return null; + } + + @Nullable + static HighlightInfo checkFileLocation(@NotNull PsiJavaModule element, @NotNull PsiFile file) { + VirtualFile vFile = file.getVirtualFile(); + if (vFile != null) { + VirtualFile root = ProjectFileIndex.SERVICE.getInstance(file.getProject()).getSourceRootForFile(vFile); + if (root != null && !root.equals(vFile.getParent())) { + String message = JavaErrorMessages.message("module.file.wrong.location"); + HighlightInfo info = HighlightInfo.newHighlightInfo(HighlightInfoType.WARNING).range(range(element)).description(message).create(); + QuickFixAction.registerQuickFixAction(info, new MoveFileFix(vFile, root)); + return info; + } + } + + return null; + } + + private static QuickFixFactory factory() { + return QuickFixFactory.getInstance(); + } + + private static TextRange range(PsiJavaModule module) { + PsiJavaModuleReference name = module.getNameElement(); + return name != null ? new TextRange(module.getTextOffset(), name.getTextRange().getEndOffset()) : module.getTextRange(); + } +} \ No newline at end of file diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/PostHighlightingVisitor.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/PostHighlightingVisitor.java index 4e7ea1a64186..3dec80734559 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/PostHighlightingVisitor.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/PostHighlightingVisitor.java @@ -406,12 +406,6 @@ class PostHighlightingVisitor { @NotNull PsiIdentifier identifier, @NotNull ProgressIndicator progress) { if (!myRefCountHolder.isReferenced(parameter) && !UnusedSymbolUtil.isImplicitUsage(myProject, parameter, progress)) { - //parameter is defined by functional interface - final PsiElement declarationScope = parameter.getDeclarationScope(); - if (declarationScope instanceof PsiMethod && - myRefCountHolder.isReferencedByMethodReference((PsiMethod)declarationScope, myLanguageLevel)) { - return null; - } String message = JavaErrorMessages.message("parameter.is.not.used", identifier.getText()); return UnusedSymbolUtil.createUnusedSymbolInfo(identifier, message, myDeadCodeInfoType); } diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/RefCountHolder.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/RefCountHolder.java index 7a93987a881f..69dcd79331af 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/RefCountHolder.java +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/RefCountHolder.java @@ -222,26 +222,6 @@ class RefCountHolder { return usedStatus == Boolean.TRUE; } - boolean isReferencedByMethodReference(@NotNull PsiMethod method, @NotNull LanguageLevel languageLevel) { - if (!languageLevel.isAtLeast(LanguageLevel.JDK_1_8)) return false; - - Collection array; - synchronized (myLocalRefsMap) { - array = myLocalRefsMap.get(method); - } - - if (!array.isEmpty()) { - for (PsiReference reference : array) { - final PsiElement element = reference.getElement(); - if (element instanceof PsiMethodReferenceExpression) { - return true; - } - } - } - - return false; - } - private static boolean isParameterUsedRecursively(@NotNull PsiElement element, @NotNull Collection array) { if (!(element instanceof PsiParameter)) return false; PsiParameter parameter = (PsiParameter)element; diff --git a/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/MoveFileFix.java b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/MoveFileFix.java new file mode 100644 index 000000000000..e38b044ddf7c --- /dev/null +++ b/java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/MoveFileFix.java @@ -0,0 +1,74 @@ +/* + * Copyright 2000-2016 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.impl.quickfix; + +import com.intellij.codeInsight.daemon.QuickFixBundle; +import com.intellij.codeInsight.intention.IntentionAction; +import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiFile; +import com.intellij.util.IncorrectOperationException; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NotNull; + +import java.io.IOException; + +public class MoveFileFix implements IntentionAction { + private final VirtualFile myFile; + private final VirtualFile myTarget; + + public MoveFileFix(@NotNull VirtualFile file, @NotNull VirtualFile target) { + myFile = file; + myTarget = target; + } + + @Nls + @NotNull + @Override + public String getText() { + return QuickFixBundle.message("move.file.to.source.root.text"); + } + + @Nls + @NotNull + @Override + public String getFamilyName() { + return getText(); + } + + @Override + public boolean isAvailable(@NotNull Project project, Editor editor, PsiFile file) { + return true; + } + + @Override + public void invoke(@NotNull Project project, Editor editor, PsiFile file) throws IncorrectOperationException { + if (myFile.isValid() && myTarget.isValid()) { + try { + myFile.move(this, myTarget); + } + catch (IOException e) { + throw new IncorrectOperationException("Cannot move '" + myFile.getPath() + "' into '" + myTarget.getPath() + "'", (Throwable)e); + } + } + } + + @Override + public boolean startInWriteAction() { + return true; + } +} \ No newline at end of file diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/AnonymousCanBeLambdaInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/AnonymousCanBeLambdaInspection.java index e9a439836b35..285593a66ee4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/AnonymousCanBeLambdaInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/AnonymousCanBeLambdaInspection.java @@ -140,14 +140,6 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection return true; } - PsiType inferenceMethodReturnType = LambdaUtil.getFunctionalInterfaceReturnType(inferredType); - PsiType existingMethodReturnType = method.getReturnType(); - if (existingMethodReturnType == null || - inferenceMethodReturnType != null && - !PsiType.VOID.equals(inferenceMethodReturnType) && !TypeConversionUtil.isAssignable(existingMethodReturnType, inferenceMethodReturnType)) { - return true; - } - final ForbiddenRefsChecker checker = new ForbiddenRefsChecker(method, aClass); final PsiCodeBlock body = method.getBody(); LOG.assertTrue(body != null); @@ -262,6 +254,7 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection final PsiCodeBlock body = method.getBody(); if (body == null) return null; + final Collection comments = collectCommentsOutsideMethodBody(anonymousClass, body); final Project project = element.getProject(); final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); @@ -285,12 +278,12 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection .giveUniqueNames(project, elementFactory, lambdaExpression, usedLocalNames, variables.toArray(new PsiVariable[variables.size()])); - final PsiExpression singleExpr = RedundantLambdaCodeBlockInspection.isCodeBlockRedundant( - lambdaExpression.getBody()); + final PsiExpression singleExpr = RedundantLambdaCodeBlockInspection.isCodeBlockRedundant(lambdaExpression.getBody()); if (singleExpr != null) { lambdaExpression.getBody().replace(singleExpr); } ChangeContextUtil.decodeContextInfo(lambdaExpression, null, null); + restoreComments(comments, lambdaExpression); final JavaCodeStyleManager javaCodeStyleManager = JavaCodeStyleManager.getInstance(project); if (forceIgnoreTypeCast) { @@ -318,6 +311,16 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection return null; } + private static Collection collectCommentsOutsideMethodBody(PsiAnonymousClass anonymousClass, PsiCodeBlock body) { + final Collection psiComments = PsiTreeUtil.findChildrenOfType(anonymousClass, PsiComment.class); + for (Iterator iterator = psiComments.iterator(); iterator.hasNext(); ) { + if (PsiTreeUtil.isAncestor(body, iterator.next(), false)) { + iterator.remove(); + } + } + return ContainerUtil.map(psiComments, (comment) -> (PsiComment)comment.copy()); + } + private static void collectLocalVariablesDefinedInsideLambda(PsiLambdaExpression lambdaExpression, final Set variables, Set namesOfVariablesInTheBlock) { @@ -460,6 +463,16 @@ public class AnonymousCanBeLambdaInspection extends BaseJavaBatchLocalInspection return false; } + public static void restoreComments(Collection comments, PsiElement lambda) { + PsiElement anchor = PsiTreeUtil.getParentOfType(lambda, PsiStatement.class, PsiField.class); + if (anchor == null) { + anchor = lambda; + } + for (PsiComment comment : comments) { + anchor.getParent().addBefore(comment, anchor); + } + } + private static class ForbiddenRefsChecker extends JavaRecursiveElementWalkingVisitor { private boolean myBodyContainsForbiddenRefs; diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java index 10e87f61971b..3cc95bbb53db 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/LambdaCanBeMethodReferenceInspection.java @@ -518,13 +518,7 @@ public class LambdaCanBeMethodReferenceInspection extends BaseJavaBatchLocalInsp replace = replace.replace(cast); } - PsiElement anchor = PsiTreeUtil.getParentOfType(replace, PsiStatement.class); - if (anchor == null) { - anchor = replace; - } - for (PsiComment comment : comments) { - anchor.getParent().addBefore(comment, anchor); - } + AnonymousCanBeLambdaInspection.restoreComments(comments, replace); JavaCodeStyleManager.getInstance(project).shortenClassReferences(replace); } } diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java index 0a746484b2b1..6f8e1eb7398b 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/SimplifyStreamApiCallChainsInspection.java @@ -81,9 +81,16 @@ public class SimplifyStreamApiCallChainsInspection extends BaseJavaBatchLocalIns } final PsiMethodCallExpression qualifierCall = getQualifierMethodCall(methodCall); if (isCallOf(qualifierCall, CommonClassNames.JAVA_UTIL_COLLECTION, STREAM_METHOD, 0)) { - holder.registerProblem(methodCall, getCallChainRange(methodCall, qualifierCall), - "Collection.stream()." + name + "() can be replaced with Collection.forEach()", - FOR_EACH_METHOD.equals(name) ? new CollectionForEachFix() : new CollectionForEachOrderedFix()); + String message = "Collection.stream()." + name + "() can be replaced with Collection.forEach()"; + final LocalQuickFix fix; + if (FOR_EACH_METHOD.equals(name)) { + fix = new CollectionForEachFix(); + } + else { + fix = new CollectionForEachOrderedFix(); + message += " (may change semantics)"; + } + holder.registerProblem(methodCall, getCallChainRange(methodCall, qualifierCall), message, fix); } } } @@ -221,7 +228,7 @@ public class SimplifyStreamApiCallChainsInspection extends BaseJavaBatchLocalIns @NotNull @Override public String getFamilyName() { - return "Replace Collection.stream()." + FOR_EACH_ORDERED_METHOD + "() with Collection.forEach()"; + return "Replace Collection.stream()." + FOR_EACH_ORDERED_METHOD + "() with Collection.forEach() (may change semantics)"; } @Override diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java index a72a85827bab..d8b6bb9b57b4 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefMethodImpl.java @@ -17,6 +17,7 @@ package com.intellij.codeInspection.reference; import com.intellij.codeInsight.ExceptionUtil; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.util.Comparing; import com.intellij.psi.*; import com.intellij.psi.search.GlobalSearchScope; @@ -426,24 +427,19 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { @Override public String getName() { if (isValid()) { - final String[] result = new String[1]; - final Runnable runnable = () -> { + return ReadAction.compute(() -> { PsiMethod psiMethod = (PsiMethod) getElement(); if (psiMethod instanceof SyntheticElement) { - result[0] = psiMethod.getName(); + return psiMethod.getName(); } else { - result[0] = PsiFormatUtil.formatMethod(psiMethod, + return PsiFormatUtil.formatMethod(psiMethod, PsiSubstitutor.EMPTY, PsiFormatUtilBase.SHOW_NAME | PsiFormatUtilBase.SHOW_PARAMETERS, PsiFormatUtilBase.SHOW_TYPE ); } - }; - - ApplicationManager.getApplication().runReadAction(runnable); - - return result[0]; + }); } else { return super.getName(); } @@ -451,16 +447,11 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { @Override public String getExternalName() { - final String[] result = new String[1]; - final Runnable runnable = () -> { + return ReadAction.compute(() -> { final PsiMethod psiMethod = (PsiMethod)getElement(); LOG.assertTrue(psiMethod != null); - result[0] = PsiFormatUtil.getExternalName(psiMethod, true, Integer.MAX_VALUE); - }; - - ApplicationManager.getApplication().runReadAction(runnable); - - return result[0]; + return PsiFormatUtil.getExternalName(psiMethod, true, Integer.MAX_VALUE); + }); } @Nullable @@ -686,4 +677,8 @@ public class RefMethodImpl extends RefJavaElementImpl implements RefMethod { setFlag(isCalledOnSubClass, IS_CALLED_ON_SUBCLASS_MASK); } + private static String extractMethodName(String methodSignature) { + final String returnTypeAndName = methodSignature.substring(0, methodSignature.indexOf('(')); + return returnTypeAndName.substring(returnTypeAndName.indexOf(' ') + 1); + } } diff --git a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java index 99bb8c0417cb..aed8d4f1c768 100644 --- a/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java +++ b/java/java-analysis-impl/src/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspection.java @@ -34,10 +34,10 @@ import com.intellij.util.VisibilityUtil; import com.intellij.util.containers.ContainerUtil; import com.siyeh.ig.fixes.ChangeModifierFix; import com.siyeh.ig.psiutils.MethodUtils; +import gnu.trove.TObjectIntHashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; @@ -87,7 +87,7 @@ class AccessCanBeTightenedInspection extends BaseJavaBatchLocalInspectionTool { UnusedDeclarationInspectionBase tool = (UnusedDeclarationInspectionBase)profile.getUnwrappedTool(UnusedDeclarationInspectionBase.SHORT_NAME, holder.getFile()); myDeadCodeInspection = tool == null ? new UnusedDeclarationInspectionBase() : tool; } - private final Set childMembersAreUsedOutsideMyPackage = ContainerUtil.newConcurrentSet(); + private final TObjectIntHashMap maxSuggestedLevelForChildMembers = new TObjectIntHashMap<>(); @Override public void visitClass(PsiClass aClass) { @@ -105,48 +105,79 @@ class AccessCanBeTightenedInspection extends BaseJavaBatchLocalInspectionTool { } private void checkMember(@NotNull final PsiMember member) { - if (member.hasModifierProperty(PsiModifier.PRIVATE) || member.hasModifierProperty(PsiModifier.NATIVE)) return; - if (member instanceof PsiMethod && member instanceof SyntheticElement || !member.isPhysical()) return; + final PsiClass memberClass = member.getContainingClass(); + PsiModifierList memberModifierList = member.getModifierList(); + if (memberModifierList == null) return; + int currentLevel = PsiUtil.getAccessLevel(memberModifierList); + int suggestedLevel = suggestLevel(member, memberClass, currentLevel); + if (memberClass != null) { + synchronized (maxSuggestedLevelForChildMembers) { + int prevMax = maxSuggestedLevelForChildMembers.get(memberClass); + maxSuggestedLevelForChildMembers.put(memberClass, Math.max(prevMax, suggestedLevel)); + } + } + + log(member.getName() + ": effective level is '" + PsiUtil.getAccessModifier(suggestedLevel) + "'"); + + if (suggestedLevel < currentLevel) { + if (member instanceof PsiClass) { + int memberMaxLevel; + synchronized (maxSuggestedLevelForChildMembers) { + memberMaxLevel = maxSuggestedLevelForChildMembers.get((PsiClass)member); + } + if (memberMaxLevel > suggestedLevel) { + // a class can't have visibility less than its members + return; + } + } + PsiElement toHighlight = currentLevel == PsiUtil.ACCESS_LEVEL_PACKAGE_LOCAL ? ((PsiNameIdentifierOwner)member).getNameIdentifier() : ContainerUtil.find( + memberModifierList.getChildren(), + element -> element instanceof PsiKeyword && element.getText().equals(PsiUtil.getAccessModifier(currentLevel))); + assert toHighlight != null : member +" ; " + ((PsiNameIdentifierOwner)member).getNameIdentifier() + "; "+ memberModifierList.getText(); + String suggestedModifier = PsiUtil.getAccessModifier(suggestedLevel); + myHolder.registerProblem(toHighlight, "Access can be " + VisibilityUtil.toPresentableText(suggestedModifier), new ChangeModifierFix(suggestedModifier)); + } + } + + private int suggestLevel(@NotNull PsiMember member, PsiClass memberClass, int currentLevel) { + if (member.hasModifierProperty(PsiModifier.PRIVATE) || member.hasModifierProperty(PsiModifier.NATIVE)) return currentLevel; + if (member instanceof PsiMethod && member instanceof SyntheticElement || !member.isPhysical()) return currentLevel; if (member instanceof PsiMethod) { PsiMethod method = (PsiMethod)member; if (!method.getHierarchicalMethodSignature().getSuperSignatures().isEmpty()) { log(member.getName() + " overrides"); - return; // overrides + return currentLevel; // overrides } if (MethodUtils.isOverridden(method)) { log(member.getName() + " overridden"); - return; + return currentLevel; } } - if (member instanceof PsiEnumConstant) return; + if (member instanceof PsiEnumConstant) return currentLevel; if (member instanceof PsiClass && (member instanceof PsiAnonymousClass || member instanceof PsiTypeParameter || member instanceof PsiSyntheticClass || PsiUtil.isLocalClass((PsiClass)member))) { - return; + return currentLevel; } - final PsiClass memberClass = member.getContainingClass(); if (memberClass != null && (memberClass.isInterface() || memberClass.isEnum() || memberClass.isAnnotationType() || PsiUtil.isLocalClass(memberClass) && member instanceof PsiClass)) { - return; + return currentLevel; } final PsiFile memberFile = member.getContainingFile(); Project project = memberFile.getProject(); if (myDeadCodeInspection.isEntryPoint(member)) { log(member.getName() +" is entry point"); - return; + return currentLevel; } - PsiModifierList memberModifierList = member.getModifierList(); - if (memberModifierList == null) return; - final int currentLevel = PsiUtil.getAccessLevel(memberModifierList); - final AtomicInteger maxLevel = new AtomicInteger(PsiUtil.ACCESS_LEVEL_PRIVATE); - final AtomicBoolean foundUsage = new AtomicBoolean(); PsiDirectory memberDirectory = memberFile.getContainingDirectory(); final PsiPackage memberPackage = memberDirectory == null ? null : JavaDirectoryService.getInstance().getPackage(memberDirectory); log(member.getName()+ ": checking effective level for "+member); + AtomicInteger maxLevel = new AtomicInteger(PsiUtil.ACCESS_LEVEL_PRIVATE); + AtomicBoolean foundUsage = new AtomicBoolean(); boolean proceed = UnusedSymbolUtil.processUsages(project, memberFile, member, new EmptyProgressIndicator(), null, info -> { PsiElement element = info.getElement(); if (element == null) return true; @@ -165,30 +196,21 @@ class AccessCanBeTightenedInspection extends BaseJavaBatchLocalInspectionTool { } if (!foundUsage.get()) { log(member.getName() + " unused; ignore"); - return; // do not propose private for unused method + return currentLevel; // do not propose private for unused method } - int max = maxLevel.get(); - if (max == PsiUtil.ACCESS_LEVEL_PRIVATE && memberClass == null) { - max = suggestPackageLocal(member); + int suggestedLevel = maxLevel.get(); + if (suggestedLevel == PsiUtil.ACCESS_LEVEL_PRIVATE && memberClass == null) { + suggestedLevel = suggestPackageLocal(member); } - String maxModifier = PsiUtil.getAccessModifier(max); - log(member.getName() + ": effective level is '" + maxModifier + "'"); + String suggestedModifier = PsiUtil.getAccessModifier(suggestedLevel); + log(member.getName() + ": effective level is '" + suggestedModifier + "'"); - if (max < currentLevel) { - if (max == PsiUtil.ACCESS_LEVEL_PACKAGE_LOCAL && member instanceof PsiClass && childMembersAreUsedOutsideMyPackage.contains(member)) { - log(member.getName() + " children used outside my package; ignore"); - return; // e.g. some public method is used outside my package (without importing class) - } - PsiElement toHighlight = currentLevel == PsiUtil.ACCESS_LEVEL_PACKAGE_LOCAL ? ((PsiNameIdentifierOwner)member).getNameIdentifier() : ContainerUtil.find( - memberModifierList.getChildren(), - element -> element instanceof PsiKeyword && element.getText().equals(PsiUtil.getAccessModifier(currentLevel))); - assert toHighlight != null : member +" ; " + ((PsiNameIdentifierOwner)member).getNameIdentifier() + "; "+ memberModifierList.getText(); - myHolder.registerProblem(toHighlight, "Access can be " + VisibilityUtil.toPresentableText(maxModifier), new ChangeModifierFix(maxModifier)); - } + return suggestedLevel; } + private boolean handleUsage(@NotNull PsiMember member, @Nullable PsiClass memberClass, @NotNull PsiFile memberFile, @@ -201,20 +223,12 @@ class AccessCanBeTightenedInspection extends BaseJavaBatchLocalInspectionTool { if (!(psiFile instanceof PsiJavaFile)) { log(" refd from " + psiFile.getName() + "; set to public"); maxLevel.set(PsiUtil.ACCESS_LEVEL_PUBLIC); - if (memberClass != null) { - childMembersAreUsedOutsideMyPackage.add(memberClass); - } return false; // referenced from XML, has to be public } - //int offset = info.getNavigationOffset(); - //if (offset == -1) return true; @PsiUtil.AccessLevel int level = getEffectiveLevel(element, psiFile, member, memberFile, memberClass, memberPackage); log(" ref in file " + psiFile.getName() + "; level = " + PsiUtil.getAccessModifier(level) + "; (" + element + ")"); maxLevel.getAndAccumulate(level, Math::max); - if (level == PsiUtil.ACCESS_LEVEL_PUBLIC && memberClass != null) { - childMembersAreUsedOutsideMyPackage.add(memberClass); - } return level != PsiUtil.ACCESS_LEVEL_PUBLIC; } diff --git a/java/java-analysis-impl/src/com/intellij/lexer/JavaHighlightingLexer.java b/java/java-analysis-impl/src/com/intellij/lexer/JavaHighlightingLexer.java index 95611c7ce0f1..b0ec1a971669 100644 --- a/java/java-analysis-impl/src/com/intellij/lexer/JavaHighlightingLexer.java +++ b/java/java-analysis-impl/src/com/intellij/lexer/JavaHighlightingLexer.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -19,6 +19,8 @@ import com.intellij.lang.java.JavaParserDefinition; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.JavaDocTokenType; import com.intellij.psi.JavaTokenType; +import com.intellij.psi.PsiKeyword; +import com.intellij.psi.impl.source.tree.ElementType; import com.intellij.psi.impl.source.tree.JavaDocElementType; import com.intellij.psi.tree.IElementType; import org.jetbrains.annotations.NotNull; @@ -27,6 +29,9 @@ import org.jetbrains.annotations.NotNull; * @author max */ public class JavaHighlightingLexer extends LayeredLexer { + private boolean myAtStart = true; + private boolean myModuleInfo = false; + public JavaHighlightingLexer(@NotNull LanguageLevel languageLevel) { super(JavaParserDefinition.createLexer(languageLevel)); @@ -42,4 +47,27 @@ public class JavaHighlightingLexer extends LayeredLexer { docLexer.registerLayer(htmlLexer, JavaDocTokenType.DOC_COMMENT_DATA); registerSelfStoppingLayer(docLexer, new IElementType[]{JavaDocElementType.DOC_COMMENT}, IElementType.EMPTY_ARRAY); } -} + + @Override + public IElementType getTokenType() { + IElementType t = super.getTokenType(); + + if (myAtStart && !ElementType.JAVA_COMMENT_OR_WHITESPACE_BIT_SET.contains(t)) { + myAtStart = false; + myModuleInfo = t == JavaTokenType.IDENTIFIER && PsiKeyword.MODULE.equals(getTokenText()); + } + + if (myModuleInfo && t == JavaTokenType.IDENTIFIER) { + String text = getTokenText(); + if (PsiKeyword.MODULE.equals(text)) t = JavaTokenType.MODULE_KEYWORD; + else if (PsiKeyword.REQUIRES.equals(text)) t = JavaTokenType.REQUIRES_KEYWORD; + else if (PsiKeyword.EXPORTS.equals(text)) t = JavaTokenType.EXPORTS_KEYWORD; + else if (PsiKeyword.USES.equals(text)) t = JavaTokenType.USES_KEYWORD; + else if (PsiKeyword.PROVIDES.equals(text)) t = JavaTokenType.PROVIDES_KEYWORD; + else if (PsiKeyword.TO.equals(text)) t = JavaTokenType.TO_KEYWORD; + else if (PsiKeyword.WITH.equals(text)) t = JavaTokenType.WITH_KEYWORD; + } + + return t; + } +} \ No newline at end of file diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java index 6eed4bdbe223..8c13e6f65dab 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/AddMethodQualifierFix.java @@ -50,7 +50,8 @@ public class AddMethodQualifierFix implements IntentionAction { @NotNull @Override public String getText() { - String text = QuickFixBundle.message("add.method.qualifier.fix.text", myCandidates.size() > 1 ? "" : myCandidates.get(0).getName()); + final List candidates = getOrFindCandidates(); + String text = QuickFixBundle.message("add.method.qualifier.fix.text", candidates.size() > 1 ? "" : candidates.get(0).getName()); if (myCandidates.size() > 1) { text += "..."; } diff --git a/java/java-impl/src/com/intellij/codeInsight/folding/impl/JavaElementSignatureProvider.java b/java/java-impl/src/com/intellij/codeInsight/folding/impl/JavaElementSignatureProvider.java index 2f1ac0cccd91..9262f8a4d24b 100644 --- a/java/java-impl/src/com/intellij/codeInsight/folding/impl/JavaElementSignatureProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/folding/impl/JavaElementSignatureProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -167,8 +167,7 @@ public class JavaElementSignatureProvider extends AbstractElementSignatureProvid @Nullable StringBuilder processingInfoStorage) { if (type.equals("imports")) { - if (!(file instanceof PsiJavaFile)) return null; - return ((PsiJavaFile)file).getImportList(); + return file instanceof PsiJavaFile ? ((PsiJavaFile)file).getImportList() : null; } else if (type.equals("method")) { String name = tokenizer.nextToken(); diff --git a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index e5548325e853..cd96cfed904b 100644 --- a/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -71,7 +71,6 @@ import java.util.regex.Pattern; public class JavaDocInfoGenerator { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.javadoc.JavaDocInfoGenerator"); - @NonNls private static final Pattern ourNotDot = Pattern.compile("[^.]"); @NonNls private static final Pattern ourWhitespaces = Pattern.compile("[ \\n\\r\\t]+"); @NonNls private static final Pattern ourRelativeHtmlLinks = Pattern.compile(" fixes = new ArrayList(); fixes.add(getFix(processor, needToDeleteHierarchy)); - SpecialAnnotationsUtilBase.createAddToSpecialAnnotationFixes(refMethod.getElement(), qualifiedName -> { - fixes.add(SpecialAnnotationsUtilBase.createAddToSpecialAnnotationsListQuickFix( - QuickFixBundle.message("fix.add.special.annotation.text", qualifiedName), - QuickFixBundle.message("fix.add.special.annotation.family"), - EXCLUDE_ANNOS, qualifiedName, refMethod.getElement())); - return true; - }); + if (globalContext instanceof GlobalInspectionContextBase && ((GlobalInspectionContextBase)globalContext).getCurrentProfile().getSingleTool() == null) { + SpecialAnnotationsUtilBase.createAddToSpecialAnnotationFixes(refMethod.getElement(), qualifiedName -> { + fixes.add(SpecialAnnotationsUtilBase.createAddToSpecialAnnotationsListQuickFix( + QuickFixBundle.message("fix.add.special.annotation.text", qualifiedName), + QuickFixBundle.message("fix.add.special.annotation.family"), + EXCLUDE_ANNOS, qualifiedName, refMethod.getElement())); + return true; + }); + } final ProblemDescriptor descriptor = manager.createProblemDescriptor(refMethod.getElement().getNavigationElement(), message, false, fixes.toArray(new LocalQuickFix[fixes.size()]), diff --git a/java/java-impl/src/com/intellij/codeInspection/varScopeCanBeNarrowed/ParameterCanBeLocalInspection.java b/java/java-impl/src/com/intellij/codeInspection/varScopeCanBeNarrowed/ParameterCanBeLocalInspection.java index e7986b515d71..8aefca5e0dc6 100644 --- a/java/java-impl/src/com/intellij/codeInspection/varScopeCanBeNarrowed/ParameterCanBeLocalInspection.java +++ b/java/java-impl/src/com/intellij/codeInspection/varScopeCanBeNarrowed/ParameterCanBeLocalInspection.java @@ -19,10 +19,14 @@ import com.intellij.codeInspection.ProblemDescriptor; import com.intellij.openapi.project.Project; import com.intellij.psi.*; import com.intellij.refactoring.changeSignature.ChangeSignatureProcessor; +import com.intellij.refactoring.changeSignature.JavaChangeInfo; +import com.intellij.refactoring.changeSignature.JavaChangeInfoImpl; import com.intellij.refactoring.changeSignature.ParameterInfoImpl; +import com.intellij.refactoring.util.CanonicalTypes; import com.intellij.usageView.UsageInfo; import com.intellij.util.NotNullFunction; import com.intellij.util.VisibilityUtil; +import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -66,8 +70,11 @@ public class ParameterCanBeLocalInspection extends ParameterCanBeLocalInspection } final ParameterInfoImpl[] newParams = info.toArray(new ParameterInfoImpl[info.size()]); final String visibilityModifier = VisibilityUtil.getVisibilityModifier(method.getModifierList()); - final ChangeSignatureProcessor cp = new ChangeSignatureProcessor(project, method, false, visibilityModifier, - method.getName(), method.getReturnType(), newParams) { + final PsiType returnType = method.getReturnType(); + final JavaChangeInfo changeInfo = new JavaChangeInfoImpl(visibilityModifier, method, method.getName(), + returnType != null ? CanonicalTypes.createTypeWrapper(returnType) : null, + newParams, null, false, ContainerUtil.newHashSet(), ContainerUtil.newHashSet()); + final ChangeSignatureProcessor cp = new ChangeSignatureProcessor(project, changeInfo) { @Override protected void performRefactoring(@NotNull UsageInfo[] usages) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(project); diff --git a/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java b/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java index f5a863484157..7f6a002c2ebf 100644 --- a/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java +++ b/java/java-impl/src/com/intellij/psi/formatter/java/AbstractJavaBlock.java @@ -1278,8 +1278,6 @@ public abstract class AbstractJavaBlock extends AbstractBlock implements JavaBlo public SyntheticCodeBlock createCodeBlockBlock(final List localResult, final Indent indent, final int childrenIndent) { final SyntheticCodeBlock result = new SyntheticCodeBlock(localResult, null, getSettings(), myJavaSettings, indent, null); result.setChildAttributes(new ChildAttributes(getCodeBlockInternalIndent(childrenIndent), null)); - return result; + return result; } - - } diff --git a/java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java b/java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java index 47b891c2ba7c..a5ed9c820926 100644 --- a/java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java +++ b/java/java-impl/src/com/intellij/psi/impl/file/JavaUpdateAddedFileProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -18,13 +18,13 @@ package com.intellij.psi.impl.file; import com.intellij.openapi.roots.JavaProjectRootsUtil; import com.intellij.psi.*; import com.intellij.psi.templateLanguages.TemplateLanguageFileViewProvider; +import com.intellij.psi.util.PsiUtil; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; /** * @author Maxim.Mossienko - * Date: Sep 18, 2008 - * Time: 3:33:07 PM + * @since Sep 18, 2008 */ public class JavaUpdateAddedFileProcessor extends UpdateAddedFileProcessor { @Override @@ -34,14 +34,17 @@ public class JavaUpdateAddedFileProcessor extends UpdateAddedFileProcessor { @Override public void update(final PsiFile element, PsiFile originalElement) throws IncorrectOperationException { - if (element.getViewProvider() instanceof TemplateLanguageFileViewProvider) return; + if (element.getViewProvider() instanceof TemplateLanguageFileViewProvider || PsiUtil.isModuleFile(element)) { + return; + } PsiDirectory dir = element.getContainingDirectory(); - if (dir == null) return; - PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(dir); - if (aPackage == null) return; - String packageName = aPackage.getQualifiedName(); - - ((PsiClassOwner)element).setPackageName(packageName); + if (dir != null) { + PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(dir); + if (aPackage != null) { + String packageName = aPackage.getQualifiedName(); + ((PsiClassOwner)element).setPackageName(packageName); + } + } } -} +} \ No newline at end of file diff --git a/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/ImportHelper.java b/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/ImportHelper.java index 5646b290a4b2..ac58e299cb0c 100644 --- a/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/ImportHelper.java +++ b/java/java-impl/src/com/intellij/psi/impl/source/codeStyle/ImportHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -66,6 +66,9 @@ public class ImportHelper{ } public PsiImportList prepareOptimizeImportsResult(@NotNull final PsiJavaFile file) { + PsiImportList oldList = file.getImportList(); + if (oldList == null) return null; + // Java parser works in a way that comments may be included to the import list, e.g.: // import a; // /* comment */ @@ -98,8 +101,8 @@ public class ImportHelper{ codeStyleManager.reformat(dummyFile); PsiImportList newImportList = dummyFile.getImportList(); + assert newImportList != null : dummyFile.getText(); PsiImportList result = (PsiImportList)newImportList.copy(); - PsiImportList oldList = file.getImportList(); if (oldList.isReplaceEquivalent(result)) return null; if (!nonImports.isEmpty()) { PsiElement firstPrevious = newImportList.getPrevSibling(); @@ -431,6 +434,7 @@ public class ImportHelper{ try { PsiImportList importList = file.getImportList(); + assert importList != null : file; PsiImportStatement statement = useOnDemand ? factory.createImportStatementOnDemand(packageName) : factory.createImportStatement(refClass); importList.add(statement); if (useOnDemand) { diff --git a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchy.java b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchy.java index 436afec45e04..982b1af46211 100644 --- a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchy.java +++ b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/SingleClassHierarchy.java @@ -18,7 +18,6 @@ package com.intellij.psi.stubsHierarchy.impl; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileWithId; import com.intellij.psi.PsiClass; -import com.intellij.psi.PsiElement; import com.intellij.psi.search.DelegatingGlobalSearchScope; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.stubsHierarchy.ClassHierarchy; @@ -113,10 +112,6 @@ public class SingleClassHierarchy extends ClassHierarchy { @NotNull @Override public SmartClassAnchor[] getDirectSubtypeCandidates(@NotNull PsiClass psiClass) { - PsiElement original = psiClass.getOriginalElement(); - if (original instanceof PsiClass) { - psiClass = (PsiClass)original; - } VirtualFile vFile = psiClass.getContainingFile().getVirtualFile(); if (!(vFile instanceof VirtualFileWithId)) return StubClassAnchor.EMPTY_ARRAY; diff --git a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/StubResolver.java b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/StubResolver.java index 49737500f391..d8791ff8a2ea 100644 --- a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/StubResolver.java +++ b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/StubResolver.java @@ -18,6 +18,7 @@ package com.intellij.psi.stubsHierarchy.impl; import com.intellij.psi.impl.java.stubs.hierarchy.IndexTree; import com.intellij.util.BitUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.HashSet; @@ -69,7 +70,7 @@ public class StubResolver { private void findType(Symbol startScope, int name, Set symbols) throws IncompleteHierarchyException { // looking up for (Symbol s = startScope; s != null; s = s.myOwner) - findMemberType(s, name, symbols, new HashSet()); + findMemberType(s, name, symbols); // type from current package findIdentInPackage(startScope.pkg(), name, IndexTree.CLASS, symbols); } @@ -79,7 +80,7 @@ public class StubResolver { if (receiver.isPackage()) findIdentInPackage((Symbol.PackageSymbol)receiver, name, kind, symbols); else - findMemberType(receiver, name, symbols, new HashSet()); + findMemberType(receiver, name, symbols); } private void findIdentInPackage(Symbol.PackageSymbol pck, int name, int kind, Set symbols) { @@ -97,19 +98,34 @@ public class StubResolver { } } - private void findMemberType(Symbol s, int name, Set symbols, Set processed) throws IncompleteHierarchyException { - if (!processed.add(s)) { - return; + private void findMemberType(Symbol s, int name, Set symbols) throws IncompleteHierarchyException { + if (s.isClass()) { + processInheritedMembers((Symbol.ClassSymbol)s, name, false, symbols, null); + } else { + processMembers(s.getMembers(), name, symbols, false); } - processMembers(s.getMembers(), name, symbols, false); - if (s.isClass()) - findInheritedMemberType((Symbol.ClassSymbol)s, name, symbols, processed); } - private void findInheritedMemberType(Symbol.ClassSymbol c, int name, Set symbols, Set processed) - throws IncompleteHierarchyException { - for (Symbol.ClassSymbol st : c.getSuperClasses(myConnector)) - findMemberType(st, name, symbols, processed); + private void processInheritedMembers(Symbol.ClassSymbol s, + int name, + boolean requireStatic, + Set symbols, + @Nullable Set processed) throws IncompleteHierarchyException { + processMembers(s.getMembers(), name, symbols, requireStatic); + + @CompactArray(Symbol.ClassSymbol.class) Object supers = s.getSuperClasses(myConnector); + if (supers == null) return; + + if (processed == null) processed = new HashSet<>(); + if (!processed.add(s)) return; + + if (supers instanceof Symbol.ClassSymbol) { + processInheritedMembers((Symbol.ClassSymbol)supers, name, requireStatic, symbols, processed); + } else if (supers instanceof Symbol.ClassSymbol[]) { + for (Symbol.ClassSymbol st : (Symbol.ClassSymbol[])supers) { + processInheritedMembers(st, name, requireStatic, symbols, processed); + } + } } private Symbol.ClassSymbol[] loadClass(@NotNull QualifiedName fqn) { @@ -171,16 +187,7 @@ public class StubResolver { // handling of import static `tsym.name` as private void importNamedStatic(final Symbol.ClassSymbol tsym, final int name, final Set symbols) throws IncompleteHierarchyException { - new Object() { - Set processed = new HashSet(); - void importFrom(Symbol.ClassSymbol cs) throws IncompleteHierarchyException { - if (cs == null || !processed.add(cs)) - return; - for (Symbol.ClassSymbol c : cs.getSuperClasses(myConnector)) - importFrom(c); - processMembers(cs.getMembers(), name, symbols, true); - } - }.importFrom(tsym); + processInheritedMembers(tsym, name, true, symbols, null); } private static void processMembers(Symbol.ClassSymbol[] members, int name, Set symbols, boolean requireStatic) { diff --git a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/Symbol.java b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/Symbol.java index abd60aea07ad..40ef829ae232 100644 --- a/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/Symbol.java +++ b/java/java-impl/src/com/intellij/psi/stubsHierarchy/impl/Symbol.java @@ -19,6 +19,7 @@ import com.intellij.psi.impl.java.stubs.hierarchy.IndexTree; import com.intellij.util.BitUtil; import gnu.trove.TIntHashSet; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Collections; import java.util.Comparator; @@ -125,13 +126,14 @@ public abstract class Symbol { return BitUtil.isSet(myFlags, CONNECT_STARTED); } - @NotNull - ClassSymbol[] getSuperClasses(StubHierarchyConnector connector) throws IncompleteHierarchyException { + @Nullable + @CompactArray(ClassSymbol.class) + Object getSuperClasses(StubHierarchyConnector connector) throws IncompleteHierarchyException { connect(connector); if (isHierarchyIncomplete()) { throw IncompleteHierarchyException.INSTANCE; } - return rawSuperClasses(); + return mySuperClasses; } @NotNull diff --git a/java/java-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessor.java b/java/java-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessor.java index 77fce0eb1366..07cf95e0d6c6 100644 --- a/java/java-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessor.java @@ -118,8 +118,11 @@ public class ChangeSignatureProcessor extends ChangeSignatureProcessorBase { newVisibility = VisibilityUtil.getVisibilityModifier(method.getModifierList()); } - return new JavaChangeInfoImpl(newVisibility, method, newName, newType, parameterInfo, thrownExceptions, generateDelegate, - propagateParametersMethods, propagateExceptionsMethods); + final JavaChangeInfoImpl javaChangeInfo = + new JavaChangeInfoImpl(newVisibility, method, newName, newType, parameterInfo, thrownExceptions, generateDelegate, + propagateParametersMethods, propagateExceptionsMethods); + javaChangeInfo.setCheckUnusedParameter(); + return javaChangeInfo; } @NotNull @@ -151,6 +154,7 @@ public class ChangeSignatureProcessor extends ChangeSignatureProcessorBase { RenameUtil.removeConflictUsages(usagesSet); if (!conflictDescriptions.isEmpty()) { if (ApplicationManager.getApplication().isUnitTestMode()) { + if (ConflictsInTestsException.isTestIgnore()) return true; throw new ConflictsInTestsException(conflictDescriptions.values()); } if (myPrepareSuccessfulSwingThreadCallback != null) { diff --git a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfo.java b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfo.java index 6466f8302385..961cce2ca1d8 100644 --- a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfo.java +++ b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfo.java @@ -68,4 +68,9 @@ public interface JavaChangeInfo extends ChangeInfo { void updateMethod(PsiMethod psiMethod); Collection getMethodsToPropagateParameters(); + + default boolean checkUnusedParameter() { + return false; + } + } diff --git a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfoImpl.java b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfoImpl.java index f9cb2f400e63..f03137162608 100644 --- a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfoImpl.java +++ b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeInfoImpl.java @@ -69,6 +69,8 @@ public class JavaChangeInfoImpl extends UserDataHolderBase implements JavaChange final Set propagateParametersMethods; final Set propagateExceptionsMethods; + private boolean myCheckUnusedParameter = false; + /** * @param newExceptions null if not changed */ @@ -201,6 +203,15 @@ public class JavaChangeInfoImpl extends UserDataHolderBase implements JavaChange } } + @Override + public boolean checkUnusedParameter() { + return myCheckUnusedParameter; + } + + public void setCheckUnusedParameter() { + myCheckUnusedParameter = true; + } + protected void fillOldParams(PsiMethod method) { PsiParameter[] parameters = method.getParameterList().getParameters(); oldParameterNames = new String[parameters.length]; diff --git a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureUsageProcessor.java b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureUsageProcessor.java index 6d0567353562..188d386dce5c 100644 --- a/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureUsageProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/changeSignature/JavaChangeSignatureUsageProcessor.java @@ -24,8 +24,6 @@ import com.intellij.lang.java.JavaLanguage; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; -import com.intellij.openapi.util.Condition; -import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; @@ -34,6 +32,8 @@ import com.intellij.psi.codeStyle.JavaCodeStyleManager; import com.intellij.psi.codeStyle.VariableKind; import com.intellij.psi.scope.processor.VariablesProcessor; import com.intellij.psi.scope.util.PsiScopesUtil; +import com.intellij.psi.search.LocalSearchScope; +import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.psi.util.*; import com.intellij.refactoring.RefactoringBundle; import com.intellij.refactoring.rename.RenameUtil; @@ -991,7 +991,7 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr public MultiMap findConflicts(Ref refUsages) { MultiMap conflictDescriptions = new MultiMap(); - addMethodConflicts(conflictDescriptions); + final PsiMethod prototype = addMethodConflicts(conflictDescriptions); Set usagesSet = new HashSet(Arrays.asList(refUsages.get())); RenameUtil.removeConflictUsages(usagesSet); if (myChangeInfo.isVisibilityChanged()) { @@ -1002,7 +1002,13 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr LOG.error(e); } } - + + final boolean[] toRemove = myChangeInfo.toRemoveParm(); + //introduce parameter object deletes parameters but replaces their usages with generated code + final boolean checkUnusedParameter = myChangeInfo.checkUnusedParameter(); + if (checkUnusedParameter) { + checkParametersToDelete(myChangeInfo.getMethod(), toRemove, conflictDescriptions); + } checkContract(conflictDescriptions, myChangeInfo.getMethod()); for (UsageInfo usageInfo : usagesSet) { @@ -1012,11 +1018,16 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr final PsiMethod baseMethod = ((OverriderUsageInfo)usageInfo).getBaseMethod(); final int delta = baseMethod.getParameterList().getParametersCount() - method.getParameterList().getParametersCount(); if (delta > 0) { - final boolean[] toRemove = myChangeInfo.toRemoveParm(); if (toRemove[toRemove.length - 1]) { //todo check if implicit parameter is not the last one conflictDescriptions.putValue(baseMethod, "Implicit last parameter should not be deleted"); } } + else if (prototype != null && baseMethod == myChangeInfo.getMethod()) { + ConflictsUtil.checkMethodConflicts(method.getContainingClass(), method, prototype, conflictDescriptions); + if (checkUnusedParameter) { + checkParametersToDelete(method, toRemove, conflictDescriptions); + } + } checkContract(conflictDescriptions, method); } @@ -1028,6 +1039,19 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr return conflictDescriptions; } + private static void checkParametersToDelete(PsiMethod method, boolean[] toRemove, MultiMap conflictDescriptions) { + final PsiParameter[] parameters = method.getParameterList().getParameters(); + final PsiCodeBlock body = method.getBody(); + if (body != null) { + final LocalSearchScope searchScope = new LocalSearchScope(body); + for (int i = 0; i < toRemove.length; i++) { + if (toRemove[i] && ReferencesSearch.search(parameters[i], searchScope).findFirst() != null) { + conflictDescriptions.putValue(parameters[i], StringUtil.capitalize(RefactoringUIUtil.getDescription(parameters[i], true)) + " is used in method body"); + } + } + } + } + private static void checkContract(MultiMap conflictDescriptions, PsiMethod method) { PsiAnnotation contract = ControlFlowAnalyzer.findContractAnnotation(method); if (contract != null && !AnnotationUtil.isInferredAnnotation(contract)) { @@ -1075,15 +1099,15 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr } - private void addMethodConflicts(MultiMap conflicts) { + private PsiMethod addMethodConflicts(MultiMap conflicts) { String newMethodName = myChangeInfo.getNewName(); try { - PsiMethod prototype; final PsiMethod method = myChangeInfo.getMethod(); - if (!StdLanguages.JAVA.equals(method.getLanguage())) return; + if (!StdLanguages.JAVA.equals(method.getLanguage())) return null; PsiManager manager = method.getManager(); PsiElementFactory factory = JavaPsiFacade.getInstance(manager.getProject()).getElementFactory(); final CanonicalTypes.Type returnType = myChangeInfo.getNewReturnType(); + PsiMethod prototype; if (returnType != null) { prototype = factory.createMethod(newMethodName, returnType.getType(method, manager)); } @@ -1104,11 +1128,13 @@ public class JavaChangeSignatureUsageProcessor implements ChangeSignatureUsagePr prototype.getParameterList().add(param); } - ConflictsUtil.checkMethodConflicts(method.getContainingClass(), method, prototype, conflicts); + ConflictsUtil.checkMethodConflicts(method.getContainingClass(), myChangeInfo.isGenerateDelegate() ? null : method, prototype, conflicts); + return prototype; } catch (IncorrectOperationException e) { LOG.error(e); } + return null; } } diff --git a/java/java-impl/src/com/intellij/refactoring/inline/InlineLocalHandler.java b/java/java-impl/src/com/intellij/refactoring/inline/InlineLocalHandler.java index afd0e3f65dc5..718a99371cf8 100644 --- a/java/java-impl/src/com/intellij/refactoring/inline/InlineLocalHandler.java +++ b/java/java-impl/src/com/intellij/refactoring/inline/InlineLocalHandler.java @@ -20,6 +20,7 @@ import com.intellij.codeInsight.TargetElementUtil; import com.intellij.codeInsight.highlighting.HighlightManager; import com.intellij.codeInsight.intention.QuickFixFactory; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Editor; @@ -27,6 +28,7 @@ import com.intellij.openapi.editor.colors.EditorColors; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.editor.ex.EditorSettingsExternalizable; import com.intellij.openapi.editor.markup.TextAttributes; +import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Ref; import com.intellij.openapi.wm.WindowManager; @@ -77,38 +79,43 @@ public class InlineLocalHandler extends JavaInlineActionHandler { final String localName = local.getName(); - final Query query = ReferencesSearch.search(local, local.getUseScope()); - if (query.findFirst() == null){ - LOG.assertTrue(refExpr == null); - String message = RefactoringBundle.message("variable.is.never.used", localName); - CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.INLINE_VARIABLE); - return; - } - - final PsiClass containingClass = PsiTreeUtil.getParentOfType(local, PsiClass.class); final List innerClassesWithUsages = Collections.synchronizedList(new ArrayList()); final List innerClassUsages = Collections.synchronizedList(new ArrayList()); - query.forEach(psiReference -> { - final PsiElement element = psiReference.getElement(); - PsiElement innerClass = PsiTreeUtil.getParentOfType(element, PsiClass.class, PsiLambdaExpression.class); - while (innerClass != containingClass && innerClass != null) { - final PsiClass parentPsiClass = PsiTreeUtil.getParentOfType(innerClass, PsiClass.class, true); - if (parentPsiClass == containingClass) { - if (innerClass instanceof PsiLambdaExpression) { - if (PsiTreeUtil.isAncestor(innerClass, local, false)) { - innerClassesWithUsages.add(element); - innerClass = parentPsiClass; - continue; - } - } - innerClassesWithUsages.add(innerClass); - innerClassUsages.add(element); - } - innerClass = parentPsiClass; + final PsiClass containingClass = PsiTreeUtil.getParentOfType(local, PsiClass.class); + final Query query = ReferencesSearch.search(local, local.getUseScope()); + if (!ProgressManager.getInstance().runProcessWithProgressSynchronously(() -> { + if (query.findFirst() == null){ + LOG.assertTrue(refExpr == null); + ApplicationManager.getApplication().invokeLater(() -> { + String message = RefactoringBundle.message("variable.is.never.used", localName); + CommonRefactoringUtil.showErrorHint(project, editor, message, REFACTORING_NAME, HelpID.INLINE_VARIABLE); + }, ModalityState.NON_MODAL); + return; } - return true; - }); + query.forEach(psiReference -> { + final PsiElement element = psiReference.getElement(); + PsiElement innerClass = PsiTreeUtil.getParentOfType(element, PsiClass.class, PsiLambdaExpression.class); + while (innerClass != containingClass && innerClass != null) { + final PsiClass parentPsiClass = PsiTreeUtil.getParentOfType(innerClass, PsiClass.class, true); + if (parentPsiClass == containingClass) { + if (innerClass instanceof PsiLambdaExpression) { + if (PsiTreeUtil.isAncestor(innerClass, local, false)) { + innerClassesWithUsages.add(element); + innerClass = parentPsiClass; + continue; + } + } + innerClassesWithUsages.add(innerClass); + innerClassUsages.add(element); + } + innerClass = parentPsiClass; + } + return true; + }); + }, "Find Usages", true, project)) { + return; + } final PsiCodeBlock containerBlock = PsiTreeUtil.getParentOfType(local, PsiCodeBlock.class); if (containerBlock == null) { final String message = RefactoringBundle.getCannotRefactorMessage("Variable is declared outside a code block"); @@ -116,9 +123,7 @@ public class InlineLocalHandler extends JavaInlineActionHandler { return; } - final PsiExpression defToInline = innerClassesWithUsages.isEmpty() - ? getDefToInline(local, refExpr, containerBlock) - : getDefToInline(local, innerClassesWithUsages.get(0), containerBlock); + final PsiExpression defToInline = getDefToInline(local, innerClassesWithUsages.isEmpty() ? refExpr : innerClassesWithUsages.get(0), containerBlock); if (defToInline == null){ final String key = refExpr == null ? "variable.has.no.initializer" : "variable.has.no.dominating.definition"; String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message(key, localName)); @@ -150,7 +155,7 @@ public class InlineLocalHandler extends JavaInlineActionHandler { } if (refExpr != null && inlineLocalDialog.isInlineThis()) { - refsToInlineList = Collections.singletonList(refExpr); + refsToInlineList = Collections.singletonList(refExpr); inlineAll.set(false); } } diff --git a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java index 0c6b16e94a11..1bd2f37620e6 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java @@ -353,14 +353,9 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase { try { text = file.getText().subSequence(startOffset, endOffset).toString(); String prefix = null; - String stripped = text; if (startLiteralExpression != null) { final int startExpressionOffset = startLiteralExpression.getTextOffset(); - if (startOffset == startExpressionOffset) { - if (StringUtil.startsWithChar(text, '\"') || StringUtil.startsWithChar(text, '\'')) { - stripped = text.substring(1); - } - } else if (startOffset == startExpressionOffset + 1) { + if (startOffset == startExpressionOffset + 1) { text = "\"" + text; } else if (startOffset > startExpressionOffset + 1){ prefix = "\" + "; @@ -371,11 +366,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase { String suffix = null; if (endLiteralExpression != null) { final int endExpressionOffset = endLiteralExpression.getTextOffset() + endLiteralExpression.getTextLength(); - if (endOffset == endExpressionOffset ) { - if (StringUtil.endsWithChar(stripped, '\"') || StringUtil.endsWithChar(stripped, '\'')) { - stripped = stripped.substring(0, stripped.length() - 1); - } - } else if (endOffset == endExpressionOffset - 1) { + if (endOffset == endExpressionOffset - 1) { text += "\""; } else if (endOffset < endExpressionOffset - 1) { suffix = " + \""; @@ -383,24 +374,6 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase { } } - boolean primitive = false; - if (stripped.equals("true") || stripped.equals("false")) { - primitive = true; - } - else { - try { - Integer.parseInt(stripped); - primitive = true; - } - catch (NumberFormatException e1) { - //then not primitive - } - } - - if (primitive) { - text = stripped; - } - if (literalExpression != null && text.equals(literalExpression.getText())) return literalExpression; final PsiElement parent = literalExpression != null ? literalExpression : elementAt; diff --git a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/MoveClassesOrPackagesUtil.java b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/MoveClassesOrPackagesUtil.java index bba84398b39b..5c2d8d3c4498 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/MoveClassesOrPackagesUtil.java +++ b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/MoveClassesOrPackagesUtil.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -26,13 +26,13 @@ import com.intellij.openapi.roots.ProjectRootManager; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.TextRange; -import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VfsUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.*; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.searches.ReferencesSearch; import com.intellij.psi.util.FileTypeUtils; +import com.intellij.psi.util.PsiUtil; import com.intellij.refactoring.MoveDestination; import com.intellij.refactoring.PackageWrapper; import com.intellij.refactoring.move.moveFilesOrDirectories.MoveFilesOrDirectoriesUtil; @@ -40,7 +40,6 @@ import com.intellij.refactoring.util.MoveRenameUsageInfo; import com.intellij.refactoring.util.RefactoringUtil; import com.intellij.refactoring.util.TextOccurrencesUtil; import com.intellij.usageView.UsageInfo; -import com.intellij.util.Function; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.HashMap; import org.jetbrains.annotations.Nullable; @@ -236,16 +235,15 @@ public class MoveClassesOrPackagesUtil { final PsiDirectory containingDirectory = file.getContainingDirectory(); if (!Comparing.equal(moveDestination.getVirtualFile(), containingDirectory != null ? containingDirectory.getVirtualFile() : null)) { LOG.assertTrue(file.getVirtualFile() != null, aClass); + MoveFilesOrDirectoriesUtil.doMoveFile(file, moveDestination); - if (file instanceof PsiClassOwner && newPackage != null && !FileTypeUtils.isInServerPageFile(file)) { + + if (newPackage != null && file instanceof PsiClassOwner && !FileTypeUtils.isInServerPageFile(file) && !PsiUtil.isModuleFile(file)) { // Do not rely on class instance identity retention after setPackageName (Scala) String aClassName = aClass.getName(); ((PsiClassOwner)file).setPackageName(newPackage.getQualifiedName()); newClass = findClassByName((PsiClassOwner)file, aClassName); - LOG.assertTrue(newClass != null, "name: " + aClassName + - ", file: " + file + - ", classes: " + StringUtil.join(((PsiClassOwner)file).getClasses(), - psiClass -> psiClass.getName(), " ")); + LOG.assertTrue(newClass != null, "name:" + aClassName + " file:" + file + " classes:" + Arrays.toString(((PsiClassOwner)file).getClasses())); } } return newClass; diff --git a/java/java-impl/src/com/intellij/refactoring/util/ConflictsUtil.java b/java/java-impl/src/com/intellij/refactoring/util/ConflictsUtil.java index a3b73c8c27a1..bd90c31ddf8d 100644 --- a/java/java-impl/src/com/intellij/refactoring/util/ConflictsUtil.java +++ b/java/java-impl/src/com/intellij/refactoring/util/ConflictsUtil.java @@ -53,7 +53,7 @@ public class ConflictsUtil { } public static void checkMethodConflicts(@Nullable PsiClass aClass, - PsiMethod refactoredMethod, + @Nullable PsiMethod refactoredMethod, final PsiMethod prototype, final MultiMap conflicts) { if (prototype == null) return; diff --git a/java/java-indexing-api/src/com/intellij/psi/search/searches/FunctionalExpressionSearch.java b/java/java-indexing-api/src/com/intellij/psi/search/searches/FunctionalExpressionSearch.java index 4dcc889233c2..f6028eefec8b 100644 --- a/java/java-indexing-api/src/com/intellij/psi/search/searches/FunctionalExpressionSearch.java +++ b/java/java-indexing-api/src/com/intellij/psi/search/searches/FunctionalExpressionSearch.java @@ -32,7 +32,6 @@ import com.intellij.util.QueryExecutor; import org.jetbrains.annotations.NotNull; public class FunctionalExpressionSearch extends ExtensibleQueryFactory { - public static final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.functionalInterfaceSearch"); public static final FunctionalExpressionSearch INSTANCE = new FunctionalExpressionSearch(); public static class SearchParameters { diff --git a/java/java-indexing-impl/src/com/intellij/codeInsight/navigation/ClassImplementationsSearch.java b/java/java-indexing-impl/src/com/intellij/codeInsight/navigation/ClassImplementationsSearch.java index 4693b7f59fd0..ef57e84f7b7b 100644 --- a/java/java-indexing-impl/src/com/intellij/codeInsight/navigation/ClassImplementationsSearch.java +++ b/java/java-indexing-impl/src/com/intellij/codeInsight/navigation/ClassImplementationsSearch.java @@ -19,7 +19,6 @@ import com.intellij.openapi.util.registry.Registry; import com.intellij.psi.PsiClass; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFunctionalExpression; -import com.intellij.psi.search.PsiElementProcessor; import com.intellij.psi.search.PsiElementProcessorAdapter; import com.intellij.psi.search.SearchScope; import com.intellij.psi.search.searches.ClassInheritorsSearch; @@ -37,20 +36,16 @@ public class ClassImplementationsSearch implements QueryExecutor processor, SearchScope scope) { - if (!FunctionalExpressionSearch.search(psiClass, scope).forEach(expression -> { - return processor.process(expression); - })) { - return false; - } - final boolean showInterfaces = Registry.is("ide.goto.implementation.show.interfaces"); - return ClassInheritorsSearch.search(psiClass, scope, true).forEach(new PsiElementProcessorAdapter(new PsiElementProcessor() { - public boolean execute(@NotNull PsiClass element) { + if (!ClassInheritorsSearch.search(psiClass, scope, true).forEach(new PsiElementProcessorAdapter(element -> { if (!showInterfaces && element.isInterface()) { return true; } return processor.process(element); - } - })); + }))) { + return false; + } + + return FunctionalExpressionSearch.search(psiClass, scope).forEach((Processor)processor::process); } } diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java index 8e5e60073247..56bba3d8d5e7 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AllClassesSearchExecutor.java @@ -59,14 +59,14 @@ public class AllClassesSearchExecutor implements QueryExecutor processor) { - final Set names = new THashSet(10000); + final Set names = new THashSet<>(10000); processClassNames(parameters.getProject(), scope, s -> { if (parameters.nameMatches(s)) { names.add(s); } }); - List sorted = new ArrayList(names); + List sorted = new ArrayList<>(names); Collections.sort(sorted, String.CASE_INSENSITIVE_ORDER); return processClassesByNames(parameters.getProject(), scope, sorted, processor); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedElementsSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedElementsSearcher.java index 53fa2eb48604..7c2a6a886d2c 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedElementsSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedElementsSearcher.java @@ -16,6 +16,7 @@ package com.intellij.psi.impl.search; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Computable; import com.intellij.psi.*; import com.intellij.psi.impl.java.stubs.index.JavaAnnotationIndex; @@ -26,9 +27,9 @@ import com.intellij.psi.search.searches.AnnotatedElementsSearch; import com.intellij.psi.util.PsiTreeUtil; import com.intellij.util.Processor; import com.intellij.util.QueryExecutor; -import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; +import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -39,15 +40,15 @@ public class AnnotatedElementsSearcher implements QueryExecutor consumer) { final PsiClass annClass = p.getAnnotationClass(); - assert annClass.isAnnotationType() : "Annotation type should be passed to annotated members search"; + if (!annClass.isAnnotationType()) throw new IllegalArgumentException("Annotation type should be passed to annotated members search but got: "+annClass); - final String annotationFQN = ApplicationManager.getApplication().runReadAction(new Computable() { + String annotationFQN = ApplicationManager.getApplication().runReadAction(new Computable() { @Override public String compute() { return annClass.getQualifiedName(); } }); - assert annotationFQN != null; + if (annotationFQN == null) throw new IllegalArgumentException("FQN is null for "+annClass); final PsiManager psiManager = ApplicationManager.getApplication().runReadAction(new Computable() { @Override @@ -59,7 +60,7 @@ public class AnnotatedElementsSearcher implements QueryExecutor[] types = p.getTypes(); - for (final PsiAnnotation ann : getAnnotationCandidates(annClass, useScope)) { + for (final PsiAnnotation ann : getAnnotationCandidates(annClass, useScope, psiManager.getProject())) { final PsiModifierListOwner candidate = ApplicationManager.getApplication().runReadAction(new Computable() { @Override public PsiModifierListOwner compute() { @@ -90,15 +91,17 @@ public class AnnotatedElementsSearcher implements QueryExecutor getAnnotationCandidates(final PsiClass annClass, final SearchScope useScope) { + @NotNull + private static Collection getAnnotationCandidates(@NotNull PsiClass annClass, + @NotNull SearchScope useScope, @NotNull Project project) { return ApplicationManager.getApplication().runReadAction(new Computable>() { @Override public Collection compute() { if (useScope instanceof GlobalSearchScope) { - return JavaAnnotationIndex.getInstance().get(annClass.getName(), annClass.getProject(), (GlobalSearchScope)useScope); + return JavaAnnotationIndex.getInstance().get(annClass.getName(), project, (GlobalSearchScope)useScope); } - final List result = ContainerUtil.newArrayList(); + List result = new ArrayList<>(); for (PsiElement element : ((LocalSearchScope)useScope).getScope()) { result.addAll(PsiTreeUtil.findChildrenOfType(element, PsiAnnotation.class)); } @@ -107,7 +110,7 @@ public class AnnotatedElementsSearcher implements QueryExecutor[] types) { + public static boolean isInstanceof(PsiElement owner, @NotNull Class[] types) { for (Class type : types) { if(type.isInstance(owner)) return true; } diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedPackagesSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedPackagesSearcher.java index d5d97b9ede83..0542e2823063 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedPackagesSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/AnnotatedPackagesSearcher.java @@ -75,9 +75,9 @@ public class AnnotatedPackagesSearcher implements QueryExecutor(){ @Override public Boolean compute() { - PsiModifierList modlist = (PsiModifierList)annotation.getParent(); - final PsiElement owner = modlist.getParent(); - if ((owner instanceof PsiClass)) { + PsiModifierList modList = (PsiModifierList)annotation.getParent(); + final PsiElement owner = modList.getParent(); + if (owner instanceof PsiClass) { PsiClass candidate = (PsiClass)owner; if ("package-info".equals(candidate.getName())) { LOG.assertTrue(candidate.isValid()); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ClassesWithAnnotatedMembersSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ClassesWithAnnotatedMembersSearcher.java index 9d12558adf00..42faae1e78d7 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ClassesWithAnnotatedMembersSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ClassesWithAnnotatedMembersSearcher.java @@ -15,10 +15,11 @@ */ package com.intellij.psi.impl.search; -import com.intellij.openapi.application.*; +import com.intellij.openapi.application.AccessToken; +import com.intellij.openapi.application.QueryExecutorBase; +import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.extensions.Extensions; import com.intellij.psi.PsiClass; -import com.intellij.psi.PsiMember; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.psi.search.SearchScope; import com.intellij.psi.search.searches.AnnotatedElementsSearch; @@ -45,7 +46,7 @@ public class ClassesWithAnnotatedMembersSearcher extends QueryExecutorBase processed = new HashSet(); + final Set processed = new HashSet<>(); AnnotatedElementsSearch.searchPsiMembers(queryParameters.getAnnotationClass(), scope).forEach(member -> { PsiClass psiClass; AccessToken token = ReadAction.start(); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearchHelper.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearchHelper.java index 423d747f5f43..8b0d965716bb 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearchHelper.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearchHelper.java @@ -35,10 +35,10 @@ import org.jetbrains.annotations.NotNull; /** * @author max */ -public class ConstructorReferencesSearchHelper { +class ConstructorReferencesSearchHelper { private final PsiManager myManager; - public ConstructorReferencesSearchHelper(@NotNull PsiManager manager) { + ConstructorReferencesSearchHelper(@NotNull PsiManager manager) { myManager = manager; } @@ -48,14 +48,14 @@ public class ConstructorReferencesSearchHelper { * 2. Exception avoidance. Project is needed outside of read action (to run it via DumbService in the first place), * and so getProject would fail with an assertion that read action is required but not present. */ - public boolean processConstructorReferences(@NotNull final Processor processor, - @NotNull final PsiMethod constructor, - @NotNull final PsiClass containingClass, - @NotNull final SearchScope searchScope, - @NotNull final Project project, - boolean ignoreAccessScope, - final boolean isStrictSignatureSearch, - @NotNull SearchRequestCollector collector) { + boolean processConstructorReferences(@NotNull final Processor processor, + @NotNull final PsiMethod constructor, + @NotNull final PsiClass containingClass, + @NotNull final SearchScope searchScope, + @NotNull final Project project, + boolean ignoreAccessScope, + final boolean isStrictSignatureSearch, + @NotNull SearchRequestCollector collector) { final boolean[] constructorCanBeCalledImplicitly = new boolean[1]; final boolean[] isEnum = new boolean[1]; final boolean[] isUnder18 = new boolean[1]; diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearcher.java index 1293937540b2..377d18df2e41 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/ConstructorReferencesSearcher.java @@ -22,6 +22,7 @@ public class ConstructorReferencesSearcher extends QueryExecutorBase() { + @Override public PsiClass compute() { if (!method.isConstructor()) return null; PsiClass aClass = method.getContainingClass(); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaDirectInheritorsSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaDirectInheritorsSearcher.java index cb20ea1bed5e..e667349ffcff 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaDirectInheritorsSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaDirectInheritorsSearcher.java @@ -29,7 +29,7 @@ import com.intellij.psi.*; import com.intellij.psi.impl.java.stubs.index.JavaAnonymousClassBaseRefOccurenceIndex; import com.intellij.psi.impl.java.stubs.index.JavaSuperClassNameOccurenceIndex; import com.intellij.psi.search.GlobalSearchScope; -import com.intellij.psi.search.LocalSearchScope; +import com.intellij.psi.search.GlobalSearchScopeUtil; import com.intellij.psi.search.PsiSearchScopeUtil; import com.intellij.psi.search.SearchScope; import com.intellij.psi.search.searches.AllClassesSearch; @@ -43,9 +43,11 @@ import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.HashMap; import org.jetbrains.annotations.NotNull; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.concurrent.ConcurrentMap; -import java.util.stream.Collectors; /** * @author max @@ -82,7 +84,8 @@ public class JavaDirectInheritorsSearcher implements QueryExecutor)subClass::getQualifiedName); - if (i != cache.length && !isInScope(scope, subClass)) continue; if (currentFQN != null && Comparing.equal(fqn, currentFQN)) { VirtualFile currentJarFile = getJarFile(subClass); @@ -113,8 +119,9 @@ public class JavaDirectInheritorsSearcher implements QueryExecutor files = Arrays.stream(((LocalSearchScope)scope).getScope()).map(PsiUtil::getVirtualFile).collect(Collectors.toSet()); - return GlobalSearchScope.filesScope(project, files); - } - @NotNull private static PsiClass[] calculateDirectSubClasses(@NotNull Project project, @NotNull PsiClass baseClass, @NotNull String baseClassName, @NotNull SearchScope useScope) { DumbService dumbService = DumbService.getInstance(project); - GlobalSearchScope globalUseScope = dumbService.runReadActionInSmartMode(() -> StubHierarchyInheritorSearcher.restrictScope(toGlobal(useScope, project))); + GlobalSearchScope globalUseScope = dumbService.runReadActionInSmartMode( + () -> StubHierarchyInheritorSearcher.restrictScope(GlobalSearchScopeUtil.toGlobalSearchScope(useScope, project))); Collection candidates = dumbService.runReadActionInSmartMode(() -> JavaSuperClassNameOccurenceIndex.getInstance().get(baseClassName, project, globalUseScope)); // memory/speed optimisation: it really is a map(string -> PsiClass or List) - final Map classes = new HashMap<>(); + final Map classesWithFqn = new HashMap<>(); processConcurrentlyIfTooMany(candidates, referenceList -> { @@ -192,16 +191,16 @@ public class JavaDirectInheritorsSearcher implements QueryExecutor list = new ArrayList<>(); list.add((PsiClass)value); list.add(candidate); - classes.put(fqn, list); + classesWithFqn.put(fqn, list); } else { @SuppressWarnings("unchecked") @@ -216,7 +215,7 @@ public class JavaDirectInheritorsSearcher implements QueryExecutor result = new ArrayList<>(); - for (Object value : classes.values()) { + for (Object value : classesWithFqn.values()) { if (value instanceof PsiClass) { result.add((PsiClass)value); } diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaFunctionalExpressionIndex.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaFunctionalExpressionIndex.java index ad458e38096a..d1686e4cd428 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaFunctionalExpressionIndex.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaFunctionalExpressionIndex.java @@ -34,7 +34,7 @@ import java.io.IOException; import java.util.*; public class JavaFunctionalExpressionIndex extends FileBasedIndexExtension> implements PsiDependentIndex { - public static final ID> JAVA_FUNCTIONAL_EXPRESSION_INDEX_ID = ID.create("java.functional.expression"); + static final ID> JAVA_FUNCTIONAL_EXPRESSION_INDEX_ID = ID.create("java.functional.expression"); private static final String THIS_REF_NAME = "this"; private static final String SUPER_REF_NAME = "super"; @@ -47,84 +47,80 @@ public class JavaFunctionalExpressionIndex extends FileBasedIndexExtension, FileContent> getIndexer() { - return new DataIndexer, FileContent>() { - @NotNull - @Override - public Map> map(@NotNull FileContent inputData) { - if (!JavaStubElementTypes.JAVA_FILE.shouldBuildStubFor(inputData.getFile())) { - return Collections.emptyMap(); - } - final CharSequence contentAsText = inputData.getContentAsText(); - if (!StringUtil.contains(contentAsText, "::") && !StringUtil.contains(contentAsText, "->")) { - return Collections.emptyMap(); - } + return inputData -> { + if (!JavaStubElementTypes.JAVA_FILE.shouldBuildStubFor(inputData.getFile())) { + return Collections.emptyMap(); + } + final CharSequence contentAsText = inputData.getContentAsText(); + if (!StringUtil.contains(contentAsText, "::") && !StringUtil.contains(contentAsText, "->")) { + return Collections.emptyMap(); + } - final PsiFile file = ((FileContentImpl)inputData).getPsiFileForPsiDependentIndex(); - if (!(file instanceof PsiJavaFile)) { - return Collections.emptyMap(); - } + final PsiFile file = ((FileContentImpl)inputData).getPsiFileForPsiDependentIndex(); + if (!(file instanceof PsiJavaFile)) { + return Collections.emptyMap(); + } - final HashMap> methodsMap = ContainerUtil.newHashMap(); - for (PsiFunctionalExpression expression : SyntaxTraverser.psiTraverser().withRoot(file).filter(PsiFunctionalExpression.class)) { - final PsiExpressionList expressionList = - PsiTreeUtil.getParentOfType(expression, PsiExpressionList.class, true, PsiStatement.class, PsiModifierListOwner.class); - if (expressionList != null) { - final PsiElement parent = expressionList.getParent(); - String methodName = null; - if (parent instanceof PsiMethodCallExpression) { - methodName = ((PsiMethodCallExpression)parent).getMethodExpression().getReferenceName(); - if (methodName != null) { - final boolean thisRef = methodName.equals(THIS_REF_NAME); - if (thisRef || methodName.equals(SUPER_REF_NAME)) { - methodName = null; - final PsiClass containingClass = PsiTreeUtil.getParentOfType(parent, PsiClass.class); - if (containingClass != null) { - if (thisRef) { - methodName = containingClass.getName(); - } else { - final PsiReferenceList extendsList = containingClass.getExtendsList(); - if (extendsList != null) { - final PsiJavaCodeReferenceElement[] referenceElements = extendsList.getReferenceElements(); - if (referenceElements.length > 0) { - methodName = referenceElements[0].getReferenceName(); - } + final HashMap> methodsMap = ContainerUtil.newHashMap(); + for (PsiFunctionalExpression expression : SyntaxTraverser.psiTraverser().withRoot(file).filter(PsiFunctionalExpression.class)) { + final PsiExpressionList expressionList = + PsiTreeUtil.getParentOfType(expression, PsiExpressionList.class, true, PsiStatement.class, PsiModifierListOwner.class); + if (expressionList != null) { + final PsiElement parent = expressionList.getParent(); + String methodName = null; + if (parent instanceof PsiMethodCallExpression) { + methodName = ((PsiMethodCallExpression)parent).getMethodExpression().getReferenceName(); + if (methodName != null) { + final boolean thisRef = methodName.equals(THIS_REF_NAME); + if (thisRef || methodName.equals(SUPER_REF_NAME)) { + methodName = null; + final PsiClass containingClass = PsiTreeUtil.getParentOfType(parent, PsiClass.class); + if (containingClass != null) { + if (thisRef) { + methodName = containingClass.getName(); + } else { + final PsiReferenceList extendsList = containingClass.getExtendsList(); + if (extendsList != null) { + final PsiJavaCodeReferenceElement[] referenceElements = extendsList.getReferenceElements(); + if (referenceElements.length > 0) { + methodName = referenceElements[0].getReferenceName(); } } } } } } - else if (parent instanceof PsiNewExpression) { - final PsiJavaCodeReferenceElement classReference = ((PsiNewExpression)parent).getClassOrAnonymousClassReference(); - if (classReference != null) { - methodName = classReference.getReferenceName(); - } - } - else if (parent instanceof PsiEnumConstant) { - final PsiClass containingClass = ((PsiEnumConstant)parent).getContainingClass(); - if (containingClass != null) { - final String shortEnumName = containingClass.getName(); - if (shortEnumName != null) { //should be always true as enums can't be local - methodName = shortEnumName; - } - } + } + else if (parent instanceof PsiNewExpression) { + final PsiJavaCodeReferenceElement classReference = ((PsiNewExpression)parent).getClassOrAnonymousClassReference(); + if (classReference != null) { + methodName = classReference.getReferenceName(); } - - if (methodName != null) { - Collection holders = methodsMap.get(methodName); - if (holders == null) { - holders = new HashSet(); - methodsMap.put(methodName, holders); + } + else if (parent instanceof PsiEnumConstant) { + final PsiClass containingClass = ((PsiEnumConstant)parent).getContainingClass(); + if (containingClass != null) { + final String shortEnumName = containingClass.getName(); + if (shortEnumName != null) { //should be always true as enums can't be local + methodName = shortEnumName; } - holders.add(new IndexHolder(expression instanceof PsiLambdaExpression ? ((PsiLambdaExpression)expression).getParameterList().getParametersCount() : -1, - expressionList.getExpressions().length, - LambdaUtil.getLambdaIdx(expressionList, expression))); } } - } - return methodsMap; + if (methodName != null) { + Collection holders = methodsMap.get(methodName); + if (holders == null) { + holders = new HashSet<>(); + methodsMap.put(methodName, holders); + } + holders.add(new IndexHolder(expression instanceof PsiLambdaExpression ? ((PsiLambdaExpression)expression).getParameterList().getParametersCount() : -1, + expressionList.getExpressions().length, + LambdaUtil.getLambdaIdx(expressionList, expression))); + } + } } + + return methodsMap; }; } @@ -151,7 +147,7 @@ public class JavaFunctionalExpressionIndex extends FileBasedIndexExtension read(@NotNull DataInput in) throws IOException { int l = DataInputOutputUtil.readINT(in); - final Collection holders = new HashSet(l); + final Collection holders = new HashSet<>(l); while (l-- > 0) { holders.add(new IndexHolder(DataInputOutputUtil.readINT(in), DataInputOutputUtil.readINT(in), @@ -178,26 +174,26 @@ public class JavaFunctionalExpressionIndex extends FileBasedIndexExtension { private static final Logger LOG = Logger.getInstance("#" + JavaFunctionalExpressionSearcher.class.getName()); /** @@ -98,7 +96,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase methodCandidates = getCandidateMethodsWithSuitableParams(aClass, project, useScope, candidateFiles, candidateScope); - final LinkedHashSet filesToProcess = new LinkedHashSet(); + final Set filesToProcess = new LinkedHashSet<>(); final FileBasedIndex fileBasedIndex = FileBasedIndex.getInstance(); //find all usages of method candidates in files with functional expressions @@ -109,7 +107,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase> holders = new LinkedHashMap>(); + final LinkedHashMap> holders = new LinkedHashMap<>(); //functional expressions checker: number and type of parameters at call site should correspond to candidate method currently check final SuitableFilesProcessor processor = new SuitableFilesProcessor(holders, expectedFunExprParamsCount, parametersCount, varArgs, parameters); fileBasedIndex.processValues(JavaFunctionalExpressionIndex.JAVA_FUNCTIONAL_EXPRESSION_INDEX_ID, psiMethod.getName(), null, processor, useScope.intersectWith(methodUseScope)); @@ -134,7 +132,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase getJava8Modules(Project project) { final boolean projectLevelIsHigh = PsiUtil.getLanguageLevel(project).isAtLeast(LanguageLevel.JDK_1_8); - final Set highLevelModules = new HashSet(); + final Set highLevelModules = new HashSet<>(); for (Module module : ModuleManager.getInstance(project).getModules()) { final LanguageLevelModuleExtension extension = ModuleRootManager.getInstance(module).getModuleExtension(LanguageLevelModuleExtension.class); if (extension != null) { @@ -151,7 +149,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase consumer, Set filesToProcess, final int expectedFunExprParamsCount, boolean isVoid) { LOG.info("#usage files: " + filesToProcess.size()); - process(filesToProcess, new ReadActionProcessor() { + ContainerUtil.process(filesToProcess, new ReadActionProcessor() { @Override public boolean processInReadAction(VirtualFile file) { //resolve functional expressions to ensure that functional expression type is appropriate @@ -172,11 +170,11 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase usedMethodNames = newHashSet(); + Set usedMethodNames = new HashSet<>(); FileBasedIndex.getInstance().processAllKeys(JavaFunctionalExpressionIndex.JAVA_FUNCTIONAL_EXPRESSION_INDEX_ID, Processors.cancelableCollectProcessor(usedMethodNames), candidateScope, null); - final LinkedHashSet methods = newLinkedHashSet(); + Set methods = ContainerUtil.newLinkedHashSet(); Processor methodProcessor = method -> { if (usedMethodNames.contains(method.getName())) { methods.add(method); @@ -197,7 +195,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase candidateFiles) { final PsiManager psiManager = PsiManager.getInstance(project); - Set resolveScopes = newLinkedHashSet(mapNotNull(candidateFiles, file -> { + Set resolveScopes = ContainerUtil.newLinkedHashSet(ContainerUtil.mapNotNull(candidateFiles, file -> { PsiFile psiFile = file.isValid() ? psiManager.findFile(file) : null; return psiFile == null ? null : psiFile.getResolveScope(); })); @@ -206,7 +204,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase getFilesWithFunctionalExpressionsScope(Project project, GlobalSearchScope useScope) { - final Set files = newLinkedHashSet(); + final Set files = ContainerUtil.newLinkedHashSet(); final PsiSearchHelperImpl helper = (PsiSearchHelperImpl)PsiSearchHelper.SERVICE.getInstance(project); Processor processor = Processors.cancelableCollectProcessor(files); helper.processFilesWithText(useScope, UsageSearchContext.IN_CODE, true, "::", processor); @@ -221,8 +219,8 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase files = new HashSet(); - addAllNotNull(files, map(((LocalSearchScope)useScope).getScope(), element -> PsiUtilCore.getVirtualFile(element))); + final Set files = new HashSet<>(); + ContainerUtil.addAllNotNull(files, ContainerUtil.map(((LocalSearchScope)useScope).getScope(), PsiUtilCore::getVirtualFile)); scope = GlobalSearchScope.filesScope(project, files); } else { @@ -247,15 +245,15 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase */ - private static void collectFilesWithTypeOccurrencesAndFieldAssignments(PsiClass aClass, - GlobalSearchScope filesScope, - final LinkedHashSet usageFiles) { - final Set fields = new LinkedHashSet(); + private static void collectFilesWithTypeOccurrencesAndFieldAssignments(@NotNull PsiClass aClass, + @NotNull GlobalSearchScope filesScope, + @NotNull Set usageFiles) { + final Set fields = new LinkedHashSet<>(); for (final PsiReference reference : ReferencesSearch.search(aClass, filesScope)) { ApplicationManager.getApplication().runReadAction(() -> { final PsiElement element = reference.getElement(); if (element != null) { - addIfNotNull(usageFiles, PsiUtilCore.getVirtualFile(element)); + ContainerUtil.addIfNotNull(usageFiles, PsiUtilCore.getVirtualFile(element)); final PsiElement parent = element.getParent(); if (parent instanceof PsiTypeElement) { final PsiElement gParent = parent.getParent(); @@ -276,7 +274,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase ref = new Ref(true); + final Ref ref = new Ref<>(true); psiFile.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) { @@ -345,11 +343,11 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase> holders, - int expectedFunExprParamsCount, - int parametersCount, - boolean varArgs, - PsiParameter[] parameters) { + SuitableFilesProcessor(Map> holders, + int expectedFunExprParamsCount, + int parametersCount, + boolean varArgs, + PsiParameter[] parameters) { myHolders = holders; myExpectedFunExprParamsCount = expectedFunExprParamsCount; myParametersCount = parametersCount; @@ -372,7 +370,7 @@ public class JavaFunctionalExpressionSearcher extends QueryExecutorBase(); + savedHolders = new LinkedHashSet<>(); myHolders.put(file, savedHolders); } savedHolders.add(holder); diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java index 23c8cd925f57..58dd6098f46f 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java @@ -116,11 +116,10 @@ public class JavaOverridingMethodsSearcher implements QueryExecutor compute(@NotNull PsiMethod method, @NotNull Project project) { - Collection result = new LinkedHashSet<>(); - Application application = ApplicationManager.getApplication(); final PsiClass containingClass = application.runReadAction((Computable)method::getContainingClass); assert containingClass != null; + Collection result = new LinkedHashSet<>(); Processor inheritorsProcessor = inheritor -> { PsiMethod found = application.runReadAction((Computable)() -> findOverridingMethod(project, inheritor, method, containingClass)); if (found != null) { diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaSourceFilterScope.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaSourceFilterScope.java index 4379ef30114a..fc87b4dc87dd 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaSourceFilterScope.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaSourceFilterScope.java @@ -20,7 +20,6 @@ package com.intellij.psi.impl.search; import com.intellij.ide.highlighter.JavaClassFileType; -import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.ProjectFileIndex; import com.intellij.openapi.roots.ProjectRootManager; @@ -38,12 +37,7 @@ public class JavaSourceFilterScope extends DelegatingGlobalSearchScope { super(delegate); Project project = getProject(); - if (project != null) { - myIndex = ProjectRootManager.getInstance(project).getFileIndex(); - } - else { - myIndex = null; - } + myIndex = project == null ? null : ProjectRootManager.getInstance(project).getFileIndex(); } @Override diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodDeepestSuperSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodDeepestSuperSearcher.java index 933998344add..1af10759b276 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodDeepestSuperSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodDeepestSuperSearcher.java @@ -34,16 +34,16 @@ public class MethodDeepestSuperSearcher implements QueryExecutor consumer) { - final Set methods = new THashSet(); + public static boolean processDeepestSuperMethods(@NotNull PsiMethod method, @NotNull Processor consumer) { + final Set methods = new THashSet<>(); methods.add(method); return findDeepestSuperOrSelfSignature(method, methods, null, consumer); } - private static boolean findDeepestSuperOrSelfSignature(final PsiMethod method, - Set set, + private static boolean findDeepestSuperOrSelfSignature(@NotNull PsiMethod method, + @NotNull Set set, Set guard, - Processor processor) { + @NotNull Processor processor) { if (guard != null && !guard.add(method)) return true; PsiMethod[] supers = ApplicationManager.getApplication().runReadAction(new Computable() { @Override @@ -57,7 +57,7 @@ public class MethodDeepestSuperSearcher implements QueryExecutor(); + guard = new THashSet<>(); guard.add(method); } if (!findDeepestSuperOrSelfSignature(superMethod, set, guard, processor)) return false; diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodUsagesSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodUsagesSearcher.java index cd1c9923ad86..e3e9c18264db 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodUsagesSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/MethodUsagesSearcher.java @@ -63,7 +63,7 @@ public class MethodUsagesSearcher extends QueryExecutorBase p.getEffectiveSearchScope()); + final SearchScope searchScope = DumbService.getInstance(p.getProject()).runReadActionInSmartMode(p::getEffectiveSearchScope); if (searchScope == GlobalSearchScope.EMPTY_SCOPE) { return; } diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/PsiAnnotationMethodReferencesSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/PsiAnnotationMethodReferencesSearcher.java index f723bc2d9e4b..54f5eb3d481b 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/PsiAnnotationMethodReferencesSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/PsiAnnotationMethodReferencesSearcher.java @@ -65,7 +65,8 @@ public class PsiAnnotationMethodReferencesSearcher implements QueryExecutor createImplicitDefaultAnnotationMethodConsumer(final Processor consumer) { + @NotNull + static ReadActionProcessor createImplicitDefaultAnnotationMethodConsumer(@NotNull Processor consumer) { return new ReadActionProcessor() { @Override public boolean processInReadAction(final PsiReference reference) { diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/SimpleAccessorReferenceSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/SimpleAccessorReferenceSearcher.java index e047db8b992a..b9add5b78f90 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/SimpleAccessorReferenceSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/SimpleAccessorReferenceSearcher.java @@ -34,7 +34,6 @@ import org.jetbrains.annotations.NotNull; * @author ven */ public class SimpleAccessorReferenceSearcher extends QueryExecutorBase { - public SimpleAccessorReferenceSearcher() { super(true); } @@ -47,7 +46,7 @@ public class SimpleAccessorReferenceSearcher extends QueryExecutorBase { + private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.search.StubHierarchyInheritorSearcher"); public StubHierarchyInheritorSearcher() { super(true); } @@ -54,6 +57,11 @@ public class StubHierarchyInheritorSearcher extends QueryExecutorBase { + for (PsiElement child = element.findElementAt(offsetInElement); child != null; child = child.getParent()) { + if (!name.equals(child.getText())) { + break; + } + if (child instanceof PsiJavaCodeReferenceElement) { + final PsiJavaCodeReferenceElement ref = (PsiJavaCodeReferenceElement)child; + if (!ref.isQualified() && + !(ref.getParent() instanceof PsiMethodCallExpression) && + ref.resolve() == null && ref.advancedResolve(true).getElement() == refElement) { + consumer.process(ref); } } - return true; } + return true; }, scope, name, UsageSearchContext.ANY, true); } } diff --git a/java/java-psi-api/src/com/intellij/codeInsight/daemon/impl/analysis/JavaGenericsUtil.java b/java/java-psi-api/src/com/intellij/codeInsight/daemon/impl/analysis/JavaGenericsUtil.java index e01eb710d73d..379d9072927d 100644 --- a/java/java-psi-api/src/com/intellij/codeInsight/daemon/impl/analysis/JavaGenericsUtil.java +++ b/java/java-psi-api/src/com/intellij/codeInsight/daemon/impl/analysis/JavaGenericsUtil.java @@ -74,6 +74,10 @@ public class JavaGenericsUtil { return true; } + if (type instanceof PsiCapturedWildcardType) { + return isReifiableType(((PsiCapturedWildcardType)type).getUpperBound()); + } + return false; } @@ -127,6 +131,9 @@ public class JavaGenericsUtil { if (castType instanceof PsiClassType) { final PsiClassType castClassType = (PsiClassType)castType; operandType = operandType.getDeepComponentType(); + if (operandType instanceof PsiCapturedWildcardType) { + operandType = ((PsiCapturedWildcardType)operandType).getUpperBound(); + } if (!(operandType instanceof PsiClassType)) return false; final PsiClassType operandClassType = (PsiClassType)operandType; diff --git a/java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java b/java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java index 3673dfa283a3..be4d6b5e6fb2 100644 --- a/java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java +++ b/java/java-psi-api/src/com/intellij/psi/JavaElementVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -18,7 +18,6 @@ package com.intellij.psi; import com.intellij.psi.javadoc.*; public abstract class JavaElementVisitor extends PsiElementVisitor { - public void visitAnonymousClass(PsiAnonymousClass aClass) { visitClass(aClass); } @@ -387,4 +386,28 @@ public abstract class JavaElementVisitor extends PsiElementVisitor { public void visitLambdaExpression(PsiLambdaExpression expression) { visitExpression(expression); } -} + + public void visitModule(PsiJavaModule module) { + visitElement(module); + } + + public void visitModuleReference(PsiJavaModuleReference moduleRef) { + visitElement(moduleRef); + } + + public void visitRequiresStatement(PsiRequiresStatement statement) { + visitElement(statement); + } + + public void visitExportsStatement(PsiExportsStatement statement) { + visitElement(statement); + } + + public void visitUsesStatement(PsiUsesStatement statement) { + visitElement(statement); + } + + public void visitProvidesStatement(PsiProvidesStatement statement) { + visitElement(statement); + } +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java b/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java index f8daa11c1d47..e84731c709fb 100644 --- a/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java +++ b/java/java-psi-api/src/com/intellij/psi/JavaTokenType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -139,4 +139,12 @@ public interface JavaTokenType extends TokenType { IElementType DOUBLE_COLON = new IJavaElementType("DOUBLE_COLON"); IElementType ARROW = new IJavaElementType("ARROW"); -} + + IElementType MODULE_KEYWORD = new IJavaElementType("MODULE"); + IElementType REQUIRES_KEYWORD = new IJavaElementType("REQUIRES"); + IElementType EXPORTS_KEYWORD = new IJavaElementType("EXPORTS"); + IElementType USES_KEYWORD = new IJavaElementType("USES"); + IElementType PROVIDES_KEYWORD = new IJavaElementType("PROVIDES"); + IElementType TO_KEYWORD = new IJavaElementType("TO"); + IElementType WITH_KEYWORD = new IJavaElementType("WITH"); +} \ No newline at end of file diff --git a/platform/core-api/src/org/jetbrains/concurrency/ConsumerRunnable.java b/java/java-psi-api/src/com/intellij/psi/PsiExportsStatement.java similarity index 65% rename from platform/core-api/src/org/jetbrains/concurrency/ConsumerRunnable.java rename to java/java-psi-api/src/com/intellij/psi/PsiExportsStatement.java index f10f67e53bf0..07f2c3d8f59a 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/ConsumerRunnable.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiExportsStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,16 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.concurrency; +package com.intellij.psi; -import com.intellij.util.Consumer; - -public abstract class ConsumerRunnable implements Consumer, Runnable { - @Override - public final void consume(Void aVoid) { - run(); - } - - @Override - public abstract void run(); -} +/** + * Represents an {@code exports} statement of a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiExportsStatement extends PsiElement { +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java b/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java index c1389781d372..f354893f9723 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiJavaFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -20,7 +20,7 @@ import org.jetbrains.annotations.Nullable; import com.intellij.pom.java.LanguageLevel; /** - * Represents a Java, JSP or class file. + * Represents a Java, JSP or .class file. */ public interface PsiJavaFile extends PsiImportHolder, PsiClassOwner { /** @@ -91,4 +91,9 @@ public interface PsiJavaFile extends PsiImportHolder, PsiClassOwner { @Nullable PsiJavaCodeReferenceElement findImportReferenceTo(PsiClass aClass); @NotNull LanguageLevel getLanguageLevel(); -} + + /** + * Returns a Java module declaration element, or {@code null} if the file is not a module-info one. + */ + @Nullable PsiJavaModule getModuleDeclaration(); +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiJavaModule.java b/java/java-psi-api/src/com/intellij/psi/PsiJavaModule.java new file mode 100644 index 000000000000..974e9af8e9cb --- /dev/null +++ b/java/java-psi-api/src/com/intellij/psi/PsiJavaModule.java @@ -0,0 +1,28 @@ +/* + * Copyright 2000-2016 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.psi; + +import org.jetbrains.annotations.Nullable; + +/** + * Represents a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiJavaModule extends PsiElement { + @Nullable PsiJavaModuleReference getNameElement(); + @Nullable String getModuleName(); +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiJavaModuleReference.java b/java/java-psi-api/src/com/intellij/psi/PsiJavaModuleReference.java new file mode 100644 index 000000000000..0dae11ea5584 --- /dev/null +++ b/java/java-psi-api/src/com/intellij/psi/PsiJavaModuleReference.java @@ -0,0 +1,27 @@ +/* + * Copyright 2000-2016 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.psi; + +import org.jetbrains.annotations.NotNull; + +/** + * Represents a reference to some module inside a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiJavaModuleReference extends PsiElement { + @NotNull String getReferenceText(); +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java b/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java index 8ff0d2707f4a..e71434599ccb 100644 --- a/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiKeyword.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -19,7 +19,6 @@ package com.intellij.psi; * Represents a Java keyword. Constants defined in this interface represent all * keywords of the Java language. */ -@SuppressWarnings({"HardCodedStringLiteral", "JavaDoc"}) public interface PsiKeyword extends PsiJavaToken { String ABSTRACT = "abstract"; String ASSERT = "assert"; @@ -75,4 +74,12 @@ public interface PsiKeyword extends PsiJavaToken { String TRUE = "true"; String FALSE = "false"; String NULL = "null"; -} + + String MODULE = "module"; + String REQUIRES = "requires"; + String EXPORTS = "exports"; + String USES = "uses"; + String PROVIDES = "provides"; + String TO = "to"; + String WITH = "with"; +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiProvidesStatement.java b/java/java-psi-api/src/com/intellij/psi/PsiProvidesStatement.java new file mode 100644 index 000000000000..3cab855f393b --- /dev/null +++ b/java/java-psi-api/src/com/intellij/psi/PsiProvidesStatement.java @@ -0,0 +1,24 @@ +/* + * Copyright 2000-2016 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.psi; + +/** + * Represents a {@code provides} statement of a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiProvidesStatement extends PsiElement { +} \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/PsiRequiresStatement.java b/java/java-psi-api/src/com/intellij/psi/PsiRequiresStatement.java new file mode 100644 index 000000000000..115f2d3a5433 --- /dev/null +++ b/java/java-psi-api/src/com/intellij/psi/PsiRequiresStatement.java @@ -0,0 +1,24 @@ +/* + * Copyright 2000-2016 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.psi; + +/** + * Represents a {@code requires} statement of a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiRequiresStatement extends PsiElement { +} \ No newline at end of file diff --git a/platform/core-api/src/org/jetbrains/concurrency/AsyncFunction.java b/java/java-psi-api/src/com/intellij/psi/PsiUsesStatement.java similarity index 72% rename from platform/core-api/src/org/jetbrains/concurrency/AsyncFunction.java rename to java/java-psi-api/src/com/intellij/psi/PsiUsesStatement.java index d0d419c9d8cc..7b58dc78fe53 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/AsyncFunction.java +++ b/java/java-psi-api/src/com/intellij/psi/PsiUsesStatement.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,11 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.concurrency; +package com.intellij.psi; -import org.jetbrains.annotations.NotNull; - -public interface AsyncFunction { - @NotNull - Promise fun(PARAM param); +/** + * Represents a {@code uses} statement of a Java module declaration. + * + * @since 2016.3 + */ +public interface PsiUsesStatement extends PsiElement { } \ No newline at end of file diff --git a/java/java-psi-api/src/com/intellij/psi/codeStyle/JavaCodeStyleManager.java b/java/java-psi-api/src/com/intellij/psi/codeStyle/JavaCodeStyleManager.java index 71086b5fec1f..350a2e088169 100644 --- a/java/java-psi-api/src/com/intellij/psi/codeStyle/JavaCodeStyleManager.java +++ b/java/java-psi-api/src/com/intellij/psi/codeStyle/JavaCodeStyleManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -87,7 +87,7 @@ public abstract class JavaCodeStyleManager { * file if an Optimize Imports operation was performed on it. * * @param file the file to calculate the import list for. - * @return the calculated import list. + * @return the calculated import list, or {@code null} when the file has no import list. */ public abstract PsiImportList prepareOptimizeImportsResult(@NotNull PsiJavaFile file); diff --git a/java/java-psi-api/src/com/intellij/psi/util/PropertyUtil.java b/java/java-psi-api/src/com/intellij/psi/util/PropertyUtil.java index 083d5e36b050..38f44262e062 100644 --- a/java/java-psi-api/src/com/intellij/psi/util/PropertyUtil.java +++ b/java/java-psi-api/src/com/intellij/psi/util/PropertyUtil.java @@ -298,7 +298,7 @@ public class PropertyUtil { } @Nullable - public static String getPropertyName(@NonNls String methodName) { + public static String getPropertyName(@NonNls @NotNull String methodName) { return StringUtil.getPropertyName(methodName); } diff --git a/java/java-psi-api/src/com/intellij/psi/util/PsiUtil.java b/java/java-psi-api/src/com/intellij/psi/util/PsiUtil.java index b5bfca09c2db..5360eb550f29 100644 --- a/java/java-psi-api/src/com/intellij/psi/util/PsiUtil.java +++ b/java/java-psi-api/src/com/intellij/psi/util/PsiUtil.java @@ -16,7 +16,6 @@ package com.intellij.psi.util; import com.intellij.lang.java.JavaLanguage; -import com.intellij.navigation.ItemPresentation; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.projectRoots.JavaSdkVersion; @@ -24,7 +23,6 @@ import com.intellij.openapi.projectRoots.JavaVersionService; import com.intellij.openapi.roots.LanguageLevelProjectExtension; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Key; -import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VfsUtilCore; @@ -629,7 +627,10 @@ public final class PsiUtil extends PsiUtilCore { * class Foo<T extends Number>{} types Foo<?> and Foo<? extends Number> * would be equivalent */ - public static boolean equalOnEquivalentClasses(PsiClassType thisClassType, @NotNull PsiClass aClass, PsiClassType otherClassType, @NotNull PsiClass bClass) { + public static boolean equalOnEquivalentClasses(PsiClassType thisClassType, + @NotNull PsiClass aClass, + PsiClassType otherClassType, + @NotNull PsiClass bClass) { final PsiClassType capture1 = !PsiCapturedWildcardType.isCapture() ? thisClassType : (PsiClassType)captureToplevelWildcards(thisClassType, aClass); final PsiClassType capture2 = !PsiCapturedWildcardType.isCapture() @@ -641,17 +642,10 @@ public final class PsiUtil extends PsiUtilCore { return equalOnEquivalentClasses(result1.getSubstitutor(), aClass, result2.getSubstitutor(), bClass); } - @Deprecated - public static boolean equalOnClass(@NotNull PsiSubstitutor s1, @NotNull PsiSubstitutor s2, @NotNull PsiClass aClass) { - return equalOnEquivalentClasses(s1, aClass, s2, aClass); - } - - /** - * @deprecated to remove in v.16 - * Checks if substitutors maps are identical. If substitutor map values contain wildcard type, type parameter bounds are IGNORED. - * Please use {@link PsiUtil#equalOnEquivalentClasses(PsiClassType, PsiClass, PsiClassType, PsiClass)} instead. - */ - public static boolean equalOnEquivalentClasses(@NotNull PsiSubstitutor s1, @NotNull PsiClass aClass, @NotNull PsiSubstitutor s2, @NotNull PsiClass bClass) { + private static boolean equalOnEquivalentClasses(@NotNull PsiSubstitutor s1, + @NotNull PsiClass aClass, + @NotNull PsiSubstitutor s2, + @NotNull PsiClass bClass) { // assume generic class equals to non-generic if (aClass.hasTypeParameters() != bClass.hasTypeParameters()) return true; final PsiTypeParameter[] typeParameters1 = aClass.getTypeParameters(); @@ -673,9 +667,8 @@ public final class PsiUtil extends PsiUtilCore { return containingClass1 == null && containingClass2 == null; } - /** - * @deprecated use more generic {@link #isCompileTimeConstant(PsiVariable)} instead - */ + /** @deprecated use more generic {@link #isCompileTimeConstant(PsiVariable)} instead */ + @SuppressWarnings("unused") public static boolean isCompileTimeConstant(@NotNull final PsiField field) { return isCompileTimeConstant((PsiVariable)field); } @@ -883,11 +876,6 @@ public final class PsiUtil extends PsiUtilCore { return psiClass != null && psiClass.isAnnotationType(); } - @PsiModifier.ModifierConstant - public static String getMaximumModifierForMember(final PsiClass aClass) { - return getMaximumModifierForMember(aClass, true); - } - @PsiModifier.ModifierConstant public static String getMaximumModifierForMember(final PsiClass aClass, boolean allowPublicAbstract) { String modifier = PsiModifier.PUBLIC; @@ -1294,281 +1282,7 @@ public final class PsiUtil extends PsiUtilCore { } } - public static class NullPsiClass extends NullPsiElement implements PsiClass { - @Nullable - @Override - public ItemPresentation getPresentation() { - throw createException(); - } - - @Nullable - @Override - public PsiDocComment getDocComment() { - throw createException(); - } - - @Override - public boolean hasTypeParameters() { - throw createException(); - } - - @Nullable - @Override - public PsiModifierList getModifierList() { - throw createException(); - } - - @Nullable - @Override - public String getName() { - throw createException(); - } - - @Override - public boolean isDeprecated() { - throw createException(); - } - - @Nullable - @Override - public PsiTypeParameterList getTypeParameterList() { - throw createException(); - } - - @Override - public void navigate(boolean requestFocus) { - throw createException(); - } - - @Override - public boolean canNavigate() { - throw createException(); - } - - @Override - public boolean hasModifierProperty(@PsiModifier.ModifierConstant @NonNls @NotNull String name) { - throw createException(); - } - - @NotNull - @Override - public PsiTypeParameter[] getTypeParameters() { - throw createException(); - } - - @Override - public boolean canNavigateToSource() { - throw createException(); - } - - @Nullable - @Override - public String getQualifiedName() { - throw createException(); - } - - @Override - public boolean isInterface() { - throw createException(); - } - - @Override - public boolean isAnnotationType() { - throw createException(); - } - - @Override - public boolean isEnum() { - throw createException(); - } - - @Nullable - @Override - public PsiReferenceList getExtendsList() { - throw createException(); - } - - @Nullable - @Override - public PsiReferenceList getImplementsList() { - throw createException(); - } - - @NotNull - @Override - public PsiClassType[] getExtendsListTypes() { - throw createException(); - } - - @NotNull - @Override - public PsiClassType[] getImplementsListTypes() { - throw createException(); - } - - @Nullable - @Override - public PsiClass getSuperClass() { - throw createException(); - } - - @Override - public PsiClass[] getInterfaces() { - throw createException(); - } - - @NotNull - @Override - public PsiClass[] getSupers() { - throw createException(); - } - - @NotNull - @Override - public PsiClassType[] getSuperTypes() { - throw createException(); - } - - @NotNull - @Override - public PsiField[] getFields() { - throw createException(); - } - - @NotNull - @Override - public PsiMethod[] getMethods() { - throw createException(); - } - - @NotNull - @Override - public PsiMethod[] getConstructors() { - throw createException(); - } - - @NotNull - @Override - public PsiClass[] getInnerClasses() { - throw createException(); - } - - @NotNull - @Override - public PsiClassInitializer[] getInitializers() { - throw createException(); - } - - @NotNull - @Override - public PsiField[] getAllFields() { - throw createException(); - } - - @NotNull - @Override - public PsiMethod[] getAllMethods() { - throw createException(); - } - - @NotNull - @Override - public PsiClass[] getAllInnerClasses() { - throw createException(); - } - - @Nullable - @Override - public PsiField findFieldByName(@NonNls String name, boolean checkBases) { - throw createException(); - } - - @Nullable - @Override - public PsiMethod findMethodBySignature(PsiMethod patternMethod, boolean checkBases) { - throw createException(); - } - - @NotNull - @Override - public PsiMethod[] findMethodsBySignature(PsiMethod patternMethod, boolean checkBases) { - throw createException(); - } - - @NotNull - @Override - public PsiMethod[] findMethodsByName(@NonNls String name, boolean checkBases) { - throw createException(); - } - - @NotNull - @Override - public List> findMethodsAndTheirSubstitutorsByName(@NonNls String name, boolean checkBases) { - throw createException(); - } - - @NotNull - @Override - public List> getAllMethodsAndTheirSubstitutors() { - throw createException(); - } - - @Nullable - @Override - public PsiClass findInnerClassByName(@NonNls String name, boolean checkBases) { - throw createException(); - } - - @Nullable - @Override - public PsiElement getLBrace() { - throw createException(); - } - - @Nullable - @Override - public PsiElement getRBrace() { - throw createException(); - } - - @Nullable - @Override - public PsiIdentifier getNameIdentifier() { - throw createException(); - } - - @Override - public PsiElement getScope() { - throw createException(); - } - - @Override - public boolean isInheritor(@NotNull PsiClass baseClass, boolean checkDeep) { - throw createException(); - } - - @Override - public boolean isInheritorDeep(PsiClass baseClass, @Nullable PsiClass classToByPass) { - throw createException(); - } - - @Nullable - @Override - public PsiClass getContainingClass() { - throw createException(); - } - - @NotNull - @Override - public Collection getVisibleSignatures() { - throw createException(); - } - - @Override - public PsiElement setName(@NonNls @NotNull String name) { - throw createException(); - } + public static boolean isModuleFile(@NotNull PsiFile file) { + return file instanceof PsiJavaFile && ((PsiJavaFile)file).getModuleDeclaration() != null; } - - public static final PsiClass NULL_PSI_CLASS = new NullPsiClass(); -} +} \ No newline at end of file diff --git a/java/java-psi-api/src/messages/JavaCoreBundle.properties b/java/java-psi-api/src/messages/JavaCoreBundle.properties index bab3bde52ca7..98735681e69b 100644 --- a/java/java-psi-api/src/messages/JavaCoreBundle.properties +++ b/java/java-psi-api/src/messages/JavaCoreBundle.properties @@ -7,6 +7,6 @@ jdk.1.5.language.level.description=5.0 - 'enum' keyword, generics, autoboxing et jdk.1.6.language.level.description=6 - @Override in interfaces jdk.1.7.language.level.description=7 - Diamonds, ARM, multi-catch etc. jdk.1.8.language.level.description=8 - Lambdas, type annotations etc. -jdk.1.9.language.level.description=9 - JDK modularization etc. +jdk.1.9.language.level.description=9 - Modules, private methods in interfaces etc. jdk.X.language.level.description=X - Experimental features diff --git a/java/java-psi-impl/src/com/intellij/lang/java/parser/FileParser.java b/java/java-psi-impl/src/com/intellij/lang/java/parser/FileParser.java index 6b9f154ebe93..c689af8cbdac 100644 --- a/java/java-psi-impl/src/com/intellij/lang/java/parser/FileParser.java +++ b/java/java-psi-impl/src/com/intellij/lang/java/parser/FileParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -20,6 +20,7 @@ import com.intellij.codeInsight.daemon.JavaErrorMessages; import com.intellij.lang.PsiBuilder; import com.intellij.openapi.util.Pair; import com.intellij.psi.JavaTokenType; +import com.intellij.psi.PsiKeyword; import com.intellij.psi.impl.source.tree.ElementType; import com.intellij.psi.impl.source.tree.JavaElementType; import com.intellij.psi.tree.IElementType; @@ -53,6 +54,11 @@ public class FileParser { @NotNull final TokenSet importListStoppers, @NotNull final AbstractBundle bundle, @NotNull final String errorMessageKey) { + if (PsiKeyword.MODULE.equals(builder.getTokenText())) { + ModuleParser.parseModule(builder); + return; + } + parsePackageStatement(builder); Pair impListInfo = parseImportList(builder, importListStoppers); @@ -189,4 +195,4 @@ public class FileParser { done(statement, type); return statement; } -} +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/lang/java/parser/ModuleParser.java b/java/java-psi-impl/src/com/intellij/lang/java/parser/ModuleParser.java new file mode 100644 index 000000000000..deb016b7d84a --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/lang/java/parser/ModuleParser.java @@ -0,0 +1,265 @@ +/* + * Copyright 2000-2016 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.lang.java.parser; + +import com.intellij.codeInsight.daemon.JavaErrorMessages; +import com.intellij.lang.PsiBuilder; +import com.intellij.psi.JavaTokenType; +import com.intellij.psi.PsiKeyword; +import com.intellij.psi.impl.source.tree.JavaElementType; +import com.intellij.psi.tree.IElementType; +import org.jetbrains.annotations.NotNull; + +import static com.intellij.lang.PsiBuilderUtil.expect; +import static com.intellij.lang.java.parser.JavaParserUtil.error; +import static com.intellij.lang.java.parser.JavaParserUtil.semicolon; + +public class ModuleParser { + public static void parseModule(@NotNull PsiBuilder builder) { + PsiBuilder.Marker module = builder.mark(); + mapAndAdvance(builder, JavaTokenType.MODULE_KEYWORD); + + if (parseName(builder) == null) { + module.drop(); + if (builder.getTokenType() != null) { + parseExtras(builder, JavaErrorMessages.message("expected.module.declaration")); + } + else { + error(builder, JavaErrorMessages.message("expected.identifier")); + } + return; + } + + if (!expect(builder, JavaTokenType.LBRACE)) { + if (builder.getTokenType() != null) { + parseExtras(builder, JavaErrorMessages.message("expected.module.declaration")); + } + else { + error(builder, JavaErrorMessages.message("expected.lbrace")); + } + } + else { + parseModuleContent(builder); + } + + module.done(JavaElementType.MODULE); + + if (builder.getTokenType() != null) { + parseExtras(builder, JavaErrorMessages.message("unexpected.tokens")); + } + } + + private static PsiBuilder.Marker parseName(PsiBuilder builder) { + PsiBuilder.Marker nameElement = builder.mark(); + boolean empty = true; + + boolean idExpected = true; + while (true) { + IElementType t = builder.getTokenType(); + if (t == JavaTokenType.IDENTIFIER) { + if (!idExpected) error(builder, JavaErrorMessages.message("expected.dot")); + idExpected = false; + } + else if (t == JavaTokenType.DOT) { + if (idExpected) error(builder, JavaErrorMessages.message("expected.identifier")); + idExpected = true; + } + else break; + builder.advanceLexer(); + empty = false; + } + + if (!empty) { + if (idExpected) error(builder, JavaErrorMessages.message("expected.identifier")); + nameElement.done(JavaElementType.MODULE_REFERENCE); + return nameElement; + } + else { + nameElement.drop(); + return null; + } + } + + private static void parseModuleContent(PsiBuilder builder) { + IElementType token; + PsiBuilder.Marker invalid = null; + + while ((token = builder.getTokenType()) != null) { + if (token == JavaTokenType.RBRACE) { + break; + } + + if (token == JavaTokenType.SEMICOLON) { + if (invalid != null) { + invalid.error(JavaErrorMessages.message("expected.module.statement")); + invalid = null; + } + builder.advanceLexer(); + continue; + } + + PsiBuilder.Marker statement = parseStatement(builder); + if (statement == null) { + if (invalid == null) invalid = builder.mark(); + builder.advanceLexer(); + } + else if (invalid != null) { + invalid.errorBefore(JavaErrorMessages.message("expected.module.statement"), statement); + invalid = null; + } + } + + if (invalid != null) { + invalid.error(JavaErrorMessages.message("expected.module.statement")); + } + + if (!expect(builder, JavaTokenType.RBRACE) && invalid == null) { + error(builder, JavaErrorMessages.message("expected.rbrace")); + } + } + + private static PsiBuilder.Marker parseStatement(PsiBuilder builder) { + String kw = builder.getTokenText(); + if (PsiKeyword.REQUIRES.equals(kw)) return parseRequiresStatement(builder); + if (PsiKeyword.EXPORTS.equals(kw)) return parseExportsStatement(builder); + if (PsiKeyword.USES.equals(kw)) return parseUsesStatement(builder); + if (PsiKeyword.PROVIDES.equals(kw)) return parseProvidesStatement(builder); + return null; + } + + private static PsiBuilder.Marker parseRequiresStatement(PsiBuilder builder) { + PsiBuilder.Marker statement = builder.mark(); + mapAndAdvance(builder, JavaTokenType.REQUIRES_KEYWORD); + + expect(builder, JavaTokenType.PUBLIC_KEYWORD); + + if (parseNameRef(builder) != null) { + semicolon(builder); + } + else { + expect(builder, JavaTokenType.SEMICOLON); + } + + statement.done(JavaElementType.REQUIRES_STATEMENT); + return statement; + } + + private static PsiBuilder.Marker parseExportsStatement(PsiBuilder builder) { + PsiBuilder.Marker statement = builder.mark(); + boolean hasError = false; + mapAndAdvance(builder, JavaTokenType.EXPORTS_KEYWORD); + + if (parseClassOrPackageRef(builder) != null) { + if (PsiKeyword.TO.equals(builder.getTokenText())) { + mapAndAdvance(builder, JavaTokenType.TO_KEYWORD); + + while (true) { + PsiBuilder.Marker ref = parseNameRef(builder); + if (!expect(builder, JavaTokenType.COMMA)) { + if (ref == null) hasError = true; + break; + } + } + } + } + else { + error(builder, JavaErrorMessages.message("expected.package.reference")); + hasError = true; + } + + if (!hasError) { + semicolon(builder); + } + else { + expect(builder, JavaTokenType.SEMICOLON); + } + + statement.done(JavaElementType.EXPORTS_STATEMENT); + return statement; + } + + private static PsiBuilder.Marker parseUsesStatement(PsiBuilder builder) { + PsiBuilder.Marker statement = builder.mark(); + mapAndAdvance(builder, JavaTokenType.USES_KEYWORD); + + if (parseClassOrPackageRef(builder) != null) { + semicolon(builder); + } + else { + error(builder, JavaErrorMessages.message("expected.class.reference")); + expect(builder, JavaTokenType.SEMICOLON); + } + + statement.done(JavaElementType.USES_STATEMENT); + return statement; + } + + private static PsiBuilder.Marker parseProvidesStatement(PsiBuilder builder) { + PsiBuilder.Marker statement = builder.mark(); + boolean hasError = false; + mapAndAdvance(builder, JavaTokenType.PROVIDES_KEYWORD); + + if (parseClassOrPackageRef(builder) == null) { + error(builder, JavaErrorMessages.message("expected.class.reference")); + hasError = true; + } + + if (PsiKeyword.WITH.equals(builder.getTokenText())) { + mapAndAdvance(builder, JavaTokenType.WITH_KEYWORD); + if (parseClassOrPackageRef(builder) == null) { + error(builder, JavaErrorMessages.message("expected.class.reference")); + hasError = true; + } + } + else if (!hasError) { + error(builder, JavaErrorMessages.message("expected.with")); + hasError = true; + } + + if (!hasError) { + semicolon(builder); + } + else { + expect(builder, JavaTokenType.SEMICOLON); + } + + statement.done(JavaElementType.PROVIDES_STATEMENT); + return statement; + } + + private static PsiBuilder.Marker parseNameRef(PsiBuilder builder) { + PsiBuilder.Marker name = parseName(builder); + if (name == null) { + error(builder, JavaErrorMessages.message("expected.identifier")); + } + return name; + } + + private static void mapAndAdvance(PsiBuilder builder, IElementType keyword) { + builder.remapCurrentToken(keyword); + builder.advanceLexer(); + } + + private static void parseExtras(PsiBuilder builder, String message) { + PsiBuilder.Marker extras = builder.mark(); + while (builder.getTokenType() != null) builder.advanceLexer(); + extras.error(message); + } + + private static PsiBuilder.Marker parseClassOrPackageRef(PsiBuilder builder) { + return JavaParser.INSTANCE.getReferenceParser().parseJavaCodeReference(builder, true, false, false, false); + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java index 2226bdfacb83..25eeac26ab20 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/PsiElementFactoryImpl.java @@ -183,11 +183,7 @@ public class PsiElementFactoryImpl extends PsiJavaParserFacadeImpl implements Ps if (type instanceof PsiClassReferenceType) { return ((PsiClassReferenceType)type).getReference(); } - - final PsiClassType.ClassResolveResult resolveResult = type.resolveGenerics(); - final PsiClass refClass = resolveResult.getElement(); - assert refClass != null : type; - return new LightClassReference(myManager, type.getCanonicalText(true), refClass, resolveResult.getSubstitutor()); + return new LightClassTypeReference(myManager, type); } @NotNull diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsFileImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsFileImpl.java index b8d2babbd836..3a6bfac42919 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsFileImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/compiled/ClsFileImpl.java @@ -256,6 +256,12 @@ public class ClsFileImpl extends ClsRepositoryPsiElement return level; } + @Nullable + @Override + public PsiJavaModule getModuleDeclaration() { + return null; + } + @Override public PsiElement setName(@NotNull String name) throws IncorrectOperationException { throw cannotModifyException(this); diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReference.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReference.java index 1455314f6249..a6be6bd58930 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReference.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReference.java @@ -15,27 +15,21 @@ */ package com.intellij.psi.impl.light; -import com.intellij.lang.java.JavaLanguage; -import com.intellij.openapi.util.TextRange; import com.intellij.psi.*; import com.intellij.psi.infos.CandidateInfo; -import com.intellij.psi.scope.PsiScopeProcessor; import com.intellij.psi.search.GlobalSearchScope; -import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -public class LightClassReference extends LightElement implements PsiJavaCodeReferenceElement { - private final String myText; +public class LightClassReference extends LightClassReferenceBase implements PsiJavaCodeReferenceElement { + private final String myClassName; private final PsiElement myContext; @NotNull private final GlobalSearchScope myResolveScope; private final PsiClass myRefClass; private final PsiSubstitutor mySubstitutor; - private LightReferenceParameterList myParameterList; - private LightClassReference(@NotNull PsiManager manager, @NotNull @NonNls String text, @Nullable @NonNls String className, @@ -43,8 +37,7 @@ public class LightClassReference extends LightElement implements PsiJavaCodeRefe @NotNull GlobalSearchScope resolveScope, @Nullable PsiElement context, @Nullable PsiClass refClass) { - super(manager, JavaLanguage.INSTANCE); - myText = text; + super(manager, text); myClassName = className; myResolveScope = resolveScope; @@ -107,32 +100,6 @@ public class LightClassReference extends LightElement implements PsiJavaCodeRefe return new CandidateInfo(resolved, substitutor); } - @Override - @NotNull - public JavaResolveResult[] multiResolve(boolean incompleteCode){ - final JavaResolveResult result = advancedResolve(incompleteCode); - if(result != JavaResolveResult.EMPTY) return new JavaResolveResult[]{result}; - return JavaResolveResult.EMPTY_ARRAY; - } - - @Override - public void processVariants(@NotNull PsiScopeProcessor processor){ - throw new RuntimeException("Variants are not available for light references"); - } - - @Override - public PsiElement getReferenceNameElement() { - return null; - } - - @Override - public PsiReferenceParameterList getParameterList() { - if (myParameterList == null) { - myParameterList = new LightReferenceParameterList(myManager, PsiTypeElement.EMPTY_ARRAY); - } - return myParameterList; - } - @Override public String getQualifiedName() { if (myClassName != null) { @@ -162,36 +129,6 @@ public class LightClassReference extends LightElement implements PsiJavaCodeRefe } } - @Override - public String getText() { - return myText; - } - - @Override - public PsiReference getReference() { - return this; - } - - @Override - @NotNull - public String getCanonicalText() { - String name = getQualifiedName(); - if (name == null) return ""; - PsiType[] types = getTypeParameters(); - if (types.length == 0) return name; - - StringBuilder buf = new StringBuilder(); - buf.append(name); - buf.append('<'); - for (int i = 0; i < types.length; i++) { - if (i > 0) buf.append(','); - buf.append(types[i].getCanonicalText()); - } - buf.append('>'); - - return buf.toString(); - } - @Override public PsiElement copy() { if (myClassName != null) { @@ -207,79 +144,11 @@ public class LightClassReference extends LightElement implements PsiJavaCodeRefe } } - @Override - public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException { - //TODO? - throw new UnsupportedOperationException(); - } - - @Override - public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException { - //TODO? - throw new UnsupportedOperationException(); - } - - @Override - public void accept(@NotNull PsiElementVisitor visitor) { - if (visitor instanceof JavaElementVisitor) { - ((JavaElementVisitor)visitor).visitReferenceElement(this); - } - else { - visitor.visitElement(this); - } - } - - public String toString() { - return "LightClassReference:" + myText; - } - - @Override - public boolean isReferenceTo(PsiElement element) { - return element instanceof PsiClass && getManager().areElementsEquivalent(resolve(), element); - } - - @Override - @NotNull - public Object[] getVariants() { - throw new RuntimeException("Variants are not available for light references"); - } - - @Override - public boolean isSoft(){ - return false; - } - - @Override - public TextRange getRangeInElement() { - return new TextRange(0, getTextLength()); - } - - @Override - public PsiElement getElement() { - return this; - } - @Override public boolean isValid() { return myRefClass == null || myRefClass.isValid(); } - @Override - @NotNull - public PsiType[] getTypeParameters() { - return PsiType.EMPTY_ARRAY; - } - - @Override - public PsiElement getQualifier() { - return null; - } - - @Override - public boolean isQualified() { - return false; - } - @NotNull @Override public GlobalSearchScope getResolveScope() { diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReferenceBase.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReferenceBase.java new file mode 100644 index 000000000000..ad1026018a55 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassReferenceBase.java @@ -0,0 +1,168 @@ +/* + * Copyright 2000-2016 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.psi.impl.light; + +import com.intellij.lang.java.JavaLanguage; +import com.intellij.openapi.util.TextRange; +import com.intellij.psi.*; +import com.intellij.psi.scope.PsiScopeProcessor; +import com.intellij.util.IncorrectOperationException; +import org.jetbrains.annotations.NotNull; + +abstract class LightClassReferenceBase extends LightElement implements PsiJavaCodeReferenceElement { + + protected final String myText; + + private LightReferenceParameterList myParameterList; + + protected LightClassReferenceBase(@NotNull PsiManager manager, @NotNull String text) { + super(manager, JavaLanguage.INSTANCE); + myText = text; + } + + @Override + @NotNull + public JavaResolveResult[] multiResolve(boolean incompleteCode) { + final JavaResolveResult result = advancedResolve(incompleteCode); + if (result != JavaResolveResult.EMPTY) return new JavaResolveResult[]{result}; + return JavaResolveResult.EMPTY_ARRAY; + } + + @Override + public void processVariants(@NotNull PsiScopeProcessor processor) { + throw new RuntimeException("Variants are not available for light references"); + } + + @Override + public PsiElement getReferenceNameElement() { + return null; + } + + @Override + public PsiReferenceParameterList getParameterList() { + if (myParameterList == null) { + myParameterList = new LightReferenceParameterList(myManager, PsiTypeElement.EMPTY_ARRAY); + } + return myParameterList; + } + + @Override + public String getQualifiedName() { + PsiClass psiClass = (PsiClass)resolve(); + if (psiClass != null) { + return psiClass.getQualifiedName(); + } + return null; + } + + @Override + public String getText() { + return myText; + } + + @Override + public PsiReference getReference() { + return this; + } + + @Override + @NotNull + public String getCanonicalText() { + String name = getQualifiedName(); + if (name == null) return ""; + PsiType[] types = getTypeParameters(); + if (types.length == 0) return name; + + StringBuilder buf = new StringBuilder(); + buf.append(name); + buf.append('<'); + for (int i = 0; i < types.length; i++) { + if (i > 0) buf.append(','); + buf.append(types[i].getCanonicalText()); + } + buf.append('>'); + + return buf.toString(); + } + + @Override + public PsiElement handleElementRename(String newElementName) throws IncorrectOperationException { + //TODO? + throw new UnsupportedOperationException(); + } + + @Override + public PsiElement bindToElement(@NotNull PsiElement element) throws IncorrectOperationException { + //TODO? + throw new UnsupportedOperationException(); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitReferenceElement(this); + } + else { + visitor.visitElement(this); + } + } + + public String toString() { + return getClass().getSimpleName() + getText(); + } + + @Override + public boolean isReferenceTo(PsiElement element) { + return element instanceof PsiClass && getManager().areElementsEquivalent(resolve(), element); + } + + @Override + @NotNull + public Object[] getVariants() { + throw new RuntimeException("Variants are not available for light references"); + } + + @Override + public boolean isSoft() { + return false; + } + + @Override + public TextRange getRangeInElement() { + return new TextRange(0, getTextLength()); + } + + @Override + public PsiElement getElement() { + return this; + } + + @Override + @NotNull + public PsiType[] getTypeParameters() { + return PsiType.EMPTY_ARRAY; + } + + @Override + public PsiElement getQualifier() { + return null; + } + + @Override + public boolean isQualified() { + return false; + } +} diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassTypeReference.java b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassTypeReference.java new file mode 100644 index 000000000000..940f0e4b248c --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/light/LightClassTypeReference.java @@ -0,0 +1,69 @@ +/* + * Copyright 2000-2016 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.psi.impl.light; + +import com.intellij.psi.*; +import com.intellij.psi.search.GlobalSearchScope; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class LightClassTypeReference extends LightClassReferenceBase implements PsiJavaCodeReferenceElement { + + private final @NotNull PsiClassType myType; + + private LightClassTypeReference(@NotNull PsiManager manager, @NotNull String text, @NotNull PsiClassType type) { + super(manager, text); + myType = type; + } + + public LightClassTypeReference(@NotNull PsiManager manager, @NotNull PsiClassType type) { + this(manager, type.getCanonicalText(true), type); + } + + @Nullable + @Override + public PsiElement resolve() { + return myType.resolve(); + } + + @NotNull + @Override + public JavaResolveResult advancedResolve(boolean incompleteCode) { + return myType.resolveGenerics(); + } + + @Nullable + @Override + public String getReferenceName() { + return myType.getClassName(); + } + + @Override + public PsiElement copy() { + return new LightClassTypeReference(myManager, myText, myType); + } + + @Override + public boolean isValid() { + return myType.isValid(); + } + + @NotNull + @Override + public GlobalSearchScope getResolveScope() { + return myType.getResolveScope(); + } +} diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiAnonymousClassImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiAnonymousClassImpl.java index b6e48479e299..33ac0b3106e0 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiAnonymousClassImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiAnonymousClassImpl.java @@ -183,15 +183,7 @@ public class PsiAnonymousClassImpl extends PsiClassImpl implements PsiAnonymousC @NotNull PsiElement place) { if (lastParent instanceof PsiExpressionList) return true; - final PsiClassStub stub = getStub(); - if (stub != null) { - // no tree is loaded - // that means we could not have come from resolving something inside anonymous class, we just resolving the base class reference - // so skip the (very expensive) getBaseClassReference() call which would load tree - return true; - } - - if (lastParent != null/* IMPORTANT: do not call getBaseClassReference() for lastParent == null and lastParent which is not under our node - loads tree!*/ + if (lastParent instanceof PsiJavaCodeReferenceElement/* IMPORTANT: do not call getBaseClassReference() for lastParent == null and lastParent which is not under our node - loads tree!*/ && lastParent.getParent() == this && lastParent == getBaseClassReference()) { return true; } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiExportsStatementImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiExportsStatementImpl.java new file mode 100644 index 000000000000..f83692a0be21 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiExportsStatementImpl.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.JavaElementVisitor; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.PsiExportsStatement; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import org.jetbrains.annotations.NotNull; + +public class PsiExportsStatementImpl extends CompositePsiElement implements PsiExportsStatement { + public PsiExportsStatementImpl() { + super(JavaElementType.EXPORTS_STATEMENT); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitExportsStatement(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiExportsStatement"; + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileBaseImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileBaseImpl.java index 9250faba5d51..ee44efe05c45 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileBaseImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileBaseImpl.java @@ -49,6 +49,7 @@ import com.intellij.util.containers.HashSet; import com.intellij.util.containers.MostlySingularMultiMap; import com.intellij.util.indexing.IndexingDataKeys; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collection; @@ -107,6 +108,10 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava @Override public void setPackageName(final String packageName) throws IncorrectOperationException { + if (PsiUtil.isModuleFile(this)) { + throw new IncorrectOperationException("Cannot set package name for module declarations"); + } + final PsiPackageStatement packageStatement = getPackageStatement(); final PsiElementFactory factory = JavaPsiFacade.getInstance(getProject()).getElementFactory(); if (packageStatement != null) { @@ -118,36 +123,33 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava packageStatement.delete(); } } - else { - if (!packageName.isEmpty()) { - addBefore(factory.createPackageStatement(packageName), getFirstChild()); - } + else if (!packageName.isEmpty()) { + addBefore(factory.createPackageStatement(packageName), getFirstChild()); } } @Override - @NotNull public PsiImportList getImportList() { StubElement stub = getStub(); if (stub != null) { PsiImportList[] nodes = stub.getChildrenByType(JavaStubElementTypes.IMPORT_LIST, PsiImportList.ARRAY_FACTORY); - if (nodes.length != 1) { - reportStubAstMismatch(stub + "; " + stub.getChildrenStubs(), getStubTree(), PsiDocumentManager.getInstance(getProject()).getCachedDocument(this)); - } - return nodes[0]; + if (nodes.length == 1) return nodes[0]; + if (nodes.length == 0) return null; + reportStubAstMismatch(stub + "; " + stub.getChildrenStubs(), getStubTree(), PsiDocumentManager.getInstance(getProject()).getCachedDocument(this)); } ASTNode node = calcTreeElement().findChildByType(JavaElementType.IMPORT_LIST); - assert node != null : getFileType() + ", " + getName(); - return SourceTreeToPsiMap.treeToPsiNotNull(node); + return (PsiImportList)SourceTreeToPsiMap.treeElementToPsi(node); } @Override @NotNull public PsiElement[] getOnDemandImports(boolean includeImplicit, boolean checkIncludes) { + PsiImportList importList = getImportList(); + if (importList == null) return EMPTY_ARRAY; + List array = new ArrayList(); - PsiImportList importList = getImportList(); PsiImportStatement[] statements = importList.getImportStatements(); for (PsiImportStatement statement : statements) { if (statement.isOnDemand()) { @@ -174,8 +176,10 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava @Override @NotNull public PsiClass[] getSingleClassImports(boolean checkIncludes) { - List array = new ArrayList(); PsiImportList importList = getImportList(); + if (importList == null) return PsiClass.EMPTY_ARRAY; + + List array = new ArrayList(); PsiImportStatement[] statements = importList.getImportStatements(); for (PsiImportStatement statement : statements) { if (!statement.isOnDemand()) { @@ -191,12 +195,14 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava @Override public PsiJavaCodeReferenceElement findImportReferenceTo(PsiClass aClass) { PsiImportList importList = getImportList(); - PsiImportStatement[] statements = importList.getImportStatements(); - for (PsiImportStatement statement : statements) { - if (!statement.isOnDemand()) { - PsiElement ref = statement.resolve(); - if (ref != null && getManager().areElementsEquivalent(ref, aClass)) { - return statement.getImportReference(); + if (importList != null) { + PsiImportStatement[] statements = importList.getImportStatements(); + for (PsiImportStatement statement : statements) { + if (!statement.isOnDemand()) { + PsiElement ref = statement.resolve(); + if (ref != null && getManager().areElementsEquivalent(ref, aClass)) { + return statement.getImportReference(); + } } } } @@ -316,7 +322,7 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava if (!processor.execute(aClass, state)) return false; } - final PsiImportStatement[] importStatements = importList.getImportStatements(); + final PsiImportStatement[] importStatements = importList != null ? importList.getImportStatements() : PsiImportStatement.EMPTY_ARRAY; // single-type processing for (PsiImportStatement statement : importStatements) { @@ -360,7 +366,7 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava } } - final PsiImportStaticStatement[] importStaticStatements = importList.getImportStaticStatements(); + final PsiImportStaticStatement[] importStaticStatements = importList != null ? importList.getImportStaticStatements() : PsiImportStaticStatement.EMPTY_ARRAY; if (importStaticStatements.length > 0) { final StaticImportFilteringProcessor staticImportProcessor = new StaticImportFilteringProcessor(processor); @@ -470,6 +476,12 @@ public abstract class PsiJavaFileBaseImpl extends PsiFileImpl implements PsiJava return LANGUAGE_LEVEL_KEY.getValue(this); } + @Nullable + @Override + public PsiJavaModule getModuleDeclaration() { + return null; + } + @Override public void clearCaches() { super.clearCaches(); diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileImpl.java index 87bd0ae69a3b..c6956a5715a4 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaFileImpl.java @@ -17,21 +17,33 @@ package com.intellij.psi.impl.source; import com.intellij.ide.highlighter.JavaFileType; import com.intellij.openapi.fileTypes.FileType; -import com.intellij.psi.FileViewProvider; +import com.intellij.psi.*; import com.intellij.psi.impl.java.stubs.JavaStubElementTypes; +import com.intellij.psi.util.PsiTreeUtil; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; public class PsiJavaFileImpl extends PsiJavaFileBaseImpl { public PsiJavaFileImpl(FileViewProvider file) { super(JavaStubElementTypes.JAVA_FILE, JavaStubElementTypes.JAVA_FILE, file); } - @Override @NotNull + @Override public FileType getFileType() { return JavaFileType.INSTANCE; } + @Nullable + @Override + public PsiJavaModule getModuleDeclaration() { + PsiElement element = getFirstChild(); + if (element instanceof PsiWhiteSpace || element instanceof PsiComment) { + element = PsiTreeUtil.skipSiblingsForward(element, PsiWhiteSpace.class, PsiComment.class); + } + return element instanceof PsiJavaModule ? (PsiJavaModule)element : null; + } + @Override public String toString() { return "PsiJavaFile:" + getName(); diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleImpl.java new file mode 100644 index 000000000000..4905a52c18c4 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleImpl.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.*; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import com.intellij.psi.util.PsiTreeUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +public class PsiJavaModuleImpl extends CompositePsiElement implements PsiJavaModule { + public PsiJavaModuleImpl() { + super(JavaElementType.MODULE); + } + + @Nullable + @Override + public PsiJavaModuleReference getNameElement() { + return PsiTreeUtil.getChildOfType(this, PsiJavaModuleReference.class); + } + + @Nullable + @Override + public String getModuleName() { + PsiJavaModuleReference nameElement = getNameElement(); + return nameElement != null ? nameElement.getReferenceText() : null; + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitModule(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiJavaModule:" + getModuleName(); + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleReferenceImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleReferenceImpl.java new file mode 100644 index 000000000000..0f9cf99c101b --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiJavaModuleReferenceImpl.java @@ -0,0 +1,54 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.*; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import org.jetbrains.annotations.NotNull; + +public class PsiJavaModuleReferenceImpl extends CompositePsiElement implements PsiJavaModuleReference { + public PsiJavaModuleReferenceImpl() { + super(JavaElementType.MODULE_REFERENCE); + } + + @NotNull + @Override + public String getReferenceText() { + StringBuilder sb = new StringBuilder(); + for (PsiElement e = getFirstChild(); e != null; e = e.getNextSibling()) { + if (!(e instanceof PsiWhiteSpace) && !(e instanceof PsiComment)) { + sb.append(e.getText()); + } + } + return sb.toString(); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitModuleReference(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiJavaModuleReference"; + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiProvidesStatementImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiProvidesStatementImpl.java new file mode 100644 index 000000000000..2d02057f4a30 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiProvidesStatementImpl.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.JavaElementVisitor; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.PsiProvidesStatement; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import org.jetbrains.annotations.NotNull; + +public class PsiProvidesStatementImpl extends CompositePsiElement implements PsiProvidesStatement { + public PsiProvidesStatementImpl() { + super(JavaElementType.PROVIDES_STATEMENT); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitProvidesStatement(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiProvidesStatement"; + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiRequiresStatementImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiRequiresStatementImpl.java new file mode 100644 index 000000000000..6919aa0110d6 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiRequiresStatementImpl.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.JavaElementVisitor; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.PsiRequiresStatement; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import org.jetbrains.annotations.NotNull; + +public class PsiRequiresStatementImpl extends CompositePsiElement implements PsiRequiresStatement { + public PsiRequiresStatementImpl() { + super(JavaElementType.REQUIRES_STATEMENT); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitRequiresStatement(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiRequiresStatement"; + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiUsesStatementImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiUsesStatementImpl.java new file mode 100644 index 000000000000..2ae1c78ece91 --- /dev/null +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/PsiUsesStatementImpl.java @@ -0,0 +1,44 @@ +/* + * Copyright 2000-2016 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.psi.impl.source; + +import com.intellij.psi.JavaElementVisitor; +import com.intellij.psi.PsiElementVisitor; +import com.intellij.psi.PsiUsesStatement; +import com.intellij.psi.impl.source.tree.CompositePsiElement; +import com.intellij.psi.impl.source.tree.JavaElementType; +import org.jetbrains.annotations.NotNull; + +public class PsiUsesStatementImpl extends CompositePsiElement implements PsiUsesStatement { + public PsiUsesStatementImpl() { + super(JavaElementType.USES_STATEMENT); + } + + @Override + public void accept(@NotNull PsiElementVisitor visitor) { + if (visitor instanceof JavaElementVisitor) { + ((JavaElementVisitor)visitor).visitUsesStatement(this); + } + else { + visitor.visitElement(this); + } + } + + @Override + public String toString() { + return "PsiUsesStatement"; + } +} \ No newline at end of file diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/ElementType.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/ElementType.java index 8c134391c77b..41ee37015198 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/ElementType.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/ElementType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -34,7 +34,8 @@ public interface ElementType extends JavaTokenType, JavaDocTokenType, JavaElemen IMPORT_KEYWORD, INSTANCEOF_KEYWORD, INT_KEYWORD, INTERFACE_KEYWORD, LONG_KEYWORD, NATIVE_KEYWORD, NEW_KEYWORD, PACKAGE_KEYWORD, PRIVATE_KEYWORD, PROTECTED_KEYWORD, PUBLIC_KEYWORD, RETURN_KEYWORD, SHORT_KEYWORD, SUPER_KEYWORD, STATIC_KEYWORD, STRICTFP_KEYWORD, SWITCH_KEYWORD, SYNCHRONIZED_KEYWORD, THIS_KEYWORD, THROW_KEYWORD, THROWS_KEYWORD, TRANSIENT_KEYWORD, TRY_KEYWORD, VOID_KEYWORD, - VOLATILE_KEYWORD, WHILE_KEYWORD); + VOLATILE_KEYWORD, WHILE_KEYWORD, + MODULE_KEYWORD, REQUIRES_KEYWORD, EXPORTS_KEYWORD, USES_KEYWORD, PROVIDES_KEYWORD, TO_KEYWORD, WITH_KEYWORD); TokenSet LITERAL_BIT_SET = TokenSet.create(TRUE_KEYWORD, FALSE_KEYWORD, NULL_KEYWORD); diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/JavaElementType.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/JavaElementType.java index 9d1163688744..da2d10906a6e 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/JavaElementType.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/JavaElementType.java @@ -139,6 +139,13 @@ public interface JavaElementType { IElementType ANNOTATION_ARRAY_INITIALIZER = new JavaCompositeElementType("ANNOTATION_ARRAY_INITIALIZER", PsiArrayInitializerMemberValueImpl.class); IElementType RECEIVER_PARAMETER = new JavaCompositeElementType("RECEIVER", PsiReceiverParameterImpl.class); + IElementType MODULE = new JavaCompositeElementType("MODULE", PsiJavaModuleImpl.class); + IElementType MODULE_REFERENCE = new JavaCompositeElementType("MODULE_NAME", PsiJavaModuleReferenceImpl.class); + IElementType REQUIRES_STATEMENT = new JavaCompositeElementType("REQUIRES_STATEMENT", PsiRequiresStatementImpl.class); + IElementType EXPORTS_STATEMENT = new JavaCompositeElementType("EXPORTS_STATEMENT", PsiExportsStatementImpl.class); + IElementType USES_STATEMENT = new JavaCompositeElementType("USES_STATEMENT", PsiUsesStatementImpl.class); + IElementType PROVIDES_STATEMENT = new JavaCompositeElementType("PROVIDES_STATEMENT", PsiProvidesStatementImpl.class); + class ICodeBlockElementType extends IErrorCounterReparseableElementType implements ICompositeElementType, ILightLazyParseableElementType { private ICodeBlockElementType() { super("CODE_BLOCK", JavaLanguage.INSTANCE); diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiReferenceExpressionImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiReferenceExpressionImpl.java index 90530124d71b..e16740c444e0 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiReferenceExpressionImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/tree/java/PsiReferenceExpressionImpl.java @@ -91,6 +91,7 @@ public class PsiReferenceExpressionImpl extends PsiReferenceExpressionBase imple boolean doImportStatic; if (containingFile instanceof PsiJavaFile) { importList = ((PsiJavaFile)containingFile).getImportList(); + assert importList != null : containingFile; PsiImportStatementBase singleImportStatement = importList.findSingleImportStatement(staticName); doImportStatic = singleImportStatement == null; if (singleImportStatement instanceof PsiImportStaticStatement) { @@ -116,8 +117,8 @@ public class PsiReferenceExpressionImpl extends PsiReferenceExpressionBase imple return this; } - public static void bindToElementViaStaticImport(final PsiClass qualifierClass, final String staticName, final PsiImportList importList) - throws IncorrectOperationException { + public static void bindToElementViaStaticImport(PsiClass qualifierClass, String staticName, PsiImportList importList) throws IncorrectOperationException { + assert importList != null; final String qualifiedName = qualifierClass.getQualifiedName(); final List refs = getImportsFromClass(importList, qualifiedName); if (refs.size() < JavaCodeStyleSettingsFacade.getInstance(qualifierClass.getProject()).getNamesCountToUseImportOnDemand()) { diff --git a/java/java-psi-impl/src/messages/JavaErrorMessages.properties b/java/java-psi-impl/src/messages/JavaErrorMessages.properties index 1e79e28c5617..4ed5a48d9392 100644 --- a/java/java-psi-impl/src/messages/JavaErrorMessages.properties +++ b/java/java-psi-impl/src/messages/JavaErrorMessages.properties @@ -336,6 +336,7 @@ expected.rbracket=']' expected expected.expression=Expression expected expected.semicolon=';' expected expected.class.reference=Class reference expected +expected.package.reference=Package reference expected expected.lparen='(' expected expected.rparen=')' expected expected.eq='=' expected @@ -351,6 +352,7 @@ expected.type.parameter=Type parameter expected expected.comma=',' expected expected.comma.or.rparen=',' or ')' expected expected.colon=':' expected +expected.dot='.' expected expected.type=Type expected expected.lbracket='[' expected expected.lparen.or.lbracket='(' or '[' expected @@ -365,6 +367,10 @@ expected.statement=Statement expected expected.while='while' expected expected.catch.or.finally='catch' or 'finally' expected expected.boolean.expression=Boolean expression expected +expected.with='with' expected +expected.module.declaration=Module declaration expected +expected.module.statement=Module statement expected + error.cannot.resolve.class=Cannot resolve class ''{0}'' error.cannot.resolve.class.or.package=Cannot resolve class or package ''{0}'' expected.class.or.package=Expected class or package @@ -379,11 +385,17 @@ cannot.resolve.package=Cannot resolve package {0} override.not.allowed.in.interfaces=@Override is not allowed when implementing interface method wildcard.not.expected=Unexpected wildcard bound.not.expected=Unexpected bound +declaration.not.allowed=Declaration not allowed here underscore.identifier.warn=Use of '_' as an identifier might not be supported in releases after Java 8 underscore.identifier.error=As of Java 9, '_' is a keyword, and may not be used as an identifier underscore.lambda.identifier=Use of '_' as a lambda parameter name is not allowed +module.file.wrong.name=Module declaration should be in a file named 'module-info.java' +module.illegal.name=Illegal module name +module.file.duplicate=Multiple module declarations +module.file.wrong.location=Module declaration should be located in a module's source root + feature.generics=Generics feature.annotations=Annotations feature.static.imports=Static imports @@ -401,5 +413,5 @@ feature.lambda.expressions=Lambda expressions feature.type.annotations=Type annotations feature.type.receivers=Receiver parameters feature.try.with.resources.refs=Resource references +feature.modules=Modules insufficient.language.level={0} are not supported at this language level -declaration.not.allowed=Declaration not allowed here diff --git a/java/java-structure-view/src/com/intellij/ide/structureView/impl/java/JavaClassTreeElementBase.java b/java/java-structure-view/src/com/intellij/ide/structureView/impl/java/JavaClassTreeElementBase.java index a1d2468ddc31..4e46dfb14fce 100644 --- a/java/java-structure-view/src/com/intellij/ide/structureView/impl/java/JavaClassTreeElementBase.java +++ b/java/java-structure-view/src/com/intellij/ide/structureView/impl/java/JavaClassTreeElementBase.java @@ -20,6 +20,7 @@ import com.intellij.navigation.ColoredItemPresentation; import com.intellij.navigation.LocationPresentation; import com.intellij.openapi.editor.colors.CodeInsightColors; import com.intellij.openapi.editor.colors.TextAttributesKey; +import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; @@ -104,7 +105,12 @@ public abstract class JavaClassTreeElementBase extends @Override public TextAttributesKey getTextAttributesKey() { - return isDeprecated() ? CodeInsightColors.DEPRECATED_ATTRIBUTES : null; + try { + return isDeprecated() ? CodeInsightColors.DEPRECATED_ATTRIBUTES : null; + } + catch (IndexNotReadyException ignore) { + return null; // do not show deprecated elements while indexing + } } private boolean isDeprecated(){ diff --git a/java/java-tests/testData/actions/reformatFileInEditor/formatOptimizeRearrangeVcsChanges_after.java b/java/java-tests/testData/actions/reformatFileInEditor/formatOptimizeRearrangeVcsChanges_after.java index e33d32fd1c1b..ddcdfe9ab7a8 100644 --- a/java/java-tests/testData/actions/reformatFileInEditor/formatOptimizeRearrangeVcsChanges_after.java +++ b/java/java-tests/testData/actions/reformatFileInEditor/formatOptimizeRearrangeVcsChanges_after.java @@ -5,6 +5,6 @@ public class Main { protected Object obj = null; private long e = 4; - public static void main(String[] args) { + public static void main(String[] args) { } } \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ThisInInterface.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ThisInInterface.java index ed86aac1e7af..2a5eb2dc8806 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ThisInInterface.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/ThisInInterface.java @@ -4,7 +4,7 @@ class C implements A { interface A { A a = new C(this); - A a1 = new C(this){}; + A a1 = new C(this){}; class B { A foo() { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/ThisInArgListOfAnonymous.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/ThisInArgListOfAnonymous.java new file mode 100644 index 000000000000..f0c5fe366d97 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting6/ThisInArgListOfAnonymous.java @@ -0,0 +1,17 @@ +class A { + public A(Object o) { + } +} + +class B {} + +class C extends B { + static { + A a = new A(this) {}; + A a1 = new A(super.clone()) {}; + } + + { + A a = new A(this); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting8/ModulesNotSupported.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting8/ModulesNotSupported.java new file mode 100644 index 000000000000..ed3bf668ad18 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting8/ModulesNotSupported.java @@ -0,0 +1,3 @@ +module M { + requires A; +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReifiableCapturedWildcards.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReifiableCapturedWildcards.java new file mode 100644 index 000000000000..ca772c9ee3ab --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/ReifiableCapturedWildcards.java @@ -0,0 +1,9 @@ +import java.util.List; + +class Test { + public void bar(List list) { + foo(list.get(0)); + } + + private final void foo(K... k) {} +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/UncheckedCastWithCapturedWildcards.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/UncheckedCastWithCapturedWildcards.java new file mode 100644 index 000000000000..ead8b1eee73b --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/genericsHighlighting8/UncheckedCastWithCapturedWildcards.java @@ -0,0 +1,8 @@ +import java.util.List; + +class Test { + public void foo(List list, List list2) { + Comparable c1 = (Comparable)list.get(0); + Comparable c2 = (Comparable)list2.get(0); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ResolutionOrderForVariableCycles.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ResolutionOrderForVariableCycles.java new file mode 100644 index 000000000000..bf9172198a83 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/graphInference/ResolutionOrderForVariableCycles.java @@ -0,0 +1,17 @@ + +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Predicate; + + +abstract class Test { + + { + Consumer bar = bar(instanceOf(Integer.class), i -> i + 2); + Consumer bar1 = bar(instanceOf(Integer.class), i -> i + 2); + } + + + abstract Consumer bar(Predicate predicate, Function f); + abstract

Predicate

instanceOf(Class type); +} diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/BoxingAndOverloadResolution.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/BoxingAndOverloadResolution.java index 36db3014c415..a269af16779f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/BoxingAndOverloadResolution.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/mostSpecific/BoxingAndOverloadResolution.java @@ -14,7 +14,7 @@ class Test { class Test2 { - static void m(Integer i) { } + static void m(Integer i) { } interface I1 { void m(int x); diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java index ee24b8c2ba93..c2ee24b70d41 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/AfterDistinctOps.java @@ -77,7 +77,7 @@ abstract class AbstractCollection implements Collection { public boolean add(E e) { return true; } - public boolean addAll(Collection c) { + public boolean addAll(Collection c) { boolean modified = false; return modified; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java index ad3ed7192df9..f985da24cf89 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/GenericArrayCreation.java @@ -6,11 +6,11 @@ class Test { Test m(List l1, List l2); } - static Test meth(List... lli) { + static Test meth(List... lli) { return null; } - Test(List... lli) {} + Test(List... lli) {} { I i1 = Test::meth; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/VarargsParametersCountComparison.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/VarargsParametersCountComparison.java index 21f69ce9a9ec..a25914f9a769 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/VarargsParametersCountComparison.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/newMethodRef/VarargsParametersCountComparison.java @@ -1,7 +1,7 @@ import java.util.stream.Stream; class A { - private void test5(Integer i, String... strings) {} + private void test5(Integer i, String... strings) {} private void test5(Integer i, Integer b, String... strings) { System.out.println(i); System.out.println(b); diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/IgnoreCandidatesWithLowerApplicabilityLevel.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/IgnoreCandidatesWithLowerApplicabilityLevel.java index a24662912555..01e4710ca0a5 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/IgnoreCandidatesWithLowerApplicabilityLevel.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/IgnoreCandidatesWithLowerApplicabilityLevel.java @@ -12,7 +12,7 @@ class MyTest { public static class Builder { - public Builder add(E element) { + public Builder add(E element) { return this; } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/NotPotentiallyCompatibleMethodReference.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/NotPotentiallyCompatibleMethodReference.java index e8da12c757c7..cffec113e81d 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/NotPotentiallyCompatibleMethodReference.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/lambda/overloadResolution/NotPotentiallyCompatibleMethodReference.java @@ -8,6 +8,6 @@ class Main { } public static boolean checkForJdk(String homePath) {return false;} - public static boolean checkForJdk(File homePath) {return false;} + public static boolean checkForJdk(File homePath) {return false;} } diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCommentsInsideAnonymousClassBody.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCommentsInsideAnonymousClassBody.java new file mode 100644 index 000000000000..64800159149d --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterCommentsInsideAnonymousClassBody.java @@ -0,0 +1,6 @@ +// "Replace with lambda" "true" + +class Test { + //my comment + Runnable r = () -> {}; +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads.java new file mode 100644 index 000000000000..4341cf5598c6 --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads.java @@ -0,0 +1,28 @@ +// "Replace with lambda" "true" + +import java.util.*; +import java.util.function.Function; + +import static java.util.Collections.emptyList; + +class Ambiguous { + public void setRoots(List roots) {} + + public static List concat(Iterable> list) { + return new ArrayList(); + } + + public static List concat(List> lists) { + return new ArrayList(); + } + + public static List map(Collection iterable, Function mapping) { + return emptyList(); + } + + public void anonymousToLambda(HashSet modules) { + setRoots(Ambiguous.concat(Ambiguous.map(modules, (Function>) s -> null) + )); + } + +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads1.java new file mode 100644 index 000000000000..94f308bb6e3e --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/afterNestedOverloads1.java @@ -0,0 +1,28 @@ +// "Replace with lambda" "true" + +import java.util.*; +import java.util.function.Function; + +import static java.util.Collections.emptyList; + +class Ambiguous { + public void setRoots(List roots) {} + + public static List concat(Iterable> list) { + return new ArrayList(); + } + + public static List concat(List> lists) { + return new ArrayList(); + } + + public static List map(Collection iterable, Function mapping) { + return emptyList(); + } + + public void anonymousToLambda(HashSet modules) { + setRoots(Ambiguous.concat(Ambiguous.map(modules, (Function>) s -> Arrays.asList("")) + )); + } + +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCodeBlockLambda.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCodeBlockLambda.java index 55bac74f26cf..e5bc06d3404f 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCodeBlockLambda.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCodeBlockLambda.java @@ -1,4 +1,4 @@ -// "Replace with lambda" "false" +// "Replace with lambda" "true" class A { { bar(new ThrowableComputable() { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCommentsInsideAnonymousClassBody.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCommentsInsideAnonymousClassBody.java new file mode 100644 index 000000000000..304804c3853f --- /dev/null +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeCommentsInsideAnonymousClassBody.java @@ -0,0 +1,8 @@ +// "Replace with lambda" "true" + +class Test { + Runnable r = new Runnable() { + //my comment + public void run () {} + }; +} \ No newline at end of file diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeFormalTypes.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeFormalTypes.java index 3b7d467776cd..5b3a5fc6b563 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeFormalTypes.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeFormalTypes.java @@ -1,4 +1,4 @@ -// "Replace with lambda" "false" +// "Replace with lambda" "true" import java.util.*; class Test2 { diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads.java index ac84163d21a2..567622567f17 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads.java @@ -1,4 +1,4 @@ -// "Replace with lambda" "false" +// "Replace with lambda" "true" import java.util.*; import java.util.function.Function; diff --git a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads1.java b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads1.java index ed61409a7644..220e0031f932 100644 --- a/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads1.java +++ b/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/anonymous2lambda/beforeNestedOverloads1.java @@ -1,4 +1,4 @@ -// "Replace with lambda" "false" +// "Replace with lambda" "true" import java.util.*; import java.util.function.Function; diff --git a/java/java-tests/testData/inspection/defUse/TryWithFinally.java b/java/java-tests/testData/inspection/defUse/TryWithFinally.java new file mode 100644 index 000000000000..e0301e5d7a11 --- /dev/null +++ b/java/java-tests/testData/inspection/defUse/TryWithFinally.java @@ -0,0 +1,15 @@ +class TryWithFinally { + static class Resource implements AutoCloseable { + public void close() throws Exception { } + boolean find() { throw new UnsupportedOperationException(); } + } + + void test() throws Exception { + boolean found = false; + try (Resource r = new Resource()) { + found = r.find(); + } + finally { } + System.out.println(found); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/inspection/defUse/TryWithoutFinally.java b/java/java-tests/testData/inspection/defUse/TryWithoutFinally.java new file mode 100644 index 000000000000..1fd425f56e5b --- /dev/null +++ b/java/java-tests/testData/inspection/defUse/TryWithoutFinally.java @@ -0,0 +1,14 @@ +class TryWithoutFinally { + static class Resource implements AutoCloseable { + public void close() throws Exception { } + boolean find() { throw new UnsupportedOperationException(); } + } + + void test() throws Exception { + boolean found = false; + try (Resource r = new Resource()) { + found = r.find(); + } + System.out.println(found); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/inspection/streamApiCallChains/afterStreamForEachOrderedLambda.java b/java/java-tests/testData/inspection/streamApiCallChains/afterStreamForEachOrderedLambda.java index a2ae9e88a405..2e0de8745474 100644 --- a/java/java-tests/testData/inspection/streamApiCallChains/afterStreamForEachOrderedLambda.java +++ b/java/java-tests/testData/inspection/streamApiCallChains/afterStreamForEachOrderedLambda.java @@ -1,4 +1,4 @@ -// "Replace Collection.stream().forEachOrdered() with Collection.forEach()" "true" +// "Replace Collection.stream().forEachOrdered() with Collection.forEach() (may change semantics)" "true" import java.util.Arrays; diff --git a/java/java-tests/testData/inspection/streamApiCallChains/beforeStreamForEachOrderedLambda.java b/java/java-tests/testData/inspection/streamApiCallChains/beforeStreamForEachOrderedLambda.java index 60747336dd24..f4cbfa406fba 100644 --- a/java/java-tests/testData/inspection/streamApiCallChains/beforeStreamForEachOrderedLambda.java +++ b/java/java-tests/testData/inspection/streamApiCallChains/beforeStreamForEachOrderedLambda.java @@ -1,4 +1,4 @@ -// "Replace Collection.stream().forEachOrdered() with Collection.forEach()" "true" +// "Replace Collection.stream().forEachOrdered() with Collection.forEach() (may change semantics)" "true" import java.util.Arrays; diff --git a/java/java-tests/testData/psi/parser-partial/modules/BadContent.txt b/java/java-tests/testData/psi/parser-partial/modules/BadContent.txt new file mode 100644 index 000000000000..b8f8c59bd508 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/BadContent.txt @@ -0,0 +1,15 @@ +PsiJavaFile:BadContent.java + PsiJavaModule:X + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace('\n ') + PsiErrorElement:Module statement expected + PsiIdentifier:some('some') + PsiWhiteSpace(' ') + PsiIdentifier:junk('junk') + PsiWhiteSpace('\n') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports0.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports0.txt new file mode 100644 index 000000000000..c00a705c9d13 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports0.txt @@ -0,0 +1,15 @@ +PsiJavaFile:Exports0.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiErrorElement:Package reference expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports1.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports1.txt new file mode 100644 index 000000000000..b4fd84b746c1 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports1.txt @@ -0,0 +1,20 @@ +PsiJavaFile:Exports1.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiErrorElement:';' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports2.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports2.txt new file mode 100644 index 000000000000..5009ca88ed19 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports2.txt @@ -0,0 +1,19 @@ +PsiJavaFile:Exports2.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports3.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports3.txt new file mode 100644 index 000000000000..517d67efff4d --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports3.txt @@ -0,0 +1,22 @@ +PsiJavaFile:Exports3.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports4.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports4.txt new file mode 100644 index 000000000000..b1fbdf7159a3 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports4.txt @@ -0,0 +1,24 @@ +PsiJavaFile:Exports4.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports5.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports5.txt new file mode 100644 index 000000000000..b8105cf4de28 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports5.txt @@ -0,0 +1,25 @@ +PsiJavaFile:Exports5.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiErrorElement:';' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports6.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports6.txt new file mode 100644 index 000000000000..204a82807b2e --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports6.txt @@ -0,0 +1,26 @@ +PsiJavaFile:Exports6.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiJavaToken:COMMA(',') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports7.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports7.txt new file mode 100644 index 000000000000..58b0fef9b183 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports7.txt @@ -0,0 +1,28 @@ +PsiJavaFile:Exports7.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiJavaToken:COMMA(',') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Exports8.txt b/java/java-tests/testData/psi/parser-partial/modules/Exports8.txt new file mode 100644 index 000000000000..780a100fa321 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Exports8.txt @@ -0,0 +1,28 @@ +PsiJavaFile:Exports8.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiExportsStatement + PsiKeyword:exports('exports') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:pkg + PsiIdentifier:pkg('pkg') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:to('to') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:COMMA(',') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:B('B') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Extras.txt b/java/java-tests/testData/psi/parser-partial/modules/Extras.txt new file mode 100644 index 000000000000..396db166a9fa --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Extras.txt @@ -0,0 +1,19 @@ +PsiJavaFile:Extras.java + PsiJavaModule:one + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:one('one') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') + PsiWhiteSpace('\n') + PsiErrorElement:Unexpected tokens + PsiIdentifier:module('module') + PsiWhiteSpace(' ') + PsiIdentifier:another('another') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Incomplete0.txt b/java/java-tests/testData/psi/parser-partial/modules/Incomplete0.txt new file mode 100644 index 000000000000..a80974a6f49c --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Incomplete0.txt @@ -0,0 +1,4 @@ +PsiJavaFile:Incomplete0.java + PsiKeyword:module('module') + PsiErrorElement:Identifier expected + \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Incomplete1.txt b/java/java-tests/testData/psi/parser-partial/modules/Incomplete1.txt new file mode 100644 index 000000000000..81f212a0de8a --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Incomplete1.txt @@ -0,0 +1,8 @@ +PsiJavaFile:Incomplete1.java + PsiJavaModule:X + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiErrorElement:'{' expected + \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Incomplete2.txt b/java/java-tests/testData/psi/parser-partial/modules/Incomplete2.txt new file mode 100644 index 000000000000..2c2d6b18cae6 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Incomplete2.txt @@ -0,0 +1,5 @@ +PsiJavaFile:Incomplete2.java + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiErrorElement:Module declaration expected + PsiJavaToken:LBRACE('{') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Incomplete3.txt b/java/java-tests/testData/psi/parser-partial/modules/Incomplete3.txt new file mode 100644 index 000000000000..7ca92eda6292 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Incomplete3.txt @@ -0,0 +1,10 @@ +PsiJavaFile:Incomplete3.java + PsiJavaModule:X + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiErrorElement:'}' expected + \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Incomplete4.txt b/java/java-tests/testData/psi/parser-partial/modules/Incomplete4.txt new file mode 100644 index 000000000000..2b0c45708c3b --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Incomplete4.txt @@ -0,0 +1,11 @@ +PsiJavaFile:Incomplete4.java + PsiJavaModule:X + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiErrorElement:Module statement expected + PsiIdentifier:junk('junk') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Name0.txt b/java/java-tests/testData/psi/parser-partial/modules/Name0.txt new file mode 100644 index 000000000000..b9d1eb1c7a3b --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Name0.txt @@ -0,0 +1,13 @@ +PsiJavaFile:Name0.java + PsiJavaModule:A. + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiJavaToken:DOT('.') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Name1.txt b/java/java-tests/testData/psi/parser-partial/modules/Name1.txt new file mode 100644 index 000000000000..5bad3c9f4ff0 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Name1.txt @@ -0,0 +1,15 @@ +PsiJavaFile:Name1.java + PsiJavaModule:A..B + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiJavaToken:DOT('.') + PsiErrorElement:Identifier expected + + PsiJavaToken:DOT('.') + PsiIdentifier:B('B') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Name2.txt b/java/java-tests/testData/psi/parser-partial/modules/Name2.txt new file mode 100644 index 000000000000..da0c180391f1 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Name2.txt @@ -0,0 +1,14 @@ +PsiJavaFile:Name2.java + PsiJavaModule:AB + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiErrorElement:'.' expected + + PsiWhiteSpace(' ') + PsiIdentifier:B('B') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides0.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides0.txt new file mode 100644 index 000000000000..6ec138ac9868 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides0.txt @@ -0,0 +1,15 @@ +PsiJavaFile:Provides0.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiErrorElement:Class reference expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides1.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides1.txt new file mode 100644 index 000000000000..8c10a032550b --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides1.txt @@ -0,0 +1,20 @@ +PsiJavaFile:Provides1.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiErrorElement:'with' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides2.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides2.txt new file mode 100644 index 000000000000..10718b06e4ad --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides2.txt @@ -0,0 +1,22 @@ +PsiJavaFile:Provides2.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiErrorElement:'with' expected + + PsiWhiteSpace(' ') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides3.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides3.txt new file mode 100644 index 000000000000..91ee40594fa4 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides3.txt @@ -0,0 +1,22 @@ +PsiJavaFile:Provides3.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:with('with') + PsiErrorElement:Class reference expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides4.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides4.txt new file mode 100644 index 000000000000..d7cef1bebdae --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides4.txt @@ -0,0 +1,24 @@ +PsiJavaFile:Provides4.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:with('with') + PsiErrorElement:Class reference expected + + PsiWhiteSpace(' ') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides5.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides5.txt new file mode 100644 index 000000000000..bec8663133d9 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides5.txt @@ -0,0 +1,27 @@ +PsiJavaFile:Provides5.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:with('with') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Impl + PsiIdentifier:Impl('Impl') + PsiReferenceParameterList + + PsiErrorElement:';' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Provides6.txt b/java/java-tests/testData/psi/parser-partial/modules/Provides6.txt new file mode 100644 index 000000000000..50a7e2928fb8 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Provides6.txt @@ -0,0 +1,26 @@ +PsiJavaFile:Provides6.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiProvidesStatement + PsiKeyword:provides('provides') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Spi + PsiIdentifier:Spi('Spi') + PsiReferenceParameterList + + PsiWhiteSpace(' ') + PsiKeyword:with('with') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:Impl + PsiIdentifier:Impl('Impl') + PsiReferenceParameterList + + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Requires0.txt b/java/java-tests/testData/psi/parser-partial/modules/Requires0.txt new file mode 100644 index 000000000000..21e724c42264 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Requires0.txt @@ -0,0 +1,15 @@ +PsiJavaFile:Requires0.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiRequiresStatement + PsiKeyword:requires('requires') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Requires1.txt b/java/java-tests/testData/psi/parser-partial/modules/Requires1.txt new file mode 100644 index 000000000000..7f94a56601d7 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Requires1.txt @@ -0,0 +1,18 @@ +PsiJavaFile:Requires1.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiRequiresStatement + PsiKeyword:requires('requires') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiErrorElement:';' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Requires2.txt b/java/java-tests/testData/psi/parser-partial/modules/Requires2.txt new file mode 100644 index 000000000000..d6ac64b9e903 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Requires2.txt @@ -0,0 +1,19 @@ +PsiJavaFile:Requires2.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiRequiresStatement + PsiKeyword:requires('requires') + PsiWhiteSpace(' ') + PsiKeyword:public('public') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Requires3.txt b/java/java-tests/testData/psi/parser-partial/modules/Requires3.txt new file mode 100644 index 000000000000..af6548ceb44b --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Requires3.txt @@ -0,0 +1,21 @@ +PsiJavaFile:Requires3.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiRequiresStatement + PsiKeyword:requires('requires') + PsiErrorElement:Identifier expected + + PsiWhiteSpace(' ') + PsiErrorElement:Module statement expected + PsiKeyword:private('private') + PsiWhiteSpace(' ') + PsiIdentifier:X('X') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Requires4.txt b/java/java-tests/testData/psi/parser-partial/modules/Requires4.txt new file mode 100644 index 000000000000..1390ce9d7974 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Requires4.txt @@ -0,0 +1,23 @@ +PsiJavaFile:Requires4.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiRequiresStatement + PsiKeyword:requires('requires') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:A('A') + PsiErrorElement:';' expected + + PsiErrorElement:Module statement expected + PsiJavaToken:COMMA(',') + PsiWhiteSpace(' ') + PsiIdentifier:B('B') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Semicolons.txt b/java/java-tests/testData/psi/parser-partial/modules/Semicolons.txt new file mode 100644 index 000000000000..6d2ea151d727 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Semicolons.txt @@ -0,0 +1,14 @@ +PsiJavaFile:Semicolons.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:SEMICOLON(';') + PsiJavaToken:SEMICOLON(';') + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Simple0.txt b/java/java-tests/testData/psi/parser-partial/modules/Simple0.txt new file mode 100644 index 000000000000..05ed35f89261 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Simple0.txt @@ -0,0 +1,10 @@ +PsiJavaFile:Simple0.java + PsiJavaModule:M1 + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M1('M1') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Simple1.txt b/java/java-tests/testData/psi/parser-partial/modules/Simple1.txt new file mode 100644 index 000000000000..0f6a0cdea9c5 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Simple1.txt @@ -0,0 +1,17 @@ +PsiJavaFile:Simple1.java + PsiJavaModule:a.b.c + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:a('a') + PsiJavaToken:DOT('.') + PsiIdentifier:b('b') + PsiJavaToken:DOT('.') + PsiWhiteSpace(' ') + PsiComment(C_STYLE_COMMENT)('/*here!*/') + PsiWhiteSpace(' ') + PsiIdentifier:c('c') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Simple2.txt b/java/java-tests/testData/psi/parser-partial/modules/Simple2.txt new file mode 100644 index 000000000000..0d063633fd88 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Simple2.txt @@ -0,0 +1,12 @@ +PsiJavaFile:Simple2.java + PsiComment(C_STYLE_COMMENT)('/* comment */') + PsiWhiteSpace('\n') + PsiJavaModule:X + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:X('X') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Uses0.txt b/java/java-tests/testData/psi/parser-partial/modules/Uses0.txt new file mode 100644 index 000000000000..f25790b6488e --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Uses0.txt @@ -0,0 +1,15 @@ +PsiJavaFile:Uses0.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiUsesStatement + PsiKeyword:uses('uses') + PsiErrorElement:Class reference expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Uses1.txt b/java/java-tests/testData/psi/parser-partial/modules/Uses1.txt new file mode 100644 index 000000000000..e2ae73b60f7a --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Uses1.txt @@ -0,0 +1,20 @@ +PsiJavaFile:Uses1.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiUsesStatement + PsiKeyword:uses('uses') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:C + PsiIdentifier:C('C') + PsiReferenceParameterList + + PsiErrorElement:';' expected + + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/psi/parser-partial/modules/Uses2.txt b/java/java-tests/testData/psi/parser-partial/modules/Uses2.txt new file mode 100644 index 000000000000..592240f406f2 --- /dev/null +++ b/java/java-tests/testData/psi/parser-partial/modules/Uses2.txt @@ -0,0 +1,39 @@ +PsiJavaFile:Uses2.java + PsiJavaModule:M + PsiKeyword:module('module') + PsiWhiteSpace(' ') + PsiJavaModuleReference + PsiIdentifier:M('M') + PsiWhiteSpace(' ') + PsiJavaToken:LBRACE('{') + PsiWhiteSpace(' ') + PsiUsesStatement + PsiKeyword:uses('uses') + PsiWhiteSpace(' ') + PsiJavaCodeReferenceElement:java.nio.file.spi.FileSystemProvider + PsiJavaCodeReferenceElement:java.nio.file.spi + PsiJavaCodeReferenceElement:java.nio.file + PsiJavaCodeReferenceElement:java.nio + PsiJavaCodeReferenceElement:java + PsiIdentifier:java('java') + PsiReferenceParameterList + + PsiJavaToken:DOT('.') + PsiIdentifier:nio('nio') + PsiReferenceParameterList + + PsiJavaToken:DOT('.') + PsiIdentifier:file('file') + PsiReferenceParameterList + + PsiJavaToken:DOT('.') + PsiIdentifier:spi('spi') + PsiReferenceParameterList + + PsiJavaToken:DOT('.') + PsiIdentifier:FileSystemProvider('FileSystemProvider') + PsiReferenceParameterList + + PsiJavaToken:SEMICOLON(';') + PsiWhiteSpace(' ') + PsiJavaToken:RBRACE('}') \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/changeSignature/ConflictForUsedParametersInMethodBody.java b/java/java-tests/testData/refactoring/changeSignature/ConflictForUsedParametersInMethodBody.java new file mode 100644 index 000000000000..795a694e88a9 --- /dev/null +++ b/java/java-tests/testData/refactoring/changeSignature/ConflictForUsedParametersInMethodBody.java @@ -0,0 +1,9 @@ +class A { + void foo(int i) {} +} + +class B extends A { + void foo(int i) { + System.out.println(i); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/changeSignature/DelegateWithoutChangesWarnAboutSameMethodInClass.java b/java/java-tests/testData/refactoring/changeSignature/DelegateWithoutChangesWarnAboutSameMethodInClass.java new file mode 100644 index 000000000000..d42d9a529df1 --- /dev/null +++ b/java/java-tests/testData/refactoring/changeSignature/DelegateWithoutChangesWarnAboutSameMethodInClass.java @@ -0,0 +1,3 @@ +class A { + void m() {} +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/changeSignature/DuplicatedSignatureInInheritor.java b/java/java-tests/testData/refactoring/changeSignature/DuplicatedSignatureInInheritor.java new file mode 100644 index 000000000000..31ca5dfddf90 --- /dev/null +++ b/java/java-tests/testData/refactoring/changeSignature/DuplicatedSignatureInInheritor.java @@ -0,0 +1,8 @@ +class A { + void foo() {} +} + +class B extends A { + void foo() {} + void foo(int i) {} +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt.java b/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt.java new file mode 100644 index 000000000000..703db8121018 --- /dev/null +++ b/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt.java @@ -0,0 +1,5 @@ +class Test { + void foo() { + String s = "5+5"; + } +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt_after.java b/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt_after.java new file mode 100644 index 000000000000..265a1f949ceb --- /dev/null +++ b/java/java-tests/testData/refactoring/introduceConstant/PartialStringLiteralConvertibleToInt_after.java @@ -0,0 +1,7 @@ +class Test { + public static final String xxx = "+5"; + + void foo() { + String s = "5" + xxx; + } +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt.java b/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt.java new file mode 100644 index 000000000000..540dbb0b0c92 --- /dev/null +++ b/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt.java @@ -0,0 +1,8 @@ +class Test { + void print(Stirng s) { + } + + void foo() { + print("5"); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt_after.java b/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt_after.java new file mode 100644 index 000000000000..c624b14f7faa --- /dev/null +++ b/java/java-tests/testData/refactoring/introduceConstant/StringLiteralConvertibleToInt_after.java @@ -0,0 +1,10 @@ +class Test { + public static final String xxx = "5"; + + void print(Stirng s) { + } + + void foo() { + print(xxx); + } +} \ No newline at end of file diff --git a/java/java-tests/testData/refactoring/introduceVariable/SubPrimitiveLiteral.after.java b/java/java-tests/testData/refactoring/introduceVariable/SubPrimitiveLiteral.after.java index 63c604c9c62e..714a0a66a301 100644 --- a/java/java-tests/testData/refactoring/introduceVariable/SubPrimitiveLiteral.after.java +++ b/java/java-tests/testData/refactoring/introduceVariable/SubPrimitiveLiteral.after.java @@ -1,6 +1,6 @@ class A { public void test() { - boolean str = true; + String str = "true"; String s = "ss" + str; } } \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/actions/ReformatCodeActionInEditorTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/actions/ReformatCodeActionInEditorTest.java index 4ba5471b93a0..0f1022bbc38b 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/actions/ReformatCodeActionInEditorTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/actions/ReformatCodeActionInEditorTest.java @@ -31,8 +31,12 @@ public class ReformatCodeActionInEditorTest extends LightPlatformCodeInsightFixt @Override public void tearDown() throws Exception { - myFixture.getFile().putUserData(FormatChangedTextUtil.TEST_REVISION_CONTENT, null); - super.tearDown(); + try { + myFixture.getFile().putUserData(FormatChangedTextUtil.TEST_REVISION_CONTENT, null); + } + finally { + super.tearDown(); + } } public void doTest(LayoutCodeOptions options) { diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java index 96adb6afc01b..1d52f336b2f7 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk6Test.java @@ -75,4 +75,7 @@ public class LightAdvHighlightingJdk6Test extends LightDaemonAnalyzerTestCase { public void testVariableUsedBeforeAssignmentWithParenthesis() { doTest(false, false); } + public void testThisInArgListOfAnonymous() { + doTest(false, false); + } } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk8Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk8Test.java index dc3c391ef218..4c1ab97d7bfd 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk8Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/LightAdvHighlightingJdk8Test.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -49,4 +49,5 @@ public class LightAdvHighlightingJdk8Test extends LightDaemonAnalyzerTestCase { public void testUsedMethodsByMethodReferences() { enableInspectionTool(new UnusedDeclarationInspection()); doTest(true, true); } public void testLambdaExpressions() { doTest(false, true); } public void testUnsupportedFeatures() { doTest(false, false); } -} + public void testModulesNotSupported() { doTest(false, false); } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ModuleHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ModuleHighlightingTest.java new file mode 100644 index 000000000000..87f3f936866b --- /dev/null +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/ModuleHighlightingTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2000-2016 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; + +import com.intellij.openapi.application.WriteAction; +import com.intellij.openapi.vfs.VfsUtil; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.testFramework.LightPlatformTestCase; +import com.intellij.testFramework.LightProjectDescriptor; +import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; +import org.jetbrains.annotations.NotNull; + +import java.io.IOException; + +public class ModuleHighlightingTest extends LightCodeInsightFixtureTestCase { + @NotNull + @Override + protected LightProjectDescriptor getProjectDescriptor() { + return JAVA_9; + } + + public void testWrongFileName() { + myFixture.configureByText("M.java", "/* ... */ module M { }"); + myFixture.checkHighlighting(); + } + + public void testFileDuplicate() throws IOException { + myFixture.configureFromExistingVirtualFile(WriteAction.compute(() -> { + VirtualFile file = LightPlatformTestCase.getSourceRoot().createChildDirectory(this, "pkg").createChildData(this, "module-info.java"); + VfsUtil.saveText(file, "module M { }"); + return file; + })); + myFixture.configureByText("module-info.java", "module M { }"); + myFixture.checkHighlighting(); + } + + public void testWrongFileLocation() throws IOException { + myFixture.configureFromExistingVirtualFile(WriteAction.compute(() -> { + VirtualFile file = LightPlatformTestCase.getSourceRoot().createChildDirectory(this, "pkg").createChildData(this, "module-info.java"); + VfsUtil.saveText(file, "module M { }"); + return file; + })); + myFixture.checkHighlighting(); + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java index 0c929899f9bc..82d2f2e7151f 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GenericsHighlighting8Test.java @@ -998,4 +998,12 @@ public class GenericsHighlighting8Test extends LightDaemonAnalyzerTestCase { public void testErasureOfReturnTypeOfNonGenericMethod() throws Exception { doTest(); } + + public void testUncheckedCastWithCapturedWildcards() throws Exception { + doTest(true); + } + + public void testReifiableCapturedWildcards() throws Exception { + doTest(true); + } } diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java index 5dafb947bfdd..2e8a7bd62059 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInsight/daemon/lambda/GraphInferenceHighlightingTest.java @@ -18,6 +18,7 @@ package com.intellij.codeInsight.daemon.lambda; import com.intellij.codeInsight.daemon.LightDaemonAnalyzerTestCase; import com.intellij.codeInsight.daemon.impl.HighlightInfo; import com.intellij.codeInspection.uncheckedWarnings.UncheckedWarningLocalInspection; +import com.intellij.idea.Bombed; import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.projectRoots.JavaSdkVersion; import com.intellij.openapi.projectRoots.Sdk; @@ -26,6 +27,7 @@ import com.intellij.testFramework.IdeaTestUtil; import org.jetbrains.annotations.NonNls; import java.util.ArrayList; +import java.util.Calendar; import java.util.Collection; import java.util.List; @@ -476,6 +478,11 @@ public class GraphInferenceHighlightingTest extends LightDaemonAnalyzerTestCase doTest(); } + @Bombed(month = Calendar.AUGUST, day = 30, user = "ann") + public void testResolutionOrderForVariableCycles() throws Exception { + doTest(); + } + private void doTest() throws Exception { doTest(false); } diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/DefUseTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/DefUseTest.java index f5381b03f6c6..62ddd52b6d8a 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/DefUseTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/DefUseTest.java @@ -17,8 +17,11 @@ package com.intellij.codeInspection; import com.intellij.JavaTestUtil; import com.intellij.codeInspection.defUse.DefUseInspection; +import com.intellij.idea.Bombed; import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase; +import java.util.Calendar; + public class DefUseTest extends LightCodeInsightFixtureTestCase { @Override protected String getBasePath() { @@ -35,6 +38,8 @@ public class DefUseTest extends LightCodeInsightFixtureTestCase { public void testUsedInArrayInitializer() { doTest(); } public void testHang() { doTest(); } public void testOperatorAssignment() { doTest(); } + @Bombed(user="roman.shevchenko@jetbrains.com", day=1, month=Calendar.AUGUST, year=2017) public void testTryWithFinally() { doTest(); } + public void testTryWithoutFinally() { doTest(); } private void doTest() { myFixture.enableInspections(new DefUseInspection()); diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/OfflineInspectionResultViewTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/OfflineInspectionResultViewTest.java index 1d86348d7a62..b4411ae29003 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/OfflineInspectionResultViewTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/OfflineInspectionResultViewTest.java @@ -157,7 +157,7 @@ public class OfflineInspectionResultViewTest extends TestSourceBasedTestCase { " -\n" + " -Test\n" + " -m()\n" + - " Identical qualifier and argument to 'equals()' call\n" + + " 'equals()' called on itself\n" + " -null\n" + " Identical qualifier and argument to equals() call\n" + " -" + myUnusedToolWrapper + "\n" @@ -195,10 +195,10 @@ public class OfflineInspectionResultViewTest extends TestSourceBasedTestCase { " -\n" + " -Test\n" + " -m()\n" + - " Identical qualifier and argument to 'equals()' call\n" + + " 'equals()' called on itself\n" + " -Test2\n" + " -m123()\n" + - " Identical qualifier and argument to 'equals()' call\n" + " 'equals()' called on itself\n" + " -" + myUnusedToolWrapper + "\n" + " -" + getModule().toString() + "\n" + " -\n" @@ -223,9 +223,9 @@ public class OfflineInspectionResultViewTest extends TestSourceBasedTestCase { + " -Probable bugs\n" + " -" + myDataFlowToolWrapper + "\n" + " -Test\n" + - " Identical qualifier and argument to 'equals()' call\n" + + " 'equals()' called on itself\n" + " -Test2\n" + - " Identical qualifier and argument to 'equals()' call\n" + " 'equals()' called on itself\n" + " -" + myUnusedToolWrapper + "\n" + " -Test\n" + " " + varMessage("j") + "\n" @@ -253,9 +253,9 @@ public class OfflineInspectionResultViewTest extends TestSourceBasedTestCase { + " -Probable bugs\n" + " -" + myDataFlowToolWrapper + "\n" + " -Test\n" + - " Identical qualifier and argument to 'equals()' call\n" + + " 'equals()' called on itself\n" + " -Test2\n" + - " Identical qualifier and argument to 'equals()' call\n" + " 'equals()' called on itself\n" + " -" + myUnusedToolWrapper + "\n" + " -Test\n" + " " + varMessage("j") + "\n" diff --git a/java/java-tests/testSrc/com/intellij/lang/java/parser/partial/ModuleParserTest.java b/java/java-tests/testSrc/com/intellij/lang/java/parser/partial/ModuleParserTest.java new file mode 100644 index 000000000000..513adcc8dd68 --- /dev/null +++ b/java/java-tests/testSrc/com/intellij/lang/java/parser/partial/ModuleParserTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2000-2016 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.lang.java.parser.partial; + +import com.intellij.lang.java.parser.JavaParser; +import com.intellij.lang.java.parser.JavaParsingTestCase; + +public class ModuleParserTest extends JavaParsingTestCase { + public ModuleParserTest() { + super("parser-partial/modules"); + } + + public void testSimple0() { doParserTest("module M1 { }"); } + public void testSimple1() { doParserTest("module a.b. /*here!*/ c { }"); } + public void testSimple2() { doParserTest("/* comment */\nmodule X { }"); } + + public void testName0() { doParserTest("module A. { }"); } + public void testName1() { doParserTest("module A..B { }"); } + public void testName2() { doParserTest("module A B { }"); } + + public void testIncomplete0() { doParserTest("module"); } + public void testIncomplete1() { doParserTest("module X"); } + public void testIncomplete2() { doParserTest("module {"); } + public void testIncomplete3() { doParserTest("module X {"); } + public void testIncomplete4() { doParserTest("module X { junk"); } + + public void testBadContent() { doParserTest("module X {\n some junk\n}"); } + public void testExtras() { doParserTest("module one { }\nmodule another { }"); } + public void testSemicolons() { doParserTest("module M { ;;; }"); } + + public void testRequires0() { doParserTest("module M { requires }"); } + public void testRequires1() { doParserTest("module M { requires X }"); } + public void testRequires2() { doParserTest("module M { requires public X; }"); } + public void testRequires3() { doParserTest("module M { requires private X; }"); } + public void testRequires4() { doParserTest("module M { requires A, B; }"); } + + public void testExports0() { doParserTest("module M { exports }"); } + public void testExports1() { doParserTest("module M { exports pkg }"); } + public void testExports2() { doParserTest("module M { exports pkg; }"); } + public void testExports3() { doParserTest("module M { exports pkg to }"); } + public void testExports4() { doParserTest("module M { exports pkg to ; }"); } + public void testExports5() { doParserTest("module M { exports pkg to A }"); } + public void testExports6() { doParserTest("module M { exports pkg to A, }"); } + public void testExports7() { doParserTest("module M { exports pkg to A, ; }"); } + public void testExports8() { doParserTest("module M { exports pkg to , B; }"); } + + public void testUses0() { doParserTest("module M { uses }"); } + public void testUses1() { doParserTest("module M { uses C }"); } + public void testUses2() { doParserTest("module M { uses java.nio.file.spi.FileSystemProvider; }"); } + + public void testProvides0() { doParserTest("module M { provides }"); } + public void testProvides1() { doParserTest("module M { provides Spi }"); } + public void testProvides2() { doParserTest("module M { provides Spi ; }"); } + public void testProvides3() { doParserTest("module M { provides Spi with }"); } + public void testProvides4() { doParserTest("module M { provides Spi with ; }"); } + public void testProvides5() { doParserTest("module M { provides Spi with Impl }"); } + public void testProvides6() { doParserTest("module M { provides Spi with Impl; }"); } + + private void doParserTest(String text) { + doParserTest(text, builder -> JavaParser.INSTANCE.getFileParser().parse(builder)); + } +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/psi/StubAstSwitchTest.groovy b/java/java-tests/testSrc/com/intellij/psi/StubAstSwitchTest.groovy index a5852ce9ed1e..7de0d9894a06 100644 --- a/java/java-tests/testSrc/com/intellij/psi/StubAstSwitchTest.groovy +++ b/java/java-tests/testSrc/com/intellij/psi/StubAstSwitchTest.groovy @@ -116,11 +116,14 @@ class A { Object field = new B() { void foo(Object o) { } + + class MyInner extends Inner {} }; } class B { void foo(Object o) {} + static class Inner {} } """) assert !file.contentsLoaded @@ -138,6 +141,8 @@ class B { assert !file.contentsLoaded assert bClass == override.containingClass.superClass + assert bClass.innerClasses[0] == override.containingClass.innerClasses[0].superClass + assert !file.contentsLoaded } public void "test AST can be gc-ed and recreated"() { diff --git a/java/java-tests/testSrc/com/intellij/psi/formatter/java/AbstractJavaFormatterTest.java b/java/java-tests/testSrc/com/intellij/psi/formatter/java/AbstractJavaFormatterTest.java index c203240abd30..c5bc370dcf4b 100644 --- a/java/java-tests/testSrc/com/intellij/psi/formatter/java/AbstractJavaFormatterTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/formatter/java/AbstractJavaFormatterTest.java @@ -34,7 +34,6 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.*; import com.intellij.testFramework.LightIdeaTestCase; import com.intellij.util.IncorrectOperationException; -import com.intellij.util.containers.ContainerUtil; import com.intellij.util.text.LineReader; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; @@ -83,7 +82,7 @@ public abstract class AbstractJavaFormatterTest extends LightIdeaTestCase { return result.toString(); } - protected enum Action {REFORMAT, INDENT, REFORMAT_WITH_CONTEXT} + protected enum Action {REFORMAT, INDENT, REFORMAT_WITH_CONTEXT, REFORMAT_WITH_INSERTED_LINE_CONTEXT} public static JavaCodeStyleSettings getJavaSettings() { return getSettings().getRootSettings().getCustomSettings(JavaCodeStyleSettings.class); @@ -110,8 +109,20 @@ public abstract class AbstractJavaFormatterTest extends LightIdeaTestCase { ACTIONS.put(Action.REFORMAT_WITH_CONTEXT, new TestFormatAction() { @Override public void run(PsiFile psiFile, int startOffset, int endOffset) { - List ranges = ContainerUtil.newArrayList(new TextRange(startOffset, endOffset)); - CodeStyleManager.getInstance(getProject()).reformatTextWithContext(psiFile, ranges); + SimpleFormatRangesInfo info = new SimpleFormatRangesInfo(new TextRange(startOffset, endOffset)); + CodeStyleManager.getInstance(getProject()).reformatTextWithContext(psiFile, info); + } + }); + ACTIONS.put(Action.REFORMAT_WITH_INSERTED_LINE_CONTEXT, new TestFormatAction() { + @Override + public void run(PsiFile psiFile, int startOffset, int endOffset) { + SimpleFormatRangesInfo info = new SimpleFormatRangesInfo(new TextRange(startOffset, endOffset)) { + @Override + public boolean isOnInsertedLine(int offset) { + return startOffset <= offset && offset < endOffset; + } + }; + CodeStyleManager.getInstance(getProject()).reformatTextWithContext(psiFile, info); } }); } diff --git a/java/java-tests/testSrc/com/intellij/psi/formatter/java/FormatWithContextTest.kt b/java/java-tests/testSrc/com/intellij/psi/formatter/java/FormatWithContextTest.kt new file mode 100644 index 000000000000..bb4e1a6e2bd7 --- /dev/null +++ b/java/java-tests/testSrc/com/intellij/psi/formatter/java/FormatWithContextTest.kt @@ -0,0 +1,117 @@ +/* + * Copyright 2000-2016 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.psi.formatter.java + +import com.intellij.openapi.util.TextRange +import com.intellij.openapi.util.registry.Registry + + +class FormatWithContextTest : AbstractJavaFormatterTest() { + + fun check(before: String, after: String) { + doTextTest(Action.REFORMAT_WITH_INSERTED_LINE_CONTEXT, before, after) + } + + override fun setUp() { + super.setUp() + Registry.get("smart.reformat.vcs.changes").setValue(true) + } + + override fun tearDown() { + Registry.get("smart.reformat.vcs.changes").setValue(false) + super.tearDown() + } + + fun `test if block`() { + myLineRange = TextRange(3, 3) + check( + """ +class X { + void test() { + if (1 > 2) { + int a = 2; + int b = 3; + } + } +} +""", + """ +class X { + void test() { + if (1 > 2) { + int a = 2; + int b = 3; + } + } +} +""" + ) + } + + fun `test for block`() { + myLineRange = TextRange(3, 3) + check( + """ +class X { + void test() { + for (int i = 0; i < 3; i++) { + int a = 2; + int b = 3; + } + } +} +""", + """ +class X { + void test() { + for (int i = 0; i < 3; i++) { + int a = 2; + int b = 3; + } + } +} +""" + ) + } + + fun `test while block`() { + myLineRange = TextRange(3, 3) + check( + """ +class X { + void test() { + while (true) { + int a = 2; + int b = 3; + } + } +} +""", + """ +class X { + void test() { + while (true) { + int a = 2; + int b = 3; + } + } +} +""" + ) + } + + +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/psi/formatter/java/IndentRangesCalculatorTest.kt b/java/java-tests/testSrc/com/intellij/psi/formatter/java/IndentRangesCalculatorTest.kt new file mode 100644 index 000000000000..87f4f40472bb --- /dev/null +++ b/java/java-tests/testSrc/com/intellij/psi/formatter/java/IndentRangesCalculatorTest.kt @@ -0,0 +1,47 @@ +/* + * Copyright 2000-2016 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.psi.formatter.java + +import com.intellij.openapi.util.TextRange +import com.intellij.psi.formatter.IndentRangesCalculator +import com.intellij.testFramework.LightPlatformCodeInsightTestCase +import org.assertj.core.api.Assertions.assertThat + +class IndentRangesCalculatorTest: LightPlatformCodeInsightTestCase() { + + fun `test simple ranges calculation`() { + configureFromFileText( + "test.txt", +"""class Test { + void foo() { + if (1 > 2) { + int a = 3; + } + } +} +""") + + val document = myEditor.document + val calculator = IndentRangesCalculator(document, TextRange(32, 67)) + val ranges = calculator.calcIndentRanges() + + assertThat(ranges).hasSize(3) + assertThat(ranges[0]).isEqualTo(TextRange(28, 32)) + assertThat(ranges[1]).isEqualTo(TextRange(45, 51)) + assertThat(ranges[2]).isEqualTo(TextRange(62, 66)) + } + +} \ No newline at end of file diff --git a/java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterTest.java b/java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterTest.java index d6f4cb219f07..1ac38560d441 100644 --- a/java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/formatter/java/JavaFormatterTest.java @@ -109,6 +109,18 @@ public class JavaFormatterTest extends AbstractJavaFormatterTest { "}" ); } + + public void test_format_only_selected_range() { + myTextRange = new TextRange(18, 19); + doTextTest( + "public class X {\n" + + " public int a = 2;\n" + + "}", + "public class X {\n" + + " public int a = 2;\n" + + "}" + ); + } public void testNew() throws Exception { final CommonCodeStyleSettings settings = getSettings(); diff --git a/java/java-tests/testSrc/com/intellij/psi/formatter/performance/JavaSmartReformatPerformanceTest.java b/java/java-tests/testSrc/com/intellij/psi/formatter/performance/JavaSmartReformatPerformanceTest.java index 9f93742199a5..4bfd890cf850 100644 --- a/java/java-tests/testSrc/com/intellij/psi/formatter/performance/JavaSmartReformatPerformanceTest.java +++ b/java/java-tests/testSrc/com/intellij/psi/formatter/performance/JavaSmartReformatPerformanceTest.java @@ -22,6 +22,7 @@ import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleManager; +import com.intellij.psi.codeStyle.SimpleFormatRangesInfo; import com.intellij.psi.formatter.java.AbstractJavaFormatterTest; import com.intellij.testFramework.PlatformTestUtil; import com.intellij.util.ThrowableRunnable; @@ -72,7 +73,7 @@ public class JavaSmartReformatPerformanceTest extends AbstractJavaFormatterTest return () -> CommandProcessor.getInstance().executeCommand( getProject(), () -> ApplicationManager.getApplication().runWriteAction( - () -> codeStyleManager.reformatTextWithContext(file, ranges) + () -> codeStyleManager.reformatTextWithContext(file, new SimpleFormatRangesInfo(ranges)) ), null, null); diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java index c4dc509264e6..d04f12b4684e 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureGestureTest.java @@ -169,7 +169,13 @@ public class ChangeSignatureGestureTest extends LightCodeInsightFixtureTestCase } public void testDeleteParamInSuperUsed() { - doDeleteTest(); + try { + BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(true); + doDeleteTest(); + } + finally { + BaseRefactoringProcessor.ConflictsInTestsException.setTestIgnore(false); + } } private void doDeleteTest() { diff --git a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java index a7b35003e2f0..d846f6ba27df 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/ChangeSignatureTest.java @@ -52,6 +52,30 @@ public class ChangeSignatureTest extends ChangeSignatureBaseTest { catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { } } + public void testDelegateWithoutChangesWarnAboutSameMethodInClass() throws Exception { + try { + doTest(null, new ParameterInfoImpl[0], true); + fail("Conflict expected"); + } + catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { } + } + + public void testDuplicatedSignatureInInheritor() throws Exception { + try { + doTest(null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "i", PsiType.INT)}, true); + fail("Conflict expected"); + } + catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { } + } + + public void testConflictForUsedParametersInMethodBody() throws Exception { + try { + doTest(null, new ParameterInfoImpl[0], true); + fail("Conflict expected"); + } + catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { } + } + public void testGenericTypes() { doTest(null, null, "T", method -> new ParameterInfoImpl[]{ new ParameterInfoImpl(-1, "x", myFactory.createTypeFromText("T", method.getParameterList()), "null"), diff --git a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceConstantTest.java b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceConstantTest.java index 4baa4bdb3ca9..b92d69600d9f 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceConstantTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceConstantTest.java @@ -75,6 +75,18 @@ public class IntroduceConstantTest extends LightCodeInsightTestCase { checkResultByFile(BASE_PATH + getTestName(false) + "_after.java"); } + public void testPartialStringLiteralConvertibleToInt() throws Exception { + configureByFile(BASE_PATH + getTestName(false) + ".java"); + new MockIntroduceConstantHandler(null).invoke(getProject(), getEditor(), getFile(), null); + checkResultByFile(BASE_PATH + getTestName(false) + "_after.java"); + } + + public void testStringLiteralConvertibleToInt() throws Exception { + configureByFile(BASE_PATH + getTestName(false) + ".java"); + new MockIntroduceConstantHandler(null).invoke(getProject(), getEditor(), getFile(), null); + checkResultByFile(BASE_PATH + getTestName(false) + "_after.java"); + } + public void testPartialStringLiteralQualified() throws Exception { configureByFile(BASE_PATH + getTestName(false) + ".java"); final PsiClass psiClass = ((PsiJavaFile)getFile()).getClasses()[0]; diff --git a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java index 20d4e611be87..fbe86084b54a 100644 --- a/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java +++ b/java/java-tests/testSrc/com/intellij/refactoring/IntroduceVariableTest.java @@ -250,7 +250,7 @@ public class IntroduceVariableTest extends LightCodeInsightTestCase { } public void testSubPrimitiveLiteral() { - doTest(new MockIntroduceVariableHandler("str", false, false, false, "boolean")); + doTest(new MockIntroduceVariableHandler("str", false, false, false, CommonClassNames.JAVA_LANG_STRING)); } public void testArrayFromVarargs() { diff --git a/java/java-tests/testSrc/com/intellij/roots/ModuleRootManagerTestCase.java b/java/java-tests/testSrc/com/intellij/roots/ModuleRootManagerTestCase.java index adfa0b344187..ee18c631b9b4 100644 --- a/java/java-tests/testSrc/com/intellij/roots/ModuleRootManagerTestCase.java +++ b/java/java-tests/testSrc/com/intellij/roots/ModuleRootManagerTestCase.java @@ -139,6 +139,6 @@ public abstract class ModuleRootManagerTestCase extends ModuleTestCase { } protected VirtualFile getAsmJar() { - return getJarFromLibDir("asm.jar"); + return getJarFromLibDir("asm-all.jar"); } } diff --git a/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java b/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java index 9fc1fc701885..f65c3e866e8d 100644 --- a/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java +++ b/java/testFramework/src/com/intellij/testFramework/fixtures/LightCodeInsightFixtureTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -76,6 +76,17 @@ public abstract class LightCodeInsightFixtureTestCase extends UsefulTestCase { model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_8); } }; + public static final LightProjectDescriptor JAVA_9 = new DefaultLightProjectDescriptor() { + @Override + public Sdk getSdk() { + return IdeaTestUtil.getMockJdk18(); + } + + @Override + public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) { + model.getModuleExtension(LanguageLevelModuleExtension.class).setLanguageLevel(LanguageLevel.JDK_1_9); + } + }; public static final LightProjectDescriptor JAVA_LATEST = new DefaultLightProjectDescriptor(); diff --git a/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/GuavaFluentIterableConversionRule.java b/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/GuavaFluentIterableConversionRule.java index 9d6410332de1..25c369189632 100644 --- a/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/GuavaFluentIterableConversionRule.java +++ b/java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/GuavaFluentIterableConversionRule.java @@ -36,6 +36,7 @@ import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.Stack; import com.intellij.util.containers.hash.HashMap; import com.siyeh.ig.controlflow.DoubleNegationInspection; +import com.siyeh.ig.psiutils.ParenthesesUtils; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -150,8 +151,10 @@ public class GuavaFluentIterableConversionRule extends BaseGuavaTypeConversionRu } boolean isCollection = InheritanceUtil.isInheritor(PsiTypesUtil.getPsiClass(argument.getType()), CommonClassNames.JAVA_UTIL_COLLECTION); - setReplaceByString(isCollection ? "$it$.stream()" : "java.util.stream.StreamSupport.stream($it$.spliterator(), false)"); - return super.replace(expression, evaluator); + setReplaceByString(isCollection ? "($it$).stream()" : "java.util.stream.StreamSupport.stream(($it$).spliterator(), false)"); + final PsiExpression replaced = super.replace(expression, evaluator); + ParenthesesUtils.removeParentheses(replaced, false); + return replaced; } }; } else if (methodName.equals("filter")) { diff --git a/java/typeMigration/test/com/intellij/codeInsight/inspections/GuavaInspectionTest.java b/java/typeMigration/test/com/intellij/codeInsight/inspections/GuavaInspectionTest.java index df07a2ea5b09..14e9569629db 100644 --- a/java/typeMigration/test/com/intellij/codeInsight/inspections/GuavaInspectionTest.java +++ b/java/typeMigration/test/com/intellij/codeInsight/inspections/GuavaInspectionTest.java @@ -282,6 +282,10 @@ public class GuavaInspectionTest extends JavaCodeInsightFixtureTestCase { } } + public void testFluentIterableFromAndParenthesises() { + doTestAllFile(); + } + private void doTestNoQuickFixes(Class... highlightedElements) { myFixture.configureByFile(getTestName(true) + ".java"); diff --git a/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises.java b/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises.java new file mode 100644 index 000000000000..fc469e48db27 --- /dev/null +++ b/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises.java @@ -0,0 +1,9 @@ +import com.google.common.collect.FluentIterable; + +import java.util.List; + +public class Main { + void m(Object input, List transformed) { + transformed.addAll(FluentIterable.from((Iterable) input).toList()); + } +} \ No newline at end of file diff --git a/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises_after.java b/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises_after.java new file mode 100644 index 000000000000..71fed8e98ef4 --- /dev/null +++ b/java/typeMigration/testData/inspections/guava/fluentIterableFromAndParenthesises_after.java @@ -0,0 +1,9 @@ +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +public class Main { + void m(Object input, List transformed) { + transformed.addAll(StreamSupport.stream(((Iterable) input).spliterator(), false).collect(Collectors.toList())); + } +} \ No newline at end of file diff --git a/java/typeMigration/testData/inspections/guava/transformAndConcat3_after.java b/java/typeMigration/testData/inspections/guava/transformAndConcat3_after.java index fec0c7a08666..3cf1caf4cfe3 100644 --- a/java/typeMigration/testData/inspections/guava/transformAndConcat3_after.java +++ b/java/typeMigration/testData/inspections/guava/transformAndConcat3_after.java @@ -1,5 +1,4 @@ import java.util.ArrayList; -import java.util.function.Function; import java.util.stream.Stream; import java.util.stream.StreamSupport; @@ -8,19 +7,16 @@ class A { ArrayList strings = new ArrayList(); Stream it = strings.stream(); - int i = (int) it.flatMap((o) -> StreamSupport.stream(new Function>() { - @Override - public Iterable apply(String o) { - if ('a' > 2) { - return getIterable(); - } else if ('c' < 123) { - ArrayList strings1 = new ArrayList<>(); - strings1.add(o); - return strings1; - } - return null; + int i = (int) it.flatMap(o -> { + if ('a' > 2) { + return StreamSupport.stream(getIterable().spliterator(), false); + } else if ('c' < 123) { + ArrayList strings1 = new ArrayList<>(); + strings1.add(o); + return strings1.stream(); } - }.apply(o).spliterator(), false)).count(); + return null; + }).count(); } diff --git a/lib/dev/easymock-3.4-sources.jar b/lib/dev/easymock-3.4-sources.jar new file mode 100644 index 000000000000..59277aa611b1 Binary files /dev/null and b/lib/dev/easymock-3.4-sources.jar differ diff --git a/lib/dev/easymock-3.4.jar b/lib/dev/easymock-3.4.jar new file mode 100644 index 000000000000..e1118b2b2c81 Binary files /dev/null and b/lib/dev/easymock-3.4.jar differ diff --git a/lib/dev/easymock.jar b/lib/dev/easymock.jar deleted file mode 100644 index de591680c19e..000000000000 Binary files a/lib/dev/easymock.jar and /dev/null differ diff --git a/lib/dev/easymockclassextension.jar b/lib/dev/easymockclassextension.jar deleted file mode 100644 index 7d098a73c2d7..000000000000 Binary files a/lib/dev/easymockclassextension.jar and /dev/null differ diff --git a/lib/pty4j-0.7.1.jar b/lib/pty4j-0.7.1.jar new file mode 100644 index 000000000000..930f08e89f82 Binary files /dev/null and b/lib/pty4j-0.7.1.jar differ diff --git a/lib/pty4j-0.7.jar b/lib/pty4j-0.7.jar deleted file mode 100644 index 0c3d34a793f4..000000000000 Binary files a/lib/pty4j-0.7.jar and /dev/null differ diff --git a/lib/required_for_dist.txt b/lib/required_for_dist.txt index 16bce1d81e40..5cbc21b3e34c 100644 --- a/lib/required_for_dist.txt +++ b/lib/required_for_dist.txt @@ -55,7 +55,7 @@ oromatcher.jar picocontainer.jar protobuf-2.5.0.jar proxy-vole_20131209.jar -pty4j-0.7.jar +pty4j-0.7.1.jar purejavacomm.jar resolver.jar rhino-js-1_7R4.jar diff --git a/lib/src/asm-src.zip b/lib/src/asm-src.zip deleted file mode 100644 index 68995ddf62eb..000000000000 Binary files a/lib/src/asm-src.zip and /dev/null differ diff --git a/lib/src/cglib-src-2.2.2.jar b/lib/src/cglib-src-2.2.2.jar deleted file mode 100644 index ef9a73a672ef..000000000000 Binary files a/lib/src/cglib-src-2.2.2.jar and /dev/null differ diff --git a/lib/src/pty4j-0.7-src.jar b/lib/src/pty4j-0.7.1-src.jar similarity index 84% rename from lib/src/pty4j-0.7-src.jar rename to lib/src/pty4j-0.7.1-src.jar index cd45a7ab5c58..17bd4235f6e6 100644 Binary files a/lib/src/pty4j-0.7-src.jar and b/lib/src/pty4j-0.7.1-src.jar differ diff --git a/platform/analysis-impl/src/com/intellij/codeHighlighting/RainbowHighlighter.java b/platform/analysis-impl/src/com/intellij/codeHighlighting/RainbowHighlighter.java index 16eb577f0924..d44c5c9b7de5 100644 --- a/platform/analysis-impl/src/com/intellij/codeHighlighting/RainbowHighlighter.java +++ b/platform/analysis-impl/src/com/intellij/codeHighlighting/RainbowHighlighter.java @@ -15,27 +15,33 @@ */ package com.intellij.codeHighlighting; +import com.intellij.codeInsight.daemon.impl.HighlightInfo; import com.intellij.codeInsight.daemon.impl.HighlightInfoType; -import com.intellij.lang.Language; import com.intellij.lang.annotation.HighlightSeverity; import com.intellij.openapi.editor.DefaultLanguageHighlighterColors; -import com.intellij.openapi.editor.colors.TextAttributesScheme; +import com.intellij.openapi.editor.HighlighterColors; +import com.intellij.openapi.editor.colors.EditorColorsManager; +import com.intellij.openapi.editor.colors.EditorColorsScheme; +import com.intellij.openapi.editor.colors.TextAttributesKey; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.text.StringHash; -import com.intellij.util.containers.hash.HashSet; +import com.intellij.openapi.util.text.StringUtil; +import com.intellij.psi.PsiElement; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.swing.*; import java.awt.*; public class RainbowHighlighter { private final float[] myFloats; - private static final HashSet BY_PASS_LANGUAGES = new HashSet(); + @NotNull private final EditorColorsScheme myColorsScheme; + @NotNull private final Color myDefaultBackground; - public RainbowHighlighter(@NotNull TextAttributesScheme colorsScheme) { - float[] components = colorsScheme.getAttributes(DefaultLanguageHighlighterColors.CONSTANT).getForegroundColor().getRGBColorComponents(null); + public RainbowHighlighter(@Nullable EditorColorsScheme colorsScheme, @Nullable Color background) { + myColorsScheme = colorsScheme != null ? colorsScheme : EditorColorsManager.getInstance().getGlobalScheme(); + myDefaultBackground = background != null ? background : myColorsScheme.getDefaultBackground(); + float[] components = myColorsScheme.getAttributes(DefaultLanguageHighlighterColors.CONSTANT).getForegroundColor().getRGBColorComponents(null); myFloats = Color.RGBtoHSB((int)(255 * components[0]), (int)(255 * components[0]), (int)(255 * components[0]), null); } @@ -46,14 +52,6 @@ public class RainbowHighlighter { return Registry.is("editor.rainbow.identifiers", false); } - public static void registerByPassLanguage(@NotNull Language language) { - BY_PASS_LANGUAGES.add(language); - } - - public static boolean isByPassLanguage(@Nullable Language language) { - return BY_PASS_LANGUAGES.contains(language); - } - @NotNull public TextAttributes getAttributes(@NotNull String name, @NotNull TextAttributes origin) { int hash = StringHash.murmur(name, 0); @@ -62,11 +60,34 @@ public class RainbowHighlighter { //System.out.println("name = " + name + " \tv=" + v); final Color color = Color.getHSBColor(v, 0.7f, myFloats[2] + .3f); + Color bkColor = origin.getBackgroundColor(); + if (bkColor == null) { + bkColor = myColorsScheme.getAttributes(HighlighterColors.TEXT).getBackgroundColor(); + } + if (bkColor == null) { + bkColor = myDefaultBackground; + } return TextAttributes.fromFlyweight(origin .getFlyweight() .withForeground(color) //fixme: uta: foreground color is not activated for local variables without background color reset - .withBackground(UIManager.getColor("EditorPane.background")) + .withBackground(bkColor) ); } + + public HighlightInfo getInfo( + @Nullable String nameKey, + @Nullable PsiElement id, + @Nullable TextAttributesKey colorKey) { + + if (id == null || nameKey == null || StringUtil.isEmpty(nameKey)) return null; + if (colorKey == null) colorKey = DefaultLanguageHighlighterColors.LOCAL_VARIABLE; + final TextAttributes attributes = getAttributes(nameKey, myColorsScheme.getAttributes(colorKey)); + return HighlightInfo + .newHighlightInfo(RAINBOW_ELEMENT) + .textAttributes(attributes) + .range(id) + .create(); + } + } diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/RainbowProvider.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/RainbowProvider.java new file mode 100644 index 000000000000..7b6b88697f27 --- /dev/null +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/RainbowProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2000-2016 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; + +import com.intellij.codeHighlighting.RainbowHighlighter; +import com.intellij.codeInsight.daemon.impl.HighlightInfo; +import com.intellij.openapi.extensions.ExtensionPointName; +import com.intellij.openapi.extensions.Extensions; +import com.intellij.openapi.progress.ProgressIndicator; +import com.intellij.psi.PsiFile; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public interface RainbowProvider { + ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.rainbowProvider"); + + @NotNull + static RainbowProvider[] getRainbowFileProcessors() { + return Extensions.getExtensions(EP_NAME); + } + + boolean isValidContext(@NotNull final PsiFile file); + + List getHighlights(@NotNull PsiFile file, + @NotNull RainbowHighlighter highlighter, + @NotNull ProgressIndicator progress); +} diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java index 0489219294d2..4e4a9517cb9f 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java @@ -19,6 +19,7 @@ package com.intellij.codeInsight.daemon.impl; import com.intellij.codeHighlighting.RainbowHighlighter; import com.intellij.codeInsight.daemon.GutterMark; import com.intellij.codeInsight.daemon.HighlightDisplayKey; +import com.intellij.codeInsight.daemon.RainbowProvider; import com.intellij.codeInsight.intention.IntentionAction; import com.intellij.codeInsight.intention.IntentionManager; import com.intellij.codeInspection.*; @@ -48,6 +49,7 @@ import com.intellij.util.BitUtil; import com.intellij.util.containers.ContainerUtil; import com.intellij.xml.util.XmlStringUtil; import org.intellij.lang.annotations.MagicConstant; +import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -181,15 +183,26 @@ public class HighlightInfo implements Segment { TextAttributes attributes = getAttributesByType(element, type, colorsScheme); if (element != null && RainbowHighlighter.isRainbowEnabled() && - !RainbowHighlighter.isByPassLanguage(element.getLanguage()) && + !isByPass(element) && isLikeVariable(type.getAttributesKey())) { String text = element.getContainingFile().getText(); String name = text.substring(startOffset, endOffset); - attributes = new RainbowHighlighter(colorsScheme).getAttributes(name, attributes); + attributes = new RainbowHighlighter(colorsScheme, null).getAttributes(name, attributes); } return attributes; } + @Contract("null -> false") + public static boolean isByPass(@Nullable PsiElement element) { + if (element == null) return false; + PsiFile containingFile = element.getContainingFile(); + for (RainbowProvider processor : RainbowProvider.getRainbowFileProcessors()) { + if (processor.isValidContext(containingFile)) return true; + } + return false; + } + + @Contract("null -> false") private static boolean isLikeVariable(TextAttributesKey key) { if (key == null) return false; TextAttributesKey fallbackAttributeKey = key.getFallbackAttributeKey(); diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextBase.java b/platform/analysis-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextBase.java index d17301e536a5..5acac5537b17 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextBase.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/ex/GlobalInspectionContextBase.java @@ -326,7 +326,7 @@ public class GlobalInspectionContextBase extends UserDataHolderBase implements G @NotNull protected List getUsedTools() { - InspectionProfileImpl profile = new InspectionProfileImpl((InspectionProfileImpl)getCurrentProfile()); + InspectionProfileImpl profile = (InspectionProfileImpl)getCurrentProfile(); List tools = profile.getAllEnabledInspectionTools(myProject); Set dependentTools = new LinkedHashSet(); for (Tools tool : tools) { diff --git a/platform/core-api/src/com/intellij/lexer/LookAheadLexer.java b/platform/core-api/src/com/intellij/lexer/LookAheadLexer.java index 75b6ab9b4e10..c9289cc73b96 100644 --- a/platform/core-api/src/com/intellij/lexer/LookAheadLexer.java +++ b/platform/core-api/src/com/intellij/lexer/LookAheadLexer.java @@ -32,13 +32,13 @@ public abstract class LookAheadLexer extends LexerBase{ private final Queue myTypeCache; private final Queue myEndOffsetCache; - public LookAheadLexer(final Lexer baseLexer, int capacity) { + public LookAheadLexer(@NotNull Lexer baseLexer, int capacity) { myBaseLexer = baseLexer; myTypeCache = new Queue(capacity); myEndOffsetCache = new Queue(capacity); } - public LookAheadLexer(final Lexer baseLexer) { + public LookAheadLexer(@NotNull Lexer baseLexer) { this(baseLexer, 64); } @@ -52,7 +52,7 @@ public abstract class LookAheadLexer extends LexerBase{ myEndOffsetCache.addLast(endOffset); } - protected void lookAhead(Lexer baseLexer) { + protected void lookAhead(@NotNull Lexer baseLexer) { advanceLexer(baseLexer); } diff --git a/platform/core-api/src/com/intellij/openapi/application/ApplicationAdapter.java b/platform/core-api/src/com/intellij/openapi/application/ApplicationAdapter.java index d3f0abafe44c..17fffb76466c 100644 --- a/platform/core-api/src/com/intellij/openapi/application/ApplicationAdapter.java +++ b/platform/core-api/src/com/intellij/openapi/application/ApplicationAdapter.java @@ -38,4 +38,7 @@ public abstract class ApplicationAdapter implements ApplicationListener { @Override public void writeActionFinished(@NotNull Object action) { } + + public void afterWriteActionFinished(@NotNull Object action) { + } } \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/openapi/application/ApplicationListener.java b/platform/core-api/src/com/intellij/openapi/application/ApplicationListener.java index f9845687227f..7b6d71f8bf5c 100644 --- a/platform/core-api/src/com/intellij/openapi/application/ApplicationListener.java +++ b/platform/core-api/src/com/intellij/openapi/application/ApplicationListener.java @@ -45,7 +45,12 @@ public interface ApplicationListener extends EventListener { void writeActionStarted(@NotNull Object action); /** - * Is called on action finish. + * Is called on before action finish, while while lock is still being hold */ void writeActionFinished(@NotNull Object action); + + /** + * Is called after action finish and lock is released + */ + void afterWriteActionFinished(@NotNull Object action); } \ No newline at end of file diff --git a/platform/core-api/src/com/intellij/openapi/progress/EmptyProgressIndicator.java b/platform/core-api/src/com/intellij/openapi/progress/EmptyProgressIndicator.java index a5cd279b2e23..0cc94c479e04 100644 --- a/platform/core-api/src/com/intellij/openapi/progress/EmptyProgressIndicator.java +++ b/platform/core-api/src/com/intellij/openapi/progress/EmptyProgressIndicator.java @@ -20,9 +20,19 @@ import com.intellij.openapi.application.ModalityState; import org.jetbrains.annotations.NotNull; public class EmptyProgressIndicator implements StandardProgressIndicator { + @NotNull private final ModalityState myModalityState; + private volatile boolean myIsRunning; private volatile boolean myIsCanceled; + public EmptyProgressIndicator() { + this(ModalityState.defaultModalityState()); + } + + public EmptyProgressIndicator(@NotNull ModalityState modalityState) { + myModalityState = modalityState; + } + @Override public void start() { myIsRunning = true; @@ -108,7 +118,7 @@ public class EmptyProgressIndicator implements StandardProgressIndicator { @Override @NotNull public ModalityState getModalityState() { - return ModalityState.NON_MODAL; + return myModalityState; } @Override diff --git a/platform/core-api/src/com/intellij/psi/PsiInvalidElementAccessException.java b/platform/core-api/src/com/intellij/psi/PsiInvalidElementAccessException.java index d7506acaa249..62a3286e63c4 100644 --- a/platform/core-api/src/com/intellij/psi/PsiInvalidElementAccessException.java +++ b/platform/core-api/src/com/intellij/psi/PsiInvalidElementAccessException.java @@ -73,9 +73,7 @@ public class PsiInvalidElementAccessException extends RuntimeException implement element.putUserData(REPORTING_EXCEPTION, Boolean.TRUE); try { - Object trace = recursiveInvocation ? null : - element instanceof PsiFile ? getInvalidationTrace(element) : - findInvalidationTrace(element.getNode()); + Object trace = recursiveInvocation ? null : getPsiInvalidationTrace(element); myMessage = getMessageWithReason(element, message, recursiveInvocation, trace); if (trace == null) { myDiagnostic = Attachment.EMPTY_ARRAY; @@ -91,6 +89,12 @@ public class PsiInvalidElementAccessException extends RuntimeException implement } } + @Nullable + private static Object getPsiInvalidationTrace(@NotNull PsiElement element) { + Object trace = getInvalidationTrace(element); + return trace != null || element instanceof PsiFile ? trace : findInvalidationTrace(element.getNode()); + } + private static String getMessageWithReason(@NotNull PsiElement element, @Nullable String message, boolean recursiveInvocation, diff --git a/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java b/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java index ef0a4b812406..b7700789ad9d 100644 --- a/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java +++ b/platform/core-api/src/com/intellij/psi/codeStyle/CodeStyleManager.java @@ -152,8 +152,15 @@ public abstract class CodeStyleManager { * @param ranges * @throws IncorrectOperationException */ - public abstract void reformatTextWithContext(@NotNull PsiFile file, @NotNull Collection ranges) throws IncorrectOperationException; + public abstract void reformatTextWithContext(@NotNull PsiFile file, @NotNull FormatRangesInfo ranges) throws IncorrectOperationException; + /** + * @deprecated use {@link #reformatTextWithContext(PsiFile, FormatRangesInfo)} + */ + public void reformatTextWithContext(@NotNull PsiFile file, @NotNull Collection ranges) throws IncorrectOperationException { + reformatTextWithContext(file, new SimpleFormatRangesInfo(ranges)); + } + /** * Re-formats the specified range of a file, modifying only line indents and leaving * all other whitespace intact. diff --git a/platform/core-api/src/com/intellij/psi/codeStyle/FormatRangesInfo.java b/platform/core-api/src/com/intellij/psi/codeStyle/FormatRangesInfo.java new file mode 100644 index 000000000000..4157d406a89a --- /dev/null +++ b/platform/core-api/src/com/intellij/psi/codeStyle/FormatRangesInfo.java @@ -0,0 +1,32 @@ +/* + * Copyright 2000-2016 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.psi.codeStyle; + +import com.intellij.openapi.util.TextRange; +import org.jetbrains.annotations.NotNull; + +import java.util.List; + +public abstract class FormatRangesInfo { + + @NotNull + public abstract List getRangesToFormat(); + + public boolean isOnInsertedLine(int offset) { + return false; + } + +} diff --git a/platform/core-api/src/com/intellij/psi/codeStyle/SimpleFormatRangesInfo.java b/platform/core-api/src/com/intellij/psi/codeStyle/SimpleFormatRangesInfo.java new file mode 100644 index 000000000000..c57a2bbdd22d --- /dev/null +++ b/platform/core-api/src/com/intellij/psi/codeStyle/SimpleFormatRangesInfo.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2016 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.psi.codeStyle; + +import com.intellij.openapi.util.TextRange; +import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.NotNull; + +import java.util.Collection; +import java.util.List; + +public class SimpleFormatRangesInfo extends FormatRangesInfo { + + private final List myRanges; + + public SimpleFormatRangesInfo(@NotNull Collection ranges) { + myRanges = ContainerUtil.newArrayList(ranges); + } + + public SimpleFormatRangesInfo(TextRange range) { + myRanges = ContainerUtil.newArrayList(range); + } + + @NotNull + @Override + public List getRangesToFormat() { + return myRanges; + } + +} diff --git a/platform/core-api/src/org/jetbrains/concurrency/AsyncPromise.java b/platform/core-api/src/org/jetbrains/concurrency/AsyncPromise.java deleted file mode 100644 index 5874cfb9b0c4..000000000000 --- a/platform/core-api/src/org/jetbrains/concurrency/AsyncPromise.java +++ /dev/null @@ -1,363 +0,0 @@ -/* - * Copyright 2000-2015 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 org.jetbrains.concurrency; - -import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.util.Getter; -import com.intellij.util.Consumer; -import com.intellij.util.Function; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayList; -import java.util.List; - -public class AsyncPromise extends Promise implements Getter { - private static final Logger LOG = Logger.getInstance(AsyncPromise.class); - - public static final RuntimeException OBSOLETE_ERROR = Promise.createError("Obsolete"); - - private volatile Consumer done; - private volatile Consumer rejected; - - protected volatile State state = State.PENDING; - // result object or error message - private volatile Object result; - - @NotNull - @Override - public State getState() { - return state; - } - - @NotNull - @Override - public Promise done(@NotNull Consumer done) { - if (isObsolete(done)) { - return this; - } - - switch (state) { - case PENDING: - break; - case FULFILLED: - //noinspection unchecked - done.consume((T)result); - return this; - case REJECTED: - return this; - } - - this.done = setHandler(this.done, done); - return this; - } - - @NotNull - @Override - public Promise rejected(@NotNull Consumer rejected) { - if (isObsolete(rejected)) { - return this; - } - - switch (state) { - case PENDING: - break; - case FULFILLED: - return this; - case REJECTED: - rejected.consume((Throwable)result); - return this; - } - - this.rejected = setHandler(this.rejected, rejected); - return this; - } - - @Override - public T get() { - //noinspection unchecked - return state == State.FULFILLED ? (T)result : null; - } - - @SuppressWarnings("SynchronizeOnThis") - private static final class CompoundConsumer implements Consumer { - private List> consumers = new ArrayList>(); - - public CompoundConsumer(@NotNull Consumer c1, @NotNull Consumer c2) { - synchronized (this) { - consumers.add(c1); - consumers.add(c2); - } - } - - @Override - public void consume(T t) { - List> list; - synchronized (this) { - list = consumers; - consumers = null; - } - - if (list != null) { - for (Consumer consumer : list) { - if (!isObsolete(consumer)) { - consumer.consume(t); - } - } - } - } - - public void add(@NotNull Consumer consumer) { - synchronized (this) { - if (consumers != null) { - consumers.add(consumer); - } - } - } - } - - @Override - @NotNull - public Promise then(@NotNull final Function fulfilled) { - switch (state) { - case PENDING: - break; - case FULFILLED: - //noinspection unchecked - return new DonePromise(fulfilled.fun((T)result)); - case REJECTED: - return new RejectedPromise((Throwable)result); - } - - final AsyncPromise promise = new AsyncPromise(); - addHandlers(new Consumer() { - @Override - public void consume(T result) { - try { - if (fulfilled instanceof Obsolescent && ((Obsolescent)fulfilled).isObsolete()) { - promise.setError(OBSOLETE_ERROR); - } - else { - promise.setResult(fulfilled.fun(result)); - } - } - catch (Throwable e) { - promise.setError(e); - } - } - }, new Consumer() { - @Override - public void consume(Throwable error) { - promise.setError(error); - } - }); - return promise; - } - - @Override - public void notify(@NotNull final AsyncPromise child) { - LOG.assertTrue(child != this); - - switch (state) { - case PENDING: - break; - case FULFILLED: - //noinspection unchecked - child.setResult((T)result); - return; - case REJECTED: - child.setError((Throwable)result); - return; - } - - addHandlers(new Consumer() { - @Override - public void consume(T result) { - try { - child.setResult(result); - } - catch (Throwable e) { - child.setError(e); - } - } - }, new Consumer() { - @Override - public void consume(Throwable error) { - child.setError(error); - } - }); - } - - @Override - @NotNull - public Promise thenAsync(@NotNull final AsyncFunction fulfilled) { - switch (state) { - case PENDING: - break; - case FULFILLED: - //noinspection unchecked - return fulfilled.fun((T)result); - case REJECTED: - return Promise.reject((Throwable)result); - } - - final AsyncPromise promise = new AsyncPromise(); - final Consumer rejectedHandler = new Consumer() { - @Override - public void consume(Throwable error) { - promise.setError(error); - } - }; - addHandlers(new Consumer() { - @Override - public void consume(T result) { - try { - fulfilled.fun(result) - .done(new Consumer() { - @Override - public void consume(SUB_RESULT result) { - try { - promise.setResult(result); - } - catch (Throwable e) { - promise.setError(e); - } - } - }) - .rejected(rejectedHandler); - } - catch (Throwable e) { - promise.setError(e); - } - } - }, rejectedHandler); - return promise; - } - - @Override - @NotNull - public Promise processed(@NotNull final AsyncPromise fulfilled) { - switch (state) { - case PENDING: - break; - case FULFILLED: - //noinspection unchecked - fulfilled.setResult((T)result); - return this; - case REJECTED: - fulfilled.setError((Throwable)result); - return this; - } - - addHandlers(new Consumer() { - @Override - public void consume(T result) { - try { - fulfilled.setResult(result); - } - catch (Throwable e) { - fulfilled.setError(e); - } - } - }, new Consumer() { - @Override - public void consume(Throwable error) { - fulfilled.setError(error); - } - }); - return this; - } - - private void addHandlers(@NotNull Consumer done, @NotNull Consumer rejected) { - this.done = setHandler(this.done, done); - this.rejected = setHandler(this.rejected, rejected); - } - - @NotNull - private static Consumer setHandler(@Nullable Consumer oldConsumer, @NotNull Consumer newConsumer) { - if (oldConsumer == null) { - return newConsumer; - } - else if (oldConsumer instanceof CompoundConsumer) { - ((CompoundConsumer)oldConsumer).add(newConsumer); - return oldConsumer; - } - else { - return new CompoundConsumer(oldConsumer, newConsumer); - } - } - - public void setResult(T result) { - if (state != State.PENDING) { - return; - } - - this.result = result; - state = State.FULFILLED; - - Consumer done = this.done; - clearHandlers(); - if (done != null && !isObsolete(done)) { - done.consume(result); - } - } - - static boolean isObsolete(@Nullable Consumer consumer) { - return consumer instanceof Obsolescent && ((Obsolescent)consumer).isObsolete(); - } - - public boolean setError(@NotNull String error) { - return setError(Promise.createError(error)); - } - - public boolean setError(@NotNull Throwable error) { - if (state != State.PENDING) { - return false; - } - - result = error; - state = State.REJECTED; - - Consumer rejected = this.rejected; - clearHandlers(); - if (rejected != null) { - if (!isObsolete(rejected)) { - rejected.consume(error); - } - } - else { - Promise.logError(LOG, error); - } - return true; - } - - private void clearHandlers() { - done = null; - rejected = null; - } - - @Override - public Promise processed(@NotNull final Consumer processed) { - done(processed); - rejected(new Consumer() { - @Override - public void consume(Throwable error) { - processed.consume(null); - } - }); - return this; - } -} \ No newline at end of file diff --git a/platform/core-api/src/org/jetbrains/concurrency/CountDownConsumer.java b/platform/core-api/src/org/jetbrains/concurrency/CountDownConsumer.java deleted file mode 100644 index 6889676d6b94..000000000000 --- a/platform/core-api/src/org/jetbrains/concurrency/CountDownConsumer.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2000-2015 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 org.jetbrains.concurrency; - -import com.intellij.util.Consumer; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -class CountDownConsumer implements Consumer { - private volatile int countDown; - private final AsyncPromise promise; - private final T totalResult; - - public CountDownConsumer(int countDown, @NotNull AsyncPromise promise, @Nullable T totalResult) { - this.countDown = countDown; - this.promise = promise; - this.totalResult = totalResult; - } - - @Override - public void consume(T t) { - if (--countDown == 0) { - promise.setResult(totalResult); - } - } -} \ No newline at end of file diff --git a/platform/core-impl/src/com/intellij/lang/impl/PsiBuilderImpl.java b/platform/core-impl/src/com/intellij/lang/impl/PsiBuilderImpl.java index 0563e613ea61..8eb4b1298c45 100644 --- a/platform/core-impl/src/com/intellij/lang/impl/PsiBuilderImpl.java +++ b/platform/core-impl/src/com/intellij/lang/impl/PsiBuilderImpl.java @@ -1153,7 +1153,7 @@ public class PsiBuilderImpl extends UserDataHolderBase implements PsiBuilder { childNode.putUserData(BlockSupport.TREE_DEPTH_LIMIT_EXCEEDED, Boolean.TRUE); } - assert rootNode.textMatches(myText) : rootNode.getElementType(); + assert rootNode.getTextLength() == myText.length() : rootNode.getElementType(); return rootNode; } diff --git a/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java b/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java index e0956f5c5385..a902109fe94a 100644 --- a/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java +++ b/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java @@ -313,23 +313,53 @@ public class CoreProgressManager extends ProgressManager implements Disposable { runProcessWithProgressSynchronously(task, null); } else { - new TaskRunnable(task, new EmptyProgressIndicator()).run(); + runProcessWithProgressInCurrentThread(task, new EmptyProgressIndicator(), ModalityState.defaultModalityState()); } } else if (task.isModal()) { - runProcessWithProgressSynchronously(task.asModal(), null); + runSynchronously(task.asModal()); } else { final Task.Backgroundable backgroundable = task.asBackgroundable(); if (backgroundable.isConditionalModal() && !backgroundable.shouldStartInBackground()) { - runProcessWithProgressSynchronously(task, null); + runSynchronously(task); } else { - runProcessWithProgressAsynchronously(backgroundable); + runAsynchronously(backgroundable); } } } + private void runSynchronously(@NotNull final Task task) { + Runnable runnable = new Runnable() { + @Override + public void run() { + runProcessWithProgressSynchronously(task, null); + } + }; + if (ApplicationManager.getApplication().isDispatchThread()) { + runnable.run(); + } + else { + ApplicationManager.getApplication().invokeAndWait(runnable, ModalityState.defaultModalityState()); + } + } + + private void runAsynchronously(@NotNull final Task.Backgroundable task) { + Runnable runnable = new Runnable() { + @Override + public void run() { + runProcessWithProgressAsynchronously(task); + } + }; + if (ApplicationManager.getApplication().isDispatchThread()) { + runnable.run(); + } + else { + ApplicationManager.getApplication().invokeLater(runnable, ModalityState.defaultModalityState()); + } + } + @NotNull public Future runProcessWithProgressAsynchronously(@NotNull Task.Backgroundable task) { return runProcessWithProgressAsynchronously(task, new EmptyProgressIndicator(), null); @@ -339,7 +369,7 @@ public class CoreProgressManager extends ProgressManager implements Disposable { public Future runProcessWithProgressAsynchronously(@NotNull final Task.Backgroundable task, @NotNull final ProgressIndicator progressIndicator, @Nullable final Runnable continuation) { - return runProcessWithProgressAsynchronously(task, progressIndicator, continuation, ModalityState.NON_MODAL); + return runProcessWithProgressAsynchronously(task, progressIndicator, continuation, ModalityState.defaultModalityState()); } @NotNull @@ -408,6 +438,43 @@ public class CoreProgressManager extends ProgressManager implements Disposable { return result; } + public void runProcessWithProgressInCurrentThread(@NotNull final Task task, + @NotNull final ProgressIndicator progressIndicator, + @NotNull final ModalityState modalityState) { + if (progressIndicator instanceof Disposable) { + Disposer.register(ApplicationManager.getApplication(), (Disposable)progressIndicator); + } + + final Runnable process = new TaskRunnable(task, progressIndicator); + + boolean processCanceled = false; + Exception exception = null; + try { + runProcess(process, progressIndicator); + } + catch (ProcessCanceledException e) { + processCanceled = true; + } + catch (Exception e) { + exception = e; + } + + final boolean finalCanceled = processCanceled || progressIndicator.isCanceled(); + final Exception finalException = exception; + + if (ApplicationManager.getApplication().isDispatchThread()) { + finishTask(task, finalCanceled, finalException); + } + else { + ApplicationManager.getApplication().invokeAndWait(new Runnable() { + @Override + public void run() { + finishTask(task, finalCanceled, finalException); + } + }, modalityState); + } + } + static void finishTask(@NotNull Task task, boolean canceled, @Nullable Exception exception) { try { if (exception != null) { diff --git a/platform/core-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfo.java b/platform/core-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfo.java index 338666b3c341..9b6a94df3918 100644 --- a/platform/core-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfo.java +++ b/platform/core-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -17,7 +17,6 @@ package com.intellij.openapi.vfs.impl.http; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; -import org.jetbrains.concurrency.Promise; public interface RemoteFileInfo { void addDownloadingListener(@NotNull FileDownloadingListener listener); @@ -35,7 +34,4 @@ public interface RemoteFileInfo { RemoteFileState getState(); void cancelDownloading(); - - @NotNull - Promise download(); } diff --git a/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java b/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java index fadff483400f..726b279bf33d 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java +++ b/platform/core-impl/src/com/intellij/psi/impl/DebugUtil.java @@ -567,7 +567,7 @@ public class DebugUtil { } } - public static void onInvalidated(@NotNull PsiFile o) { + public static void onInvalidated(@NotNull PsiElement o) { Object trace = PsiInvalidElementAccessException.getInvalidationTrace(o); if (trace != null) return; diff --git a/platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java b/platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java index aa699ff328bf..e7cb267010f3 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java +++ b/platform/core-impl/src/com/intellij/psi/impl/DocumentCommitThread.java @@ -815,9 +815,11 @@ public class DocumentCommitThread implements Runnable, Disposable, DocumentCommi if (file.isPhysical() && !ApplicationManager.getApplication().isWriteAccessAllowed()) { VirtualFile vFile = viewProvider.getVirtualFile(); LOG.error("Write action expected" + + "; document=" + document + "; file=" + file + " of " + file.getClass() + "; file.valid=" + file.isValid() + "; file.eventSystemEnabled=" + viewProvider.isEventSystemEnabled() + + "; viewProvider=" + viewProvider + " of " + viewProvider.getClass() + "; language=" + file.getLanguage() + "; vFile=" + vFile + " of " + vFile.getClass() + "; free-threaded=" + PsiDocumentManagerBase.isFreeThreaded(vFile)); diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/AstPathPsiMap.java b/platform/core-impl/src/com/intellij/psi/impl/source/AstPathPsiMap.java index 0be43afc1577..539a68f5672d 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/AstPathPsiMap.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/AstPathPsiMap.java @@ -15,8 +15,12 @@ */ package com.intellij.psi.impl.source; -import com.intellij.concurrency.JobScheduler; import com.intellij.extapi.psi.StubBasedPsiElementBase; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Key; +import com.intellij.openapi.util.LowMemoryWatcher; +import com.intellij.openapi.util.UserDataHolderEx; +import com.intellij.psi.impl.DebugUtil; import com.intellij.psi.impl.source.tree.AstPath; import com.intellij.psi.impl.source.tree.CompositeElement; import com.intellij.reference.SoftReference; @@ -27,7 +31,6 @@ import org.jetbrains.annotations.Nullable; import java.lang.ref.ReferenceQueue; import java.lang.ref.WeakReference; import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.TimeUnit; /** * A weak cache for all instantiated stub-based PSI to allow {@link CompositeElement#getPsi()} return it when AST is reloaded.

@@ -35,27 +38,26 @@ import java.util.concurrent.TimeUnit; */ class AstPathPsiMap { /** - * Not using ConcurrentWeakValueMap because we need to clean them up as ASTs in thousands of files are created and gc-ed. - * So we have a single shared reference queue {@link MyReference#ourQueue} for that. + * Not using ConcurrentWeakValueMap because we need to clean each of them up separately, when ASTs in thousands of files are created and gc-ed. + * So we have a per-project single shared reference queue {@link #myQueue} for that. * Otherwise the files end up retaining lots of maps with all-gc-ed stuff inside, but the maps are still very large. */ private final ConcurrentMap myMap = ContainerUtil.newConcurrentMap(); - static { - JobScheduler.getScheduler().scheduleWithFixedDelay(new Runnable() { - @Override - public void run() { - // clean up AstPath objects when no PSI is accessed, e.g. after project closing - processQueue(); - } - }, 5, 5, TimeUnit.SECONDS); + private static final Key STUB_PSI_REFS = Key.create("STUB_PSI_REFS"); + private final MyReferenceQueue myQueue; + + AstPathPsiMap(@NotNull Project project) { + MyReferenceQueue queue = project.getUserData(STUB_PSI_REFS); + myQueue = queue != null ? queue : ((UserDataHolderEx)project).putUserDataIfAbsent(STUB_PSI_REFS, new MyReferenceQueue()); } void invalidatePsi() { - processQueue(); + myQueue.cleanupStaleReferences(); for (MyReference reference : myMap.values()) { StubBasedPsiElementBase psi = SoftReference.dereference(reference); if (psi != null) { + DebugUtil.onInvalidated(psi); psi.setSubstrateRef(SubstrateRef.createInvalidRef(psi)); } } @@ -63,7 +65,7 @@ class AstPathPsiMap { } void switchToStrongRefs() { - processQueue(); + myQueue.cleanupStaleReferences(); for (MyReference reference : myMap.values()) { StubBasedPsiElementBase psi = SoftReference.dereference(reference); if (psi != null) { @@ -82,30 +84,38 @@ class AstPathPsiMap { @NotNull StubBasedPsiElementBase cachePsi(@NotNull AstPath key, @NotNull StubBasedPsiElementBase psi) { - processQueue(); - myMap.put(key, new MyReference(psi, key)); + myQueue.cleanupStaleReferences(); + myMap.put(key, new MyReference(psi, key, myQueue)); psi.setSubstrateRef(key); return psi; } - private static void processQueue() { - while (true) { - MyReference reference = (MyReference)MyReference.ourQueue.poll(); - if (reference == null) break; - - AstPath key = reference.pathRef; - key.getContainingFile().getRefToPsi().myMap.remove(key, reference); - } - } - private static class MyReference extends WeakReference> { - static final ReferenceQueue> ourQueue = new ReferenceQueue>(); final AstPath pathRef; - MyReference(StubBasedPsiElementBase psi, AstPath ref) { - super(psi, ourQueue); + MyReference(StubBasedPsiElementBase psi, AstPath ref, ReferenceQueue> queue) { + super(psi, queue); pathRef = ref; } } + private static class MyReferenceQueue extends ReferenceQueue> { + @SuppressWarnings("unused") LowMemoryWatcher watcher = LowMemoryWatcher.register(new Runnable() { + @Override + public void run() { + cleanupStaleReferences(); + } + }); + + void cleanupStaleReferences() { + while (true) { + MyReference reference = (MyReference)poll(); + if (reference == null) break; + + AstPath key = reference.pathRef; + key.getContainingFile().getRefToPsi().myMap.remove(key, reference); + } + } + + } } diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java b/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java index b57383d39905..181df9658638 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/PsiFileImpl.java @@ -73,7 +73,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF private boolean myInvalidated; private volatile boolean myAstLoaded; private volatile boolean myUseStrongRefs; - private AstPathPsiMap myRefToPsi = new AstPathPsiMap(); + private AstPathPsiMap myRefToPsi; private final ThreadLocal myFileElementBeingLoaded = new ThreadLocal(); protected final PsiManagerEx myManager; private volatile Getter myTreeElementPointer; // SoftReference/WeakReference to ASTNode or a strong reference to a tree if the file is a DummyHolder @@ -87,6 +87,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF protected PsiFileImpl(@NotNull FileViewProvider provider ) { myManager = (PsiManagerEx)provider.getManager(); myViewProvider = provider; + myRefToPsi = new AstPathPsiMap(getProject()); } public void setContentElementType(final IElementType contentElementType) { @@ -482,7 +483,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF PsiFileImpl clone = BlockSupportImpl.getFileCopy(this, providerCopy); copyCopyableDataTo(clone); - clone.myRefToPsi = new AstPathPsiMap(); + clone.myRefToPsi = new AstPathPsiMap(getProject()); if (getTreeElement() != null) { // not set by provider in clone final FileElement treeClone = (FileElement)calcTreeElement().clone(); @@ -776,7 +777,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF protected PsiFileImpl cloneImpl(FileElement treeElementClone) { PsiFileImpl clone = (PsiFileImpl)super.clone(); - clone.myRefToPsi = new AstPathPsiMap(); + clone.myRefToPsi = new AstPathPsiMap(getProject()); clone.setTreeElementPointer(treeElementClone); // should not use setTreeElement here because cloned file still have VirtualFile (SCR17963) treeElementClone.setPsi(clone); return clone; diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/PsiMultiReference.java b/platform/core-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/PsiMultiReference.java index 2d93eb27f10a..f05834426276 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/PsiMultiReference.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/PsiMultiReference.java @@ -38,8 +38,9 @@ public class PsiMultiReference implements PsiPolyVariantReference { public static final Comparator COMPARATOR = new Comparator() { @Override public int compare(final PsiReference ref1, final PsiReference ref2) { - if (ref1.isSoft() && !ref2.isSoft()) return 1; - if (!ref1.isSoft() && ref2.isSoft()) return -1; + boolean soft1 = ref1.isSoft(); + boolean soft2 = ref2.isSoft(); + if (soft1 != soft2) return soft1 ? 1 : -1; boolean resolves1 = resolves(ref1); boolean resolves2 = resolves(ref2); diff --git a/platform/core-impl/src/com/intellij/psi/impl/source/tree/LazyParseableElement.java b/platform/core-impl/src/com/intellij/psi/impl/source/tree/LazyParseableElement.java index 579a7c29e40a..33e41d52a623 100644 --- a/platform/core-impl/src/com/intellij/psi/impl/source/tree/LazyParseableElement.java +++ b/platform/core-impl/src/com/intellij/psi/impl/source/tree/LazyParseableElement.java @@ -210,7 +210,7 @@ public class LazyParseableElement extends CompositeElement { AstPath.cacheNodePaths(this); - assert super.textMatches(text) : "Text mismatch in " + getElementType(); + assertTextLengthIntact(text.length()); myText = new SoftReference(text); } } @@ -219,6 +219,14 @@ public class LazyParseableElement extends CompositeElement { } } + private void assertTextLengthIntact(int expected) { + int length = 0; + for (ASTNode node : getChildren(null)) { + length += node.getTextLength(); + } + assert length == expected : "Text mismatch in " + getElementType(); + } + @Override public void rawAddChildrenWithoutNotifications(@NotNull TreeElement first) { if (!isParsed()) { diff --git a/platform/diff-impl/src/com/intellij/diff/requests/BinaryMergeRequestImpl.java b/platform/diff-impl/src/com/intellij/diff/requests/BinaryMergeRequestImpl.java index 3e0716f47750..aabec2fd8553 100644 --- a/platform/diff-impl/src/com/intellij/diff/requests/BinaryMergeRequestImpl.java +++ b/platform/diff-impl/src/com/intellij/diff/requests/BinaryMergeRequestImpl.java @@ -71,6 +71,8 @@ public class BinaryMergeRequestImpl extends BinaryMergeRequest { myTitles = contentTitles; myApplyCallback = applyCallback; + + onAssigned(true); } @NotNull @@ -105,41 +107,53 @@ public class BinaryMergeRequestImpl extends BinaryMergeRequest { @Override public void applyResult(@NotNull MergeResult result) { - final byte[] applyContent; - switch (result) { - case CANCEL: - applyContent = myOriginalContent; - break; - case LEFT: - applyContent = ThreeSide.LEFT.select(myByteContents); - break; - case RIGHT: - applyContent = ThreeSide.RIGHT.select(myByteContents); - break; - case RESOLVED: - applyContent = null; - break; - default: - throw new IllegalArgumentException(result.toString()); - } + try { + final byte[] applyContent; + switch (result) { + case CANCEL: + applyContent = myOriginalContent; + break; + case LEFT: + applyContent = ThreeSide.LEFT.select(myByteContents); + break; + case RIGHT: + applyContent = ThreeSide.RIGHT.select(myByteContents); + break; + case RESOLVED: + applyContent = null; + break; + default: + throw new IllegalArgumentException(result.toString()); + } - if (applyContent != null) { - new WriteCommandAction.Simple(null) { - @Override - protected void run() throws Throwable { - try { - VirtualFile file = myFile.getFile(); - if (!DiffUtil.makeWritable(myProject, file)) throw new IOException("File is read-only: " + file.getPresentableName()); - file.setBinaryContent(applyContent); + if (applyContent != null) { + new WriteCommandAction.Simple(null) { + @Override + protected void run() throws Throwable { + try { + VirtualFile file = myFile.getFile(); + if (!DiffUtil.makeWritable(myProject, file)) throw new IOException("File is read-only: " + file.getPresentableName()); + file.setBinaryContent(applyContent); + } + catch (IOException e) { + LOG.error(e); + Messages.showErrorDialog(myProject, "Can't apply result", CommonBundle.getErrorTitle()); + } } - catch (IOException e) { - LOG.error(e); - Messages.showErrorDialog(myProject, "Can't apply result", CommonBundle.getErrorTitle()); - } - } - }.execute(); - } + }.execute(); + } - if (myApplyCallback != null) myApplyCallback.consume(result); + if (myApplyCallback != null) myApplyCallback.consume(result); + } + finally { + onAssigned(false); + } + } + + private void onAssigned(boolean assigned) { + myFile.onAssigned(assigned); + for (DiffContent content : myContents) { + content.onAssigned(assigned); + } } } diff --git a/platform/diff-impl/src/com/intellij/diff/requests/TextMergeRequestImpl.java b/platform/diff-impl/src/com/intellij/diff/requests/TextMergeRequestImpl.java index f01b41e31879..5b6f8946232c 100644 --- a/platform/diff-impl/src/com/intellij/diff/requests/TextMergeRequestImpl.java +++ b/platform/diff-impl/src/com/intellij/diff/requests/TextMergeRequestImpl.java @@ -15,6 +15,7 @@ */ package com.intellij.diff.requests; +import com.intellij.diff.contents.DiffContent; import com.intellij.diff.contents.DocumentContent; import com.intellij.diff.merge.MergeResult; import com.intellij.diff.merge.TextMergeRequest; @@ -59,6 +60,8 @@ public class TextMergeRequestImpl extends TextMergeRequest { myTitle = title; myApplyCallback = applyCallback; + + onAssigned(true); } @NotNull @@ -87,32 +90,44 @@ public class TextMergeRequestImpl extends TextMergeRequest { @Override public void applyResult(@NotNull MergeResult result) { - final CharSequence applyContent; - switch (result) { - case CANCEL: - applyContent = myOriginalContent; - break; - case LEFT: - CharSequence leftContent = ThreeSide.LEFT.select(getContents()).getDocument().getImmutableCharSequence(); - applyContent = StringUtil.convertLineSeparators(leftContent.toString()); - break; - case RIGHT: - CharSequence rightContent = ThreeSide.RIGHT.select(getContents()).getDocument().getImmutableCharSequence(); - applyContent = StringUtil.convertLineSeparators(rightContent.toString()); - break; - case RESOLVED: - applyContent = null; - break; - default: - throw new IllegalArgumentException(result.toString()); - } + try { + final CharSequence applyContent; + switch (result) { + case CANCEL: + applyContent = myOriginalContent; + break; + case LEFT: + CharSequence leftContent = ThreeSide.LEFT.select(getContents()).getDocument().getImmutableCharSequence(); + applyContent = StringUtil.convertLineSeparators(leftContent.toString()); + break; + case RIGHT: + CharSequence rightContent = ThreeSide.RIGHT.select(getContents()).getDocument().getImmutableCharSequence(); + applyContent = StringUtil.convertLineSeparators(rightContent.toString()); + break; + case RESOLVED: + applyContent = null; + break; + default: + throw new IllegalArgumentException(result.toString()); + } - if (applyContent != null) { - DiffUtil.executeWriteCommand(myOutput.getDocument(), myProject, null, () -> { - myOutput.getDocument().setText(applyContent); - }); - } + if (applyContent != null) { + DiffUtil.executeWriteCommand(myOutput.getDocument(), myProject, null, () -> { + myOutput.getDocument().setText(applyContent); + }); + } - if (myApplyCallback != null) myApplyCallback.consume(result); + if (myApplyCallback != null) myApplyCallback.consume(result); + } + finally { + onAssigned(false); + } + } + + private void onAssigned(boolean assigned) { + myOutput.onAssigned(assigned); + for (DocumentContent content : myContents) { + content.onAssigned(assigned); + } } } diff --git a/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java b/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java index 066557c70312..8c586735f14d 100644 --- a/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java +++ b/platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java @@ -328,18 +328,19 @@ public class DiffUtil { } public static void addActionBlock(@NotNull DefaultActionGroup group, AnAction... actions) { - if (actions.length == 0) return; - if (group.getChildrenCount() != 0) group.addSeparator(); - - for (AnAction action : actions) { - if (action != null) group.add(action); - } + addActionBlock(group, Arrays.asList(actions)); } public static void addActionBlock(@NotNull DefaultActionGroup group, @Nullable List actions) { if (actions == null || actions.isEmpty()) return; - if (group.getChildrenCount() != 0) group.addSeparator(); - group.addAll(actions); + group.addSeparator(); + + AnAction[] children = group.getChildren(null); + for (AnAction action : actions) { + if (!ArrayUtil.contains(action, children)) { + group.add(action); + } + } } @NotNull diff --git a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffTableModel.java b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffTableModel.java index 455120cb2339..84f8e3edb5ac 100644 --- a/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffTableModel.java +++ b/platform/diff-impl/src/com/intellij/openapi/diff/impl/dir/DirDiffTableModel.java @@ -222,13 +222,7 @@ public class DirDiffTableModel extends AbstractTableModel implements DirDiffMode final ModalityState modalityState = ModalityState.current(); ApplicationManager.getApplication().executeOnPooledThread(() -> { - EmptyProgressIndicator indicator = new EmptyProgressIndicator() { - @NotNull - @Override - public ModalityState getModalityState() { - return modalityState; - } - }; + EmptyProgressIndicator indicator = new EmptyProgressIndicator(modalityState); ProgressManager.getInstance().executeProcessUnderProgress(() -> { try { if (myDisposed) return; diff --git a/platform/indexing-impl/src/com/intellij/openapi/module/impl/scopes/ModulesScope.java b/platform/indexing-impl/src/com/intellij/openapi/module/impl/scopes/ModulesScope.java index 4919ad67c95a..32480dd1d36c 100644 --- a/platform/indexing-impl/src/com/intellij/openapi/module/impl/scopes/ModulesScope.java +++ b/platform/indexing-impl/src/com/intellij/openapi/module/impl/scopes/ModulesScope.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -21,18 +21,16 @@ import com.intellij.openapi.roots.ProjectFileIndex; import com.intellij.openapi.roots.ProjectRootManager; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.search.GlobalSearchScope; -import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.Set; public class ModulesScope extends GlobalSearchScope { - private final ProjectFileIndex myProjectFileIndex; private final Set myModules; - public ModulesScope(@NotNull Set modules, Project project) { + public ModulesScope(@NotNull Set modules, @NotNull Project project) { super(project); myProjectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); myModules = modules; @@ -59,8 +57,8 @@ public class ModulesScope extends GlobalSearchScope { return false; } - @NonNls + @Override public String toString() { return "Modules:" + Arrays.toString(myModules.toArray(new Module[myModules.size()])); } -} +} \ No newline at end of file diff --git a/platform/indexing-impl/src/com/intellij/psi/search/FileTypeIndex.java b/platform/indexing-impl/src/com/intellij/psi/search/FileTypeIndex.java index 2fffcc2f2cfe..3281e39863f9 100644 --- a/platform/indexing-impl/src/com/intellij/psi/search/FileTypeIndex.java +++ b/platform/indexing-impl/src/com/intellij/psi/search/FileTypeIndex.java @@ -20,6 +20,7 @@ import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.fileTypes.FileTypeRegistry; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.util.Processor; import com.intellij.util.indexing.*; import com.intellij.util.io.EnumeratorStringDescriptor; import com.intellij.util.io.KeyDescriptor; @@ -38,11 +39,6 @@ import java.util.Map; public class FileTypeIndex extends ScalarIndexExtension implements FileBasedIndex.InputFilter, KeyDescriptor, DataIndexer { - @NotNull - public static Collection getFiles(@NotNull FileType fileType, @NotNull GlobalSearchScope scope) { - return FileBasedIndex.getInstance().getContainingFiles(NAME, fileType, scope); - } - public static final ID NAME = ID.create("filetypes"); private final FileTypeRegistry myFileTypeManager; @@ -130,11 +126,24 @@ public class FileTypeIndex extends ScalarIndexExtension } public static boolean containsFileOfType(@NotNull FileType type, @NotNull GlobalSearchScope scope) { - return !FileBasedIndex.getInstance().processValues(NAME, type, null, new FileBasedIndex.ValueProcessor() { - @Override - public boolean process(VirtualFile file, Void value) { - return false; - } - }, scope); + return !processFiles(type, file -> false, scope); + } + + @NotNull + public static Collection getFiles(@NotNull FileType fileType, @NotNull GlobalSearchScope scope) { + return FileBasedIndex.getInstance().getContainingFiles(NAME, fileType, scope); + } + + public static boolean processFiles(@NotNull FileType fileType, @NotNull Processor processor, GlobalSearchScope scope) { + return FileBasedIndex.getInstance().processValues( + NAME, + fileType, + null, + new FileBasedIndex.ValueProcessor() { + @Override + public boolean process(VirtualFile file, Void value) { + return processor.process(file); + } + }, scope); } } diff --git a/platform/indexing-impl/src/com/intellij/psi/search/FilenameIndex.java b/platform/indexing-impl/src/com/intellij/psi/search/FilenameIndex.java index c8719f91fde6..0bee35cdbf9a 100644 --- a/platform/indexing-impl/src/com/intellij/psi/search/FilenameIndex.java +++ b/platform/indexing-impl/src/com/intellij/psi/search/FilenameIndex.java @@ -195,6 +195,10 @@ public class FilenameIndex extends ScalarIndexExtension { return result.toArray(new PsiFile[result.size()]); } + public static void processAllFileNames(@NotNull Processor processor, @NotNull GlobalSearchScope scope, @NotNull IdFilter filter) { + FileBasedIndex.getInstance().processAllKeys(NAME, processor, scope, filter); + } + private static class MyDataIndexer implements DataIndexer { @Override @NotNull diff --git a/platform/indexing-impl/src/com/intellij/psi/search/GlobalSearchScopeUtil.java b/platform/indexing-impl/src/com/intellij/psi/search/GlobalSearchScopeUtil.java new file mode 100644 index 000000000000..3360606f3d12 --- /dev/null +++ b/platform/indexing-impl/src/com/intellij/psi/search/GlobalSearchScopeUtil.java @@ -0,0 +1,62 @@ +/* + * Copyright 2000-2016 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.psi.search; + +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Computable; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; +import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.NotNull; + +import java.util.LinkedHashSet; +import java.util.Set; + +public class GlobalSearchScopeUtil { + @NotNull + public static GlobalSearchScope toGlobalSearchScope(@NotNull final SearchScope scope, + @NotNull Project project) { + if (scope instanceof GlobalSearchScope) { + return (GlobalSearchScope)scope; + } + return ApplicationManager.getApplication().runReadAction(new Computable() { + @Override + public GlobalSearchScope compute() { + return GlobalSearchScope.filesScope(project, getLocalScopeFiles((LocalSearchScope)scope)); + } + }); + } + + @NotNull + public static Set getLocalScopeFiles(@NotNull final LocalSearchScope scope) { + return ApplicationManager.getApplication().runReadAction(new Computable>() { + @Override + public Set compute() { + Set files = new LinkedHashSet(); + for (PsiElement element : scope.getScope()) { + PsiFile file = element.getContainingFile(); + if (file != null) { + ContainerUtil.addIfNotNull(files, file.getVirtualFile()); + ContainerUtil.addIfNotNull(files, file.getNavigationElement().getContainingFile().getVirtualFile()); + } + } + return files; + } + }); + } +} diff --git a/platform/lang-api/src/com/intellij/refactoring/classMembers/MemberInfoBase.java b/platform/lang-api/src/com/intellij/refactoring/classMembers/MemberInfoBase.java index 0da9d6148dbc..99b34c300396 100644 --- a/platform/lang-api/src/com/intellij/refactoring/classMembers/MemberInfoBase.java +++ b/platform/lang-api/src/com/intellij/refactoring/classMembers/MemberInfoBase.java @@ -70,7 +70,9 @@ public abstract class MemberInfoBase { public T getMember() { T element = myMember.getElement(); - PsiUtilCore.ensureValid(element); + if (element != null) { + PsiUtilCore.ensureValid(element); + } return element; } diff --git a/platform/lang-impl/src/com/intellij/application/options/colors/FontOptions.java b/platform/lang-impl/src/com/intellij/application/options/colors/FontOptions.java index b133d5e02b09..59e3f116c0db 100644 --- a/platform/lang-impl/src/com/intellij/application/options/colors/FontOptions.java +++ b/platform/lang-impl/src/com/intellij/application/options/colors/FontOptions.java @@ -18,6 +18,7 @@ package com.intellij.application.options.colors; import com.intellij.application.options.EditorFontsConstants; import com.intellij.icons.AllIcons; +import com.intellij.ide.IdeTooltipManager; import com.intellij.ide.ui.AntialiasingType; import com.intellij.ide.ui.UISettings; import com.intellij.openapi.application.ApplicationBundle; @@ -27,10 +28,7 @@ import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.openapi.editor.colors.FontPreferences; import com.intellij.openapi.ui.MessageType; import com.intellij.openapi.util.SystemInfo; -import com.intellij.ui.DocumentAdapter; -import com.intellij.ui.FontComboBox; -import com.intellij.ui.FontInfoRenderer; -import com.intellij.ui.IdeBorderFactory; +import com.intellij.ui.*; import com.intellij.ui.components.JBCheckBox; import com.intellij.util.EventDispatcher; import com.intellij.util.ui.JBUI; @@ -105,7 +103,11 @@ public class FontOptions extends JPanel implements OptionsPanel{ myEnableLigaturesCheckbox.setBorder(null); panel.add(myEnableLigaturesCheckbox); JLabel warningIcon = new JLabel(AllIcons.General.BalloonWarning); - warningIcon.setToolTipText(ApplicationBundle.message("ligatures.jre.warning", ApplicationNamesInfo.getInstance().getFullProductName())); + IdeTooltipManager.getInstance().setCustomTooltip( + warningIcon, + new TooltipWithClickableLinks.ForBrowser(warningIcon, + ApplicationBundle.message("ligatures.jre.warning", + ApplicationNamesInfo.getInstance().getFullProductName()))); warningIcon.setBorder(JBUI.Borders.emptyLeft(5)); updateWarningIconVisibility(warningIcon); panel.add(warningIcon); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/FormatChangedTextUtil.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/FormatChangedTextUtil.java index 56d6588635e0..a4156947d282 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/actions/FormatChangedTextUtil.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/FormatChangedTextUtil.java @@ -33,10 +33,12 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; +import com.intellij.psi.codeStyle.FormatRangesInfo; import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.diff.FilesTooBigForDiffException; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Collection; import java.util.List; @@ -53,12 +55,6 @@ public class FormatChangedTextUtil { return ServiceManager.getService(FormatChangedTextUtil.class); } - /** - * Allows to answer if given file has changes in comparison with VCS. - * - * @param file target file - * @return true if given file has changes; false otherwise - */ public static boolean hasChanges(@NotNull PsiFile file) { final Project project = file.getProject(); final VirtualFile virtualFile = file.getVirtualFile(); @@ -69,25 +65,10 @@ public class FormatChangedTextUtil { return false; } - /** - * Allows to answer if any file below the given directory (any level of nesting) has changes in comparison with VCS. - * - * @param directory target directory to check - * @return true if any file below the given directory has changes in comparison with VCS; - * false otherwise - */ public static boolean hasChanges(@NotNull PsiDirectory directory) { return hasChanges(directory.getVirtualFile(), directory.getProject()); } - /** - * Allows to answer if given file or any file below the given directory (any level of nesting) has changes in comparison with VCS. - * - * @param file target directory to check - * @param project target project - * @return true if given file or any file below the given directory has changes in comparison with VCS; - * false otherwise - */ public static boolean hasChanges(@NotNull VirtualFile file, @NotNull Project project) { final Collection changes = ChangeListManager.getInstance(project).getChangesIn(file); for (Change change : changes) { @@ -106,13 +87,6 @@ public class FormatChangedTextUtil { return false; } - /** - * Allows to answer if any file that belongs to the given module has changes in comparison with VCS. - * - * @param module target module to check - * @return true if any file that belongs to the given module has changes in comparison with VCS - * false otherwise - */ public static boolean hasChanges(@NotNull Module module) { final ModuleRootManager rootManager = ModuleRootManager.getInstance(module); for (VirtualFile root : rootManager.getSourceRoots()) { @@ -123,13 +97,6 @@ public class FormatChangedTextUtil { return false; } - /** - * Allows to answer if any file that belongs to the given project has changes in comparison with VCS. - * - * @param project target project to check - * @return true if any file that belongs to the given project has changes in comparison with VCS - * false otherwise - */ public static boolean hasChanges(@NotNull final Project project) { final ModifiableModuleModel moduleModel = new ReadAction() { @Override @@ -189,4 +156,11 @@ public class FormatChangedTextUtil { public boolean isChangeNotTrackedForFile(@NotNull Project project, @NotNull PsiFile file) { return false; } + + + @Nullable + public FormatRangesInfo getChangedTextHelper(@NotNull PsiFile file) throws FilesTooBigForDiffException { + return null; + } + } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeProcessor.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeProcessor.java index 758f129ee004..6cde4d45241e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeProcessor.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/ReformatCodeProcessor.java @@ -30,6 +30,7 @@ import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleManager; +import com.intellij.psi.codeStyle.FormatRangesInfo; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.diff.FilesTooBigForDiffException; @@ -41,7 +42,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; -import java.util.concurrent.Callable; import java.util.concurrent.FutureTask; public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor { @@ -51,7 +51,7 @@ public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor { private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.actions.ReformatCodeProcessor"); private static final String PROGRESS_TEXT = CodeInsightBundle.message("reformat.progress.common.text"); - private final Collection myRanges = new ArrayList(); + private final Collection myRanges = new ArrayList<>(); private SelectionModel mySelectionModel; public ReformatCodeProcessor(Project project, boolean processChangedTextOnly) { @@ -110,11 +110,9 @@ public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor { protected FutureTask prepareTask(@NotNull final PsiFile file, final boolean processChangedTextOnly) throws IncorrectOperationException { - return new FutureTask(() -> { + return new FutureTask<>(() -> { FormattingProgressTask.FORMATTING_CANCELLED_FLAG.set(false); try { - Collection ranges = getRangesToFormat(processChangedTextOnly, file); - CharSequence before = null; Document document = PsiDocumentManager.getInstance(myProject).getDocument(file); if (getInfoCollector() != null) { @@ -125,9 +123,13 @@ public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor { CaretVisualPositionKeeper caretPositionKeeper = new CaretVisualPositionKeeper(document); if (processChangedTextOnly) { - CodeStyleManager.getInstance(myProject).reformatTextWithContext(file, ranges); + FormatRangesInfo helper = FormatChangedTextUtil.getInstance().getChangedTextHelper(file); + if (helper != null) { + CodeStyleManager.getInstance(myProject).reformatTextWithContext(file, helper); + } } else { + Collection ranges = getRangesToFormat(file); CodeStyleManager.getInstance(myProject).reformatText(file, ranges); } @@ -163,20 +165,16 @@ public class ReformatCodeProcessor extends AbstractLayoutCodeProcessor { } @NotNull - private Collection getRangesToFormat(boolean processChangedTextOnly, PsiFile file) throws FilesTooBigForDiffException { + private Collection getRangesToFormat(PsiFile file) { if (mySelectionModel != null) { return getSelectedRanges(mySelectionModel); } - - if (processChangedTextOnly) { - return FormatChangedTextUtil.getInstance().getChangedTextRanges(myProject, file); - } - + return !myRanges.isEmpty() ? myRanges : ContainerUtil.newArrayList(file.getTextRange()); } private static class CaretVisualPositionKeeper { - private final Map myCaretRelativeVerticalPositions = new HashMap(); + private final Map myCaretRelativeVerticalPositions = new HashMap<>(); private CaretVisualPositionKeeper(@Nullable Document document) { if (document == null) return; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java index ecce5532102d..aac704fdd4c2 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/IdentifierHighlighterPass.java @@ -107,11 +107,17 @@ public class IdentifierHighlighterPass extends TextEditorHighlightingPass { } else { PsiReference ref = TargetElementUtil.findReference(myEditor); if (ref instanceof PsiPolyVariantReference) { + if (!ref.getElement().isValid()) { + throw new PsiInvalidElementAccessException(ref.getElement(), "Invalid element in " + ref + " of " + ref.getClass() + "; editor=" + myEditor); + } ResolveResult[] results = ((PsiPolyVariantReference)ref).multiResolve(false); if (results.length > 0) { for (ResolveResult result : results) { PsiElement target = result.getElement(); if (target != null) { + if (!target.isValid()) { + throw new PsiInvalidElementAccessException(target, "Invalid element returned from " + ref + " of " + ref.getClass() + "; editor=" + myEditor); + } highlightTargetUsages(target); } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiElementListNavigator.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiElementListNavigator.java index 023da660687d..5396c133dfc1 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiElementListNavigator.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/PsiElementListNavigator.java @@ -144,6 +144,9 @@ public class PsiElementListNavigator { }). setCancelCallback(() -> { HintUpdateSupply.hideHint(list); + if (listUpdaterTask != null) { + return listUpdaterTask.cancelTask(); + } return true; }); final Ref usageView = new Ref(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPass.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPass.java index d4f5f6b0a968..4ebf316ff175 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPass.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPass.java @@ -18,75 +18,46 @@ package com.intellij.codeInsight.daemon.impl; import com.intellij.codeHighlighting.RainbowHighlighter; import com.intellij.codeHighlighting.TextEditorHighlightingPass; -import com.intellij.openapi.editor.DefaultLanguageHighlighterColors; +import com.intellij.codeInsight.daemon.RainbowProvider; import com.intellij.openapi.editor.Editor; -import com.intellij.openapi.editor.colors.EditorColorsScheme; -import com.intellij.openapi.editor.colors.TextAttributesKey; -import com.intellij.openapi.editor.markup.TextAttributes; +import com.intellij.openapi.editor.impl.EditorImpl; import com.intellij.openapi.progress.ProgressIndicator; -import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import java.awt.*; import java.util.ArrayList; import java.util.List; public class RainbowIdentifierHighlighterPass extends TextEditorHighlightingPass { protected final PsiFile myFile; - protected final RainbowHighlighter myRainbowHighlighter; - protected List toHighlight; - protected final EditorColorsScheme myEditorColorsScheme; + protected List myHighlight; + protected final Color myBackgroundColor; protected RainbowIdentifierHighlighterPass(@NotNull PsiFile file, @NotNull Editor editor) { super(file.getProject(), editor.getDocument(), false); + myBackgroundColor = (editor instanceof EditorImpl) ? ((EditorImpl)editor).getBackgroundColor() : null; myFile = file; - myEditorColorsScheme = editor.getColorsScheme(); - myRainbowHighlighter = new RainbowHighlighter(myEditorColorsScheme); } @Override public void doCollectInformation(@NotNull final ProgressIndicator progress) { - // reference implementation! final List infos = new ArrayList<>(); - myFile.accept(new PsiRecursiveElementWalkingVisitor() { - @Override - public void visitElement(PsiElement e) { - final HighlightInfo attrs; - if (e instanceof PsiReference) { - attrs = getInfo(e.getText(), e, null); - } - else if (e instanceof PsiNameIdentifierOwner) { - PsiNameIdentifierOwner identifierOwner = (PsiNameIdentifierOwner)e; - attrs = getInfo(identifierOwner.getName(), identifierOwner.getNameIdentifier(), null); - } - else { - attrs = null; - } - if (attrs != null) { - infos.add(attrs); - } - super.visitElement(e); + + // myBackgroundColor takes into account "read only" editors + final RainbowHighlighter rainbowHighlighter = new RainbowHighlighter(getColorsScheme(), myBackgroundColor); + for (RainbowProvider processor : RainbowProvider.getRainbowFileProcessors()) { + if (processor.isValidContext(myFile)) { + infos.addAll(processor.getHighlights(myFile, rainbowHighlighter, progress)); } - }); - toHighlight = infos; + } + myHighlight = infos; } @Override public void doApplyInformationToEditor() { - if (toHighlight == null || myDocument == null) return; - UpdateHighlightersUtil.setHighlightersToEditor(myProject, myDocument, 0, myFile.getTextLength(), toHighlight, getColorsScheme(), getId()); - } - - protected HighlightInfo getInfo(@Nullable String nameKey, @Nullable PsiElement id, @Nullable TextAttributesKey colorKey) { - if (id == null || nameKey == null || StringUtil.isEmpty(nameKey)) return null; - if (colorKey == null) colorKey = DefaultLanguageHighlighterColors.LOCAL_VARIABLE; - final TextAttributes attributes = myRainbowHighlighter.getAttributes(nameKey, - myEditorColorsScheme.getAttributes(colorKey)); - return HighlightInfo - .newHighlightInfo(RainbowHighlighter.RAINBOW_ELEMENT) - .textAttributes(attributes) - .range(id) - .create(); + if (myHighlight == null || myDocument == null) return; + UpdateHighlightersUtil + .setHighlightersToEditor(myProject, myDocument, 0, myFile.getTextLength(), myHighlight, getColorsScheme(), getId()); } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPassFactory.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPassFactory.java index 42c0a2813285..6fa898260b89 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPassFactory.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/RainbowIdentifierHighlighterPassFactory.java @@ -23,13 +23,13 @@ import com.intellij.psi.PsiFile; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; -/** - * Language-dependent implementation need to be inherited from this class and - */ public class RainbowIdentifierHighlighterPassFactory extends AbstractProjectComponent implements TextEditorHighlightingPassFactory { public RainbowIdentifierHighlighterPassFactory(Project project, TextEditorHighlightingPassRegistrar highlightingPassRegistrar) { super(project); - highlightingPassRegistrar.registerTextEditorHighlightingPass(this, new int[]{Pass.UPDATE_ALL}, null, false, -1); + highlightingPassRegistrar.registerTextEditorHighlightingPass(this, + TextEditorHighlightingPassRegistrar.Anchor.BEFORE, + Pass.UPDATE_FOLDING, + false, false); } @Override @@ -41,29 +41,9 @@ public class RainbowIdentifierHighlighterPassFactory extends AbstractProjectComp @Override public TextEditorHighlightingPass createHighlightingPass(@NotNull final PsiFile file, @NotNull final Editor editor) { - if (RainbowHighlighter.isRainbowEnabled() && isValidContext(file, editor)) { - return getRainbowPass(file, editor); + if (RainbowHighlighter.isRainbowEnabled()) { + return new RainbowIdentifierHighlighterPass(file, editor); } - return null; } - - /** - * Need to be rewritten in language-dependent implementation. - * Default implementation colors all identifiers in [PsiReference] and [PsiNameIdentifierOwner] elements. - */ - @NotNull - protected RainbowIdentifierHighlighterPass getRainbowPass(@NotNull PsiFile file, @NotNull Editor editor) { - return new RainbowIdentifierHighlighterPass(file, editor); - } - - /** - * Need to be rewritten in language-dependent implementation. - * For example: - * return file instanceof JavaFile; - * Default implementation works for any language. - */ - protected boolean isValidContext(@NotNull final PsiFile file, @NotNull Editor editor) { - return true; - } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java index 50ec2c8d66ac..48665d43dc44 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/hint/actions/ShowImplementationsAction.java @@ -300,7 +300,9 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { }) .setCancelCallback(() -> { ImplementationsUpdaterTask task = SoftReference.dereference(myTaskRef); - cancelTask(task); + if (task != null) { + task.cancelTask(); + } return Boolean.TRUE; }) .createPopup(); @@ -314,17 +316,6 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { } } - private static boolean cancelTask(@Nullable ImplementationsUpdaterTask task) { - if (task != null) { - ProgressIndicator indicator = task.myIndicator; - if (indicator != null) { - indicator.cancel(); - } - return task.setCanceled(); - } - return false; - } - private void updateInBackground(Editor editor, @Nullable PsiElement element, @NotNull ImplementationViewComponent component, @@ -332,7 +323,9 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { @NotNull AbstractPopup popup, @NotNull Ref usageView) { final ImplementationsUpdaterTask updaterTask = SoftReference.dereference(myTaskRef); - cancelTask(updaterTask); + if (updaterTask != null) { + updaterTask.cancelTask(); + } if (element == null) return; //already found final ImplementationsUpdaterTask task = new ImplementationsUpdaterTask(element, editor, title, isIncludeAlwaysSelf()); @@ -412,7 +405,6 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { private final PsiElement myElement; private final boolean myIncludeSelf; private PsiElement[] myElements; - private volatile ProgressIndicator myIndicator; private ImplementationsUpdaterTask(@NotNull PsiElement element, final Editor editor, final String caption, boolean includeSelf) { super(element.getProject(), ImplementationSearcher.SEARCHING_FOR_IMPLEMENTATIONS); @@ -445,7 +437,6 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { @Override public void run(@NotNull final ProgressIndicator indicator) { - myIndicator = indicator; super.run(indicator); final ImplementationSearcher.BackgroundableImplementationSearcher implementationSearcher = new ImplementationSearcher.BackgroundableImplementationSearcher() { @@ -477,7 +468,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction { @Override public void onSuccess() { - if (!cancelTask(this)) { + if (!cancelTask()) { myComponent.update(myElements, myComponent.getIndex()); } super.onSuccess(); diff --git a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java index 3a613776b2af..e1a199dd79b8 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/intention/impl/IntentionListStep.java @@ -16,6 +16,7 @@ package com.intellij.codeInsight.intention.impl; +import com.google.common.annotations.VisibleForTesting; import com.intellij.codeInsight.daemon.impl.HighlightInfo; import com.intellij.codeInsight.daemon.impl.ShowIntentionsPass; import com.intellij.codeInsight.hint.HintManager; @@ -195,10 +196,20 @@ public class IntentionListStep implements ListPopupStep options = descriptor.getOptions(element, containingEditor); if (options == null) return cachedAction; for (IntentionAction option : options) { - if (!option.isAvailable(myProject, containingEditor, containingFile)) { - // if option is not applicable in injected fragment, check in host file context - if (containingEditor == myEditor || !option.isAvailable(myProject, myEditor, myFile)) { - continue; + if (containingFile != null && containingEditor != null && myEditor != null) { + if (!ShowIntentionActionsHandler.availableFor(containingFile, containingEditor, option)) { + //if option is not applicable in injected fragment, check in host file context + if (containingEditor == myEditor || !ShowIntentionActionsHandler.availableFor(myFile, myEditor, option)) { + continue; + } + } + } + else { + if (!option.isAvailable(myProject, containingEditor, containingFile)) { + // if option is not applicable in injected fragment, check in host file context + if (containingEditor == myEditor || !option.isAvailable(myProject, myEditor, myFile)) { + continue; + } } } IntentionActionWithTextCaching textCaching = new IntentionActionWithTextCaching(option); @@ -291,6 +302,16 @@ public class IntentionListStep implements ListPopupStep> getActionsWithSubActions() { + Map> result = ContainerUtil.newLinkedHashMap(); + for (IntentionActionWithTextCaching action : getValues()) { + List subActions = getSubStep(action, action.getToolName()).getValues(); + result.put(action.getAction(), ContainerUtil.map(subActions, IntentionActionWithTextCaching::getAction)); + } + return result; + } + @Override public boolean hasSubstep(final IntentionActionWithTextCaching action) { return action.getOptionIntentions().size() + action.getOptionErrorFixes().size() > 0; diff --git a/platform/lang-impl/src/com/intellij/codeInsight/navigation/BackgroundUpdaterTask.java b/platform/lang-impl/src/com/intellij/codeInsight/navigation/BackgroundUpdaterTask.java index d171512b0031..76b57f41fa79 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/navigation/BackgroundUpdaterTask.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/navigation/BackgroundUpdaterTask.java @@ -52,6 +52,7 @@ public abstract class BackgroundUpdaterTask extends Task.Backgroundable { private volatile boolean myCanceled; private volatile boolean myFinished; + private volatile ProgressIndicator myIndicator; public BackgroundUpdaterTask(Project project, String title, boolean canBeCancelled) { super(project, title, canBeCancelled); @@ -132,6 +133,7 @@ public abstract class BackgroundUpdaterTask extends Task.Backgroundable { @Override public void run(@NotNull ProgressIndicator indicator) { paintBusy(true); + myIndicator = indicator; } @Override @@ -148,4 +150,12 @@ public abstract class BackgroundUpdaterTask extends Task.Backgroundable { public boolean isFinished() { return myFinished; } + + public boolean cancelTask() { + ProgressIndicator indicator = myIndicator; + if (indicator != null) { + indicator.cancel(); + } + return setCanceled(); + } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/navigation/GotoTargetHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/navigation/GotoTargetHandler.java index 74b3c29de57e..a5b1ecf27c97 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/navigation/GotoTargetHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/navigation/GotoTargetHandler.java @@ -182,6 +182,10 @@ public abstract class GotoTargetHandler implements CodeInsightActionHandler { setMovable(true). setCancelCallback(() -> { HintUpdateSupply.hideHint(list); + final ListBackgroundUpdaterTask task = gotoData.listUpdaterTask; + if (task != null) { + return task.cancelTask(); + } return true; }). setCouldPin(popup1 -> { diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionAction.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionAction.java index 9128afe9bda0..17bf7caf833c 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/RunInspectionAction.java @@ -40,26 +40,18 @@ import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleUtilCore; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.openapi.ui.LabeledComponent; import com.intellij.openapi.util.InvalidDataException; -import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.profile.Profile; -import com.intellij.profile.codeInspection.InspectionProfileManager; import com.intellij.profile.codeInspection.InspectionProjectProfileManager; -import com.intellij.profile.codeInspection.ui.header.ProfilesComboBox; import com.intellij.psi.*; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.ui.TitledSeparator; -import com.intellij.util.containers.FactoryMap; -import com.intellij.util.ui.JBUI; import org.jdom.Element; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; -import java.awt.*; import java.awt.event.ActionEvent; import java.util.ArrayList; import java.util.Arrays; @@ -148,7 +140,7 @@ public class RunInspectionAction extends GotoActionBase { project, analysisScope, module != null ? module.getName() : null, true, options, psiElement) { - private InheritOptionsForToolPanel myToolOptionsPanel; + private InspectionToolWrapper myUpdatedSettingsToolWrapper; @Nullable @Override @@ -158,8 +150,9 @@ public class RunInspectionAction extends GotoActionBase { JPanel additionPanel = new JPanel(); additionPanel.setLayout(new BoxLayout(additionPanel, BoxLayout.Y_AXIS)); additionPanel.add(fileFilter); - myToolOptionsPanel = new InheritOptionsForToolPanel((InspectionProfileImpl)currentProfile, toolWrapper.getShortName(), project); - additionPanel.add(myToolOptionsPanel); + myUpdatedSettingsToolWrapper = copyToolWithSettings(toolWrapper);//new InheritOptionsForToolPanel(toolWrapper.getShortName(), project); + additionPanel.add(new TitledSeparator(IdeBundle.message("goto.inspection.action.choose.inherit.settings.from"))); + additionPanel.add(myUpdatedSettingsToolWrapper.getTool().createOptionsPanel()); return additionPanel; } else { return fileFilter; @@ -186,7 +179,7 @@ public class RunInspectionAction extends GotoActionBase { } private InspectionToolWrapper getToolWrapper() { - return myToolOptionsPanel == null ? toolWrapper : myToolOptionsPanel.getSelectedWrapper(); + return myUpdatedSettingsToolWrapper == null ? toolWrapper : myUpdatedSettingsToolWrapper; } @NotNull @@ -228,69 +221,16 @@ public class RunInspectionAction extends GotoActionBase { dialog.showAndGet(); } - private static class InheritOptionsForToolPanel extends JPanel { - private final ProfilesComboBox myProfilesComboBox; - @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") - private final FactoryMap> myProfile2ModifiedWrapper; - - public InheritOptionsForToolPanel(final InspectionProfileImpl initial, final String toolShortName, final Project project) { - myProfile2ModifiedWrapper = new FactoryMap>() { - @Nullable - @Override - protected Pair create(InspectionProfile profile) { - InspectionToolWrapper tool = profile.getInspectionTool(toolShortName, project); - LOGGER.assertTrue(tool != null); - final Element options = new Element("copy"); - tool.getTool().writeSettings(options); - tool = tool.createCopy(); - try { - tool.getTool().readSettings(options); - } - catch (InvalidDataException e) { - throw new RuntimeException(e); - } - return Pair.create(tool, tool.getTool().createOptionsPanel()); - } - }; - JPanel settingsAnchor = new JPanel(new BorderLayout()); - myProfilesComboBox = new ProfilesComboBox() { - @Override - protected void onProfileChosen(InspectionProfileImpl inspectionProfile) { - settingsAnchor.removeAll(); - settingsAnchor.add(myProfile2ModifiedWrapper.get(inspectionProfile).getSecond(), BorderLayout.CENTER); - settingsAnchor.invalidate(); - settingsAnchor.validate(); - settingsAnchor.repaint(); - } - - @Override - protected boolean isProjectLevel(InspectionProfileImpl p) { - return p.isProjectLevel(); - } - - @NotNull - @Override - protected String getProfileName(InspectionProfileImpl p) { - return p.getName(); - } - }; - - setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); - add(new TitledSeparator(IdeBundle.message("goto.inspection.action.choose.inherit.settings.from"))); - add(LabeledComponent.create(myProfilesComboBox, "Profile:", BorderLayout.WEST)); - add(Box.createVerticalStrut(JBUI.scale(10))); - add(settingsAnchor); - - final List profiles = new ArrayList<>(); - profiles.addAll(InspectionProfileManager.getInstance().getProfiles()); - profiles.addAll(InspectionProjectProfileManager.getInstance(project).getProfiles()); - myProfilesComboBox.reset(profiles); - myProfilesComboBox.selectProfile(initial); + private static InspectionToolWrapper copyToolWithSettings(@NotNull final InspectionToolWrapper tool) { + final Element options = new Element("copy"); + tool.getTool().writeSettings(options); + final InspectionToolWrapper copiedTool = tool.createCopy(); + try { + copiedTool.getTool().readSettings(options); } - - @NotNull - public InspectionToolWrapper getSelectedWrapper() { - return myProfile2ModifiedWrapper.get((InspectionProfileImpl)myProfilesComboBox.getSelectedItem()).getFirst(); + catch (InvalidDataException e) { + throw new RuntimeException(e); } + return copiedTool; } } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java index 8fef0ac468fd..a53b517c0022 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/ViewOfflineResultsAction.java @@ -163,22 +163,20 @@ public class ViewOfflineResultsAction extends AnAction { else { profile = null; } - final InspectionProfile inspectionProfile; + final InspectionProfileImpl inspectionProfile; if (profile != null) { - inspectionProfile = (InspectionProfile)profile; + inspectionProfile = (InspectionProfileImpl)profile; } else { inspectionProfile = new InspectionProfileImpl(profileName != null ? profileName : "Server Side") { - @Override - public boolean isToolEnabled(@Nullable final HighlightDisplayKey key, PsiElement element) { - return key != null && resMap.containsKey(key.toString()); - } - @Override public HighlightDisplayLevel getErrorLevel(@NotNull final HighlightDisplayKey key, PsiElement element) { return InspectionProfileManager.getInstance().getCurrentProfile().getErrorLevel(key, element); } }; + for (String id : resMap.keySet()) { + inspectionProfile.enableTool(id, project); + } } return showOfflineView(project, resMap, inspectionProfile, title); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java index eb8b3123966a..441b8ee6b4e1 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsView.java @@ -163,6 +163,11 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren }); add(mySplitter, BorderLayout.CENTER); myExclusionHandler = new ExclusionHandler() { + @Override + public boolean isNodeExclusionAvailable(@NotNull InspectionTreeNode node) { + return true; + } + @Override public boolean isNodeExcluded(@NotNull InspectionTreeNode node) { return node.isExcluded(myExcludedInspectionTreeNodesManager); @@ -357,8 +362,10 @@ public class InspectionResultsView extends JPanel implements Disposable, Occuren return createToolbar(group); } - private static JComponent createToolbar(final DefaultActionGroup specialGroup) { - return ActionManager.getInstance().createActionToolbar(ActionPlaces.CODE_INSPECTION, specialGroup, false).getComponent(); + private JComponent createToolbar(final DefaultActionGroup specialGroup) { + final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.CODE_INSPECTION, specialGroup, false); + toolbar.setTargetComponent(this); + return toolbar.getComponent(); } @Override diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java index 06b0efb87738..24b1f3087b40 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionResultsViewComparator.java @@ -93,8 +93,21 @@ public class InspectionResultsViewComparator implements Comparator { final CommonProblemDescriptor descriptor1 = ((ProblemDescriptionNode)node1).getDescriptor(); final CommonProblemDescriptor descriptor2 = ((ProblemDescriptionNode)node2).getDescriptor(); if (descriptor1 instanceof ProblemDescriptor && descriptor2 instanceof ProblemDescriptor) { - //TODO: Do not materialise lazy pointers - return ((ProblemDescriptor)descriptor1).getLineNumber() - ((ProblemDescriptor)descriptor2).getLineNumber(); + int diff = ((ProblemDescriptor)descriptor1).getLineNumber() - ((ProblemDescriptor)descriptor2).getLineNumber(); + if (diff != 0) { + return diff; + } + diff = ((ProblemDescriptor)descriptor1).getHighlightType().compareTo(((ProblemDescriptor)descriptor2).getHighlightType()); + if (diff != 0) { + return diff; + } + diff = PsiUtilCore.compareElementsByPosition(((ProblemDescriptor)descriptor1).getStartElement(), + ((ProblemDescriptor)descriptor2).getStartElement()); + if (diff != 0) { + return diff; + } + return PsiUtilCore.compareElementsByPosition(((ProblemDescriptor)descriptor2).getEndElement(), + ((ProblemDescriptor)descriptor1).getEndElement()); } if (descriptor1 != null && descriptor2 != null) { return descriptor1.getDescriptionTemplate().compareToIgnoreCase(descriptor2.getDescriptionTemplate()); diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/RefElementNode.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/RefElementNode.java index 96b0b9b5f450..0da10d66239e 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/RefElementNode.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/RefElementNode.java @@ -119,7 +119,7 @@ public class RefElementNode extends SuppressableInspectionTreeNode { @Override public int getProblemCount() { - return isLeaf() ? 1 : super.getProblemCount(); + return isLeaf() ? myPresentation.getIgnoredRefElements().contains(getElement()) ? 0 : 1 : super.getProblemCount(); } @Override diff --git a/platform/lang-impl/src/com/intellij/find/impl/FindInProjectTask.java b/platform/lang-impl/src/com/intellij/find/impl/FindInProjectTask.java index 97fcd3133dee..6880cd14044f 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/FindInProjectTask.java +++ b/platform/lang-impl/src/com/intellij/find/impl/FindInProjectTask.java @@ -46,7 +46,6 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileFilter; import com.intellij.openapi.vfs.VirtualFileVisitor; import com.intellij.psi.PsiBinaryFile; -import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; import com.intellij.psi.impl.cache.CacheManager; @@ -259,7 +258,8 @@ class FindInProjectTask { @NotNull private Collection collectFilesInScope(@NotNull final Set alreadySearched, final boolean skipIndexed) { SearchScope customScope = myFindModel.isCustomScope() ? myFindModel.getCustomScope() : null; - final GlobalSearchScope globalCustomScope = customScope == null ? null : toGlobal(customScope); + final GlobalSearchScope globalCustomScope = customScope == null ? null : GlobalSearchScopeUtil.toGlobalSearchScope(customScope, + myProject); final ProjectFileIndex fileIndex = ProjectFileIndex.SERVICE.getInstance(myProject); final boolean hasTrigrams = hasTrigrams(myStringToFindInIndices); @@ -314,7 +314,7 @@ class FindInProjectTask { final EnumContentIterator iterator = new EnumContentIterator(); if (customScope instanceof LocalSearchScope) { - for (VirtualFile file : getLocalScopeFiles((LocalSearchScope)customScope)) { + for (VirtualFile file : GlobalSearchScopeUtil.getLocalScopeFiles((LocalSearchScope)customScope)) { iterator.processFile(file); } } @@ -367,37 +367,6 @@ class FindInProjectTask { return true; } - @NotNull - private GlobalSearchScope toGlobal(@NotNull final SearchScope scope) { - if (scope instanceof GlobalSearchScope) { - return (GlobalSearchScope)scope; - } - return ApplicationManager.getApplication().runReadAction(new Computable() { - @Override - public GlobalSearchScope compute() { - return GlobalSearchScope.filesScope(myProject, getLocalScopeFiles((LocalSearchScope)scope)); - } - }); - } - - @NotNull - private static Set getLocalScopeFiles(@NotNull final LocalSearchScope scope) { - return ApplicationManager.getApplication().runReadAction(new Computable>() { - @Override - public Set compute() { - Set files = new LinkedHashSet(); - for (PsiElement element : scope.getScope()) { - PsiFile file = element.getContainingFile(); - if (file != null) { - ContainerUtil.addIfNotNull(files, file.getVirtualFile()); - ContainerUtil.addIfNotNull(files, file.getNavigationElement().getContainingFile().getVirtualFile()); - } - } - return files; - } - }); - } - private boolean canRelyOnIndices() { if (DumbService.isDumb(myProject)) return false; @@ -441,7 +410,8 @@ class FindInProjectTask { } } - final GlobalSearchScope scope = toGlobal(FindInProjectUtil.getScopeFromModel(myProject, myFindModel)); + final GlobalSearchScope scope = GlobalSearchScopeUtil.toGlobalSearchScope(FindInProjectUtil.getScopeFromModel(myProject, myFindModel), + myProject); if (TrigramIndex.ENABLED) { final Set keys = ContainerUtil.newTroveSet(); diff --git a/platform/lang-impl/src/com/intellij/formatting/AdjustFormatRangesState.kt b/platform/lang-impl/src/com/intellij/formatting/AdjustFormatRangesState.kt new file mode 100644 index 000000000000..a700c34f5bec --- /dev/null +++ b/platform/lang-impl/src/com/intellij/formatting/AdjustFormatRangesState.kt @@ -0,0 +1,130 @@ +/* + * Copyright 2000-2016 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. + */ +/* + * Copyright 2000-2016 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. + */ +/* + * Copyright 2000-2016 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.formatting + +import com.intellij.formatting.engine.State +import com.intellij.openapi.util.TextRange +import com.intellij.psi.codeStyle.FormatRangesInfo +import com.intellij.psi.formatter.common.AbstractBlock +import com.intellij.util.containers.Stack + +interface BlockProcessor { + fun processLeafBlock(block: Block) + fun processCompositeBlock(block: Block) +} + +class VcsAwareFormatRangesInfo(val formattingRanges: List, + private val insertedRanges: List): FormatRangesInfo() +{ + constructor(changedTextRange: TextRange): this(listOf(changedTextRange), emptyList()) + + override fun getRangesToFormat() = formattingRanges + + override fun isOnInsertedLine(offset: Int) = insertedRanges.find { it.contains(offset) } != null + +} + + +class AdditionalRangesExtractor(private val formatRanges: FormatTextRanges) : BlockProcessor { + val extraRanges = mutableListOf() + + override fun processLeafBlock(block: Block) = Unit + + override fun processCompositeBlock(block: Block) { + if (block is AbstractBlock) { + block.getExtraRangesToFormat(formatRanges)?.let { extraRanges.add(it) } + } + } +} + +class ExtraReformatRanges(val ranges: List = emptyList()) { + constructor(range: TextRange): this(listOf(range)) +} + +fun FormatTextRanges.mergeWith(extraRanges: ExtraReformatRanges) { + extraRanges.ranges.forEach { add(it, false) } +} + + +class AdjustFormatRangesState(var currentRoot: Block, + val formatRanges: FormatTextRanges) : State() { + + private val extractor = AdditionalRangesExtractor(formatRanges) + private val state = Stack(currentRoot) + + init { + setOnDone({ + extractor.extraRanges.forEach { formatRanges.mergeWith(it) } + }) + } + + override fun doIteration() { + val currentBlock = state.pop() + processBlock(currentBlock) + isDone = state.isEmpty() + } + + private fun processBlock(currentBlock: Block) { + if (formatRanges.isReadOnly(currentBlock.textRange, false)) { + extractor.processLeafBlock(currentBlock) + } + else { + val children = currentBlock.subBlocks + if (children.isEmpty()) { + extractor.processLeafBlock(currentBlock) + return + } + + extractor.processCompositeBlock(currentBlock) + + children + .filterNot { formatRanges.isReadOnly(it.textRange, false) } + .reversed() + .forEach { state.push(it) } + } + } + +} \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java b/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java index caf00cbf450e..cbe4459396db 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatProcessor.java @@ -19,6 +19,7 @@ package com.intellij.formatting; import com.intellij.formatting.engine.*; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; +import com.intellij.openapi.util.registry.Registry; import com.intellij.psi.codeStyle.CodeStyleSettings; import com.intellij.psi.codeStyle.CommonCodeStyleSettings; import org.jetbrains.annotations.NotNull; @@ -68,7 +69,15 @@ public class FormatProcessor { final InitialInfoBuilder builder = prepareToBuildBlocksSequentially(block, model, options, settings, defaultIndentOption, myProgressCallback); myWrapState = new WrapBlocksState(builder, blockIndentOptions); - myStateProcessor = new StateProcessor(myWrapState); + FormatTextRanges ranges = options.myAffectedRanges; + if (ranges != null && options.myReformatContext && Registry.is("smart.reformat.vcs.changes")) { + AdjustFormatRangesState adjustRangesState = new AdjustFormatRangesState(block, ranges); + myStateProcessor = new StateProcessor(adjustRangesState); + myStateProcessor.setNextState(myWrapState); + } + else { + myStateProcessor = new StateProcessor(myWrapState); + } } public BlockRangesMap getBlockRangesMap() { diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatTextRanges.java b/platform/lang-impl/src/com/intellij/formatting/FormatTextRanges.java index 01085b32381c..19027c1bb121 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatTextRanges.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatTextRanges.java @@ -17,6 +17,7 @@ package com.intellij.formatting; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.text.StringUtil; +import com.intellij.psi.codeStyle.FormatRangesInfo; import java.util.ArrayList; import java.util.List; @@ -24,27 +25,25 @@ import java.util.List; public class FormatTextRanges { private final List myRanges = new ArrayList<>(); + private final FormatRangesInfo myHelper; public FormatTextRanges() { + myHelper = null; } public FormatTextRanges(TextRange range, boolean processHeadingWhitespace) { + myHelper = null; add(range, processHeadingWhitespace); } + + public FormatTextRanges(FormatRangesInfo helper) { + myHelper = helper; + } public void add(TextRange range, boolean processHeadingWhitespace) { myRanges.add(new FormatTextRange(range, processHeadingWhitespace)); } - /** - * Batches {@link FormatTextRange#isWhitespaceReadOnly(TextRange)} operation for all aggregated ranges. - *

- * I.e. this method allows to check if given range has intersections with any of aggregated ranges. - * - * @param range range to check - * @return true if given range doesn't have intersections with all aggregated ranges; - * false if given range intersects at least one of aggregated ranges - */ public boolean isWhitespaceReadOnly(TextRange range) { for (FormatTextRange formatTextRange : myRanges) { if (!formatTextRange.isWhitespaceReadOnly(range)) { @@ -54,16 +53,6 @@ public class FormatTextRanges { return true; } - /** - * Batches {@link FormatTextRange#isReadOnly(TextRange, boolean)} operation for all aggregated ranges. - *

- * I.e. this method allows to check if given range has intersections with any of aggregated ranges. - * - * @param range range to check - * @param rootIsRightBlock flag to use during {@link FormatTextRange#isReadOnly(TextRange, boolean)} processing - * @return true if given range doesn't have intersections with all aggregated ranges; - * false if given range intersects at least one of aggregated ranges - */ public boolean isReadOnly(TextRange range, boolean rootIsRightBlock) { for (FormatTextRange formatTextRange : myRanges) { if (!formatTextRange.isReadOnly(range, rootIsRightBlock)) { @@ -94,4 +83,10 @@ public class FormatTextRanges { public String toString() { return "FormatTextRanges{" + StringUtil.join(myRanges, StringUtil.createToStringFunction(FormatTextRange.class), ","); } + + public boolean isInsertedBlock(Block block) { + int offset = block.getTextRange().getStartOffset(); + return myHelper != null && myHelper.isOnInsertedLine(offset); + } + } \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java b/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java index c63084b525f2..2d32c89e3606 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java @@ -18,8 +18,8 @@ package com.intellij.formatting; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; -import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.util.TextRange; +import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleSettings; import com.intellij.psi.codeStyle.CommonCodeStyleSettings; import com.intellij.util.IncorrectOperationException; @@ -113,8 +113,10 @@ public abstract class FormatterEx{ final CommonCodeStyleSettings.IndentOptions indentOptions, final TextRange rangeToAdjust); - public abstract void formatAroundRange(final FormattingModel model, final CodeStyleSettings settings, - final TextRange textRange, final FileType fileType); + public abstract void formatAroundRange(final FormattingModel model, + final CodeStyleSettings settings, + final PsiFile file, + final TextRange textRange); public abstract void adjustTextRange(FormattingModel model, CodeStyleSettings settings, diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatterImpl.java b/platform/lang-impl/src/com/intellij/formatting/FormatterImpl.java index fd153cfa9b80..7ac8fdfe1dbd 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatterImpl.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatterImpl.java @@ -22,7 +22,6 @@ import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.editor.Document; -import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Computable; @@ -393,17 +392,17 @@ public class FormatterImpl extends FormatterEx } @Override - public void formatAroundRange(final FormattingModel model, - final CodeStyleSettings settings, - final TextRange textRange, - final FileType fileType) { + public void formatAroundRange(FormattingModel model, + CodeStyleSettings settings, + PsiFile file, + TextRange textRange) { disableFormatting(); try { validateModel(model); final FormattingDocumentModel documentModel = model.getDocumentModel(); final Block block = model.getRootBlock(); final FormatProcessor processor = buildProcessorAndWrapBlocks( - documentModel, block, settings, settings.getIndentOptions(fileType), null + documentModel, block, settings, settings.getIndentOptionsByFile(file), null ); LeafBlockWrapper tokenBlock = processor.getFirstTokenBlock(); while (tokenBlock != null) { diff --git a/platform/lang-impl/src/com/intellij/formatting/InitialInfoBuilder.java b/platform/lang-impl/src/com/intellij/formatting/InitialInfoBuilder.java index 00755205caa1..6804f0a900fb 100644 --- a/platform/lang-impl/src/com/intellij/formatting/InitialInfoBuilder.java +++ b/platform/lang-impl/src/com/intellij/formatting/InitialInfoBuilder.java @@ -22,7 +22,6 @@ import com.intellij.openapi.util.TextRange; import com.intellij.openapi.util.UnfairTextRange; import com.intellij.psi.codeStyle.CodeStyleSettings; import com.intellij.psi.codeStyle.CommonCodeStyleSettings; -import com.intellij.psi.formatter.ReadOnlyBlockInformationProvider; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.LinkedMultiMap; import com.intellij.util.containers.MultiMap; @@ -69,7 +68,6 @@ public class InitialInfoBuilder { private LeafBlockWrapper myFirstTokenBlock; private LeafBlockWrapper myLastTokenBlock; private SpacingImpl myCurrentSpaceProperty; - private ReadOnlyBlockInformationProvider myReadOnlyBlockInformationProvider; private boolean myInsideFormatRestrictingTag; private InitialInfoBuilder(final Block rootBlock, @@ -163,36 +161,27 @@ public class InitialInfoBuilder { myCurrentWhiteSpace.changeEndOffset(blockStartOffset, myModel, myOptions); collectAlignments(rootBlock); - - ReadOnlyBlockInformationProvider previousProvider = myReadOnlyBlockInformationProvider; - try { - if (rootBlock instanceof ReadOnlyBlockInformationProvider) { - myReadOnlyBlockInformationProvider = (ReadOnlyBlockInformationProvider)rootBlock; - } - - if (isInsideFormattingRanges(rootBlock, rootBlockIsRightBlock) - || myCollectAlignmentsInsideFormattingRange && isInsideExtendedAffectedRange(rootBlock)) - { - final List subBlocks = rootBlock.getSubBlocks(); - if (subBlocks.isEmpty() || myReadOnlyBlockInformationProvider != null && myReadOnlyBlockInformationProvider.isReadOnly(rootBlock)) { - final AbstractBlockWrapper wrapper = buildLeafBlock(rootBlock, parent, false, index, parentBlock); - if (!subBlocks.isEmpty()) { - wrapper.setIndent((IndentImpl)subBlocks.get(0).getIndent()); - } - return wrapper; + + if (isInsideFormattingRanges(rootBlock, rootBlockIsRightBlock) || shouldCollectAlignmentsAround(rootBlock)) { + final List subBlocks = rootBlock.getSubBlocks(); + if (subBlocks.isEmpty()) { + final AbstractBlockWrapper wrapper = buildLeafBlock(rootBlock, parent, false, index, parentBlock); + if (!subBlocks.isEmpty()) { + wrapper.setIndent((IndentImpl)subBlocks.get(0).getIndent()); } - return buildCompositeBlock(rootBlock, parent, index, currentWrapParent, rootBlockIsRightBlock); - } - else { - //block building is skipped - return buildLeafBlock(rootBlock, parent, true, index, parentBlock); + return wrapper; } + return buildCompositeBlock(rootBlock, parent, index, currentWrapParent, rootBlockIsRightBlock); } - finally { - myReadOnlyBlockInformationProvider = previousProvider; + else { + return buildLeafBlock(rootBlock, parent, true, index, parentBlock); } } + private boolean shouldCollectAlignmentsAround(Block rootBlock) { + return myCollectAlignmentsInsideFormattingRange && isInsideExtendedAffectedRange(rootBlock); + } + private void collectAlignments(Block rootBlock) { if (myCollectAlignmentsInsideFormattingRange && rootBlock.getAlignment() != null && isAffectedByFormatting(rootBlock) && !myInsideFormatRestrictingTag) diff --git a/platform/lang-impl/src/com/intellij/formatting/engine/State.java b/platform/lang-impl/src/com/intellij/formatting/engine/State.java index 77f1760ae594..92c66d6b2eeb 100644 --- a/platform/lang-impl/src/com/intellij/formatting/engine/State.java +++ b/platform/lang-impl/src/com/intellij/formatting/engine/State.java @@ -26,7 +26,7 @@ public abstract class State { } } - public boolean isDone() { + public final boolean isDone() { return myDone; } diff --git a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionAction.java b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionAction.java index 6705fdf1f7f1..5dc1116760ec 100644 --- a/platform/lang-impl/src/com/intellij/ide/actions/GotoActionAction.java +++ b/platform/lang-impl/src/com/intellij/ide/actions/GotoActionAction.java @@ -26,6 +26,7 @@ import com.intellij.ide.util.gotoByName.GotoActionModel; import com.intellij.openapi.Disposable; import com.intellij.openapi.actionSystem.*; import com.intellij.openapi.actionSystem.ex.ActionUtil; +import com.intellij.openapi.actionSystem.impl.ActionMenu; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.application.TransactionGuard; @@ -53,10 +54,7 @@ import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.*; -import java.awt.event.InputEvent; -import java.awt.event.KeyEvent; -import java.awt.event.MouseAdapter; -import java.awt.event.MouseEvent; +import java.awt.event.*; import java.util.Set; public class GotoActionAction extends GotoActionBase implements DumbAware { @@ -110,6 +108,9 @@ public class GotoActionAction extends GotoActionBase implements DumbAware { if (text != null && myDropdownPopup != null) { myDropdownPopup.setAdText(text, SwingConstants.LEFT); } + + String description = getValueDescription(value); + ActionMenu.showDescriptionInStatusBar(true, myList, description); } @Nullable @@ -124,6 +125,28 @@ public class GotoActionAction extends GotoActionBase implements DumbAware { return getAdText(); } }); + myList.addMouseMotionListener(new MouseMotionAdapter() { + @Override + public void mouseMoved(MouseEvent e) { + int index = myList.locationToIndex(e.getPoint()); + if (index == -1) return; + Object value = myList.getModel().getElementAt(index); + String description = getValueDescription(value); + ActionMenu.showDescriptionInStatusBar(true, myList, description); + } + }); + } + + @Nullable + private String getValueDescription(@Nullable Object value) { + if (value instanceof GotoActionModel.MatchedValue) { + GotoActionModel.MatchedValue mv = (GotoActionModel.MatchedValue)value; + if (mv.value instanceof GotoActionModel.ActionWrapper) { + AnAction action = ((GotoActionModel.ActionWrapper)mv.value).getAction(); + return action.getTemplatePresentation().getDescription(); + } + } + return null; } @NotNull @@ -144,7 +167,9 @@ public class GotoActionAction extends GotoActionBase implements DumbAware { public void setDisposed(boolean disposedFlag) { super.setDisposed(disposedFlag); Disposer.dispose(disposable); - + + ActionMenu.showDescriptionInStatusBar(true, myList, null); + for (ListSelectionListener listener : myList.getListSelectionListeners()) { myList.removeListSelectionListener(listener); } diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/DefaultFileNavigationContributor.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/DefaultFileNavigationContributor.java index 8d74c9fba450..2304b9ebcee1 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/DefaultFileNavigationContributor.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/DefaultFileNavigationContributor.java @@ -69,7 +69,7 @@ public class DefaultFileNavigationContributor implements ChooseByNameContributor @Override public void processNames(@NotNull final Processor processor, @NotNull GlobalSearchScope scope, IdFilter filter) { long started = System.currentTimeMillis(); - FileBasedIndex.getInstance().processAllKeys(FilenameIndex.NAME, s -> processor.process(s), scope, filter); + FilenameIndex.processAllFileNames(processor, scope, filter); if (IdFilter.LOG.isDebugEnabled()) { IdFilter.LOG.debug("All names retrieved:" + (System.currentTimeMillis() - started)); } diff --git a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java index 2ca3a7cb88c2..f2a9425950a7 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java +++ b/platform/lang-impl/src/com/intellij/ide/util/gotoByName/GotoActionModel.java @@ -541,6 +541,7 @@ public class GotoActionModel implements ChooseByNameModel, Comparator, E panel.add(createIconLabel(presentation.getIcon()), BorderLayout.WEST); } appendWithColoredMatches(nameComponent, getName(presentation.getText(), groupName, toggle), pattern, fg, isSelected); + panel.setToolTipText(presentation.getDescription()); Shortcut[] shortcuts = KeymapManager.getInstance().getActiveKeymap().getShortcuts(ActionManager.getInstance().getId(anAction)); String shortcutText = KeymapUtil.getPreferredShortcutText( diff --git a/platform/lang-impl/src/com/intellij/mock/MockFileManager.java b/platform/lang-impl/src/com/intellij/mock/MockFileManager.java index 2863363f509c..04848c280611 100644 --- a/platform/lang-impl/src/com/intellij/mock/MockFileManager.java +++ b/platform/lang-impl/src/com/intellij/mock/MockFileManager.java @@ -22,11 +22,14 @@ import com.intellij.psi.PsiFile; import com.intellij.psi.SingleRootFileViewProvider; import com.intellij.psi.impl.PsiManagerEx; import com.intellij.psi.impl.file.impl.FileManager; -import com.intellij.util.containers.WeakFactoryMap; +import com.intellij.util.containers.ConcurrentWeakFactoryMap; +import com.intellij.util.containers.ContainerUtil; +import com.intellij.util.containers.FactoryMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.List; +import java.util.Map; /** * @author peter @@ -35,7 +38,12 @@ public class MockFileManager implements FileManager { private final PsiManagerEx myManager; // in mock tests it's LightVirtualFile, they're only alive when they're referenced, // and there can not be several instances representing the same file - private final WeakFactoryMap myViewProviders = new WeakFactoryMap() { + private final FactoryMap myViewProviders = new ConcurrentWeakFactoryMap() { + @Override + protected Map createMap() { + return ContainerUtil.createConcurrentWeakKeyWeakValueMap(); + } + @Override protected FileViewProvider create(VirtualFile key) { return new SingleRootFileViewProvider(myManager, key); diff --git a/platform/lang-impl/src/com/intellij/openapi/fileTypes/FileTypeUsagesCollector.java b/platform/lang-impl/src/com/intellij/openapi/fileTypes/FileTypeUsagesCollector.java index bccc71ef939d..9376aa780363 100644 --- a/platform/lang-impl/src/com/intellij/openapi/fileTypes/FileTypeUsagesCollector.java +++ b/platform/lang-impl/src/com/intellij/openapi/fileTypes/FileTypeUsagesCollector.java @@ -22,13 +22,11 @@ import com.intellij.internal.statistic.beans.UsageDescriptor; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.io.FileUtil; -import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.search.FileTypeIndex; import com.intellij.psi.search.GlobalSearchScope; import com.intellij.util.NotNullFunction; import com.intellij.util.ThreeState; import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.indexing.FileBasedIndex; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -64,21 +62,14 @@ public class FileTypeUsagesCollector extends AbstractApplicationUsagesCollector } final String ideaDirPath = getIdeaDirPath(project); ApplicationManager.getApplication().runReadAction(() -> { - FileBasedIndex.getInstance().processValues( - FileTypeIndex.NAME, - fileType, - null, - new FileBasedIndex.ValueProcessor() { - @Override - public boolean process(VirtualFile file, Void value) { - //skip files from .idea directory otherwise 99% of projects would have XML and PLAIN_TEXT file types - if (ideaDirPath == null || FileUtil.isAncestorThreeState(ideaDirPath, file.getPath(), true) == ThreeState.NO) { - usedFileTypes.add(fileType); - return false; - } - return true; - } - }, GlobalSearchScope.projectScope(project)); + FileTypeIndex.processFiles(fileType, file -> { + //skip files from .idea directory otherwise 99% of projects would have XML and PLAIN_TEXT file types + if (ideaDirPath == null || FileUtil.isAncestorThreeState(ideaDirPath, file.getPath(), true) == ThreeState.NO) { + usedFileTypes.add(fileType); + return false; + } + return true; + }, GlobalSearchScope.projectScope(project)); }); } return ContainerUtil.map2Set(usedFileTypes, (NotNullFunction)fileType -> new UsageDescriptor(fileType.getName(), 1)); diff --git a/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleManagerComponent.java b/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleManagerComponent.java index 50ac43c3fc1d..3457d8fc0953 100644 --- a/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleManagerComponent.java +++ b/platform/lang-impl/src/com/intellij/openapi/module/impl/ModuleManagerComponent.java @@ -68,7 +68,9 @@ public class ModuleManagerComponent extends ModuleManagerImpl { long t = System.currentTimeMillis(); loadModules(myModuleModel); t = System.currentTimeMillis() - t; - LOG.info(myModuleModel.getModules().length + " module(s) loaded in " + t + " ms"); + if (!ApplicationManager.getApplication().isUnitTestMode()) { + LOG.info(myModuleModel.getModules().length + " module(s) loaded in " + t + " ms"); + } } }); diff --git a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/LevelChooserAction.java b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/LevelChooserAction.java index 0920f870d296..5a3bb8758835 100644 --- a/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/LevelChooserAction.java +++ b/platform/lang-impl/src/com/intellij/profile/codeInspection/ui/LevelChooserAction.java @@ -86,8 +86,7 @@ public abstract class LevelChooserAction extends ComboBoxAction implements DumbA return getSeverities(severityRegistrar, true); } - public static List getSeverities(final SeverityRegistrar severityRegistrar, - boolean includeDoNotShow) { + public static List getSeverities(final SeverityRegistrar severityRegistrar, boolean includeDoNotShow) { final List severities = new ArrayList(); for (final SeverityRegistrar.SeverityBasedTextAttributes type : SeverityUtil.getRegisteredHighlightingInfoTypes(severityRegistrar)) { severities.add(type.getSeverity()); @@ -95,7 +94,7 @@ public abstract class LevelChooserAction extends ComboBoxAction implements DumbA if (includeDoNotShow) { severities.add(HighlightSeverity.INFORMATION); } - Collections.sort(severities, (a, b) -> -severityRegistrar.compare(a, b)); + Collections.sort(severities, severityRegistrar.reversed()); return severities; } diff --git a/platform/lang-impl/src/com/intellij/psi/formatter/IndentRangesCalculator.kt b/platform/lang-impl/src/com/intellij/psi/formatter/IndentRangesCalculator.kt new file mode 100644 index 000000000000..6fad905b9a18 --- /dev/null +++ b/platform/lang-impl/src/com/intellij/psi/formatter/IndentRangesCalculator.kt @@ -0,0 +1,45 @@ +/* + * Copyright 2000-2016 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.psi.formatter + +import com.intellij.openapi.editor.Document +import com.intellij.openapi.util.TextRange +import com.intellij.util.text.CharArrayUtil + +class IndentRangesCalculator(private val document: Document, + private val textRange: TextRange) +{ + private val startOffset = textRange.startOffset + private val endOffset = textRange.endOffset + + fun calcIndentRanges(): List { + val startLine = document.getLineNumber(startOffset) + val endLine = document.getLineNumber(endOffset) + val chars = document.charsSequence + + val indentRanges = mutableListOf() + + for (line in startLine..endLine) { + val lineStartOffset = document.getLineStartOffset(line) + val lineEndOffset = document.getLineEndOffset(line) + val firstNonWsChar = CharArrayUtil.shiftForward(chars, lineStartOffset, lineEndOffset + 1, " \t") + indentRanges.add(TextRange(lineStartOffset, firstNonWsChar)) + } + + return indentRanges + } + +} \ No newline at end of file diff --git a/platform/lang-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java b/platform/lang-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java index 6310f66298d2..2ca0874b6afd 100644 --- a/platform/lang-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java +++ b/platform/lang-impl/src/com/intellij/psi/formatter/common/AbstractBlock.java @@ -19,12 +19,16 @@ package com.intellij.psi.formatter.common; import com.intellij.formatting.*; import com.intellij.injected.editor.DocumentWindow; import com.intellij.lang.ASTNode; +import com.intellij.openapi.editor.Document; +import com.intellij.openapi.project.Project; import com.intellij.openapi.util.TextRange; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.formatter.FormatterUtil; +import com.intellij.psi.formatter.IndentRangesCalculator; import com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil; +import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.ContainerUtilRt; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -178,4 +182,40 @@ public abstract class AbstractBlock implements ASTBlock { public String toString() { return myNode.getText() + " " + getTextRange(); } + + /** + * @return additional range to reformat, when this block if formatted + */ + @Nullable + public ExtraReformatRanges getExtraRangesToFormat(FormatTextRanges ranges) { + if (ranges.isInsertedBlock(this) && myNode.textContains('\n')) { + List extra = calculateExtraRanges(myNode); + return new ExtraReformatRanges(extra); + } + + return null; + } + + @NotNull + private List calculateExtraRanges(@NotNull ASTNode node) { + Document document = retrieveDocument(node, getProject(node)); + if (document != null) { + TextRange ranges = node.getTextRange(); + return new IndentRangesCalculator(document, ranges).calcIndentRanges(); + } + + return ContainerUtil.newArrayList(myNode.getTextRange()); + } + + + private static Document retrieveDocument(@NotNull ASTNode node, @NotNull Project project) { + PsiFile file = node.getPsi().getContainingFile(); + return PsiDocumentManager.getInstance(project).getDocument(file); + } + + @NotNull + private static Project getProject(@NotNull ASTNode node) { + return node.getPsi().getProject(); + } + } diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java index 8357337c45e6..9b1bb43cb0da 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleManagerImpl.java @@ -165,15 +165,24 @@ public class CodeStyleManagerImpl extends CodeStyleManager { } @Override - public void reformatTextWithContext(@NotNull PsiFile file, @NotNull Collection ranges) throws IncorrectOperationException { - reformatText(file, ranges, null, true); + public void reformatTextWithContext(@NotNull PsiFile file, @NotNull FormatRangesInfo helper) throws IncorrectOperationException { + reformatText(file, helper, null, true); } public void reformatText(@NotNull PsiFile file, @NotNull Collection ranges, @Nullable Editor editor) throws IncorrectOperationException { reformatText(file, ranges, editor, false); } - + public void reformatText(@NotNull PsiFile file, @NotNull Collection ranges, @Nullable Editor editor, boolean reformatContext) throws IncorrectOperationException { + reformatText(file, new SimpleFormatRangesInfo(ranges), editor, reformatContext); + } + + private void reformatText(@NotNull PsiFile file, + @NotNull FormatRangesInfo rangesInfo, + @Nullable Editor editor, + boolean reformatContext) throws IncorrectOperationException + { + List ranges = rangesInfo.getRangesToFormat(); if (ranges.isEmpty()) { return; } @@ -228,7 +237,7 @@ public class CodeStyleManagerImpl extends CodeStyleManager { )); } - FormatTextRanges formatRanges = new FormatTextRanges(); + FormatTextRanges formatRanges = new FormatTextRanges(rangesInfo); for (TextRange range : correctedRanges) { formatRanges.add(range, true); } @@ -319,7 +328,7 @@ public class CodeStyleManagerImpl extends CodeStyleManager { final FormattingModelBuilder builder = LanguageFormatting.INSTANCE.forContext(containingFile); if (builder != null) { final FormattingModel model = CoreFormatterUtil.buildModel(builder, containingFile, getSettings(), FormattingMode.REFORMAT); - FormatterEx.getInstanceEx().formatAroundRange(model, getSettings(), textRange, containingFile.getFileType()); + FormatterEx.getInstanceEx().formatAroundRange(model, getSettings(), containingFile, textRange); } adjustLineIndent(containingFile, textRange); diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReferenceCompletionImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReferenceCompletionImpl.java index c0f7361bd9aa..30f13f697c3a 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReferenceCompletionImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/providers/FileReferenceCompletionImpl.java @@ -15,10 +15,14 @@ */ package com.intellij.psi.impl.source.resolve.reference.impl.providers; +import com.intellij.codeInsight.completion.PrioritizedLookupElement; +import com.intellij.codeInsight.lookup.LookupElement; import com.intellij.codeInsight.lookup.LookupElementBuilder; +import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Iconable; import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; import com.intellij.psi.PsiFileSystemItem; import com.intellij.psi.PsiNamedElement; import com.intellij.psi.search.PsiElementProcessor; @@ -90,6 +94,7 @@ public class FileReferenceCompletionImpl extends FileReferenceCompletion { } } + final FileType[] types = reference.getFileReferenceSet().getSuitableFileTypes(); final THashSet set = new THashSet(collector.getResults(), VARIANTS_HASHING_STRATEGY); final PsiElement[] candidates = PsiUtilCore.toPsiElementArray(set); @@ -100,6 +105,10 @@ public class FileReferenceCompletionImpl extends FileReferenceCompletion { if (item == null) { item = FileInfoManager.getFileLookupItem(candidate); } + if (candidate instanceof PsiFile && item instanceof LookupElement && + types.length > 0 && ArrayUtil.contains(((PsiFile)candidate).getFileType(), types)) { + item = PrioritizedLookupElement.withPriority((LookupElement)item, Double.MAX_VALUE); + } variants[i] = item; } diff --git a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/CallerChooserBase.java b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/CallerChooserBase.java index 0032c5d73a97..c1a5e70b2620 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/CallerChooserBase.java +++ b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/CallerChooserBase.java @@ -275,8 +275,8 @@ public abstract class CallerChooserBase extends DialogWrap private void getSelectedMethodsInner(final MethodNodeBase node, final Set allMethods) { if (node.isChecked()) { M method = node.getMethod(); - final M[] superMethods = findDeepestSuperMethods(method); - if (superMethods.length == 0) { + final M[] superMethods = method == myMethod ? null : findDeepestSuperMethods(method); + if (superMethods == null || superMethods.length == 0) { allMethods.add(method); } else { diff --git a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessorBase.java b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessorBase.java index d3c0f6a202bc..ae077b6aa28a 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessorBase.java +++ b/platform/lang-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureProcessorBase.java @@ -50,6 +50,7 @@ import java.util.*; */ public abstract class ChangeSignatureProcessorBase extends BaseRefactoringProcessor { private static final Logger LOG = Logger.getInstance("#com.intellij.refactoring.changeSignature.ChangeSignatureProcessorBase"); + protected static final String REFACTORING_ID = "refactoring.changeSignature"; protected final ChangeInfo myChangeInfo; protected final PsiManager myManager; @@ -134,7 +135,7 @@ public abstract class ChangeSignatureProcessorBase extends BaseRefactoringProces @Nullable @Override protected String getRefactoringId() { - return "refactoring.changeSignature"; + return REFACTORING_ID; } @Nullable diff --git a/platform/lang-impl/src/com/intellij/refactoring/copy/CopyFilesOrDirectoriesDialog.java b/platform/lang-impl/src/com/intellij/refactoring/copy/CopyFilesOrDirectoriesDialog.java index 324398d16e85..c79c8bd41fa7 100644 --- a/platform/lang-impl/src/com/intellij/refactoring/copy/CopyFilesOrDirectoriesDialog.java +++ b/platform/lang-impl/src/com/intellij/refactoring/copy/CopyFilesOrDirectoriesDialog.java @@ -270,7 +270,7 @@ public class CopyFilesOrDirectoriesDialog extends DialogWrapper { return; } - if (myFileCopy) { + if (myFileCopy && myTargetDirectory != null) { if (FileTypeChooser.getKnownFileTypeOrAssociate(myTargetDirectory.getVirtualFile(), newName, myProject) == null) { myUnknownFileType = true; } diff --git a/platform/lang-impl/src/com/intellij/unscramble/AnnotateStackTraceAction.java b/platform/lang-impl/src/com/intellij/unscramble/AnnotateStackTraceAction.java index ec6f4f9bd929..ab039c02d55e 100644 --- a/platform/lang-impl/src/com/intellij/unscramble/AnnotateStackTraceAction.java +++ b/platform/lang-impl/src/com/intellij/unscramble/AnnotateStackTraceAction.java @@ -29,12 +29,12 @@ import com.intellij.openapi.editor.colors.EditorFontType; import com.intellij.openapi.editor.ex.EditorGutterComponentEx; import com.intellij.openapi.editor.markup.RangeHighlighter; import com.intellij.openapi.fileEditor.OpenFileDescriptor; -import com.intellij.openapi.progress.PerformInBackgroundOption; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.progress.Task; -import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.*; import com.intellij.openapi.vcs.actions.ActiveAnnotationGutter; @@ -47,10 +47,14 @@ import com.intellij.openapi.vcs.history.VcsHistorySession; import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.ContainerUtil; +import com.intellij.util.containers.MultiMap; import com.intellij.util.text.DateFormatUtil; +import com.intellij.util.ui.update.MergingUpdateQueue; +import com.intellij.util.ui.update.Update; import com.intellij.vcs.history.VcsHistoryProviderEx; import com.intellij.vcsUtil.VcsUtil; import com.intellij.xml.util.XmlStringUtil; +import org.jetbrains.annotations.CalledInAwt; import org.jetbrains.annotations.CalledWithReadLock; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -59,18 +63,13 @@ import java.awt.*; import java.util.*; import java.util.List; -/** -* @author Konstantin Bulenkov -*/ -public class AnnotateStackTraceAction extends AnAction implements DumbAware { +public class AnnotateStackTraceAction extends DumbAwareAction { private static final Logger LOG = Logger.getInstance(AnnotateStackTraceAction.class); private final EditorHyperlinkSupport myHyperlinks; - private Map cache; - private Date newestDate; - private int maxDateLength = 0; private final Editor myEditor; - private boolean myGutterShowed = false; + + private boolean myIsLoading = false; public AnnotateStackTraceAction(@NotNull Editor editor, @NotNull EditorHyperlinkSupport hyperlinks) { super("Show files modification info", null, AllIcons.Actions.Annotate); @@ -78,101 +77,37 @@ public class AnnotateStackTraceAction extends AnAction implements DumbAware { myEditor = editor; } + @Override + public void update(AnActionEvent e) { + boolean isShown = myEditor.getGutter().isAnnotationsShown(); + e.getPresentation().setEnabled(!isShown && !myIsLoading); + } + @Override public void actionPerformed(final AnActionEvent e) { - cache = new HashMap(); + myIsLoading = true; + + ProgressManager.getInstance().run(new Task.Backgroundable(myEditor.getProject(), "Getting File History", true) { + private final Object LOCK = new Object(); + private final MergingUpdateQueue myUpdateQueue = new MergingUpdateQueue("AnnotateStackTraceAction", 200, true, null); + + private MyActiveAnnotationGutter myGutter; - ProgressManager.getInstance().run( - new Task.Backgroundable(myEditor.getProject(), "Getting File History", true, PerformInBackgroundOption.ALWAYS_BACKGROUND) { @Override - public boolean shouldStartInBackground() { - return true; + public void onCancel() { + myEditor.getGutter().closeAllAnnotations(); } @Override - public void onSuccess() { - } - - private void showGutter() { - ActiveAnnotationGutter gutter = new ActiveAnnotationGutter() { - @Override - public void doAction(int lineNum) { - final LastRevision revision = cache.get(lineNum); - if (revision == null) return; - - VirtualFile file = getHyperlinkVirtualFile(myHyperlinks.findAllHyperlinksOnLine(lineNum)); - if (file == null) return; - - final Project project = getProject(); - final AbstractVcs vcs = ProjectLevelVcsManager.getInstance(project).getVcsFor(file); - if (vcs != null) { - final VcsRevisionNumber number = revision.getNumber(); - final VcsKey vcsKey = vcs.getKeyInstanceMethod(); - ShowAllAffectedGenericAction.showSubmittedFiles(project, number, file, vcsKey); - } - } - - @Override - public Cursor getCursor(int lineNum) { - return cache.containsKey(lineNum) ? Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) : Cursor.getDefaultCursor(); - } - - @Override - public String getLineText(int line, Editor editor) { - final LastRevision revision = cache.get(line); - if (revision != null) { - return String.format("%"+maxDateLength+"s", DateFormatUtil.formatPrettyDate(revision.getDate())) + " " + revision.getAuthor(); - } - return ""; - } - - @Override - public String getToolTip(int line, Editor editor) { - final LastRevision revision = cache.get(line); - if (revision != null) { - return XmlStringUtil.escapeString( - revision.getAuthor() + " " + DateFormatUtil.formatDateTime(revision.getDate()) + "\n" + - revision.getMessage() - ); - } - return null; - } - - @Override - public EditorFontType getStyle(int line, Editor editor) { - LastRevision revision = cache.get(line); - return revision != null && revision.getDate().equals(newestDate) ? EditorFontType.BOLD : EditorFontType.PLAIN; - } - - @Override - public ColorKey getColor(int line, Editor editor) { - return AnnotationSource.LOCAL.getColor(); - } - - @Override - public Color getBgColor(int line, Editor editor) { - return null; - } - - @Override - public List getPopupActions(int line, Editor editor) { - return Collections.emptyList(); - } - - @Override - public void gutterClosed() { - myGutterShowed = false; - } - }; - myEditor.getGutter().registerTextAnnotation(gutter, gutter); - - myGutterShowed = true; + public void onFinished() { + myIsLoading = false; + Disposer.dispose(myUpdateQueue); } @Override - public void run(@NotNull final ProgressIndicator indicator) { - final List files = new ArrayList(); - final HashMap> files2lines = new HashMap>(); + public void run(@NotNull ProgressIndicator indicator) { + MultiMap files2lines = new MultiMap<>(); + Map revisions = ContainerUtil.newHashMap(); ApplicationManager.getApplication().runReadAction(() -> { for (int line = 0; line < myEditor.getDocument().getLineCount(); line++) { @@ -180,52 +115,58 @@ public class AnnotateStackTraceAction extends AnAction implements DumbAware { VirtualFile file = getHyperlinkVirtualFile(myHyperlinks.findAllHyperlinksOnLine(line)); if (file == null) continue; - if (files2lines.containsKey(file)) { - files2lines.get(file).add(line); - } - else { - final ArrayList lines = new ArrayList(); - lines.add(line); - files2lines.put(file, lines); - files.add(file); - } + files2lines.putValue(file, line); } }); - for (VirtualFile file : files) { + files2lines.entrySet().forEach(entry -> { indicator.checkCanceled(); + VirtualFile file = entry.getKey(); + Collection lines = entry.getValue(); LastRevision revision = getLastRevision(file); - if (revision != null) { - final List lines = files2lines.get(file); + if (revision == null) return; - final Date date = revision.getDate(); - if (newestDate == null || date.after(newestDate)) { - newestDate = date; - } - final int length = DateFormatUtil.formatPrettyDate(date).length(); - if (length > maxDateLength) { - maxDateLength = length; - } + synchronized (LOCK) { for (Integer line : lines) { - cache.put(line, revision); + revisions.put(line, revision); } - ApplicationManager.getApplication().invokeLater(() -> { - if (!myGutterShowed) { - showGutter(); - } - else { - ((EditorGutterComponentEx)myEditor.getGutter()).revalidateMarkup(); - } - }); } + + myUpdateQueue.queue(new Update("update") { + @Override + public void run() { + updateGutter(indicator, revisions); + } + }); + }); + + // myUpdateQueue can be disposed before the last revisions are passed to the gutter + ApplicationManager.getApplication().invokeLater(() -> updateGutter(indicator, revisions)); + } + + @CalledInAwt + private void updateGutter(@NotNull ProgressIndicator indicator, @NotNull Map revisions) { + if (indicator.isCanceled()) return; + + if (myGutter == null) { + myGutter = new MyActiveAnnotationGutter(getProject(), myHyperlinks, indicator); + myEditor.getGutter().registerTextAnnotation(myGutter, myGutter); } + + Map revisionsCopy; + synchronized (LOCK) { + revisionsCopy = ContainerUtil.newHashMap(revisions); + } + + myGutter.updateData(revisionsCopy); + ((EditorGutterComponentEx)myEditor.getGutter()).revalidateMarkup(); } @Nullable private LastRevision getLastRevision(@NotNull VirtualFile file) { try { - final AbstractVcs vcs = VcsUtil.getVcsFor(myEditor.getProject(), file); + AbstractVcs vcs = VcsUtil.getVcsFor(myEditor.getProject(), file); if (vcs == null) return null; VcsHistoryProvider historyProvider = vcs.getVcsHistoryProvider(); @@ -237,7 +178,8 @@ public class AnnotateStackTraceAction extends AnAction implements DumbAware { VcsFileRevision revision = ((VcsHistoryProviderEx)historyProvider).getLastRevision(filePath); if (revision == null) return null; return LastRevision.create(revision); - } else { + } + else { VcsHistorySession session = historyProvider.createSessionFor(filePath); if (session == null) return null; @@ -255,11 +197,6 @@ public class AnnotateStackTraceAction extends AnAction implements DumbAware { }); } - @Override - public void update(AnActionEvent e) { - e.getPresentation().setEnabled(!myGutterShowed); - } - @Nullable @CalledWithReadLock private static VirtualFile getHyperlinkVirtualFile(@NotNull List links) { @@ -313,4 +250,112 @@ public class AnnotateStackTraceAction extends AnAction implements DumbAware { return myMessage; } } + + private static class MyActiveAnnotationGutter implements ActiveAnnotationGutter { + @NotNull private final Project myProject; + @NotNull private final EditorHyperlinkSupport myHyperlinks; + @NotNull private final ProgressIndicator myIndicator; + + @NotNull private Map myRevisions = Collections.emptyMap(); + private Date myNewestDate = null; + private int myMaxDateLength = 0; + + public MyActiveAnnotationGutter(@NotNull Project project, + @NotNull EditorHyperlinkSupport hyperlinks, + @NotNull ProgressIndicator indicator) { + myProject = project; + myHyperlinks = hyperlinks; + myIndicator = indicator; + } + + @Override + public void doAction(int lineNum) { + LastRevision revision = myRevisions.get(lineNum); + if (revision == null) return; + + VirtualFile file = getHyperlinkVirtualFile(myHyperlinks.findAllHyperlinksOnLine(lineNum)); + if (file == null) return; + + AbstractVcs vcs = ProjectLevelVcsManager.getInstance(myProject).getVcsFor(file); + if (vcs != null) { + VcsRevisionNumber number = revision.getNumber(); + VcsKey vcsKey = vcs.getKeyInstanceMethod(); + ShowAllAffectedGenericAction.showSubmittedFiles(myProject, number, file, vcsKey); + } + } + + @Override + public Cursor getCursor(int lineNum) { + return myRevisions.containsKey(lineNum) ? Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) : Cursor.getDefaultCursor(); + } + + @Override + public String getLineText(int line, Editor editor) { + LastRevision revision = myRevisions.get(line); + if (revision != null) { + return String.format("%" + myMaxDateLength + "s", DateFormatUtil.formatPrettyDate(revision.getDate())) + " " + revision.getAuthor(); + } + return ""; + } + + @Override + public String getToolTip(int line, Editor editor) { + LastRevision revision = myRevisions.get(line); + if (revision != null) { + return XmlStringUtil.escapeString( + revision.getAuthor() + " " + DateFormatUtil.formatDateTime(revision.getDate()) + "\n" + + revision.getMessage() + ); + } + return null; + } + + @Override + public EditorFontType getStyle(int line, Editor editor) { + LastRevision revision = myRevisions.get(line); + return revision != null && revision.getDate().equals(myNewestDate) ? EditorFontType.BOLD : EditorFontType.PLAIN; + } + + @Override + public ColorKey getColor(int line, Editor editor) { + return AnnotationSource.LOCAL.getColor(); + } + + @Override + public Color getBgColor(int line, Editor editor) { + return null; + } + + @Override + public List getPopupActions(int line, Editor editor) { + return Collections.emptyList(); + } + + @Override + public void gutterClosed() { + myIndicator.cancel(); + } + + @CalledInAwt + public void updateData(@NotNull Map revisions) { + myRevisions = revisions; + + Date newestDate = null; + int maxDateLength = 0; + + for (LastRevision revision : myRevisions.values()) { + Date date = revision.getDate(); + if (newestDate == null || date.after(newestDate)) { + newestDate = date; + } + int length = DateFormatUtil.formatPrettyDate(date).length(); + if (length > maxDateLength) { + maxDateLength = length; + } + } + + myNewestDate = newestDate; + myMaxDateLength = maxDateLength; + } + } } diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index a5410d645808..ce59608b632b 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -38,7 +38,6 @@ import com.intellij.openapi.module.ModuleManager; import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; -import com.intellij.openapi.progress.Task; import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator; import com.intellij.openapi.project.*; import com.intellij.openapi.roots.*; @@ -119,10 +118,6 @@ public class FileBasedIndexImpl extends FileBasedIndex { private final List myIndexableSets = ContainerUtil.createLockFreeCopyOnWriteList(); private final Map myIndexableSetToProjectMap = new THashMap(); - private static final int OK = 1; - private static final int REQUIRES_REBUILD = 2; - private static final Map, AtomicInteger> ourRebuildStatus = new THashMap, AtomicInteger>(); - private final MessageBusConnection myConnection; private final FileDocumentManager myFileDocumentManager; private final FileTypeManagerImpl myFileTypeManager; @@ -521,8 +516,8 @@ public class FileBasedIndexImpl extends FileBasedIndex { for (ID indexId : state.getIndexIDs()) { final UpdatableIndex index = state.getIndex(indexId); assert index != null; - if(ourRebuildStatus.get(indexId).get() != OK) { - doClearIndex(indexId); // if the index was scheduled for rebuild, only clean it + if (!RebuildStatus.isOk(indexId)) { + index.clear(); // if the index was scheduled for rebuild, only clean it } index.dispose(); } @@ -706,7 +701,7 @@ public class FileBasedIndexImpl extends FileBasedIndex { try { if (isUpToDateCheckEnabled()) { try { - if (ourRebuildStatus.get(indexId).get() != OK) { + if (!RebuildStatus.isOk(indexId)) { throw new ProcessCanceledException(); } forceUpdate(project, filter, restrictedFile); @@ -1178,12 +1173,22 @@ public class FileBasedIndexImpl extends FileBasedIndex { } } - private void clearIndex(@NotNull final ID indexId) throws StorageException { - advanceIndexVersion(indexId); - doClearIndex(indexId); + void clearIndicesIfNecessary() { + waitUntilIndicesAreInitialized(); + for (ID indexId : getState().getIndexIDs()) { + try { + RebuildStatus.clearIndexIfNecessary(indexId, getIndex(indexId)::clear); + } + catch (StorageException e) { + requestRebuild(indexId); + LOG.error(e); + } + } } - private void doClearIndex(ID indexId) throws StorageException { + private void clearIndex(@NotNull final ID indexId) throws StorageException { + advanceIndexVersion(indexId); + final UpdatableIndex index = myState.getIndex(indexId); assert index != null : "Index with key " + indexId + " not found or not registered properly"; index.clear(); @@ -1419,10 +1424,7 @@ public class FileBasedIndexImpl extends FileBasedIndex { @Override public void requestRebuild(final ID indexId, final Throwable throwable) { cleanupProcessedFlag(); - final AtomicInteger status = ourRebuildStatus.get(indexId); - boolean requiresRebuildWasSet = status.compareAndSet(OK, REQUIRES_REBUILD); - - if (requiresRebuildWasSet) { + if (RebuildStatus.requestRebuild(indexId)) { String message = "Rebuild requested for index " + indexId; Application app = ApplicationManager.getApplication(); if (app.isUnitTestMode() && app.isReadAccessAllowed() && !app.isDispatchThread()) { @@ -1438,34 +1440,13 @@ public class FileBasedIndexImpl extends FileBasedIndex { if (!myInitialized) return; advanceIndexVersion(indexId); - final Runnable rebuildRunnable = () -> { - final Ref success = Ref.create(true); - new Task.Modal(null, "Updating index", false) { - @Override - public void run(@NotNull final ProgressIndicator indicator) { - indicator.setIndeterminate(true); - try { - doClearIndex(indexId); - } - catch (StorageException e) { - success.set(false); - requestRebuild(indexId); - LOG.info(e); - } - } - }.queue(); - if (success.get()) { - scheduleIndexRebuild("checkRebuild"); - status.compareAndSet(REQUIRES_REBUILD, OK); - } - }; + Runnable rebuildRunnable = () -> scheduleIndexRebuild("checkRebuild"); if (myIsUnitTestMode) { rebuildRunnable.run(); } else { // we do invoke later since we can have read lock acquired - //noinspection SSBasedInspection TransactionGuard.getInstance().submitTransactionLater(app, rebuildRunnable); } } @@ -1646,12 +1627,7 @@ public class FileBasedIndexImpl extends FileBasedIndex { void updateSingleIndex(@NotNull ID indexId, VirtualFile file, final int inputId, @Nullable FileContent currentFC) throws StorageException { - AtomicInteger rebuildStatus = ourRebuildStatus.get(indexId); - if (rebuildStatus == null) { - LOG.error("Problem updating " + indexId + " for " + inputId + "," + file + " with content:" + currentFC + ", initialized:" + myInitialized); - return; - } - if (rebuildStatus.get() == REQUIRES_REBUILD && !myIsUnitTestMode) { + if (!RebuildStatus.isOk(indexId) && !myIsUnitTestMode) { return; // the index is scheduled for rebuild, no need to update } myLocalModCount++; @@ -2356,7 +2332,7 @@ public class FileBasedIndexImpl extends FileBasedIndex { public FileIndexDataInitialization(FileBasedIndexExtension[] extensions) { for (FileBasedIndexExtension extension : extensions) { ID name = extension.getName(); - ourRebuildStatus.put(name, new AtomicInteger(OK)); + RebuildStatus.registerIndex(name); myUnsavedDataUpdateTasks.put(name, new DocumentUpdateTask(name)); @@ -2426,14 +2402,12 @@ public class FileBasedIndexImpl extends FileBasedIndex { myState = state; // memory barrier // check if rebuild was requested for any index during registration for (ID indexId : state.getIndexIDs()) { - if (ourRebuildStatus.get(indexId).compareAndSet(REQUIRES_REBUILD, OK)) { - try { - clearIndex(indexId); - } - catch (StorageException e) { - requestRebuild(indexId); - LOG.error(e); - } + try { + RebuildStatus.clearIndexIfNecessary(indexId, () -> clearIndex(indexId)); + } + catch (StorageException e) { + requestRebuild(indexId); + LOG.error(e); } } diff --git a/platform/lang-impl/src/com/intellij/util/indexing/RebuildStatus.java b/platform/lang-impl/src/com/intellij/util/indexing/RebuildStatus.java new file mode 100644 index 000000000000..2c445e5125ea --- /dev/null +++ b/platform/lang-impl/src/com/intellij/util/indexing/RebuildStatus.java @@ -0,0 +1,81 @@ +/* + * Copyright 2000-2016 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.util.indexing; + +import com.intellij.openapi.progress.ProgressManager; +import com.intellij.util.ThrowableRunnable; +import com.intellij.util.TimeoutUtil; +import com.intellij.util.containers.ContainerUtil; + +import java.util.Map; +import java.util.concurrent.atomic.AtomicReference; + +/** + * @author peter + */ +enum RebuildStatus { + OK, + REQUIRES_REBUILD, + DOING_REBUILD; + + private static final Map, AtomicReference> ourRebuildStatus = ContainerUtil.newTroveMap(); + + static void registerIndex(ID indexId) { + ourRebuildStatus.put(indexId, new AtomicReference<>(OK)); + } + + static boolean isOk(ID indexId) { + return ourRebuildStatus.get(indexId).get() == OK; + } + + static boolean requestRebuild(ID indexId) { + return ourRebuildStatus.get(indexId).compareAndSet(OK, REQUIRES_REBUILD); + } + + static void clearIndexIfNecessary(ID indexId, ThrowableRunnable clearAction) throws StorageException { + AtomicReference rebuildStatus = ourRebuildStatus.get(indexId); + if (rebuildStatus == null) { + throw new StorageException("Problem updating " + indexId); + } + + if (rebuildStatus.compareAndSet(REQUIRES_REBUILD, DOING_REBUILD)) { + doClear(clearAction, rebuildStatus); + } else { + waitUntilIndexReady(rebuildStatus); + } + } + + private static void doClear(ThrowableRunnable clearAction, AtomicReference status) throws StorageException { + try { + clearAction.run(); + } + catch (StorageException e) { + status.compareAndSet(DOING_REBUILD, REQUIRES_REBUILD); + throw e; + } + if (!status.compareAndSet(DOING_REBUILD, OK)) { + FileBasedIndexImpl.LOG.error("Unexpected status " + status.get()); + } + } + + private static void waitUntilIndexReady(AtomicReference rebuildStatus) { + while (rebuildStatus.get() != OK) { + ProgressManager.checkCanceled(); + TimeoutUtil.sleep(50); + } + } + +} diff --git a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java index 3086d01ab6da..1b525e30abda 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/UnindexedFilesUpdater.java @@ -18,7 +18,6 @@ package com.intellij.util.indexing; import com.intellij.ProjectTopics; import com.intellij.diagnostic.PerformanceWatcher; import com.intellij.ide.IdeBundle; -import com.intellij.ide.caches.FileContent; import com.intellij.ide.startup.impl.StartupManagerImpl; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; @@ -34,7 +33,6 @@ import com.intellij.openapi.roots.ModuleRootEvent; import com.intellij.openapi.roots.impl.PushedFilePropertiesUpdater; import com.intellij.openapi.startup.StartupManager; import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.Consumer; import org.jetbrains.annotations.NotNull; import java.util.List; @@ -71,6 +69,8 @@ public class UnindexedFilesUpdater extends DumbModeTask { indicator.setIndeterminate(true); indicator.setText(IdeBundle.message("progress.indexing.scanning")); + myIndex.clearIndicesIfNecessary(); + CollectingContentIterator finder = myIndex.createContentIterator(indicator); snapshot = PerformanceWatcher.takeSnapshot(); diff --git a/platform/platform-api/platform-api.iml b/platform/platform-api/platform-api.iml index 2455e9f385cc..fa8a000b28c8 100644 --- a/platform/platform-api/platform-api.iml +++ b/platform/platform-api/platform-api.iml @@ -36,5 +36,6 @@ + \ No newline at end of file diff --git a/platform/platform-api/src/com/intellij/ide/actions/exclusion/ExclusionHandler.java b/platform/platform-api/src/com/intellij/ide/actions/exclusion/ExclusionHandler.java index d208e93daef0..102a1e492e2f 100644 --- a/platform/platform-api/src/com/intellij/ide/actions/exclusion/ExclusionHandler.java +++ b/platform/platform-api/src/com/intellij/ide/actions/exclusion/ExclusionHandler.java @@ -26,6 +26,8 @@ import javax.swing.tree.MutableTreeNode; public interface ExclusionHandler { DataKey EXCLUSION_HANDLER = DataKey.create("tree.exclusion.handler"); + boolean isNodeExclusionAvailable(@NotNull T node); + boolean isNodeExcluded(@NotNull T node); void excludeNode(@NotNull T node); diff --git a/platform/platform-api/src/com/intellij/ide/actions/exclusion/TreeNodeExclusionAction.java b/platform/platform-api/src/com/intellij/ide/actions/exclusion/TreeNodeExclusionAction.java index a5f2443f710d..62986773d869 100644 --- a/platform/platform-api/src/com/intellij/ide/actions/exclusion/TreeNodeExclusionAction.java +++ b/platform/platform-api/src/com/intellij/ide/actions/exclusion/TreeNodeExclusionAction.java @@ -63,6 +63,7 @@ abstract class TreeNodeExclusionAction extends AnActi for (TreePath path : selection) { final T node = (T)path.getLastPathComponent(); TreeUtil.traverse(node, n -> { + if (!exclusionProcessor.isNodeExclusionAvailable((T)n)) return true; final Boolean isNodeExcluded = exclusionProcessor.isNodeExcluded((T)n); if (myIsExclude != isNodeExcluded) { isEnabled[0] = true; diff --git a/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java b/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java index 24035f4a272e..2b11fd784ef3 100644 --- a/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java +++ b/platform/platform-api/src/com/intellij/ide/util/treeView/AbstractTreeUi.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -31,11 +31,8 @@ import com.intellij.openapi.util.registry.RegistryValue; import com.intellij.ui.LoadingNode; import com.intellij.ui.treeStructure.AlwaysExpandedTree; import com.intellij.ui.treeStructure.Tree; -import com.intellij.util.Alarm; -import com.intellij.util.ArrayUtil; -import com.intellij.util.Consumer; -import com.intellij.util.SmartList; -import com.intellij.util.concurrency.WorkerThread; +import com.intellij.util.*; +import com.intellij.util.concurrency.QueueProcessor; import com.intellij.util.containers.ContainerUtil; import com.intellij.util.containers.HashSet; import com.intellij.util.enumeration.EnumerationCopy; @@ -49,6 +46,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.concurrency.AsyncPromise; import org.jetbrains.concurrency.Promise; +import org.jetbrains.concurrency.Promises; import javax.swing.*; import javax.swing.event.*; @@ -96,7 +94,10 @@ public class AbstractTreeUi { private TreeExpansionListener myExpansionListener; private MySelectionListener mySelectionListener; - private WorkerThread myWorker = null; + private final QueueProcessor myWorker = new QueueProcessor(runnable -> { + runnable.run(); + TimeoutUtil.sleep(1); + }); private final Set myActiveWorkerTasks = new HashSet(); private ProgressIndicator myProgress; @@ -455,10 +456,8 @@ public class AbstractTreeUi { disposeNode(getRootNode()); myElementToNodeMap.clear(); getUpdater().cancelAllRequests(); - if (myWorker != null) { - myWorker.dispose(true); - clearWorkerTasks(); - } + myWorker.clear(); + clearWorkerTasks(); TREE_NODE_WRAPPER.setValue(null); if (myProgress != null) { myProgress.cancel(); @@ -468,7 +467,6 @@ public class AbstractTreeUi { myTree = null; setUpdater(null); - myWorker = null; myTreeStructure = null; myBuilder.releaseUi(); myBuilder = null; @@ -941,7 +939,7 @@ public class AbstractTreeUi { return update.get(); } catch (IndexNotReadyException e) { - warnOnIndexNotReady(); + warnOnIndexNotReady(e); return false; } } @@ -1621,7 +1619,7 @@ public class AbstractTreeUi { }); } catch (IndexNotReadyException e) { - warnOnIndexNotReady(); + warnOnIndexNotReady(e); return ArrayUtil.EMPTY_OBJECT_ARRAY; } finally { @@ -1653,10 +1651,10 @@ public class AbstractTreeUi { return passOne.get(); } - private void warnOnIndexNotReady() { + private void warnOnIndexNotReady(IndexNotReadyException e) { if (!myWasEverIndexNotReady) { myWasEverIndexNotReady = true; - LOG.warn("Tree is not dumb-mode-aware; treeBuilder=" + getBuilder() + " treeStructure=" + getTreeStructure()); + LOG.error("Tree is not dumb-mode-aware; treeBuilder=" + getBuilder() + " treeStructure=" + getTreeStructure(), e); } } @@ -1729,7 +1727,7 @@ public class AbstractTreeUi { } } } - return Promise.all(promises); + return Promises.all(promises); } }, pass, node); } @@ -3446,18 +3444,8 @@ public class AbstractTreeUi { execute(pooledThreadRunnable); } else { - if (myWorker == null || myWorker.isDisposed()) { - myWorker = new WorkerThread("AbstractTreeBuilder.Worker", 1); - myWorker.start(); - myWorker.addTaskFirst(pooledThreadRunnable); - myWorker.dispose(false); - } - else { - myWorker.addTaskFirst(pooledThreadRunnable); - } + myWorker.addFirst(pooledThreadRunnable); } - - return result; } @@ -4737,11 +4725,7 @@ public class AbstractTreeUi { myUnbuiltNodes.clear(); myUpdateFromRootRequested = true; - if (myWorker != null) { - Disposer.dispose(myWorker); - myWorker = null; - } - + myWorker.clear(); myTree.invalidate(); state.restore(null); diff --git a/platform/platform-api/src/com/intellij/util/concurrency/WorkerThread.java b/platform/platform-api/src/com/intellij/util/concurrency/WorkerThread.java deleted file mode 100644 index 478029282b1d..000000000000 --- a/platform/platform-api/src/com/intellij/util/concurrency/WorkerThread.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright 2000-2009 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.util.concurrency; - -import com.intellij.openapi.Disposable; -import com.intellij.openapi.application.ApplicationManager; -import com.intellij.util.TimeoutUtil; -import org.jetbrains.annotations.NonNls; -import org.jetbrains.annotations.NotNull; - -import java.util.LinkedList; - - -/** - * @deprecated use lightweight com.intellij.util.concurrency.QueueProcessor instead - */ -public class WorkerThread implements Runnable, Disposable { - private final LinkedList myTasks = new LinkedList(); - private boolean myToDispose = false; - private boolean myDisposed = false; - private final int mySleep; - private final String myName; - - public WorkerThread(@NonNls String name, int sleep) { - mySleep = sleep; - myName = name; - } - - public void start() { - ApplicationManager.getApplication().executeOnPooledThread(this); - } - - public boolean addTask(Runnable action) { - synchronized(myTasks){ - if(myDisposed) return false; - - myTasks.add(action); - myTasks.notifyAll(); - return true; - } - } - - public boolean addTaskFirst(@NotNull Runnable action) { - synchronized(myTasks){ - if(myDisposed) return false; - - myTasks.add(0, action); - myTasks.notifyAll(); - return true; - } - } - - @Override - public void dispose() { - dispose(true); - } - - public void dispose(boolean cancelTasks){ - synchronized(myTasks){ - if (cancelTasks){ - myTasks.clear(); - } - myToDispose = true; - myTasks.notifyAll(); - } - } - - public void cancelTasks() { - synchronized(myTasks){ - myTasks.clear(); - myTasks.notifyAll(); - } - } - - public boolean isDisposeRequested() { - synchronized(myTasks){ - return myToDispose; - } - } - - public boolean isDisposed() { - synchronized(myTasks){ - return myDisposed; - } - } - - @Override - public void run() { - while (true) { - while (true) { - Runnable task; - synchronized (myTasks) { - if (myTasks.isEmpty()) break; - task = myTasks.removeFirst(); - } - task.run(); - if (mySleep > 0) { - TimeoutUtil.sleep(mySleep); - } - } - - synchronized (myTasks) { - if (myToDispose && myTasks.isEmpty()) { - myDisposed = true; - return; - } - - try { - myTasks.wait(); - } - catch (InterruptedException ignored) { - } - } - } - } -} diff --git a/platform/platform-api/src/com/intellij/util/io/HttpRequests.java b/platform/platform-api/src/com/intellij/util/io/HttpRequests.java index c186bbaa5f1b..567cf4d68501 100644 --- a/platform/platform-api/src/com/intellij/util/io/HttpRequests.java +++ b/platform/platform-api/src/com/intellij/util/io/HttpRequests.java @@ -20,6 +20,7 @@ import com.intellij.ide.IdeBundle; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationInfo; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.util.io.BufferExposingByteArrayOutputStream; import com.intellij.openapi.util.io.FileUtilRt; @@ -54,6 +55,8 @@ import java.util.zip.GZIPInputStream; * } */ public final class HttpRequests { + private static final Logger LOG = Logger.getInstance(HttpRequests.class); + private static final int BLOCK_SIZE = 16 * 1024; private static final Pattern CHARSET_PATTERN = Pattern.compile("charset=([^;]+)"); @@ -353,6 +356,11 @@ public final class HttpRequests { } private static T process(RequestBuilderImpl builder, RequestProcessor processor) throws IOException { + LOG.assertTrue(ApplicationManager.getApplication() == null || + ApplicationManager.getApplication().isUnitTestMode() || + !ApplicationManager.getApplication().isReadAccessAllowed(), + "Network shouldn't be accessed in EDT or inside read action"); + ClassLoader contextLoader = Thread.currentThread().getContextClassLoader(); if (Patches.JDK_BUG_ID_8032832 && !UrlClassLoader.isRegisteredAsParallelCapable(contextLoader)) { // hack-around for class loader lock in sun.net.www.protocol.http.NegotiateAuthentication (IDEA-131621) diff --git a/platform/platform-api/src/com/intellij/util/ui/EditorAdapter.java b/platform/platform-api/src/com/intellij/util/ui/EditorAdapter.java index a65f45ec43d9..7f0631018076 100644 --- a/platform/platform-api/src/com/intellij/util/ui/EditorAdapter.java +++ b/platform/platform-api/src/com/intellij/util/ui/EditorAdapter.java @@ -57,22 +57,19 @@ public class EditorAdapter { private final Editor myEditor; private final Alarm myFlushAlarm = new Alarm(); - private final Collection myLines = new ArrayList(); + private final Collection myLines = new ArrayList<>(); private final Project myProject; private final boolean myScrollToTheEndOnAppend; - private final Runnable myFlushDeferredRunnable = () -> flushStoredLines(); - private synchronized void flushStoredLines() { Collection lines; synchronized (myLines) { - lines = new ArrayList(myLines); + lines = new ArrayList<>(myLines); myLines.clear(); } ApplicationManager.getApplication().runWriteAction(writingCommand(lines)); } - public EditorAdapter(@NotNull Editor editor, Project project, boolean scrollToTheEndOnAppend) { myEditor = editor; myProject = project; @@ -90,13 +87,13 @@ public class EditorAdapter { } if (myFlushAlarm.isEmpty()) { - myFlushAlarm.addRequest(myFlushDeferredRunnable, 200, ModalityState.NON_MODAL); + myFlushAlarm.addRequest(this::flushStoredLines, 200, ModalityState.NON_MODAL); } } - private Runnable writingCommand(final Collection lines) { + @NotNull + private Runnable writingCommand(@NotNull Collection lines) { final Runnable command = () -> { - Document document = myEditor.getDocument(); StringBuilder buffer = new StringBuilder(); @@ -104,8 +101,8 @@ public class EditorAdapter { buffer.append(line.getValue()); } int endBefore = document.getTextLength(); - int endBeforeLine = endBefore; document.insertString(endBefore, buffer.toString()); + int endBeforeLine = endBefore; for (Line line : lines) { myEditor.getMarkupModel() .addRangeHighlighter(endBeforeLine, Math.min(document.getTextLength(), endBeforeLine + line.getValue().length()), HighlighterLayer.ADDITIONAL_SYNTAX, diff --git a/platform/platform-api/src/org/jetbrains/concurrency/AsyncPromise.kt b/platform/platform-api/src/org/jetbrains/concurrency/AsyncPromise.kt new file mode 100644 index 000000000000..91f13db02c96 --- /dev/null +++ b/platform/platform-api/src/org/jetbrains/concurrency/AsyncPromise.kt @@ -0,0 +1,284 @@ +/* + * Copyright 2000-2016 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 org.jetbrains.concurrency + +import com.intellij.openapi.diagnostic.Logger +import com.intellij.openapi.util.Getter +import com.intellij.util.Consumer +import com.intellij.util.Function +import java.util.* + +private val LOG = Logger.getInstance(AsyncPromise::class.java) + +@SuppressWarnings("ThrowableResultOfMethodCallIgnored") +private val OBSOLETE_ERROR = Promise.createError("Obsolete") + +open class AsyncPromise : Promise(), Getter { + @Volatile private var done: Consumer? = null + @Volatile private var rejected: Consumer? = null + + @Volatile private var state: Promise.State = Promise.State.PENDING + + // result object or error message + @Volatile private var result: Any? = null + + override fun getState() = state + + override fun done(done: Consumer): Promise { + if (isObsolete(done)) { + return this + } + + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> { + @Suppress("UNCHECKED_CAST") + done.consume(result as T?) + return this + } + Promise.State.REJECTED -> return this + } + + this.done = setHandler(this.done, done) + return this + } + + override fun rejected(rejected: Consumer): Promise { + if (isObsolete(rejected)) { + return this + } + + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> return this + Promise.State.REJECTED -> { + rejected.consume(result as Throwable?) + return this + } + } + + this.rejected = setHandler(this.rejected, rejected) + return this + } + + @Suppress("UNCHECKED_CAST") + override fun get() = if (state == Promise.State.FULFILLED) result as T? else null + + override fun then(fulfilled: Function): Promise { + @Suppress("UNCHECKED_CAST") + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> return DonePromise(fulfilled.`fun`(result as T?)) + Promise.State.REJECTED -> return rejectedPromise(result as Throwable) + } + + val promise = AsyncPromise() + addHandlers(Consumer({ result -> + promise.catchError { + if (fulfilled is Obsolescent && fulfilled.isObsolete) { + promise.cancel() + } + else { + promise.setResult(fulfilled.`fun`(result)) + } + } + }), Consumer({ promise.setError(it) })) + return promise + } + + override fun notify(child: AsyncPromise) { + LOG.assertTrue(child !== this) + + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> { + @Suppress("UNCHECKED_CAST") + child.setResult(result as T) + return + } + Promise.State.REJECTED -> { + child.setError((result as Throwable?)!!) + return + } + } + + addHandlers(Consumer({ child.catchError { child.setResult(it) } }), Consumer({ child.setError(it) })) + } + + override fun thenAsync(fulfilled: Function>): Promise { + @Suppress("UNCHECKED_CAST") + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> return fulfilled.`fun`(result as T?) + Promise.State.REJECTED -> return rejectedPromise(result as Throwable) + } + + val promise = AsyncPromise() + val rejectedHandler = Consumer({ promise.setError(it) }) + addHandlers(Consumer({ + promise.catchError { + fulfilled.`fun`(it) + .done { promise.catchError { promise.setResult(it) } } + .rejected(rejectedHandler) + } + }), rejectedHandler) + return promise + } + + override fun processed(fulfilled: AsyncPromise): Promise { + when (state) { + Promise.State.PENDING -> { + } + Promise.State.FULFILLED -> { + @Suppress("UNCHECKED_CAST") + fulfilled.setResult(result as T) + return this + } + Promise.State.REJECTED -> { + fulfilled.setError((result as Throwable?)!!) + return this + } + } + + addHandlers(Consumer({ result -> fulfilled.catchError { fulfilled.setResult(result) } }), Consumer({ fulfilled.setError(it) })) + return this + } + + private fun addHandlers(done: Consumer, rejected: Consumer) { + this.done = setHandler(this.done, done) + this.rejected = setHandler(this.rejected, rejected) + } + + fun setResult(result: T?) { + if (state != Promise.State.PENDING) { + return + } + + this.result = result + state = Promise.State.FULFILLED + + val done = this.done + clearHandlers() + if (done != null && !isObsolete(done)) { + done.consume(result) + } + } + + fun setError(error: String): Boolean { + return setError(Promise.createError(error)) + } + + fun cancel() { + setError(OBSOLETE_ERROR) + } + + open fun setError(error: Throwable): Boolean { + if (state != Promise.State.PENDING) { + return false + } + + result = error + state = Promise.State.REJECTED + + val rejected = this.rejected + clearHandlers() + if (rejected == null) { + Promise.logError(LOG, error) + } + else if (!isObsolete(rejected)) { + rejected.consume(error) + } + return true + } + + private fun clearHandlers() { + done = null + rejected = null + } + + override fun processed(processed: Consumer): Promise { + done(processed) + rejected({ error -> processed.consume(null) }) + return this + } +} + +private class CompoundConsumer(c1: Consumer, c2: Consumer) : Consumer { + private var consumers: MutableList>? = ArrayList() + + init { + synchronized(this) { + consumers!!.add(c1) + consumers!!.add(c2) + } + } + + override fun consume(t: T) { + val list = synchronized(this) { + val list = consumers + consumers = null + list + } ?: return + + for (consumer in list) { + if (!isObsolete(consumer)) { + consumer.consume(t) + } + } + } + + fun add(consumer: Consumer) { + synchronized(this) { + if (consumers != null) { + consumers!!.add(consumer) + } + } + } +} + +private fun setHandler(oldConsumer: Consumer?, newConsumer: Consumer) = when (oldConsumer) { + null -> newConsumer + is CompoundConsumer<*> -> { + @Suppress("UNCHECKED_CAST") + (oldConsumer as CompoundConsumer).add(newConsumer) + oldConsumer + } + else -> CompoundConsumer(oldConsumer, newConsumer) +} + +internal fun isObsolete(consumer: Consumer<*>?) = consumer is Obsolescent && consumer.isObsolete + +inline fun AsyncPromise<*>.catchError(runnable: () -> T): T? { + try { + return runnable() + } + catch (e: Throwable) { + setError(e) + return null + } +} + +private val cancelledPromise = RejectedPromise(OBSOLETE_ERROR) + +@Suppress("CAST_NEVER_SUCCEEDS") +fun cancelledPromise(): Promise = cancelledPromise as Promise + +fun rejectedPromise(error: Throwable): Promise = Promise.reject(error) \ No newline at end of file diff --git a/platform/core-api/src/org/jetbrains/concurrency/DonePromise.java b/platform/platform-api/src/org/jetbrains/concurrency/DonePromise.java similarity index 91% rename from platform/core-api/src/org/jetbrains/concurrency/DonePromise.java rename to platform/platform-api/src/org/jetbrains/concurrency/DonePromise.java index 1f619862257d..ebcefdae4dd3 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/DonePromise.java +++ b/platform/platform-api/src/org/jetbrains/concurrency/DonePromise.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -30,7 +30,7 @@ class DonePromise extends Promise implements Getter { @NotNull @Override public Promise done(@NotNull Consumer done) { - if (!AsyncPromise.isObsolete(done)) { + if (!AsyncPromiseKt.isObsolete(done)) { done.consume(result); } return this; @@ -68,7 +68,7 @@ class DonePromise extends Promise implements Getter { @NotNull @Override - public Promise thenAsync(@NotNull AsyncFunction done) { + public Promise thenAsync(@NotNull Function> done) { return done.fun(result); } diff --git a/platform/core-api/src/org/jetbrains/concurrency/Obsolescent.java b/platform/platform-api/src/org/jetbrains/concurrency/Obsolescent.java similarity index 95% rename from platform/core-api/src/org/jetbrains/concurrency/Obsolescent.java rename to platform/platform-api/src/org/jetbrains/concurrency/Obsolescent.java index 44d280b86013..a8e60bab6072 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/Obsolescent.java +++ b/platform/platform-api/src/org/jetbrains/concurrency/Obsolescent.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. diff --git a/platform/core-api/src/org/jetbrains/concurrency/Promise.java b/platform/platform-api/src/org/jetbrains/concurrency/Promise.java similarity index 60% rename from platform/core-api/src/org/jetbrains/concurrency/Promise.java rename to platform/platform-api/src/org/jetbrains/concurrency/Promise.java index da9dfefeb334..ffeb4d5d9142 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/Promise.java +++ b/platform/platform-api/src/org/jetbrains/concurrency/Promise.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -23,13 +23,9 @@ import com.intellij.openapi.util.AsyncResult; import com.intellij.util.Consumer; import com.intellij.util.Function; import com.intellij.util.ThreeState; -import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.Collection; -import java.util.List; - public abstract class Promise { public static final Promise DONE = new DonePromise(null); public static final Promise REJECTED = new RejectedPromise(createError("rejected")); @@ -70,88 +66,11 @@ public abstract class Promise { } } - @NotNull - public static Promise all(@NotNull Collection> promises) { - if (promises.size() == 1) { - return promises instanceof List ? ((List>)promises).get(0) : promises.iterator().next(); - } - else { - return all(promises, null); - } - } - - @NotNull - public static Promise all(@NotNull Collection> promises, @Nullable T totalResult) { - if (promises.isEmpty()) { - //noinspection unchecked - return (Promise)DONE; - } - - final AsyncPromise totalPromise = new AsyncPromise(); - Consumer done = new CountDownConsumer(promises.size(), totalPromise, totalResult); - Consumer rejected = new Consumer() { - @Override - public void consume(Throwable error) { - totalPromise.setError(error); - } - }; - - for (Promise promise : promises) { - //noinspection unchecked - promise.done(done); - promise.rejected(rejected); - } - return totalPromise; - } - - public static Promise any(@NotNull final Collection> promises, @NotNull final String totalError) { - if (promises.isEmpty()) { - //noinspection unchecked - return (Promise)DONE; - } - else if (promises.size() == 1) { - return ContainerUtil.getFirstItem(promises); - } - - final AsyncPromise totalPromise = new AsyncPromise(); - Consumer done = new Consumer() { - @Override - public void consume(T result) { - totalPromise.setResult(result); - } - }; - Consumer rejected = new Consumer() { - private volatile int toConsume = promises.size(); - - @Override - public void consume(Throwable throwable) { - if (--toConsume <= 0) { - totalPromise.setError(totalError); - } - } - }; - - for (Promise promise : promises) { - promise.done(done); - promise.rejected(rejected); - } - return totalPromise; - } - @NotNull public static Promise wrapAsVoid(@NotNull ActionCallback asyncResult) { final AsyncPromise promise = new AsyncPromise(); - asyncResult.doWhenDone(new Runnable() { - @Override - public void run() { - promise.setResult(null); - } - }).doWhenRejected(new Consumer() { - @Override - public void consume(String error) { - promise.setError(createError(error == null ? "Internal error" : error)); - } - }); + asyncResult.doWhenDone(() -> promise.setResult(null)).doWhenRejected( + error -> promise.setError(createError(error == null ? "Internal error" : error))); return promise; } @@ -163,12 +82,7 @@ public abstract class Promise { public void consume(T result) { promise.setResult(result); } - }).doWhenRejected(new Consumer() { - @Override - public void consume(String error) { - promise.setError(error); - } - }); + }).doWhenRejected(promise::setError); return promise; } @@ -187,7 +101,7 @@ public abstract class Promise { public abstract Promise then(@NotNull Function done); @NotNull - public abstract Promise thenAsync(@NotNull AsyncFunction done); + public abstract Promise thenAsync(@NotNull Function> done); @NotNull public abstract State getState(); @@ -218,16 +132,20 @@ public abstract class Promise { /** * Log error if not message error */ - public static void logError(@NotNull Logger logger, @NotNull Throwable e) { + public static boolean logError(@NotNull Logger logger, @NotNull Throwable e) { if (e instanceof MessageError) { ThreeState log = ((MessageError)e).log; if (log == ThreeState.YES || (log == ThreeState.UNSURE && ApplicationManager.getApplication().isUnitTestMode())) { logger.error(e); + return true; } } else if (!(e instanceof ProcessCanceledException)) { logger.error(e); + return true; } + + return false; } public abstract void notify(@NotNull AsyncPromise child); diff --git a/platform/core-api/src/org/jetbrains/concurrency/RejectedPromise.java b/platform/platform-api/src/org/jetbrains/concurrency/RejectedPromise.java similarity index 90% rename from platform/core-api/src/org/jetbrains/concurrency/RejectedPromise.java rename to platform/platform-api/src/org/jetbrains/concurrency/RejectedPromise.java index d9a8946b1495..af8d09d0746c 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/RejectedPromise.java +++ b/platform/platform-api/src/org/jetbrains/concurrency/RejectedPromise.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -42,7 +42,7 @@ class RejectedPromise extends Promise { @NotNull @Override public Promise rejected(@NotNull Consumer rejected) { - if (!AsyncPromise.isObsolete(rejected)) { + if (!AsyncPromiseKt.isObsolete(rejected)) { rejected.consume(error); } return this; @@ -63,7 +63,7 @@ class RejectedPromise extends Promise { @NotNull @Override - public Promise thenAsync(@NotNull AsyncFunction done) { + public Promise thenAsync(@NotNull Function> done) { //noinspection unchecked return (Promise)this; } diff --git a/platform/platform-api/src/org/jetbrains/concurrency/promise-ex.kt b/platform/platform-api/src/org/jetbrains/concurrency/promise-ex.kt new file mode 100644 index 000000000000..e923bcdba6d6 --- /dev/null +++ b/platform/platform-api/src/org/jetbrains/concurrency/promise-ex.kt @@ -0,0 +1,76 @@ +/* + * Copyright 2000-2016 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. + */ +@file:JvmName("Promises") +package org.jetbrains.concurrency + +import com.intellij.util.Consumer + +fun resolvedPromise(): Promise<*> = Promise.DONE + +fun resolvedPromise(result: T) = Promise.resolve(result) + +fun all(promises: Collection>) = if (promises.size == 1) promises.first() else all(promises, null) + +fun all(promises: Collection>, totalResult: T?): Promise { + if (promises.isEmpty()) { + return resolvedPromise(null) + } + + val totalPromise = AsyncPromise() + val done = CountDownConsumer(promises.size, totalPromise, totalResult) + val rejected = Consumer { error -> totalPromise.setError(error) } + + for (promise in promises) { + promise.done(done) + promise.rejected(rejected) + } + return totalPromise +} + +private class CountDownConsumer(@Volatile private var countDown: Int, private val promise: AsyncPromise, private val totalResult: T?) : Consumer { + override fun consume(t: Any?) { + if (--countDown == 0) { + promise.setResult(totalResult) + } + } +} + +fun any(promises: Collection>, totalError: String): Promise { + if (promises.isEmpty()) { + return resolvedPromise(null) + } + else if (promises.size == 1) { + return promises.first() + } + + val totalPromise = AsyncPromise() + val done = Consumer { result -> totalPromise.setResult(result) } + val rejected = object : Consumer { + @Volatile private var toConsume = promises.size + + override fun consume(throwable: Throwable) { + if (--toConsume <= 0) { + totalPromise.setError(totalError) + } + } + } + + for (promise in promises) { + promise.done(done) + promise.rejected(rejected) + } + return totalPromise +} \ No newline at end of file diff --git a/platform/platform-impl/src/com/intellij/ide/IdeTooltipManager.java b/platform/platform-impl/src/com/intellij/ide/IdeTooltipManager.java index c4a88552ee43..e33781da2387 100644 --- a/platform/platform-impl/src/com/intellij/ide/IdeTooltipManager.java +++ b/platform/platform-impl/src/com/intellij/ide/IdeTooltipManager.java @@ -30,18 +30,17 @@ import com.intellij.openapi.ui.popup.BalloonBuilder; import com.intellij.openapi.ui.popup.JBPopupFactory; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Disposer; +import com.intellij.openapi.util.Key; import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.registry.Registry; import com.intellij.openapi.util.registry.RegistryValue; import com.intellij.openapi.util.registry.RegistryValueListener; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.*; import com.intellij.ui.awt.RelativePoint; import com.intellij.ui.components.panels.Wrapper; import com.intellij.util.Alarm; -import com.intellij.util.ui.Html; -import com.intellij.util.ui.JBInsets; -import com.intellij.util.ui.JBUI; -import com.intellij.util.ui.UIUtil; +import com.intellij.util.ui.*; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -57,6 +56,8 @@ import java.awt.event.AWTEventListener; import java.awt.event.MouseEvent; public class IdeTooltipManager implements ApplicationComponent, AWTEventListener { + private static final Key CUSTOM_TOOLTIP = Key.create("custom.tooltip"); + private static final MouseEventAdapter DUMMY_LISTENER = new MouseEventAdapter(null); public static final String IDE_TOOLTIP_PLACE = "IdeTooltip"; public static final Color GRAPHITE_COLOR = new Color(100, 100, 100, 230); @@ -141,7 +142,7 @@ public class IdeTooltipManager implements ApplicationComponent, AWTEventListener if (!myCurrentTipIsCentered) { myX = me.getX(); myY = me.getY(); - if (c instanceof JComponent && ((JComponent)c).getToolTipText(me) == null && (myQueuedTooltip == null || !myQueuedTooltip.isHint())) { + if (c instanceof JComponent && !isTooltipDefined((JComponent)c, me) && (myQueuedTooltip == null || !myQueuedTooltip.isHint())) { hideCurrent(me, null, null);//There is no tooltip or hint here, let's proceed it as MOUSE_EXITED } else { @@ -176,9 +177,7 @@ public class IdeTooltipManager implements ApplicationComponent, AWTEventListener if (JBPopupFactory.getInstance().isChildPopupFocused(wnd)) return; } - String tooltipText = comp.getToolTipText(me); - if (tooltipText == null || tooltipText.trim().isEmpty()) return; - + if (!isTooltipDefined(comp, me)) return; boolean centerDefault = Boolean.TRUE.equals(comp.getClientProperty(UIUtil.CENTER_TOOLTIP_DEFAULT)); boolean centerStrict = Boolean.TRUE.equals(comp.getClientProperty(UIUtil.CENTER_TOOLTIP_STRICT)); @@ -198,30 +197,52 @@ public class IdeTooltipManager implements ApplicationComponent, AWTEventListener queueShow(comp, me, centerStrict || centerDefault, shift, -shift, -shift); } + private boolean isTooltipDefined(JComponent comp, MouseEvent me) { + return !StringUtil.isEmpty(comp.getToolTipText(me)) || getCustomTooltip(comp) != null; + } + private void queueShow(final JComponent c, final MouseEvent me, final boolean toCenter, int shift, int posChangeX, int posChangeY) { - String aText = String.valueOf(c.getToolTipText(me)); - final IdeTooltip tooltip = new IdeTooltip(c, me.getPoint(), null, /*new Object()*/c, aText) { - @Override - protected boolean beforeShow() { - myCurrentEvent = me; + IdeTooltip tooltip = getCustomTooltip(c); + if (tooltip == null) { + String aText = String.valueOf(c.getToolTipText(me)); + tooltip = new IdeTooltip(c, me.getPoint(), null, /*new Object()*/c, aText) { + @Override + protected boolean beforeShow() { + myCurrentEvent = me; - if (!c.isShowing()) return false; + if (!c.isShowing()) return false; - String text = c.getToolTipText(myCurrentEvent); - if (text == null || text.trim().isEmpty()) return false; + String text = c.getToolTipText(myCurrentEvent); + if (text == null || text.trim().isEmpty()) return false; - JLayeredPane layeredPane = UIUtil.getParentOfType(JLayeredPane.class, c); + JLayeredPane layeredPane = UIUtil.getParentOfType(JLayeredPane.class, c); - final JEditorPane pane = initPane(text, new HintHint(me).setAwtTooltip(true), layeredPane); - final Wrapper wrapper = new Wrapper(pane); - setTipComponent(wrapper); - return true; - } - }.setToCenter(toCenter).setCalloutShift(shift).setPositionChangeShift(posChangeX, posChangeY).setLayer(Balloon.Layer.top); + final JEditorPane pane = initPane(text, new HintHint(me).setAwtTooltip(true), layeredPane); + final Wrapper wrapper = new Wrapper(pane); + setTipComponent(wrapper); + return true; + } + }.setToCenter(toCenter).setCalloutShift(shift).setPositionChangeShift(posChangeX, posChangeY).setLayer(Balloon.Layer.top); + } show(tooltip, false); } + public void setCustomTooltip(JComponent component, IdeTooltip tooltip) { + UIUtil.putClientProperty(component, CUSTOM_TOOLTIP, tooltip); + // We need to register a dummy mouse listener to make sure events will be generated for this specific component, not its parent + component.removeMouseListener(DUMMY_LISTENER); + component.removeMouseMotionListener(DUMMY_LISTENER); + if (tooltip != null) { + component.addMouseListener(DUMMY_LISTENER); + component.addMouseMotionListener(DUMMY_LISTENER); + } + } + + public IdeTooltip getCustomTooltip(JComponent component) { + return UIUtil.getClientProperty(component, CUSTOM_TOOLTIP); + } + public IdeTooltip show(final IdeTooltip tooltip, boolean now) { return show(tooltip, now, true); } diff --git a/platform/platform-impl/src/com/intellij/ide/MacOSApplicationProvider.java b/platform/platform-impl/src/com/intellij/ide/MacOSApplicationProvider.java index c768b15432e2..8e529d69050a 100644 --- a/platform/platform-impl/src/com/intellij/ide/MacOSApplicationProvider.java +++ b/platform/platform-impl/src/com/intellij/ide/MacOSApplicationProvider.java @@ -16,8 +16,6 @@ package com.intellij.ide; import com.apple.eawt.Application; -import com.apple.eawt.ApplicationAdapter; -import com.apple.eawt.ApplicationEvent; import com.intellij.ide.actions.AboutAction; import com.intellij.ide.actions.ExitAction; import com.intellij.ide.actions.OpenFileAction; @@ -30,9 +28,11 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.TransactionGuard; import com.intellij.openapi.components.ApplicationComponent; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManager; import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.wm.IdeFocusManager; import com.intellij.ui.mac.foundation.Foundation; import com.intellij.ui.mac.foundation.ID; import com.sun.jna.Callback; @@ -40,6 +40,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; +import java.awt.Component; import java.awt.color.ColorSpace; import java.awt.color.ICC_ColorSpace; import java.awt.color.ICC_Profile; @@ -47,12 +48,15 @@ import java.awt.event.MouseEvent; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; /** * @author max */ public class MacOSApplicationProvider implements ApplicationComponent { private static final Logger LOG = Logger.getInstance(MacOSApplicationProvider.class); + private static final AtomicBoolean ENABLED = new AtomicBoolean(true); private static final Callback IMPL = new Callback() { @SuppressWarnings("unused") public void callback(ID self, String selector) { @@ -116,53 +120,35 @@ public class MacOSApplicationProvider implements ApplicationComponent { } private static class Worker { - @SuppressWarnings("deprecation") public static void initMacApplication() { - Application application = new Application(); - application.addApplicationListener(new ApplicationAdapter() { - @Override - public void handleAbout(ApplicationEvent applicationEvent) { - AboutAction.perform(getProject()); - applicationEvent.setHandled(true); - } - - @Override - public void handlePreferences(ApplicationEvent applicationEvent) { - Project project = getNotNullProject(); - TransactionGuard.submitTransaction(project, () -> ShowSettingsAction.perform(project)); - applicationEvent.setHandled(true); - } - - @Override - public void handleQuit(ApplicationEvent applicationEvent) { - TransactionGuard.submitTransaction(ApplicationManager.getApplication(), ExitAction::perform); - } - - @Override - public void handleOpenFile(ApplicationEvent applicationEvent) { - Project project = getProject(); - String filename = applicationEvent.getFilename(); - if (filename == null) return; - - TransactionGuard.submitTransaction(ApplicationManager.getApplication(), () -> { - File file = new File(filename); - if (ProjectUtil.openOrImport(file.getAbsolutePath(), project, true) != null) { - IdeaApplication.getInstance().setPerformProjectLoad(false); - return; - } - if (project != null && file.exists()) { - OpenFileAction.openFile(filename, project); - applicationEvent.setHandled(true); - } - }); - } + Application application = Application.getApplication(); + application.setAboutHandler(event -> AboutAction.perform(getProject())); + application.setPreferencesHandler(event -> { + Project project = getNotNullProject(); + submit(() -> ShowSettingsAction.perform(project)); + }); + application.setQuitHandler((event, response) -> { + submit(ExitAction::perform); + response.cancelQuit(); + }); + application.setOpenFileHandler(event -> { + Project project = getProject(); + List list = event.getFiles(); + LOG.debug("MacMenu: files found ", list.size()); + if (list.isEmpty()) return; + File file = list.get(0); + submit(() -> { + if (ProjectUtil.openOrImport(file.getAbsolutePath(), project, true) != null) { + LOG.debug("MacMenu: load project for ", file); + IdeaApplication.getInstance().setPerformProjectLoad(false); + return; + } + if (project != null && file.exists()) { + LOG.debug("MacMenu: open file ", file); + OpenFileAction.openFile(file.getAbsolutePath(), project); + } + }); }); - - application.addAboutMenuItem(); - application.addPreferencesMenuItem(); - application.setEnabledAboutMenu(true); - application.setEnabledPreferencesMenu(true); - installAutoUpdateMenu(); } @@ -201,5 +187,23 @@ public class MacOSApplicationProvider implements ApplicationComponent { Project project = getProject(); return project != null ? project : ProjectManager.getInstance().getDefaultProject(); } + + private static void submit(@NotNull Runnable task) { + LOG.debug("MacMenu: on EDT = ", SwingUtilities.isEventDispatchThread()); + if (!ENABLED.get()) return; + + Component component = IdeFocusManager.getGlobalInstance().getFocusOwner(); + if (component == null || IdeKeyEventDispatcher.isModalContext(component)) return; + + ENABLED.set(false); + TransactionGuard.submitTransaction(ApplicationManager.getApplication(), () -> { + try { + task.run(); + } + finally { + ENABLED.set(true); + } + }); + } } } diff --git a/platform/platform-impl/src/com/intellij/ide/actions/CollectSettingsAction.java b/platform/platform-impl/src/com/intellij/ide/actions/CollectSettingsAction.java new file mode 100644 index 000000000000..f9ed7c7109b6 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/ide/actions/CollectSettingsAction.java @@ -0,0 +1,41 @@ +/* + * Copyright 2000-2016 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.ide.actions; + +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.extensions.ExtensionPointName; +import com.intellij.settingsSummary.ProblemType; +import com.intellij.settingsSummary.ui.SettingsSummaryDialog; + + +public class CollectSettingsAction extends AnAction{ + + public static final ExtensionPointName EP_SETTINGS = ExtensionPointName.create("com.intellij.settingsSummaryFactory"); + + @Override + public void actionPerformed(AnActionEvent e) { + new SettingsSummaryDialog(e.getProject()).show(); + } + + @Override + public void update(AnActionEvent e) { + super.update(e); + if (EP_SETTINGS.getExtensions().length == 0) { + e.getPresentation().setEnabled(false); + } + } +} diff --git a/platform/platform-impl/src/com/intellij/ide/actions/SendFeedbackAction.java b/platform/platform-impl/src/com/intellij/ide/actions/SendFeedbackAction.java index fce491bfeb08..b9e72d9d40f8 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/SendFeedbackAction.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/SendFeedbackAction.java @@ -28,6 +28,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent; import com.intellij.openapi.application.ex.ApplicationInfoEx; import com.intellij.openapi.project.DumbAware; import com.intellij.openapi.project.Project; +import com.intellij.openapi.util.SystemInfo; import com.intellij.ui.LicensingFacade; import com.intellij.util.ui.UIUtil; import org.jetbrains.annotations.Nullable; @@ -54,7 +55,9 @@ public class SendFeedbackAction extends AnAction implements DumbAware { private static String getDescription() { StringBuilder sb = new StringBuilder("\n\n"); + sb.append(ApplicationInfoEx.getInstanceEx().getBuild().asString()).append(", "); String javaVersion = System.getProperty("java.runtime.version", System.getProperty("java.version", "unknown")); + sb.append("JRE "); sb.append(javaVersion); String archDataModel = System.getProperty("sun.arch.data.model"); if (archDataModel != null) { @@ -64,7 +67,7 @@ public class SendFeedbackAction extends AnAction implements DumbAware { if (javaVendor != null) { sb.append(" ").append(javaVendor); } - sb.append(", ").append(System.getProperty("os.name")); + sb.append(", OS ").append(System.getProperty("os.name")); String osArch = System.getProperty("os.arch"); if (osArch != null) { sb.append("(").append(osArch).append(")"); @@ -79,16 +82,15 @@ public class SendFeedbackAction extends AnAction implements DumbAware { } } if (!GraphicsEnvironment.isHeadless()) { + sb.append(", screens "); GraphicsDevice[] devices = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); - sb.append(" ("); for (int i = 0; i < devices.length; i++) { if (i > 0) sb.append(", "); GraphicsDevice device = devices[i]; Rectangle bounds = device.getDefaultConfiguration().getBounds(); sb.append(bounds.width).append("x").append(bounds.height); } - if (UIUtil.isRetina()) sb.append(" R"); - sb.append(")"); + if (UIUtil.isRetina()) sb.append(SystemInfo.isMac ? "; Retina" : "; HiDPI"); } return sb.toString(); } diff --git a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java index 10f868ff26f0..6220dbacb697 100644 --- a/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java +++ b/platform/platform-impl/src/com/intellij/ide/actions/Switcher.java @@ -37,7 +37,9 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.GraphicsConfig; import com.intellij.openapi.ui.popup.JBPopup; import com.intellij.openapi.ui.popup.JBPopupFactory; -import com.intellij.openapi.util.*; +import com.intellij.openapi.util.Comparing; +import com.intellij.openapi.util.Iconable; +import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vcs.FileStatus; @@ -312,7 +314,7 @@ public class Switcher extends AnAction implements DumbAware { } }; - descriptions.setBorder(BorderFactory.createEmptyBorder(1, 4, 1, 4)); + descriptions.setBorder(JBUI.Borders.empty(1, 4)); descriptions.add(pathLabel, BorderLayout.CENTER); twManager = ToolWindowManager.getInstance(project); DefaultListModel twModel = new DefaultListModel(); @@ -339,7 +341,7 @@ public class Switcher extends AnAction implements DumbAware { || mySpeedSearch.getComparator().matchingFragments(mySpeedSearch.getEnteredPrefix(), s) != null, mySpeedSearch); } - toolWindows.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 20)); + toolWindows.setBorder(JBUI.Borders.empty(5, 5, 5, 20)); toolWindows.setSelectionMode(pinned ? ListSelectionModel.MULTIPLE_INTERVAL_SELECTION : ListSelectionModel.SINGLE_SELECTION); toolWindows.setCellRenderer(new SwitcherToolWindowsListRenderer(mySpeedSearch, map, myPinned) { @NotNull @@ -403,7 +405,9 @@ public class Switcher extends AnAction implements DumbAware { boolean firstRecentMarked = false; final List selectedFiles = Arrays.asList(editorManager.getSelectedFiles()); for (int i = 0; i < len; i++) { - if (isPinnedMode() && selectedFiles.contains(recentFiles[i])) { + if (isPinnedMode() + && selectedFiles.contains(recentFiles[i]) + && UISettings.getInstance().EDITOR_TAB_PLACEMENT != UISettings.TABS_NONE) { continue; } @@ -420,8 +424,10 @@ public class Switcher extends AnAction implements DumbAware { if (add) { filesData.add(info); if (!firstRecentMarked) { - firstRecentMarked = true; selectionIndex = filesData.size() - 1; + if (selectionIndex != 0 || UISettings.getInstance().EDITOR_TAB_PLACEMENT != UISettings.TABS_NONE) { + firstRecentMarked = true; + } } } } @@ -542,7 +548,7 @@ public class Switcher extends AnAction implements DumbAware { files.getSelectionModel().addListSelectionListener(filesSelectionListener); files.setCellRenderer(filesRenderer); - files.setBorder(IdeBorderFactory.createEmptyBorder(5, 5, 5, 5)); + files.setBorder(JBUI.Borders.empty(5)); files.addKeyListener(this); ScrollingUtil.installActions(files); files.addMouseListener(this); diff --git a/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationImpl.java b/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationImpl.java index 3bf62a7c81bd..1bdae0bc58e6 100644 --- a/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/application/impl/ApplicationImpl.java @@ -1122,6 +1122,7 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App } if (myWriteActionsStack.isEmpty()) { myLock.writeUnlock(); + fireAfterWriteActionFinished(clazz); } } } @@ -1263,6 +1264,10 @@ public class ApplicationImpl extends PlatformComponentManagerImpl implements App myDispatcher.getMulticaster().writeActionFinished(action); } + private void fireAfterWriteActionFinished(@NotNull Class action) { + myDispatcher.getMulticaster().afterWriteActionFinished(action); + } + @Override public void saveSettings() { if (myDoNotSave) return; diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java index e62031c00d39..e8af7067873a 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorSizeManager.java @@ -296,6 +296,11 @@ class EditorSizeManager implements PrioritizedDocumentListener, Disposable, Fold myDocumentChangeStartOffset = Math.min(myDocumentChangeStartOffset, startOffset); myDocumentChangeEndOffset = Math.max(myDocumentChangeEndOffset, endOffset); } + else if (myFoldingChangeEndOffset != Integer.MIN_VALUE) { + // during batch folding processing we delay invalidation requests, as we cannot perform coordinate conversions immediately + myFoldingChangeStartOffset = Math.min(myFoldingChangeStartOffset, startOffset); + myFoldingChangeEndOffset = Math.max(myFoldingChangeEndOffset, endOffset); + } else { doInvalidateRange(startOffset, endOffset); } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorHistoryManager.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorHistoryManager.java index be146f687077..6de286c7352f 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorHistoryManager.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/EditorHistoryManager.java @@ -137,8 +137,10 @@ public final class EditorHistoryManager implements PersistentStateComponent= 0; i--) { final FileEditorProvider provider = oldProviders [i]; LOG.assertTrue(provider != null); + FileEditor editor = editors[i]; + if (!editor.isValid()) continue; providers[i] = provider; - states[i] = editors[i].getState(FileEditorStateLevel.FULL); + states[i] = editor.getState(FileEditorStateLevel.FULL); } addEntry(HistoryEntry.createHeavy(myProject, file, providers, states, providers[selectedProviderIndex])); trimToSize(); diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/HistoryEntry.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/HistoryEntry.java index 46eff670c26b..bde37044c2be 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/HistoryEntry.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/HistoryEntry.java @@ -105,7 +105,11 @@ final class HistoryEntry { HistoryEntry entry = new HistoryEntry(pointer, selectedProvider, disposable); for (int i = 0; i < providers.length; i++) { - entry.putState(providers[i], states[i]); + FileEditorProvider provider = providers[i]; + FileEditorState state = states[i]; + if (provider != null && state != null) { + entry.putState(provider, state); + } } return entry; } diff --git a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/http/HttpFileEditor.java b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/http/HttpFileEditor.java index 5948768fe571..b3ffe9d3eb3e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/http/HttpFileEditor.java +++ b/platform/platform-impl/src/com/intellij/openapi/fileEditor/impl/http/HttpFileEditor.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -19,10 +19,8 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.fileEditor.TextEditor; import com.intellij.openapi.fileEditor.impl.BaseRemoteFileEditor; import com.intellij.openapi.project.Project; -import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.impl.http.HttpVirtualFile; -import com.intellij.openapi.vfs.impl.http.RemoteFileInfo; -import com.intellij.util.Consumer; +import com.intellij.openapi.vfs.impl.http.RemoteFileInfoImpl; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -38,7 +36,7 @@ class HttpFileEditor extends BaseRemoteFileEditor { super(project); myPanel = new RemoteFilePanel(project, virtualFile, this); - RemoteFileInfo fileInfo = virtualFile.getFileInfo(); + RemoteFileInfoImpl fileInfo = (RemoteFileInfoImpl)virtualFile.getFileInfo(); assert fileInfo != null; fileInfo.download() .done(file -> ApplicationManager.getApplication().invokeLater(() -> contentLoaded(), myProject.getDisposed())) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ModifierKeyDoubleClickHandler.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ModifierKeyDoubleClickHandler.java index 9ba27f6c5d36..423d2164952d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ModifierKeyDoubleClickHandler.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ModifierKeyDoubleClickHandler.java @@ -248,6 +248,7 @@ public class ModifierKeyDoubleClickHandler extends ApplicationComponent.Adapter myIsRunningAction = true; try { AnAction action = myActionManagerEx.getAction(myActionId); + if (action == null) return false; DataContext context = DataManager.getInstance().getDataContext(IdeFocusManager.findInstance().getFocusOwner()); AnActionEvent anActionEvent = AnActionEvent.createFromAnAction(action, event, ActionPlaces.MAIN_MENU, context); action.update(anActionEvent); diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/BackgroundTaskQueue.java b/platform/platform-impl/src/com/intellij/openapi/progress/BackgroundTaskQueue.java index dfa0e2302114..6436311b7e1c 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/BackgroundTaskQueue.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/BackgroundTaskQueue.java @@ -17,7 +17,6 @@ package com.intellij.openapi.progress; import com.intellij.openapi.Disposable; -import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.progress.impl.BackgroundableProcessIndicator; @@ -148,45 +147,11 @@ public class BackgroundTaskQueue { ModalityState modalityState = data.modalityState; if (modalityState == null) modalityState = ModalityState.NON_MODAL; - boolean processCanceled = false; - Exception exception = null; - try { - synchronized (TEST_TASK_LOCK) { - task.run(indicator); - } - } - catch (ProcessCanceledException e) { - processCanceled = true; - } - catch (Exception e) { - exception = e; - } + ProgressManagerImpl pm = (ProgressManagerImpl)ProgressManager.getInstance(); - final boolean finalCanceled = processCanceled || indicator.isCanceled(); - final Exception finalException = exception; - Runnable finishTask = () -> { - try { - if (finalException != null) { - task.onError(finalException); - } - else if (finalCanceled) { - task.onCancel(); - } - else { - task.onSuccess(); - } - } - finally { - task.onFinished(); - } - }; - - Application application = ApplicationManager.getApplication(); - if (application.isDispatchThread()) { - finishTask.run(); - } - else { - application.invokeLater(finishTask, modalityState); + // prohibit simultaneous execution from different threads + synchronized (TEST_TASK_LOCK) { + pm.runProcessWithProgressInCurrentThread(task, indicator, modalityState); } } } diff --git a/platform/platform-impl/src/com/intellij/openapi/progress/util/BackgroundTaskUtil.java b/platform/platform-impl/src/com/intellij/openapi/progress/util/BackgroundTaskUtil.java index 7e256051cd5d..e09cd0b2a3b1 100644 --- a/platform/platform-impl/src/com/intellij/openapi/progress/util/BackgroundTaskUtil.java +++ b/platform/platform-impl/src/com/intellij/openapi/progress/util/BackgroundTaskUtil.java @@ -71,13 +71,7 @@ public class BackgroundTaskUtil { final int waitMillis, final boolean forceEDT) { final ModalityState modality = ModalityState.current(); - final ProgressIndicator indicator = new EmptyProgressIndicator() { - @NotNull - @Override - public ModalityState getModalityState() { - return modality; - } - }; + final ProgressIndicator indicator = new EmptyProgressIndicator(modality); final Semaphore semaphore = new Semaphore(0); final AtomicReference resultRef = new AtomicReference(); @@ -164,13 +158,7 @@ public class BackgroundTaskUtil { public static ProgressIndicator executeOnPooledThread(@NotNull final Consumer task, @NotNull Disposable parent, final ModalityState modalityState) { - final ProgressIndicator indicator = new EmptyProgressIndicator() { - @NotNull - @Override - public ModalityState getModalityState() { - return modalityState; - } - }; + final ProgressIndicator indicator = new EmptyProgressIndicator(modalityState); final Disposable disposable = new Disposable() { @Override diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfoImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfoImpl.java index 4ed1b015e1d9..dd2af837a7ad 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfoImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/http/RemoteFileInfoImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -292,7 +292,6 @@ public class RemoteFileInfoImpl implements RemoteContentProvider.DownloadingCall } @NotNull - @Override public Promise download() { synchronized (myLock) { switch (getState()) { diff --git a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java index 1fcbb33e3af1..89a218013733 100644 --- a/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/wm/impl/ToolWindowManagerImpl.java @@ -755,7 +755,7 @@ public final class ToolWindowManagerImpl extends ToolWindowManagerEx implements @NotNull List commandList, boolean forced, boolean autoFocusContents) { - if (!FocusManagerImpl.getInstance().isUnforcedRequestAllowed() && !forced) return; + autoFocusContents &= FocusManagerImpl.getInstance().isUnforcedRequestAllowed() || forced; if (LOG.isDebugEnabled()) { LOG.debug("enter: activateToolWindowImpl(" + id + ")"); diff --git a/platform/core-api/src/org/jetbrains/concurrency/ObsolescentAsyncFunction.java b/platform/platform-impl/src/com/intellij/settingsSummary/ProblemType.java similarity index 74% rename from platform/core-api/src/org/jetbrains/concurrency/ObsolescentAsyncFunction.java rename to platform/platform-impl/src/com/intellij/settingsSummary/ProblemType.java index c6ffe2f22f33..0942c9d586a1 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/ObsolescentAsyncFunction.java +++ b/platform/platform-impl/src/com/intellij/settingsSummary/ProblemType.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,7 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.concurrency; +package com.intellij.settingsSummary; -public interface ObsolescentAsyncFunction extends AsyncFunction, Obsolescent { -} \ No newline at end of file +import com.intellij.openapi.project.Project; + +public interface ProblemType { + String collectInfo(Project project); +} diff --git a/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.form b/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.form new file mode 100644 index 000000000000..e33b7f943c29 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.form @@ -0,0 +1,55 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.java b/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.java new file mode 100644 index 000000000000..880d6f0298c4 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/settingsSummary/ui/SettingsSummaryDialog.java @@ -0,0 +1,77 @@ +/* + * Copyright 2000-2016 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.settingsSummary.ui; + + +import com.intellij.openapi.extensions.ExtensionPointName; +import com.intellij.openapi.ide.CopyPasteManager; +import com.intellij.openapi.project.Project; +import com.intellij.openapi.ui.ComboBox; +import com.intellij.openapi.ui.DialogWrapper; +import com.intellij.settingsSummary.ProblemType; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import javax.swing.*; +import java.awt.datatransfer.StringSelection; +import java.awt.event.ActionEvent; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; + +public class SettingsSummaryDialog extends DialogWrapper { + private JTextArea summary; + private JPanel centerPanel; + private ComboBox problemTypeBox; + + public static final ExtensionPointName EP_SETTINGS = ExtensionPointName.create("com.intellij.settingsSummaryFactory"); + + public SettingsSummaryDialog(Project project) { + super(project); + setTitle("Settings Summary"); + for(ProblemType problemType: EP_SETTINGS.getExtensions()){ + problemTypeBox.addItem(problemType); + } + problemTypeBox.addItemListener(new ItemListener() { + @Override + public void itemStateChanged(ItemEvent e) { + ProblemType item = (ProblemType)e.getItem(); + summary.setText(item.collectInfo(project)); + } + }); + summary.setText(EP_SETTINGS.getExtensions()[0].collectInfo(project)); + + init(); + pack(); + } + + @NotNull + @Override + protected Action[] createActions() { + Action copy = new DialogWrapperAction("&Copy") { + @Override + protected void doAction(ActionEvent e) { + CopyPasteManager.getInstance().setContents(new StringSelection(summary.getText())); + } + }; + return new Action[]{copy, getOKAction()}; + } + + @Nullable + @Override + protected JComponent createCenterPanel() { + return centerPanel; + } +} diff --git a/platform/platform-impl/src/com/intellij/ui/TooltipWithClickableLinks.java b/platform/platform-impl/src/com/intellij/ui/TooltipWithClickableLinks.java new file mode 100644 index 000000000000..bbbe06cf18f0 --- /dev/null +++ b/platform/platform-impl/src/com/intellij/ui/TooltipWithClickableLinks.java @@ -0,0 +1,59 @@ +/* + * Copyright 2000-2016 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.ui; + +import com.intellij.ide.BrowserUtil; +import com.intellij.ide.IdeTooltip; +import com.intellij.ide.IdeTooltipManager; +import com.intellij.ide.TooltipEvent; + +import javax.swing.*; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; +import java.awt.*; + +/** + * Custom tooltip implementation which supports clickable links in HTML text + * + * @see IdeTooltipManager#setCustomTooltip(JComponent, IdeTooltip) + */ +public class TooltipWithClickableLinks extends IdeTooltip { + public TooltipWithClickableLinks(JComponent component, String htmlText, HyperlinkListener hyperlinkListener) { + super(component, new Point(), createTipComponent(htmlText, hyperlinkListener), component, htmlText); + } + + private static JComponent createTipComponent(String text, HyperlinkListener hyperlinkListener) { + JEditorPane pane = IdeTooltipManager.initPane(text, new HintHint().setAwtTooltip(true), null); + pane.addHyperlinkListener(hyperlinkListener); + return pane; + } + + @Override + protected boolean canAutohideOn(TooltipEvent event) { + return !event.isIsEventInsideBalloon(); + } + + public static class ForBrowser extends TooltipWithClickableLinks { + public ForBrowser(JComponent component, String htmlText) { + super(component, htmlText, new HyperlinkAdapter() { + @Override + protected void hyperlinkActivated(HyperlinkEvent e) { + BrowserUtil.browse(e.getURL()); + } + }); + } + } +} diff --git a/platform/platform-impl/src/com/intellij/util/path.kt b/platform/platform-impl/src/com/intellij/util/path.kt index bbaf55f4e76f..41ca774677c7 100644 --- a/platform/platform-impl/src/com/intellij/util/path.kt +++ b/platform/platform-impl/src/com/intellij/util/path.kt @@ -61,7 +61,7 @@ fun Path.delete() { } } -fun Path.deleteRecursively(): Path = if (exists()) Files.walkFileTree(this, object : SimpleFileVisitor() { +fun Path.deleteRecursively(): Path = if (exists()) Files.walkFileTree (this, object : SimpleFileVisitor() { override fun visitFile(file: Path, attrs: BasicFileAttributes): FileVisitResult { file.delete() return FileVisitResult.CONTINUE diff --git a/platform/core-api/src/org/jetbrains/concurrency/AsyncValueLoader.java b/platform/platform-impl/src/org/jetbrains/concurrency/AsyncValueLoader.java similarity index 99% rename from platform/core-api/src/org/jetbrains/concurrency/AsyncValueLoader.java rename to platform/platform-impl/src/org/jetbrains/concurrency/AsyncValueLoader.java index 4029f9182e31..b47347ee69e4 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/AsyncValueLoader.java +++ b/platform/platform-impl/src/org/jetbrains/concurrency/AsyncValueLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. diff --git a/platform/core-api/src/org/jetbrains/concurrency/PromiseManager.java b/platform/platform-impl/src/org/jetbrains/concurrency/PromiseManager.java similarity index 99% rename from platform/core-api/src/org/jetbrains/concurrency/PromiseManager.java rename to platform/platform-impl/src/org/jetbrains/concurrency/PromiseManager.java index 7712f82a96f4..557f433b4cd3 100644 --- a/platform/core-api/src/org/jetbrains/concurrency/PromiseManager.java +++ b/platform/platform-impl/src/org/jetbrains/concurrency/PromiseManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. diff --git a/platform/platform-impl/src/org/jetbrains/concurrency/promise.kt b/platform/platform-impl/src/org/jetbrains/concurrency/promise.kt index 6e6134e3eaff..0e14060afe04 100644 --- a/platform/platform-impl/src/org/jetbrains/concurrency/promise.kt +++ b/platform/platform-impl/src/org/jetbrains/concurrency/promise.kt @@ -25,7 +25,7 @@ private val rejectedPromise = Promise.reject("rejected") // only internal usage interface ObsolescentFunction : Function, Obsolescent -abstract class ValueNodeAsyncFunction(private val node: Obsolescent) : AsyncFunction, Obsolescent { +abstract class ValueNodeAsyncFunction(private val node: Obsolescent) : Function>, Obsolescent { override fun isObsolete() = node.isObsolete } @@ -69,9 +69,9 @@ inline fun Promise.thenAsyncAccept(node: Obsolescent, crossinline handler override fun `fun`(param: T) = handler(param) as Promise }) -inline fun Promise.thenAsyncAccept(crossinline handler: (T) -> Promise<*>) = thenAsync(AsyncFunction { param -> +inline fun Promise.thenAsyncAccept(crossinline handler: (T) -> Promise<*>) = thenAsync(Function> { param -> @Suppress("UNCHECKED_CAST") - (return@AsyncFunction handler(param) as Promise) + (return@Function handler(param) as Promise) }) @@ -80,15 +80,9 @@ inline fun Promise<*>.rejected(node: Obsolescent, crossinline handler: (Throwabl }) -fun resolvedPromise(): Promise<*> = Promise.DONE - -fun resolvedPromise(result: T) = Promise.resolve(result) - fun rejectedPromise(error: String): Promise = Promise.reject(error) -fun rejectedPromise(error: Throwable): Promise = Promise.reject(error) - -@Suppress("CAST_NEVER_SUCCEEDS") +@Suppress("UNCHECKED_CAST") fun rejectedPromise(): Promise = rejectedPromise as Promise val Promise<*>.isRejected: Boolean @@ -100,16 +94,6 @@ val Promise<*>.isPending: Boolean val Promise<*>.isFulfilled: Boolean get() = state == Promise.State.FULFILLED -inline fun AsyncPromise<*>.catchError(runnable: () -> T): T? { - try { - return runnable() - } - catch (e: Throwable) { - setError(e) - return null - } -} - fun collectResults(promises: List>): Promise> { if (promises.isEmpty()) { return resolvedPromise(emptyList()) @@ -119,7 +103,7 @@ fun collectResults(promises: List>): Promise> { for (promise in promises) { promise.done { results.add(it) } } - return Promise.all(promises, results) + return all(promises, results) } fun createError(error: String, log: Boolean): RuntimeException = Promise.MessageError(error, log) diff --git a/platform/platform-resources-en/src/messages/ApplicationBundle.properties b/platform/platform-resources-en/src/messages/ApplicationBundle.properties index 19ac3c9e7033..fb0ab61a8f02 100644 --- a/platform/platform-resources-en/src/messages/ApplicationBundle.properties +++ b/platform/platform-resources-en/src/messages/ApplicationBundle.properties @@ -533,7 +533,7 @@ checkbox.show.only.monospaced.fonts=Show only monospaced fonts primary.font=Primary font: secondary.font=Secondary font: use.ligatures=Enable font ligatures -ligatures.jre.warning=The JRE you are running {0} with might have\nfunctional and performance issues related to ligatures support.\nTo avoid such issues, run IntelliJ IDEA with the bundled JRE. +ligatures.jre.warning=The JRE you are running {0} with might have
functional and performance issues related to ligatures support.
To avoid such issues, run {0} with JetBrains Runtime. editbox.enter.tag.name=Enter tag name: title.tag.name=Tag Name title.xml=XML diff --git a/platform/platform-resources-en/src/messages/IdeBundle.properties b/platform/platform-resources-en/src/messages/IdeBundle.properties index 26abc44aad72..3f541db2606e 100644 --- a/platform/platform-resources-en/src/messages/IdeBundle.properties +++ b/platform/platform-resources-en/src/messages/IdeBundle.properties @@ -1136,7 +1136,7 @@ low.disk.space.message=Low disk space on a {0} system directory partition prompt.goto.inspection.enter.name=Enter inspection name: goto.inspection.action.text=&Run Inspection by Name... -goto.inspection.action.choose.inherit.settings.from=Inherit inspection options from +goto.inspection.action.choose.inherit.settings.from=Inspection options label.no.inspections.found=No inspections found #Scripting library management diff --git a/platform/platform-resources/src/META-INF/LangExtensionPoints.xml b/platform/platform-resources/src/META-INF/LangExtensionPoints.xml index 1b0c57c03924..307da8269a49 100644 --- a/platform/platform-resources/src/META-INF/LangExtensionPoints.xml +++ b/platform/platform-resources/src/META-INF/LangExtensionPoints.xml @@ -95,6 +95,9 @@ + + diff --git a/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml b/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml index 79c1509393c6..6912633033f6 100644 --- a/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml +++ b/platform/platform-resources/src/META-INF/PlatformExtensionPoints.xml @@ -266,5 +266,7 @@ + + diff --git a/platform/platform-resources/src/componentSets/Lang.xml b/platform/platform-resources/src/componentSets/Lang.xml index 9fb161e81b10..720d67480145 100644 --- a/platform/platform-resources/src/componentSets/Lang.xml +++ b/platform/platform-resources/src/componentSets/Lang.xml @@ -154,6 +154,10 @@ com.intellij.codeInsight.daemon.impl.CodeFoldingPassFactory + + com.intellij.codeInsight.daemon.impl.RainbowIdentifierHighlighterPassFactory + + com.intellij.codeInsight.daemon.impl.IndentsPassFactory diff --git a/platform/platform-resources/src/idea/PlatformActions.xml b/platform/platform-resources/src/idea/PlatformActions.xml index beac7906c6c4..a5282d086ff0 100644 --- a/platform/platform-resources/src/idea/PlatformActions.xml +++ b/platform/platform-resources/src/idea/PlatformActions.xml @@ -496,6 +496,7 @@ + diff --git a/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/MockCodeStyleManager.java b/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/MockCodeStyleManager.java index 84e218118c61..5dbf53754d9b 100644 --- a/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/MockCodeStyleManager.java +++ b/platform/platform-tests/testSrc/com/intellij/codeInsight/actions/MockCodeStyleManager.java @@ -25,6 +25,7 @@ import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleManager; +import com.intellij.psi.codeStyle.FormatRangesInfo; import com.intellij.psi.codeStyle.Indent; import com.intellij.util.IncorrectOperationException; import com.intellij.util.ThrowableRunnable; @@ -72,8 +73,8 @@ public class MockCodeStyleManager extends CodeStyleManager { } @Override - public void reformatTextWithContext(@NotNull PsiFile file, @NotNull Collection ranges) throws IncorrectOperationException { - reformatText(file, ranges); + public void reformatTextWithContext(@NotNull PsiFile file, @NotNull FormatRangesInfo helper) throws IncorrectOperationException { + reformatText(file, helper.getRangesToFormat()); } @NotNull diff --git a/platform/platform-tests/testSrc/com/intellij/history/core/storage/TestContent.java b/platform/platform-tests/testSrc/com/intellij/history/core/storage/TestContent.java index c74068ff4beb..602fc288cf87 100644 --- a/platform/platform-tests/testSrc/com/intellij/history/core/storage/TestContent.java +++ b/platform/platform-tests/testSrc/com/intellij/history/core/storage/TestContent.java @@ -43,11 +43,12 @@ public class TestContent extends Content { @Override public boolean equals(Object o) { + if (!(o instanceof Content)) return false; return Arrays.equals(myData, ((Content)o).getBytes()); } @Override public int hashCode() { - return myData.hashCode(); + return Arrays.hashCode(myData); } } diff --git a/platform/platform-tests/testSrc/com/intellij/history/integration/ui/SelectionHistoryDialogTest.java b/platform/platform-tests/testSrc/com/intellij/history/integration/ui/SelectionHistoryDialogTest.java index e2de406fb805..d03e0d7accf0 100644 --- a/platform/platform-tests/testSrc/com/intellij/history/integration/ui/SelectionHistoryDialogTest.java +++ b/platform/platform-tests/testSrc/com/intellij/history/integration/ui/SelectionHistoryDialogTest.java @@ -30,7 +30,7 @@ import com.intellij.openapi.vfs.VirtualFile; import java.io.IOException; -import static org.easymock.classextension.EasyMock.*; +import static org.easymock.EasyMock.*; public class SelectionHistoryDialogTest extends LocalHistoryUITestCase { private VirtualFile f; diff --git a/platform/platform-tests/testSrc/com/intellij/history/integration/ui/models/SelectionCalculatorTest.java b/platform/platform-tests/testSrc/com/intellij/history/integration/ui/models/SelectionCalculatorTest.java index e731b712f86b..41817a90bac9 100644 --- a/platform/platform-tests/testSrc/com/intellij/history/integration/ui/models/SelectionCalculatorTest.java +++ b/platform/platform-tests/testSrc/com/intellij/history/integration/ui/models/SelectionCalculatorTest.java @@ -29,7 +29,7 @@ import org.junit.Test; import java.util.List; -import static org.easymock.classextension.EasyMock.*; +import static org.easymock.EasyMock.*; public class SelectionCalculatorTest extends LocalHistoryTestCase { IdeaGateway gw = new MyIdeaGateway(); diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/diff/impl/external/DiffManagerTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/diff/impl/external/DiffManagerTest.java index bfae0bb66aac..0d7b0cc6cb0c 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/diff/impl/external/DiffManagerTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/diff/impl/external/DiffManagerTest.java @@ -20,7 +20,7 @@ import com.intellij.openapi.diff.*; import com.intellij.openapi.fileTypes.FileTypes; import com.intellij.openapi.project.Project; import com.intellij.util.ArrayUtil; -import org.easymock.classextension.EasyMock; +import org.easymock.EasyMock; import org.jetbrains.annotations.NotNull; import org.junit.Test; diff --git a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java index 59d5b89fa0bc..fdb4f286dc68 100644 --- a/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java +++ b/platform/platform-tests/testSrc/com/intellij/openapi/editor/impl/EditorImplTest.java @@ -29,6 +29,7 @@ import com.intellij.openapi.editor.event.SelectionListener; import com.intellij.openapi.editor.ex.DocumentBulkUpdateListener; import com.intellij.openapi.editor.ex.DocumentEx; import com.intellij.openapi.editor.ex.EditorEx; +import com.intellij.openapi.editor.ex.FoldingModelEx; import com.intellij.openapi.editor.ex.util.EditorUtil; import com.intellij.openapi.editor.markup.HighlighterTargetArea; import com.intellij.openapi.editor.markup.RangeHighlighter; @@ -390,4 +391,18 @@ public class EditorImplTest extends AbstractEditorTest { assertEquals(7, highlighters[0].getStartOffset()); assertEquals(8, highlighters[0].getEndOffset()); } + + public void testChangingHighlightersAfterClearingFoldingsDuringFoldingBatchUpdate() throws Exception { + initText("abc\n\ndef"); + addCollapsedFoldRegion(2, 6, "..."); + myEditor.getFoldingModel().runBatchFoldingOperation(() -> { + ((FoldingModelEx)myEditor.getFoldingModel()).clearFoldRegions(); + myEditor.getMarkupModel().addRangeHighlighter(7, 8, 0, new TextAttributes(null, null, null, null, Font.BOLD), + HighlighterTargetArea.EXACT_RANGE); + }); + RangeHighlighter[] highlighters = myEditor.getMarkupModel().getAllHighlighters(); + assertEquals(1, highlighters.length); + assertEquals(7, highlighters[0].getStartOffset()); + assertEquals(8, highlighters[0].getEndOffset()); + } } diff --git a/platform/platform-tests/testSrc/com/intellij/util/containers/TreeTraverserTest.java b/platform/platform-tests/testSrc/com/intellij/util/containers/TreeTraverserTest.java index 3c216266a644..7fc6b3c55135 100644 --- a/platform/platform-tests/testSrc/com/intellij/util/containers/TreeTraverserTest.java +++ b/platform/platform-tests/testSrc/com/intellij/util/containers/TreeTraverserTest.java @@ -18,7 +18,10 @@ package com.intellij.util.containers; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Conditions; -import com.intellij.util.*; +import com.intellij.util.Function; +import com.intellij.util.Functions; +import com.intellij.util.PairFunction; +import com.intellij.util.Processor; import junit.framework.TestCase; import org.jetbrains.annotations.NotNull; @@ -425,21 +428,16 @@ public class TreeTraverserTest extends TestCase { // GuidedTraversal ---------------------------------------------- @NotNull - private static Function.Mono> initGuide(@NotNull final TreeTraversal traversal) { - return new Function.Mono>() { - @Override - public TreeTraversal.GuidedIt fun(TreeTraversal.GuidedIt it) { - return it.setGuide(it1 -> { - if (traversal == TreeTraversal.PRE_ORDER_DFS) { - it1.queueNext(it1.curChild).result(it1.curChild); - } - else if (traversal == TreeTraversal.POST_ORDER_DFS) { - it1.queueNext(it1.curChild).result(it1.curChild == null ? it1.curParent : null); - } - else if (traversal == TreeTraversal.PLAIN_BFS) { - it1.queueLast(it1.curChild).result(it1.curChild); - } - }); + private static TreeTraversal.GuidedIt.Guide newGuide(@NotNull final TreeTraversal traversal) { + return it -> { + if (traversal == TreeTraversal.PRE_ORDER_DFS) { + it.queueNext(it.curChild).result(it.curChild); + } + else if (traversal == TreeTraversal.POST_ORDER_DFS) { + it.queueNext(it.curChild).result(it.curChild == null ? it.curParent : null); + } + else if (traversal == TreeTraversal.PLAIN_BFS) { + it.queueLast(it.curChild).result(it.curChild); } }; } @@ -451,7 +449,7 @@ public class TreeTraverserTest extends TestCase { } private static void verifyGuidedTraversal(TreeTraversal traversal) { - assertEquals(numTraverser2(TreeTraversal.GUIDED_TRAVERSAL).fun(1).intercept(initGuide(traversal)).toList(), + assertEquals(numTraverser2(TreeTraversal.GUIDED_TRAVERSAL(newGuide(traversal))).fun(1).toList(), numTraverser2(traversal).fun(1).toList()); } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java index 7155ba1b2af7..0e57c908d80f 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/AdditionalLibraryRootsProvider.java @@ -23,9 +23,29 @@ import org.jetbrains.annotations.NotNull; import java.util.Collection; import java.util.Collections; +/** + * Implement this EP to provide additional library roots. It can be useful when it's undesirable to create + * {@link com.intellij.openapi.roots.libraries.Library} and attach it to a module via {@link OrderEntry}. + * Additional library roots will extend {@link com.intellij.psi.search.GlobalSearchScope#allScope(Project)} + * (in UI, "Project and Libraries" scope). Also, files contained in the roots will be shown as library files + * in Project View and will be available in "Navigate | File..." popup. + * + * Please note it is an experimental API that is subject to incompatible changes, or even removal, in a future release. + */ public abstract class AdditionalLibraryRootsProvider { public static final ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.additionalLibraryRootsProvider"); + /** + * Returns library source roots (analogous to {@code library.getFiles(OrderRootType.SOURCES)} for a given project. + * This method is suitable when it's easier to collect all additional library roots associated with {@code Project}, + * instead of {@code Module}. E.g. JavaScript libraries can be associated with files or folders allowing more + * fine-grained control. + * Files contained in the returned roots are considered as library source files: + * {@link ProjectFileIndex#isInLibrarySource(VirtualFile)} should return {@code true} for them. + * + * @param project Project instance + * @return a collection of library source roots + */ @NotNull public Collection getAdditionalProjectLibrarySourceRoots(@NotNull Project project) { return Collections.emptyList(); diff --git a/platform/script-debugger/backend/src/BreakpointManagerBase.kt b/platform/script-debugger/backend/src/BreakpointManagerBase.kt index 73c73e281454..13f48d3f3b38 100644 --- a/platform/script-debugger/backend/src/BreakpointManagerBase.kt +++ b/platform/script-debugger/backend/src/BreakpointManagerBase.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -23,6 +23,7 @@ import com.intellij.util.Url import com.intellij.util.containers.ContainerUtil import gnu.trove.TObjectHashingStrategy import org.jetbrains.concurrency.Promise +import org.jetbrains.concurrency.all import org.jetbrains.concurrency.rejectedPromise import org.jetbrains.concurrency.resolvedPromise import java.util.concurrent.ConcurrentMap @@ -90,7 +91,7 @@ abstract class BreakpointManagerBase> : BreakpointManager promises.add(doClearBreakpoint(b)) } } - return Promise.all(promises) + return all(promises) } protected abstract fun doClearBreakpoint(breakpoint: T): Promise<*> diff --git a/platform/script-debugger/backend/src/DeclarativeScope.kt b/platform/script-debugger/backend/src/DeclarativeScope.kt index db1e206776a3..ed6523dd66d5 100644 --- a/platform/script-debugger/backend/src/DeclarativeScope.kt +++ b/platform/script-debugger/backend/src/DeclarativeScope.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -15,8 +15,8 @@ */ package org.jetbrains.debugger -import com.intellij.util.Consumer import org.jetbrains.concurrency.Promise +import org.jetbrains.concurrency.cancelledPromise import org.jetbrains.debugger.values.ObjectValue import org.jetbrains.debugger.values.ValueManager @@ -25,14 +25,10 @@ abstract class DeclarativeScope(type: Scope.Type, protected fun loadScopeObjectProperties(value: ObjectValue): Promise> { if (childrenManager.valueManager.isObsolete) { - return ValueManager.reject() + return cancelledPromise() } - return value.properties.done(object : Consumer> { - override fun consume(variables: List) { - childrenManager.updateCacheStamp() - } - }) + return value.properties.done { childrenManager.updateCacheStamp() } } override fun getVariablesHost() = childrenManager diff --git a/platform/script-debugger/backend/src/org/jetbrains/debugger/VariablesHost.java b/platform/script-debugger/backend/src/org/jetbrains/debugger/VariablesHost.java index 746016d690cf..f83f8010a2c4 100644 --- a/platform/script-debugger/backend/src/org/jetbrains/debugger/VariablesHost.java +++ b/platform/script-debugger/backend/src/org/jetbrains/debugger/VariablesHost.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -17,6 +17,7 @@ package org.jetbrains.debugger; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.jetbrains.concurrency.AsyncPromiseKt; import org.jetbrains.concurrency.Promise; import org.jetbrains.concurrency.PromiseManager; import org.jetbrains.debugger.values.ValueManager; @@ -35,7 +36,7 @@ public abstract class VariablesHost { @NotNull @Override public Promise load(@NotNull VariablesHost host) { - return host.valueManager.isObsolete() ? ValueManager.Companion.reject() : host.load(); + return host.valueManager.isObsolete() ? AsyncPromiseKt.cancelledPromise() : host.load(); } }; diff --git a/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectValueBase.kt b/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectValueBase.kt index 7b8bcb80d958..00752737536b 100644 --- a/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectValueBase.kt +++ b/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ObjectValueBase.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -17,8 +17,9 @@ package org.jetbrains.debugger.values import com.intellij.util.SmartList import org.jetbrains.concurrency.Obsolescent -import org.jetbrains.concurrency.ObsolescentAsyncFunction +import org.jetbrains.concurrency.ObsolescentFunction import org.jetbrains.concurrency.Promise +import org.jetbrains.concurrency.all import org.jetbrains.debugger.EvaluateContext import org.jetbrains.debugger.Variable import org.jetbrains.debugger.VariablesHost @@ -30,7 +31,7 @@ abstract class ObjectValueBase(type: ValueType) : V override val properties: Promise> get() = childrenManager.get() - internal abstract inner class MyObsolescentAsyncFunction(private val obsolescent: Obsolescent) : ObsolescentAsyncFunction { + internal abstract inner class MyObsolescentAsyncFunction(private val obsolescent: Obsolescent) : ObsolescentFunction> { override fun isObsolete() = obsolescent.isObsolete || childrenManager.valueManager.isObsolete } @@ -43,7 +44,7 @@ abstract class ObjectValueBase(type: ValueType) : V override fun getIndexedProperties(from: Int, to: Int, bucketThreshold: Int, consumer: IndexedVariablesConsumer, componentType: ValueType?): Promise<*> = Promise.REJECTED - @Suppress("CAST_NEVER_SUCCEEDS") + @Suppress("UNCHECKED_CAST") override val variablesHost: VariablesHost get() = childrenManager as VariablesHost } @@ -57,9 +58,7 @@ fun getSpecifiedProperties(variables: List, names: List, evalu } if (!properties.isEmpty()) { - Collections.sort(properties, object : Comparator { - override fun compare(o1: Variable, o2: Variable) = names.indexOf(o1.name) - names.indexOf(o2.name) - }) + Collections.sort(properties) { o1, o2 -> names.indexOf(o1.name) - names.indexOf(o2.name) } } properties.add(property) @@ -80,6 +79,6 @@ fun getSpecifiedProperties(variables: List, names: List, evalu promises.add(valueModifier!!.evaluateGet(variable, evaluateContext)) } } - return Promise.all>(promises, properties) + return all(promises, properties) } } \ No newline at end of file diff --git a/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ValueManager.kt b/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ValueManager.kt index 9d41c63f939c..f1d1ee5740c3 100644 --- a/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ValueManager.kt +++ b/platform/script-debugger/backend/src/org/jetbrains/debugger/values/ValueManager.kt @@ -15,10 +15,7 @@ */ package org.jetbrains.debugger.values -import org.jetbrains.concurrency.AsyncPromise import org.jetbrains.concurrency.Obsolescent -import org.jetbrains.concurrency.Promise -import org.jetbrains.concurrency.rejectedPromise import java.util.concurrent.atomic.AtomicInteger /** @@ -43,11 +40,4 @@ abstract class ValueManager() : Obsolescent { fun markObsolete() { obsolete = true } - - companion object { - val OBSOLETE_CONTEXT_PROMISE = rejectedPromise(AsyncPromise.OBSOLETE_ERROR) - - @Suppress("CAST_NEVER_SUCCEEDS") - fun reject() = OBSOLETE_CONTEXT_PROMISE as Promise - } } \ No newline at end of file diff --git a/platform/script-debugger/backend/src/org/jetbrains/rpc/CommandProcessor.kt b/platform/script-debugger/backend/src/org/jetbrains/rpc/CommandProcessor.kt index 880b2b45ff2d..cd144974068b 100644 --- a/platform/script-debugger/backend/src/org/jetbrains/rpc/CommandProcessor.kt +++ b/platform/script-debugger/backend/src/org/jetbrains/rpc/CommandProcessor.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -54,7 +54,7 @@ fun requestToByteBuf(message: Request<*>, isDebugEnabled: Boolean = LOG.isDebugE return content } -interface ResultReader { +interface ResultReader { fun readResult(readMethodName: String, successResponse: RESPONSE): RESULT? } diff --git a/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt b/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt index 8fee087ca062..3d704f5ba453 100644 --- a/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt +++ b/platform/script-debugger/debugger-ui/src/LineBreakpointManager.kt @@ -26,6 +26,7 @@ import com.intellij.xdebugger.breakpoints.XLineBreakpoint import gnu.trove.THashMap import gnu.trove.THashSet import org.jetbrains.concurrency.Promise +import org.jetbrains.concurrency.all import org.jetbrains.concurrency.resolvedPromise import java.util.concurrent.atomic.AtomicBoolean @@ -113,7 +114,7 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl promises.add(breakpointManager.remove(vmBreakpoint)) } } - return Promise.all(promises) + return all(promises) } fun setBreakpoint(vm: Vm, breakpoint: XLineBreakpoint<*>, locations: List, promiseRef: Ref>? = null) { @@ -233,11 +234,11 @@ abstract class LineBreakpointManager(internal val debugProcess: DebugProcessImpl } fun clearRunToLocationBreakpoints(vm: Vm) { - var breakpoints = synchronized (lock) { + val breakpoints = synchronized (lock) { if (runToLocationBreakpoints.isEmpty) { return@clearRunToLocationBreakpoints } - var breakpoints = runToLocationBreakpoints.toArray(arrayOfNulls(runToLocationBreakpoints.size)) + val breakpoints = runToLocationBreakpoints.toArray(arrayOfNulls(runToLocationBreakpoints.size)) runToLocationBreakpoints.clear() breakpoints } diff --git a/platform/script-debugger/debugger-ui/src/VariableView.kt b/platform/script-debugger/debugger-ui/src/VariableView.kt index 4bffc4914cce..3f7ddedba47d 100644 --- a/platform/script-debugger/debugger-ui/src/VariableView.kt +++ b/platform/script-debugger/debugger-ui/src/VariableView.kt @@ -185,7 +185,7 @@ class VariableView(override val variableName: String, private val variable: Vari } if (hasIndexedProperties == hasNamedProperties || additionalProperties != null) { - Promise.all(promises).processed(node) { node.addChildren(XValueChildrenList.EMPTY, true) } + all(promises).processed(node) { node.addChildren(XValueChildrenList.EMPTY, true) } } } diff --git a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.java b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.java deleted file mode 100644 index 337ec586106e..000000000000 --- a/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2000-2015 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 org.jetbrains.debugger; - -import com.intellij.util.Consumer; -import com.intellij.xdebugger.XDebugSession; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; -import org.jetbrains.concurrency.AsyncPromise; -import org.jetbrains.concurrency.Promise; -import org.jetbrains.rpc.CommandProcessorKt; - -public final class RejectErrorReporter implements Consumer { - private final XDebugSession session; - private final String description; - - public RejectErrorReporter(@NotNull XDebugSession session) { - this(session, null); - } - - public RejectErrorReporter(@NotNull XDebugSession session, @Nullable String description) { - this.session = session; - this.description = description; - } - - @Override - public void consume(Throwable error) { - Promise.logError(CommandProcessorKt.getLOG(), error); - if (error != AsyncPromise.OBSOLETE_ERROR) { - session.reportError((description == null ? "" : description + ": ") + error.getMessage()); - } - } -} \ No newline at end of file diff --git a/platform/script-debugger/debugger-ui/src/util.kt b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.kt similarity index 60% rename from platform/script-debugger/debugger-ui/src/util.kt rename to platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.kt index 6bb7d71f1ad0..9a2b08606ce5 100644 --- a/platform/script-debugger/debugger-ui/src/util.kt +++ b/platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/RejectErrorReporter.kt @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.xdebugger.util +package org.jetbrains.debugger +import com.intellij.util.Consumer import com.intellij.xdebugger.XDebugSession -import org.jetbrains.concurrency.AsyncPromise import org.jetbrains.concurrency.Promise import org.jetbrains.rpc.LOG -// have to use package "com.intellij.xdebugger.util" to avoid package clash -fun XDebugSession.rejectedErrorReporter(description: String? = null): (Throwable) -> Unit = { - Promise.logError(LOG, it) - if (it != AsyncPromise.OBSOLETE_ERROR) { - reportError("${if (description == null) "" else description + ": "}${it.message}") +class RejectErrorReporter @JvmOverloads constructor(private val session: XDebugSession, private val description: String? = null) : Consumer { + override fun consume(error: Throwable) { + if (Promise.logError(LOG, error)) { + session.reportError("${if (description == null) "" else "$description: "}${error.message}") + } } } \ No newline at end of file diff --git a/platform/script-debugger/debugger-ui/testSrc/org/jetbrains/debugger/TestCompositeNode.java b/platform/script-debugger/debugger-ui/testSrc/org/jetbrains/debugger/TestCompositeNode.java index c1ced2464956..dc507209792c 100644 --- a/platform/script-debugger/debugger-ui/testSrc/org/jetbrains/debugger/TestCompositeNode.java +++ b/platform/script-debugger/debugger-ui/testSrc/org/jetbrains/debugger/TestCompositeNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -18,12 +18,13 @@ package org.jetbrains.debugger; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Conditions; import com.intellij.ui.SimpleTextAttributes; +import com.intellij.util.Function; import com.intellij.xdebugger.frame.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.concurrency.AsyncFunction; import org.jetbrains.concurrency.AsyncPromise; import org.jetbrains.concurrency.Promise; +import org.jetbrains.concurrency.Promises; import org.jetbrains.debugger.values.ObjectValue; import javax.swing.*; @@ -105,7 +106,7 @@ public class TestCompositeNode implements XCompositeNode { assert content == null; content = new Content(); - return result.thenAsync(new AsyncFunction() { + return result.thenAsync(new Function>() { private void resolveGroups(@NotNull List valueGroups, @NotNull List resultNodes, @NotNull List> promises) { for (XValueGroup group : valueGroups) { TestCompositeNode node = new TestCompositeNode(group); @@ -115,7 +116,7 @@ public class TestCompositeNode implements XCompositeNode { } resultNodes.add(node); if (computeChildren) { - promises.add(node.loadContent(Conditions.alwaysFalse(), valueSubContentResolveCondition)); + promises.add(node.loadContent(Conditions.alwaysFalse(), valueSubContentResolveCondition)); } } } @@ -142,7 +143,7 @@ public class TestCompositeNode implements XCompositeNode { resolveGroups(children.getBottomGroups(), content.bottomGroups, promises); - return Promise.all(promises, content); + return Promises.all(promises, content); } }); } diff --git a/platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/OutMessage.kt b/platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/OutMessage.kt index 4e04af8cb877..63a17b083aa4 100644 --- a/platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/OutMessage.kt +++ b/platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/OutMessage.kt @@ -201,7 +201,7 @@ open class OutMessage() { fun writeNullableString(name: String, value: CharSequence?) { beginArguments() - writer.name(name).value(value!!.toString()) + writer.name(name).value(value?.toString() ?: null) } companion object { diff --git a/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/SMTestProxyTest.java b/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/SMTestProxyTest.java index b7a7fd5b7cdf..69d404a0bb0b 100644 --- a/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/SMTestProxyTest.java +++ b/platform/smRunner/testSrc/com/intellij/execution/testframework/sm/runner/SMTestProxyTest.java @@ -19,7 +19,7 @@ import com.intellij.execution.testframework.Filter; import com.intellij.execution.testframework.TestConsoleProperties; import com.intellij.execution.testframework.sm.runner.ui.MockPrinter; import com.intellij.psi.search.GlobalSearchScope; -import org.easymock.classextension.EasyMock; +import org.easymock.EasyMock; import static com.intellij.execution.testframework.sm.runner.states.TestStateInfo.Magnitude; diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java index 07dc98d4578f..364d75814091 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java @@ -708,12 +708,8 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro } } - protected boolean isRunInEdt() { - return true; - } - protected void runBareRunnable(ThrowableRunnable runnable) throws Throwable { - if (isRunInEdt()) { + if (runInDispatchThread()) { EdtTestUtil.runInEdtAndWait(runnable); } else { 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 ba61e63f5ccb..8a6670990b2c 100644 --- a/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java +++ b/platform/testFramework/src/com/intellij/testFramework/fixtures/impl/CodeInsightTestFixtureImpl.java @@ -27,6 +27,7 @@ import com.intellij.codeInsight.daemon.impl.*; import com.intellij.codeInsight.folding.CodeFoldingManager; import com.intellij.codeInsight.highlighting.actions.HighlightUsagesAction; import com.intellij.codeInsight.intention.IntentionAction; +import com.intellij.codeInsight.intention.impl.IntentionListStep; import com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler; import com.intellij.codeInsight.lookup.Lookup; import com.intellij.codeInsight.lookup.LookupElement; @@ -296,56 +297,26 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig private static List doGetAvailableIntentions(@NotNull Editor editor, @NotNull PsiFile file) { ShowIntentionsPass.IntentionsInfo intentions = new ShowIntentionsPass.IntentionsInfo(); ShowIntentionsPass.getActionsToShow(editor, file, intentions, -1); - List descriptors = new ArrayList(); - descriptors.addAll(intentions.intentionsToShow); - descriptors.addAll(intentions.errorFixesToShow); - descriptors.addAll(intentions.inspectionFixesToShow); - descriptors.addAll(intentions.guttersToShow); - - final int fileOffset = editor.getCaretModel().getOffset(); - PsiElement hostElement = file.getViewProvider().findElementAt(fileOffset, file.getLanguage()); - PsiElement injectedElement = InjectedLanguageUtil.findElementAtNoCommit(file, fileOffset); - - PsiFile injectedFile = injectedElement != null ? injectedElement.getContainingFile() : null; - Editor injectedEditor = InjectedLanguageUtil.getInjectedEditorForInjectedFile(editor, injectedFile); List result = new ArrayList(); + IntentionListStep intentionListStep = new IntentionListStep(null, intentions, editor, file, file.getProject()); + for (Map.Entry> entry : intentionListStep.getActionsWithSubActions().entrySet()) { + result.add(entry.getKey()); + result.addAll(entry.getValue()); + } List infos = DaemonCodeAnalyzerEx.getInstanceEx(file.getProject()).getFileLevelHighlights(file.getProject(), file); for (HighlightInfo info : infos) { for (Pair pair : info.quickFixActionRanges) { HighlightInfo.IntentionActionDescriptor actionInGroup = pair.first; - final IntentionAction action = actionInGroup.getAction(); - - if (ShowIntentionActionsHandler.availableFor(file, editor, action) - || - injectedElement != null && hostElement != injectedElement && ShowIntentionActionsHandler.availableFor(injectedFile, injectedEditor, action)) { - descriptors.add(actionInGroup); - } - } - } - - // add all intention options for simplicity - for (HighlightInfo.IntentionActionDescriptor descriptor : descriptors) { - result.add(descriptor.getAction()); - - if (injectedElement != null && injectedElement != hostElement) { - List options = descriptor.getOptions(injectedElement, injectedEditor); - if (options != null) { - for (IntentionAction option : options) { - if (ShowIntentionActionsHandler.availableFor(injectedFile, injectedEditor, option)) { - result.add(option); - } - } - } - } - - if (hostElement != null) { - List options = descriptor.getOptions(hostElement, editor); - if (options != null) { - for (IntentionAction option : options) { - if (ShowIntentionActionsHandler.availableFor(file, editor, option)) { - result.add(option); + if (actionInGroup.getAction().isAvailable(file.getProject(), editor, file)) { + result.add(actionInGroup.getAction()); + List options = actionInGroup.getOptions(file, editor); + if (options != null) { + for (IntentionAction subAction : options) { + if (subAction.isAvailable(file.getProject(), editor, file)) { + result.add(subAction); + } } } } @@ -1315,7 +1286,7 @@ public class CodeInsightTestFixtureImpl extends BaseFixture implements CodeInsig PlatformTestCase.synchronizeTempDirVfs(tempDir); myPsiManager = (PsiManagerImpl)PsiManager.getInstance(getProject()); - configureInspections(LocalInspectionTool.EMPTY_ARRAY, getProject(), Collections.emptyList(), getTestRootDisposable()); + configureInspections(LocalInspectionTool.EMPTY_ARRAY, getProject(), Collections.emptyList(), getTestRootDisposable()); DaemonCodeAnalyzerImpl daemonCodeAnalyzer = (DaemonCodeAnalyzerImpl)DaemonCodeAnalyzer.getInstance(getProject()); daemonCodeAnalyzer.prepareForTest(); diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index 0c279e77df35..fd580538a454 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -106,7 +106,7 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra private final ExporterToTextFile myTextFileExporter = new ExporterToTextFile(this); private final Alarm myUpdateAlarm = new Alarm(Alarm.ThreadToUse.SWING_THREAD); - private final ExclusionHandler myExclusionHandler; + private final ExclusionHandler myExclusionHandler; private final UsageModelTracker myModelTracker; private final Map myUsageNodes = new ConcurrentHashMap(); public static final UsageNode NULL_NODE = new UsageNode(NullUsage.INSTANCE, new UsageViewTreeModelBuilder(new UsageViewPresentation(), UsageTarget.EMPTY_ARRAY)); @@ -253,21 +253,26 @@ public class UsageViewImpl implements UsageView, UsageModelTracker.UsageModelTra runnable.run(); return true; }, o -> isDisposed || project.isDisposed(), 200); - myExclusionHandler = new ExclusionHandler() { + myExclusionHandler = new ExclusionHandler() { @Override - public boolean isNodeExcluded(@NotNull Node node) { - return node.isDataExcluded(); + public boolean isNodeExclusionAvailable(@NotNull DefaultMutableTreeNode node) { + return node instanceof UsageNode; } @Override - public void excludeNode(@NotNull Node node) { + public boolean isNodeExcluded(@NotNull DefaultMutableTreeNode node) { + return ((UsageNode)node).isDataExcluded(); + } + + @Override + public void excludeNode(@NotNull DefaultMutableTreeNode node) { final HashSet usages = new HashSet<>(); collectUsages(node, usages); excludeUsages(usages.toArray(new Usage[usages.size()])); } @Override - public void includeNode(@NotNull Node node) { + public void includeNode(@NotNull DefaultMutableTreeNode node) { final HashSet usages = new HashSet<>(); collectUsages(node, usages); includeUsages(usages.toArray(new Usage[usages.size()])); diff --git a/platform/util-rt/src/com/intellij/util/containers/LinkedHashSet.java b/platform/util-rt/src/com/intellij/util/containers/LinkedHashSet.java index 4940409fa6ce..ab1fceb3a806 100644 --- a/platform/util-rt/src/com/intellij/util/containers/LinkedHashSet.java +++ b/platform/util-rt/src/com/intellij/util/containers/LinkedHashSet.java @@ -35,6 +35,7 @@ class LinkedHashSet extends java.util.LinkedHashSet { super(i); } + @Override public void clear() { if (size() == 0) return; // optimization super.clear(); diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index 78f0f064dba3..81edb7690f50 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -179,6 +179,7 @@ editor.navigation.history.stack.size=25 editor.navigation.history.stack.size.description=Stack size limit for back/forward and last/next edit location navigation editor.reformat.on.typing=false +smart.reformat.vcs.changes=false ide.showIndexRebuildMessage=false @@ -782,9 +783,6 @@ dumb.aware.run.configurations.description=Enable executing run configurations in focus.follows.mouse.workarounds=false focus.follows.mouse.workarounds.description=Enables some workarounds for Focus-follows-mouse issues, like IDEA-112015 -angular.js.ui.router.diagram=false -angular.js.ui.router.diagram.description=Enables AngularJS ui-router states&views diagram action - cidr.xcode.derived.data.override=true cidr.xcode.derived.data.override.description=Ignore Xcode DerivedData location settings diff --git a/platform/util/src/com/intellij/util/IncorrectOperationException.java b/platform/util/src/com/intellij/util/IncorrectOperationException.java index 04beeee09584..51581a27559c 100644 --- a/platform/util/src/com/intellij/util/IncorrectOperationException.java +++ b/platform/util/src/com/intellij/util/IncorrectOperationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -34,7 +34,7 @@ public class IncorrectOperationException extends RuntimeException { super(message, t); } - /** @deprecated use {@link #IncorrectOperationException(String, Throwable)} (to be removed in IDEA 16) */ + /** @deprecated use {@link #IncorrectOperationException(String, Throwable)} (to be removed in IDEA 18) */ public IncorrectOperationException(@NonNls String message, Exception e) { super(message, e); } diff --git a/platform/util/src/com/intellij/util/concurrency/FutureResult.java b/platform/util/src/com/intellij/util/concurrency/FutureResult.java index 53673230ae2f..e3e5c2afa5ba 100644 --- a/platform/util/src/com/intellij/util/concurrency/FutureResult.java +++ b/platform/util/src/com/intellij/util/concurrency/FutureResult.java @@ -26,6 +26,13 @@ public class FutureResult implements Future { private final Semaphore mySema = new Semaphore(0); private volatile Pair myValue; + public FutureResult() { + } + + public FutureResult(@Nullable T result) { + set(result); + } + public synchronized void set(@Nullable T result) { assertNotSet(); diff --git a/platform/util/src/com/intellij/util/containers/FilteredTraverserBase.java b/platform/util/src/com/intellij/util/containers/FilteredTraverserBase.java index 3c4f3312fef8..4b92ff3fd5d4 100644 --- a/platform/util/src/com/intellij/util/containers/FilteredTraverserBase.java +++ b/platform/util/src/com/intellij/util/containers/FilteredTraverserBase.java @@ -17,7 +17,6 @@ package com.intellij.util.containers; import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Conditions; -import com.intellij.util.Consumer; import com.intellij.util.Function; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -63,7 +62,7 @@ public abstract class FilteredTraverserBase(roots, traversal, expand, regard, this.filter, forceIgnore, forceDisregard.append(c)); } - Function.Mono> createChildrenGuide(final T parent) { - final Condition expand = buildExpandConditionForChildren(parent); - class G implements Consumer>, Function.Mono> { - + TreeTraversal.GuidedIt.Guide createChildrenGuide(final T parent) { + return new TreeTraversal.GuidedIt.Guide() { + final Condition expand = buildExpandConditionForChildren(parent); @Override - public TreeTraversal.GuidedIt fun(TreeTraversal.GuidedIt it) { - return it.setGuide(this); + public void guide(TreeTraversal.GuidedIt guidedIt) { + doPerformChildrenGuidance(guidedIt, expand); } - - @Override - public void consume(TreeTraversal.GuidedIt it) { - doPerformChildrenGuidance(it, expand); - } - } - return new G(); + }; } private void doPerformChildrenGuidance(TreeTraversal.GuidedIt it, Condition expand) { @@ -296,7 +288,7 @@ public abstract class FilteredTraverserBase EMPTY = new Meta( @@ -326,37 +318,33 @@ public abstract class FilteredTraverserBase(impl, this); } - private boolean valueAnd(T t) { + boolean valueAnd(T t) { for (Cond c = this; c != null; c = c.next) { if (!c.impl.value(t)) return false; } return true; } - private boolean valueOr(T t) { + boolean valueOr(T t) { for (Cond c = this; c != null; c = c.next) { if (c.impl.value(t)) return true; } return false; } - Condition OR() { - return new Condition() { - @Override - public boolean value(T t) { - return valueOr(t); - } - }; - } + final Condition OR = new Condition() { + @Override + public boolean value(T t) { + return valueOr(t); + } + }; - Condition AND() { - return new Condition() { - @Override - public boolean value(T t) { - return valueAnd(t); - } - }; - } + final Condition AND = new Condition() { + @Override + public boolean value(T t) { + return valueAnd(t); + } + }; @Override public String toString() { diff --git a/platform/util/src/com/intellij/util/containers/TreeTraversal.java b/platform/util/src/com/intellij/util/containers/TreeTraversal.java index 300eb5e93a9e..e8f8bb344469 100644 --- a/platform/util/src/com/intellij/util/containers/TreeTraversal.java +++ b/platform/util/src/com/intellij/util/containers/TreeTraversal.java @@ -16,7 +16,6 @@ package com.intellij.util.containers; import com.intellij.openapi.util.Condition; -import com.intellij.util.Consumer; import com.intellij.util.Function; import com.intellij.util.Functions; import org.jetbrains.annotations.NotNull; @@ -148,14 +147,17 @@ public abstract class TreeTraversal { } public static abstract class GuidedIt extends It { + + public interface Guide { + void guide(GuidedIt guidedIt); + } + @Nullable public T curChild, curParent; @Nullable public Iterable curChildren; public boolean curNoChildren; - public abstract GuidedIt setGuide(Consumer> guide); - public abstract GuidedIt queueNext(T child); public abstract GuidedIt result(T node); public abstract GuidedIt queueLast(T child); @@ -166,13 +168,16 @@ public abstract class TreeTraversal { } @NotNull - public static final TreeTraversal GUIDED_TRAVERSAL = new TreeTraversal("GUIDED_TRAVERSAL") { - @NotNull - @Override - public It createIterator(@NotNull Iterable roots, @NotNull Function> tree) { - return new GuidedItImpl(roots, tree); - } - }; + public static TreeTraversal GUIDED_TRAVERSAL(@NotNull final GuidedIt.Guide guide) { + return new TreeTraversal("GUIDED_TRAVERSAL") { + @NotNull + @Override + public It createIterator(@NotNull Iterable roots, @NotNull Function> tree) { + //noinspection unchecked + return new GuidedItImpl(roots, tree, (GuidedIt.Guide)guide); + } + }; + } /** * Returns an iterator over the nodes in a tree structure, using pre-order @@ -503,19 +508,17 @@ public abstract class TreeTraversal { // Misc // ----------------------------------------------------------------------------- private static final class GuidedItImpl extends GuidedIt { - P1 first, last; + final Guide guide; - Consumer> guide; + P1 first, last; T curResult; - GuidedItImpl(@NotNull Iterable roots, Function> tree) { + GuidedItImpl(@NotNull Iterable roots, + @NotNull Function> tree, + @NotNull Guide guide) { super(tree); first = last = P1.create(roots); - } - - public GuidedIt setGuide(Consumer> guide) { this.guide = guide; - return this; } public GuidedIt queueNext(T child) { @@ -546,7 +549,7 @@ public abstract class TreeTraversal { curParent = top.node; curChildren = top.itle; curNoChildren = top.empty; - guide.consume(this); + guide.guide(this); } if (!hasNext) { last = last.remove(); diff --git a/platform/util/src/com/intellij/util/containers/WeakFactoryMap.java b/platform/util/src/com/intellij/util/containers/WeakFactoryMap.java deleted file mode 100644 index 9106086d44bc..000000000000 --- a/platform/util/src/com/intellij/util/containers/WeakFactoryMap.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2000-2015 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.util.containers; - -import java.util.concurrent.ConcurrentMap; - -import static com.intellij.util.ObjectUtils.NULL; - -/** - * @author peter - */ -public abstract class WeakFactoryMap { - private final ConcurrentMap myMap = ContainerUtil.createConcurrentWeakKeyWeakValueMap(); - - protected abstract V create(T key); - - public final V get(T key) { - final V v = myMap.get(key); - if (v != null) { - return v == NULL ? null : v; - } - - final V value = create(key); - V prev = myMap.putIfAbsent(key, notNull(value)); - return prev == null || prev == NULL ? value : prev; - } - - public final boolean containsKey(T key) { - return myMap.containsKey(key); - } - - public void clear() { - myMap.clear(); - } - - private static K notNull(K key) { - //noinspection unchecked - return key == null ? (K)NULL : key; - } - - public void put(T key, V value) { - myMap.put(notNull(key), notNull(value)); - } -} diff --git a/platform/util/src/com/intellij/util/io/ReadWriteDirectBufferWrapper.java b/platform/util/src/com/intellij/util/io/ReadWriteDirectBufferWrapper.java index 16e41c9b8c0e..eec87e80f661 100644 --- a/platform/util/src/com/intellij/util/io/ReadWriteDirectBufferWrapper.java +++ b/platform/util/src/com/intellij/util/io/ReadWriteDirectBufferWrapper.java @@ -56,13 +56,16 @@ public class ReadWriteDirectBufferWrapper extends DirectBufferWrapper { final RandomAccessFile myFile; FileContext(final File file) throws IOException { - myFile = FileUtilRt.doIOOperation(new FileUtilRt.RepeatableIOOperation() { + myFile = FileUtilRt.doIOOperation(new FileUtilRt.RepeatableIOOperation() { @Nullable @Override - public RandomAccessFile execute(boolean finalAttempt) throws FileNotFoundException { + public RandomAccessFile execute(boolean finalAttempt) throws IOException { try { return new RandomAccessFile(file, RW); } catch (FileNotFoundException ex) { + if (!file.getParentFile().exists()) { + throw new IOException("Parent file doesn't exist:" + file); + } if (!finalAttempt) return null; throw ex; } @@ -91,12 +94,14 @@ public class ReadWriteDirectBufferWrapper extends DirectBufferWrapper { try { if (fileContext == null) fileContext = new FileContext(myFile); - final FileChannel channel = fileContext.myFile.getChannel(); + if (fileContext.myFile != null) { + final FileChannel channel = fileContext.myFile.getChannel(); - channel.position(myPosition); - buffer.rewind(); - channel.write(buffer); - myDirty = false; + channel.position(myPosition); + buffer.rewind(); + channel.write(buffer); + myDirty = false; + } } catch (IOException e) { LOG.error(e); @@ -109,7 +114,10 @@ public class ReadWriteDirectBufferWrapper extends DirectBufferWrapper { final ByteBuffer buffer = getCachedBuffer(); if (buffer == null || !isDirty()) return; - //noinspection SSBasedInspection - doFlush(null, buffer).dispose(); + Disposable disposable = doFlush(null, buffer); + if (disposable != null) { + //noinspection SSBasedInspection + disposable.dispose(); + } } } diff --git a/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java b/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java index e06019398051..a30e7f57e7c0 100644 --- a/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java +++ b/platform/util/src/com/intellij/util/io/ResizeableMappedFile.java @@ -125,13 +125,16 @@ public class ResizeableMappedFile implements Forceable { final File lengthFile = getLengthFile(); DataOutputStream stream = null; try { - stream = FileUtilRt.doIOOperation(new FileUtilRt.RepeatableIOOperation() { + stream = FileUtilRt.doIOOperation(new FileUtilRt.RepeatableIOOperation() { @Nullable @Override - public DataOutputStream execute(boolean lastAttempt) throws FileNotFoundException { + public DataOutputStream execute(boolean lastAttempt) throws IOException { try { return new DataOutputStream(new FileOutputStream(lengthFile)); } catch (FileNotFoundException ex) { + if (!lengthFile.getParentFile().exists()) { + throw new IOException("Parent file doesn't exist:" + lengthFile); + } if (!lastAttempt) return null; throw ex; } diff --git a/platform/vcs-impl/src/com/intellij/codeInsight/actions/VcsAwareFormatChangedTextUtil.java b/platform/vcs-impl/src/com/intellij/codeInsight/actions/VcsAwareFormatChangedTextUtil.java index ddee7bf5b6b7..d2773062064d 100644 --- a/platform/vcs-impl/src/com/intellij/codeInsight/actions/VcsAwareFormatChangedTextUtil.java +++ b/platform/vcs-impl/src/com/intellij/codeInsight/actions/VcsAwareFormatChangedTextUtil.java @@ -15,6 +15,7 @@ */ package com.intellij.codeInsight.actions; +import com.intellij.formatting.VcsAwareFormatRangesInfo; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.EditorFactory; @@ -33,8 +34,8 @@ import com.intellij.openapi.vcs.impl.LineStatusTrackerManager; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; +import com.intellij.psi.codeStyle.FormatRangesInfo; import com.intellij.util.containers.ContainerUtil; -import com.intellij.util.containers.ContainerUtilRt; import com.intellij.util.diff.FilesTooBigForDiffException; import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.NotNull; @@ -43,35 +44,43 @@ import org.jetbrains.annotations.Nullable; import java.util.List; class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { + @Override @NotNull public List getChangedTextRanges(@NotNull Project project, @NotNull PsiFile file) throws FilesTooBigForDiffException { - Document document = PsiDocumentManager.getInstance(project).getDocument(file); - if (document == null) return ContainerUtil.emptyList(); + FormatRangesInfo helper = getChangedTextHelper(file); + return helper != null ? helper.getRangesToFormat() : ContainerUtil.newArrayList(); + } - List cachedChangedLines = getCachedChangedLines(project, document); - if (cachedChangedLines != null) { - return cachedChangedLines; + @Override + @Nullable + public FormatRangesInfo getChangedTextHelper(@NotNull PsiFile file) throws FilesTooBigForDiffException { + Project project = file.getProject(); + Document document = PsiDocumentManager.getInstance(project).getDocument(file); + if (document == null) return null; + + FormatRangesInfo cachedChangedTextHelper = getCachedChangedLines(project, document); + if (cachedChangedTextHelper != null) { + return cachedChangedTextHelper; } if (ApplicationManager.getApplication().isUnitTestMode()) { CharSequence testContent = file.getUserData(TEST_REVISION_CONTENT); if (testContent != null) { - return calculateChangedTextRanges(document, testContent); + return calculateContextReformatHelper(document, testContent); } } Change change = ChangeListManager.getInstance(project).getChange(file.getVirtualFile()); if (change == null) { - return ContainerUtilRt.emptyList(); + return null; } if (change.getType() == Change.Type.NEW) { - return ContainerUtil.newArrayList(file.getTextRange()); + return new VcsAwareFormatRangesInfo(file.getTextRange()); } String contentFromVcs = getRevisionedContentFrom(change); - return contentFromVcs != null ? calculateChangedTextRanges(document, contentFromVcs) - : ContainerUtil.emptyList(); + return contentFromVcs != null ? calculateContextReformatHelper(document, contentFromVcs) : null; } @Nullable @@ -91,7 +100,7 @@ class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { } @Nullable - private static List getCachedChangedLines(@NotNull Project project, @NotNull Document document) { + private static FormatRangesInfo getCachedChangedLines(@NotNull Project project, @NotNull Document document) { LineStatusTracker tracker = LineStatusTrackerManager.getInstance(project).getLineStatusTracker(document); if (tracker != null) { List ranges = tracker.getRanges(); @@ -103,8 +112,8 @@ class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { } @NotNull - protected static List calculateChangedTextRanges(@NotNull Document document, - @NotNull CharSequence contentFromVcs) throws FilesTooBigForDiffException + protected static FormatRangesInfo calculateContextReformatHelper(@NotNull Document document, + @NotNull CharSequence contentFromVcs) throws FilesTooBigForDiffException { return getChangedTextRanges(document, getRanges(document, contentFromVcs)); } @@ -150,8 +159,10 @@ class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { } @NotNull - private static List getChangedTextRanges(@NotNull Document document, @NotNull List changedRanges) { + private static FormatRangesInfo getChangedTextRanges(@NotNull Document document, @NotNull List changedRanges) { List ranges = ContainerUtil.newArrayList(); + List insertedRanges = ContainerUtil.newArrayList(); + for (Range range : changedRanges) { if (range.getType() != Range.DELETED) { int changeStartLine = range.getLine1(); @@ -160,10 +171,14 @@ class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { int lineStartOffset = document.getLineStartOffset(changeStartLine); int lineEndOffset = document.getLineEndOffset(changeEndLine - 1); - ranges.add(new TextRange(lineStartOffset, lineEndOffset)); + TextRange changedTextRange = new TextRange(lineStartOffset, lineEndOffset); + ranges.add(changedTextRange); + if (range.getType() == Range.INSERTED) { + insertedRanges.add(changedTextRange); + } } } - return ranges; + return new VcsAwareFormatRangesInfo(ranges, insertedRanges); } @Override @@ -179,4 +194,5 @@ class VcsAwareFormatChangedTextUtil extends FormatChangedTextUtil { return false; } + } diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsInitialization.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsInitialization.java index b6ee4ff05886..59ad9b8ab066 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsInitialization.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/impl/VcsInitialization.java @@ -15,8 +15,10 @@ */ package com.intellij.openapi.vcs.impl; +import com.intellij.diagnostic.ThreadDumper; import com.intellij.openapi.Disposable; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.diagnostic.Attachment; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressManager; @@ -27,6 +29,7 @@ import com.intellij.openapi.project.DumbAwareRunnable; import com.intellij.openapi.project.Project; import com.intellij.openapi.startup.StartupManager; import com.intellij.openapi.util.Pair; +import com.intellij.util.TimeoutUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.TestOnly; @@ -51,14 +54,13 @@ public class VcsInitialization implements Disposable { StartupManager.getInstance(project).registerPostStartupActivity((DumbAwareRunnable)() -> { if (project.isDisposed()) return; - Task task = new Task.Backgroundable(myProject, "VCS Initialization") { - @Override - public void run(@NotNull ProgressIndicator indicator) { - execute(); - } - }; - - myFuture = ((ProgressManagerImpl)ProgressManager.getInstance()).runProcessWithProgressAsynchronously(task.asBackgroundable(), myIndicator, null); + myFuture = ((ProgressManagerImpl)ProgressManager.getInstance()).runProcessWithProgressAsynchronously( + new Task.Backgroundable(myProject, "VCS Initialization") { + @Override + public void run(@NotNull ProgressIndicator indicator) { + execute(); + } + }, myIndicator, null); }); } @@ -81,6 +83,10 @@ public class VcsInitialization implements Disposable { synchronized (myLock) { list = myList; myInitStarted = true; // list would not be modified starting from this point + Future future = myFuture; + if (future != null && future.isCancelled() || ProgressManager.getGlobalProgressIndicator().isCanceled()) { + return; + } } Collections.sort(list, (o1, o2) -> o1.getFirst().getOrder() - o2.getFirst().getOrder()); for (Pair pair : list) { @@ -93,7 +99,6 @@ public class VcsInitialization implements Disposable { void waitForInitialized() { try { myFuture.get(); - myFuture = null; } catch (Exception e) { throw new RuntimeException(e); @@ -111,10 +116,13 @@ public class VcsInitialization implements Disposable { Future future = myFuture; if (future != null) { future.cancel(false); - try { - future.get(); + // have to wait for task completion to avoid running it in background for closed project + long start = System.currentTimeMillis(); + while (myIndicator.isRunning() && System.currentTimeMillis() < start + 10000) { + TimeoutUtil.sleep(10); } - catch (Exception ignored) { + if (myIndicator.isRunning()) { + LOG.error("Failed to wait for completion if VCS initialization. ", new Attachment("thread dump", ThreadDumper.dumpThreadsToString())); } } } diff --git a/platform/vcs-log/impl/src/META-INF/vcs-log.xml b/platform/vcs-log/impl/src/META-INF/vcs-log.xml index d8b6051cb731..26ea1b1c391f 100644 --- a/platform/vcs-log/impl/src/META-INF/vcs-log.xml +++ b/platform/vcs-log/impl/src/META-INF/vcs-log.xml @@ -11,10 +11,6 @@ - - visibleRoots = VcsLogUtil.getAllVisibleRoots(providers.keySet(), filterCollection.getRootFilter(), filterCollection.getStructureFilter()); - Collection logs = ContainerUtil.newArrayList(); + Collection commits = ContainerUtil.newArrayList(); for (Map.Entry entry : providers.entrySet()) { final VirtualFile root = entry.getKey(); @@ -230,10 +230,10 @@ class VisiblePackBuilder { } List matchingCommits = entry.getValue().getCommitsMatchingFilter(root, rootSpecificCollection, maxCount); - logs.addAll(ContainerUtil.map(matchingCommits, commit -> new CommitId(commit.getId(), root))); + commits.addAll(ContainerUtil.map(matchingCommits, commit -> new CommitId(commit.getId(), root))); } - return logs; + return commits; } @NotNull diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/graph/GraphColorManagerImpl.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/graph/GraphColorManagerImpl.java index 174009c3a14b..fe2a7501f30b 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/graph/GraphColorManagerImpl.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/graph/GraphColorManagerImpl.java @@ -135,7 +135,14 @@ public class GraphColorManagerImpl implements GraphColorManager { } VcsRef bestRef = ContainerUtil.sorted(ContainerUtil.concat(refs1, refs2), refManager1.getBranchLayoutComparator()).get(0); - return refs1.contains(bestRef) ? -1 : 1; + if (refs1.contains(bestRef)) { + if (refs2.contains(bestRef)) { + LOG.error( + "Different heads " + myHashGetter.fun(head1) + " and " + myHashGetter.fun(head2) + " contain the same reference " + bestRef); + } + return -1; + } + return 1; } } } diff --git a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripeIcon.java b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripeIcon.java index bee0f615fadf..7cb02d6da58b 100644 --- a/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripeIcon.java +++ b/platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/ProgressStripeIcon.java @@ -81,7 +81,7 @@ public abstract class ProgressStripeIcon implements Icon { private static class StripeIcon extends ProgressStripeIcon { private static final double ALPHA = 0.8; - private static final JBColor BG_COLOR = new JBColor(ColorUtil.withAlpha(Gray._165, ALPHA), ColorUtil.withAlpha(Gray._88, ALPHA)); + private static final JBColor BG_COLOR = new JBColor(ColorUtil.withAlpha(Gray._165, ALPHA), ColorUtil.withAlpha(Gray._110, ALPHA)); private static final int WIDTH = 16; private StripeIcon(@NotNull JComponent component, int shift) { @@ -119,8 +119,8 @@ public abstract class ProgressStripeIcon implements Icon { private static final double ALPHA = 0.5; private static final Color DARK_BLUE = new Color(0x4d9ff8); private static final Color DARK_GRAY = Gray._165; - private static final Color LIGHT_BLUE = ColorUtil.withAlpha(DARK_BLUE, ALPHA); - private static final Color LIGHT_GRAY = ColorUtil.withAlpha(DARK_GRAY, ALPHA); + private static final Color LIGHT_BLUE = ColorUtil.withAlpha(new Color(0x90c2f8), ALPHA); + private static final Color LIGHT_GRAY = ColorUtil.withAlpha(new Color(0xdbdbdb), ALPHA); private static final int GRADIENT = 128; private static final int GRADIENT_HEIGHT = 2; diff --git a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt index dd9bc487be53..162f55382acd 100644 --- a/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt +++ b/platform/vcs-tests/testSrc/com/intellij/vcs/test/VcsPlatformTest.kt @@ -88,7 +88,7 @@ abstract class VcsPlatformTest : PlatformTestCase() { // we don't need a module in Git tests } - override fun isRunInEdt(): Boolean { + override fun runInDispatchThread(): Boolean { return false } diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml index da83e44cc317..7e8728134f00 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/META-INF/InspectionGadgets.xml @@ -196,9 +196,6 @@ key="non.final.field.compareto.display.name" groupBundle="messages.InspectionsBundle" groupKey="group.names.probable.bugs" enabledByDefault="false" level="WARNING" implementationClass="com.siyeh.ig.bugs.CompareToUsesNonFinalVariableInspection"/> - @@ -2555,6 +2552,14 @@ key="replace.method.ref.with.lambda.name" groupBundle="messages.InspectionsBundle" groupKey="group.names.code.style.issues" enabledByDefault="true" level="INFORMATION" implementationClass="com.siyeh.ig.style.ReplaceMethodRefWithLambdaInspection"/> + + #ref with itself as argument #loc non.final.field.compareto.display.name=Non-final field referenced in 'compareTo()' non.final.field.compareto.problem.descriptor=Non-final field #ref accessed in 'compareTo()' #loc -covariant.compareto.display.name=Covariant 'compareTo()' -covariant.compareto.problem.descriptor=#ref() should take 'Object' as its argument #loc covariant.equals.display.name=Covariant 'equals()' covariant.equals.problem.descriptor=#ref() should take 'Object' as its argument #loc empty.class.initializer.display.name=Empty class initializer @@ -2082,7 +2080,7 @@ class.with.only.private.constructors.display.name=Class with only 'private' cons class.with.only.private.constructors.problem.descriptor=Class #ref with only 'private' constructors should be declared 'final' property.value.set.to.itself.display.name=Property value set to itself equals.with.itself.display.name='equals()' called on itself -equals.with.itself.problem.descriptor=Identical qualifier and argument to #ref() call +equals.with.itself.problem.descriptor=#ref() called on itself junit4.method.naming.convention.display.name=JUnit 4 test method naming convention junit4.method.naming.convention.element.description=JUnit 4 test method junit3.method.naming.convention.display.name=JUnit 3 test method naming convention @@ -2186,4 +2184,8 @@ replace.diamond.with.explicit.type.arguments.descriptor=Replace '<>' with explic replace.lambda.with.anonymous.name=Replace lambda with anonymous class replace.lambda.with.anonymous.descriptor=Replace lambda with anonymous class replace.method.ref.with.lambda.name=Replace method reference with lambda -replace.method.ref.with.lambda.descriptor=Replace method reference with lambda \ No newline at end of file +replace.method.ref.with.lambda.descriptor=Replace method reference with lambda +split.try.with.multiple.resources.name=Split Try Statement with Multiple Resources +split.try.with.multiple.resources.descriptor=Split 'try' statement with multiple resources +split.multi.catch.name=Split Multi-Catch into Separate Catch Blocks +split.multi.catch.descriptor=Split multi-catch into separate 'catch' blocks diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/CovariantCompareToInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/CovariantCompareToInspection.java deleted file mode 100644 index 9de0ecf84302..000000000000 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/CovariantCompareToInspection.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2003-2012 Dave Griffith, Bas Leijdekkers - * - * 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.siyeh.ig.bugs; - -import com.intellij.openapi.project.Project; -import com.intellij.psi.*; -import com.intellij.psi.search.GlobalSearchScope; -import com.intellij.psi.util.TypeConversionUtil; -import com.siyeh.HardcodedMethodConstants; -import com.siyeh.InspectionGadgetsBundle; -import com.siyeh.ig.BaseInspection; -import com.siyeh.ig.BaseInspectionVisitor; -import com.siyeh.ig.psiutils.MethodUtils; -import com.siyeh.ig.psiutils.TypeUtils; -import org.jetbrains.annotations.NotNull; - -public class CovariantCompareToInspection extends BaseInspection { - - @Override - @NotNull - public String getDisplayName() { - return InspectionGadgetsBundle.message("covariant.compareto.display.name"); - } - - @Override - @NotNull - public String buildErrorString(Object... infos) { - return InspectionGadgetsBundle.message("covariant.compareto.problem.descriptor"); - } - - @Override - public BaseInspectionVisitor buildVisitor() { - return new CovariantCompareToVisitor(); - } - - private static class CovariantCompareToVisitor extends BaseInspectionVisitor { - - @Override - public void visitMethod(@NotNull PsiMethod method) { - final String name = method.getName(); - if (!HardcodedMethodConstants.COMPARE_TO.equals(name)) { - return; - } - if (!method.hasModifierProperty(PsiModifier.PUBLIC)) { - return; - } - final PsiParameterList parameterList = method.getParameterList(); - if (parameterList.getParametersCount() != 1) { - return; - } - final PsiParameter[] parameters = parameterList.getParameters(); - final PsiType paramType = parameters[0].getType(); - if (TypeUtils.isJavaLangObject(paramType)) { - return; - } - final PsiClass aClass = method.getContainingClass(); - if (aClass == null) { - return; - } - final PsiMethod[] methods = aClass.findMethodsByName(HardcodedMethodConstants.COMPARE_TO, false); - final Project project = method.getProject(); - final JavaPsiFacade psiFacade = JavaPsiFacade.getInstance(project); - final GlobalSearchScope scope = method.getResolveScope(); - final PsiClass comparableClass = psiFacade.findClass(CommonClassNames.JAVA_LANG_COMPARABLE, scope); - PsiType substitutedTypeParam = null; - if (comparableClass != null && comparableClass.getTypeParameters().length == 1) { - final PsiSubstitutor superSubstitutor = TypeConversionUtil.getClassSubstitutor(comparableClass, aClass, PsiSubstitutor.EMPTY); - //null iff aClass is not inheritor of comparableClass - if (superSubstitutor != null) { - substitutedTypeParam = superSubstitutor.substitute(comparableClass.getTypeParameters()[0]); - } - } - for (PsiMethod compareToMethod : methods) { - if (isNonVariantCompareTo(compareToMethod, substitutedTypeParam)) { - return; - } - } - registerMethodError(method); - } - - private static boolean isNonVariantCompareTo(PsiMethod method, PsiType substitutedTypeParam) { - final PsiClassType objectType = TypeUtils.getObjectType(method); - if (MethodUtils.methodMatches(method, null, PsiType.INT, HardcodedMethodConstants.COMPARE_TO, objectType)) { - return true; - } - if (substitutedTypeParam == null) { - return false; - } - return MethodUtils.methodMatches(method, null, PsiType.INT, HardcodedMethodConstants.COMPARE_TO, substitutedTypeParam); - } - } -} \ No newline at end of file diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/EqualsWithItselfInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/EqualsWithItselfInspection.java index fbff65968d7f..9c8a060a9ecb 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/EqualsWithItselfInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/bugs/EqualsWithItselfInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -15,14 +15,12 @@ */ package com.siyeh.ig.bugs; -import com.intellij.psi.PsiExpression; -import com.intellij.psi.PsiExpressionList; -import com.intellij.psi.PsiMethodCallExpression; -import com.intellij.psi.PsiReferenceExpression; +import com.intellij.psi.*; import com.siyeh.InspectionGadgetsBundle;import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; import com.siyeh.ig.psiutils.EquivalenceChecker; import com.siyeh.ig.psiutils.MethodCallUtils; +import com.siyeh.ig.psiutils.ParenthesesUtils; import com.siyeh.ig.psiutils.SideEffectChecker; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; @@ -58,19 +56,22 @@ public class EqualsWithItselfInspection extends BaseInspection { return; } final PsiReferenceExpression methodExpression = expression.getMethodExpression(); - final PsiExpression qualifier = methodExpression.getQualifierExpression(); - if (qualifier == null) { - return; - } final PsiExpressionList argumentList = expression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length != 1) { return; } - final PsiExpression argument = arguments[0]; - if (!EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(qualifier, argument) || - SideEffectChecker.mayHaveSideEffects(qualifier)) { - return; + final PsiExpression argument = ParenthesesUtils.stripParentheses(arguments[0]); + final PsiExpression qualifier = methodExpression.getQualifierExpression(); + if (qualifier == null) { + if (!(argument instanceof PsiThisExpression)) { + return; + } + } else { + if (!EquivalenceChecker.getCanonicalPsiEquivalence().expressionsAreEquivalent(qualifier, argument) || + SideEffectChecker.mayHaveSideEffects(qualifier)) { + return; + } } registerMethodCallError(expression); } diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java index 9e04de3d5f55..960460d28c93 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/dataflow/TooBroadScopeInspectionBase.java @@ -26,11 +26,8 @@ import com.intellij.util.Query; import com.siyeh.InspectionGadgetsBundle; import com.siyeh.ig.BaseInspection; import com.siyeh.ig.BaseInspectionVisitor; -import com.siyeh.ig.psiutils.ClassUtils; -import com.siyeh.ig.psiutils.ExpressionUtils; +import com.siyeh.ig.psiutils.*; import com.intellij.psi.util.FileTypeUtils; -import com.siyeh.ig.psiutils.ParenthesesUtils; -import com.siyeh.ig.psiutils.VariableAccessUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -108,8 +105,8 @@ public class TooBroadScopeInspectionBase extends BaseInspection { return false; } else if (!m_allowConstructorAsInitializer) { - // constructors located in java.* packages probably have no non-local side effects - if (!ClassUtils.isImmutable(type) && !type.getCanonicalText().startsWith("java.")) { + // constructors located in library packages probably have no non-local side effects + if (!ClassUtils.isImmutable(type) && !LibraryUtil.isTypeInLibrary(type)) { return false; } } @@ -130,6 +127,9 @@ public class TooBroadScopeInspectionBase extends BaseInspection { return false; } final PsiVariable variable = (PsiVariable)target; + if (!ClassUtils.isImmutable(variable.getType()) && !CollectionUtils.isEmptyArray(variable)) { + return false; + } if (variable.hasModifierProperty(PsiModifier.FINAL)) { return true; } @@ -146,6 +146,21 @@ public class TooBroadScopeInspectionBase extends BaseInspection { } return true; } + if (expression instanceof PsiMethodCallExpression) { + // methods located in library packages probably have no non-local side effects + final PsiMethodCallExpression methodCallExpression = (PsiMethodCallExpression)expression; + final PsiMethod method = methodCallExpression.resolveMethod(); + if (!(method instanceof PsiCompiledElement)) { + return false; + } + final PsiExpressionList argumentList = methodCallExpression.getArgumentList(); + for (PsiExpression argument : argumentList.getExpressions()){ + if (!isMoveable(argument)) { + return false; + } + } + return true; + } return false; } diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/CollectionUtils.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/CollectionUtils.java index d4dd164e57ef..86b918d0e12b 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/CollectionUtils.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/CollectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2014 Dave Griffith, Bas Leijdekkers + * Copyright 2003-2016 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -231,13 +231,11 @@ public class CollectionUtils { return isEmptyArray(field); } - public static boolean isEmptyArray(PsiField field) { - final PsiExpression initializer = field.getInitializer(); + public static boolean isEmptyArray(PsiVariable variable) { + final PsiExpression initializer = variable.getInitializer(); if (initializer instanceof PsiArrayInitializerExpression) { - final PsiArrayInitializerExpression arrayInitializerExpression = - (PsiArrayInitializerExpression)initializer; - final PsiExpression[] initializers = - arrayInitializerExpression.getInitializers(); + final PsiArrayInitializerExpression arrayInitializerExpression = (PsiArrayInitializerExpression)initializer; + final PsiExpression[] initializers = arrayInitializerExpression.getInitializers(); return initializers.length == 0; } return ExpressionUtils.isZeroLengthArrayConstruction(initializer); diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/FormatUtils.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/FormatUtils.java index 9be61bc1302d..66a861f2d05c 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/FormatUtils.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/FormatUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2013 Bas Leijdekkers + * Copyright 2010-2016 Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,6 +41,7 @@ public class FormatUtils { formatMethodNames.add("format"); formatMethodNames.add("printf"); + formatClassNames.add("java.io.Console"); formatClassNames.add("java.io.PrintWriter"); formatClassNames.add("java.io.PrintStream"); formatClassNames.add("java.util.Formatter"); diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySemicolonInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySemicolonInspection.java index 6cffee94fc76..60826bc3a4f5 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySemicolonInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySemicolonInspection.java @@ -33,7 +33,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class UnnecessarySemicolonInspection extends BaseInspection implements CleanupLocalInspectionTool { - @Override @NotNull public String getDisplayName() { @@ -115,6 +114,12 @@ public class UnnecessarySemicolonInspection extends BaseInspection implements Cl super.visitImportList(list); } + @Override + public void visitModule(PsiJavaModule module) { + findTopLevelSemicolons(module); + super.visitModule(module); + } + private void findTopLevelSemicolons(PsiElement element) { for (PsiElement sibling = element.getFirstChild(); sibling != null; sibling = skipForwardWhiteSpacesAndComments(sibling)) { if (PsiUtil.isJavaToken(sibling, JavaTokenType.SEMICOLON)) { @@ -159,25 +164,18 @@ public class UnnecessarySemicolonInspection extends BaseInspection implements Cl registerError(element, ProblemHighlightType.LIKE_UNUSED_SYMBOL); } - private void findUnnecessarySemicolonsAfterEnumConstants( - @NotNull PsiClass aClass) { + private void findUnnecessarySemicolonsAfterEnumConstants(@NotNull PsiClass aClass) { PsiElement child = aClass.getFirstChild(); while (child != null) { if (child instanceof PsiJavaToken) { final PsiJavaToken token = (PsiJavaToken)child; final IElementType tokenType = token.getTokenType(); if (tokenType.equals(JavaTokenType.SEMICOLON)) { - final PsiElement prevSibling = - skipBackwardWhiteSpacesAndComments(child); + final PsiElement prevSibling = skipBackwardWhiteSpacesAndComments(child); if (!(prevSibling instanceof PsiEnumConstant)) { if (prevSibling instanceof PsiJavaToken) { - final PsiJavaToken javaToken = - (PsiJavaToken)prevSibling; - final IElementType prevTokenType = - javaToken.getTokenType(); - if (!JavaTokenType.COMMA.equals(prevTokenType) - && !JavaTokenType.LBRACE.equals( - prevTokenType)) { + final IElementType prevTokenType = ((PsiJavaToken)prevSibling).getTokenType(); + if (!JavaTokenType.COMMA.equals(prevTokenType) && !JavaTokenType.LBRACE.equals(prevTokenType)) { registerError(child, ProblemHighlightType.LIKE_UNUSED_SYMBOL); } } @@ -192,17 +190,13 @@ public class UnnecessarySemicolonInspection extends BaseInspection implements Cl } @Nullable - private static PsiElement skipForwardWhiteSpacesAndComments( - PsiElement element) { - return PsiTreeUtil.skipSiblingsForward(element, - PsiWhiteSpace.class, PsiComment.class); + private static PsiElement skipForwardWhiteSpacesAndComments(PsiElement element) { + return PsiTreeUtil.skipSiblingsForward(element, PsiWhiteSpace.class, PsiComment.class); } @Nullable - private static PsiElement skipBackwardWhiteSpacesAndComments( - PsiElement element) { - return PsiTreeUtil.skipSiblingsBackward(element, - PsiWhiteSpace.class, PsiComment.class); + private static PsiElement skipBackwardWhiteSpacesAndComments(PsiElement element) { + return PsiTreeUtil.skipSiblingsBackward(element, PsiWhiteSpace.class, PsiComment.class); } @Override diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySuperQualifierInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySuperQualifierInspection.java index e311b54ccc81..10d4b639242d 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySuperQualifierInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/style/UnnecessarySuperQualifierInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2011 Bas Leijdekkers + * Copyright 2008-2016 Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,8 +87,7 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen @Override public void visitSuperExpression(PsiSuperExpression expression) { super.visitSuperExpression(expression); - final PsiJavaCodeReferenceElement qualifier = - expression.getQualifier(); + final PsiJavaCodeReferenceElement qualifier = expression.getQualifier(); if (qualifier != null) { return; } @@ -96,8 +95,7 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen if (!(parent instanceof PsiReferenceExpression)) { return; } - final PsiReferenceExpression referenceExpression = - (PsiReferenceExpression)parent; + final PsiReferenceExpression referenceExpression = (PsiReferenceExpression)parent; final PsiElement grandParent = referenceExpression.getParent(); if (grandParent instanceof PsiMethodCallExpression) { final PsiMethodCallExpression methodCallExpression = @@ -114,11 +112,8 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen registerError(expression, ProblemHighlightType.LIKE_UNUSED_SYMBOL); } - private static boolean hasUnnecessarySuperQualifier( - PsiReferenceExpression referenceExpression) { - final PsiClass parentClass = - PsiTreeUtil.getParentOfType(referenceExpression, - PsiClass.class); + private static boolean hasUnnecessarySuperQualifier(PsiReferenceExpression referenceExpression) { + final PsiClass parentClass = PsiTreeUtil.getParentOfType(referenceExpression, PsiClass.class); if (parentClass == null) { return false; } @@ -127,34 +122,31 @@ public class UnnecessarySuperQualifierInspection extends BaseInspection implemen return false; } final PsiField superField = (PsiField)target; - final PsiReferenceExpression copy = (PsiReferenceExpression) - referenceExpression.copy(); + final PsiReferenceExpression copy = (PsiReferenceExpression)referenceExpression.copy(); final PsiElement qualifier = copy.getQualifier(); if (qualifier == null) { return false; } qualifier.delete(); // remove super - return superField == copy.resolve(); + final JavaResolveResult resolveResult = copy.advancedResolve(false); + return resolveResult.isValidResult() && superField == resolveResult.getElement(); } - private static boolean hasUnnecessarySuperQualifier( - PsiMethodCallExpression methodCallExpression) { - final PsiMethod superMethod = - methodCallExpression.resolveMethod(); + private static boolean hasUnnecessarySuperQualifier(PsiMethodCallExpression methodCallExpression) { + final PsiMethod superMethod = methodCallExpression.resolveMethod(); if (superMethod == null) { return false; } // check that super.m() and m() resolve to the same method - final PsiMethodCallExpression copy = - (PsiMethodCallExpression)methodCallExpression.copy(); - final PsiReferenceExpression methodExpression = - copy.getMethodExpression(); + final PsiMethodCallExpression copy = (PsiMethodCallExpression)methodCallExpression.copy(); + final PsiReferenceExpression methodExpression = copy.getMethodExpression(); final PsiElement qualifier = methodExpression.getQualifier(); if (qualifier == null) { return false; } qualifier.delete(); //remove super - return superMethod == copy.resolveMethod(); + final JavaResolveResult resolveResult = copy.resolveMethodGenerics(); + return resolveResult.isValidResult() && superMethod == resolveResult.getElement(); } } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/threading/StaticInitializerReferencesSubClassInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/threading/StaticInitializerReferencesSubClassInspection.java index d68ab88eb015..3bed6d7e97f3 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/threading/StaticInitializerReferencesSubClassInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/threading/StaticInitializerReferencesSubClassInspection.java @@ -68,7 +68,12 @@ public class StaticInitializerReferencesSubClassInspection extends BaseJavaBatch scope.accept(new PsiRecursiveElementWalkingVisitor() { @Override public void visitElement(PsiElement element) { - if (element instanceof PsiClass || element instanceof PsiReferenceParameterList || element instanceof PsiTypeElement) return; + if (element instanceof PsiClass || + element instanceof PsiReferenceParameterList || + element instanceof PsiTypeElement || + element instanceof PsiLambdaExpression) { + return; + } PsiClass targetClass = extractClass(element); if (targetClass != null && targetClass.isInheritor(baseClass, true) && !hasSingleInitializationPlace(targetClass)) { diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitMultiCatchInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitMultiCatchInspection.java new file mode 100644 index 000000000000..82f496f3953c --- /dev/null +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitMultiCatchInspection.java @@ -0,0 +1,141 @@ +/* + * Copyright 2011 Bas Leijdekkers + * + * 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.siyeh.ig.exceptions; + +import com.intellij.codeInspection.ProblemDescriptor; +import com.intellij.openapi.project.Project; +import com.intellij.psi.*; +import com.intellij.psi.codeStyle.JavaCodeStyleManager; +import com.intellij.util.IncorrectOperationException; +import com.siyeh.InspectionGadgetsBundle; +import com.siyeh.ig.BaseInspection; +import com.siyeh.ig.BaseInspectionVisitor; +import com.siyeh.ig.InspectionGadgetsFix; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import static com.intellij.util.ObjectUtils.assertNotNull; + +public class SplitMultiCatchInspection extends BaseInspection { + + @Nls + @NotNull + @Override + public String getDisplayName() { + return InspectionGadgetsBundle.message("split.multi.catch.name"); + } + + @NotNull + @Override + protected String buildErrorString(Object... infos) { + return InspectionGadgetsBundle.message("split.multi.catch.descriptor"); + } + + @Override + public BaseInspectionVisitor buildVisitor() { + return new SplitMultiCatchVisitor(); + } + + @Nullable + @Override + protected InspectionGadgetsFix buildFix(Object... infos) { + return new SplitMultiCatchFix(); + } + + private static void doFixImpl(@NotNull PsiElement element) throws IncorrectOperationException { + final PsiElement parent = element.getParent(); + if (!(parent instanceof PsiCatchSection)) { + return; + } + final PsiCatchSection catchSection = (PsiCatchSection)parent; + final PsiElement grandParent = catchSection.getParent(); + if (!(grandParent instanceof PsiTryStatement)) { + return; + } + final PsiParameter parameter = catchSection.getParameter(); + if (parameter == null) { + return; + } + final PsiType type = parameter.getType(); + if (!(type instanceof PsiDisjunctionType)) { + return; + } + + final PsiElementFactory factory = JavaPsiFacade.getElementFactory(element.getProject()); + final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(element.getProject()); + for (PsiType disjunction : ((PsiDisjunctionType)type).getDisjunctions()) { + final PsiCatchSection copy = (PsiCatchSection)catchSection.copy(); + + final PsiTypeElement typeElement = assertNotNull(assertNotNull(copy.getParameter()).getTypeElement()); + final PsiTypeElement newTypeElement = factory.createTypeElementFromText(disjunction.getCanonicalText(true), catchSection); + final PsiElement replaced = typeElement.replace(newTypeElement); + + grandParent.addBefore(copy, catchSection); + styleManager.shortenClassReferences(replaced); + } + + catchSection.delete(); + } + + private static boolean isAcceptable(@NotNull PsiElement element) { + final PsiElement parent = element.getParent(); + if (parent instanceof PsiCatchSection) { + final PsiType type = ((PsiCatchSection)parent).getCatchType(); + return type instanceof PsiDisjunctionType; + } + return false; + } + + private static class SplitMultiCatchVisitor extends BaseInspectionVisitor { + @Override + public void visitParameter(PsiParameter parameter) { + super.visitParameter(parameter); + if (isAcceptable(parameter)) { + registerError(parameter); + } + } + + @Override + public void visitKeyword(PsiKeyword keyword) { + super.visitKeyword(keyword); + if (isAcceptable(keyword)) { + registerError(keyword); + } + } + } + + private static class SplitMultiCatchFix extends InspectionGadgetsFix { + @Nls + @NotNull + @Override + public String getName() { + return InspectionGadgetsBundle.message("split.multi.catch.descriptor"); + } + + @Nls + @NotNull + @Override + public String getFamilyName() { + return getName(); + } + + @Override + protected void doFix(Project project, ProblemDescriptor descriptor) { + doFixImpl(descriptor.getPsiElement()); + } + } +} diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitTryWithMultipleResourcesInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitTryWithMultipleResourcesInspection.java new file mode 100644 index 000000000000..42fd00d278c6 --- /dev/null +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/exceptions/SplitTryWithMultipleResourcesInspection.java @@ -0,0 +1,149 @@ +/* + * Copyright 2000-2016 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.siyeh.ig.exceptions; + +import com.intellij.codeInspection.ProblemDescriptor; +import com.intellij.openapi.project.Project; +import com.intellij.psi.*; +import com.intellij.util.IncorrectOperationException; +import com.siyeh.InspectionGadgetsBundle; +import com.siyeh.ig.BaseInspection; +import com.siyeh.ig.BaseInspectionVisitor; +import com.siyeh.ig.InspectionGadgetsFix; +import com.siyeh.ig.PsiReplacementUtil; +import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +/** + * @author Bas Leijdekkers + */ +public class SplitTryWithMultipleResourcesInspection extends BaseInspection { + + @Nls + @NotNull + @Override + public String getDisplayName() { + return InspectionGadgetsBundle.message("split.try.with.multiple.resources.name"); + } + + @NotNull + @Override + protected String buildErrorString(Object... infos) { + return InspectionGadgetsBundle.message("split.try.with.multiple.resources.descriptor"); + } + + @Override + public BaseInspectionVisitor buildVisitor() { + return new SplitTryWithResourcesVisitor(); + } + + @Nullable + @Override + protected InspectionGadgetsFix buildFix(Object... infos) { + return new SplitTryWithResourcesFix(); + } + + private static void doFixImpl(@NotNull PsiElement element) throws IncorrectOperationException { + final PsiTryStatement tryStatement = (PsiTryStatement)element.getParent(); + final PsiResourceList resourceList = tryStatement.getResourceList(); + if (resourceList == null || resourceList.getResourceVariablesCount() <= 1) { + return; + } + final StringBuilder newTryStatementText = new StringBuilder(); + int count = 0; + for (PsiResourceListElement resource : resourceList) { + if (count > 0) { + newTryStatementText.append("{\n"); + } + ++count; + newTryStatementText.append("try (").append(resource.getText()).append(")"); + } + final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); + if (tryBlock == null) { + return; + } + newTryStatementText.append(tryBlock.getText()); + for (int i = 1; i < count; i++) { + newTryStatementText.append("\n}"); + } + final PsiCatchSection[] catchSections = tryStatement.getCatchSections(); + for (PsiCatchSection catchSection : catchSections) { + newTryStatementText.append(catchSection.getText()); + } + final PsiCodeBlock finallyBlock = tryStatement.getFinallyBlock(); + if (finallyBlock != null) { + newTryStatementText.append("finally").append(finallyBlock.getText()); + } + PsiReplacementUtil.replaceStatement(tryStatement, newTryStatementText.toString()); + } + + private static boolean isAcceptable(PsiElement element) { + final PsiElement parent = element.getParent(); + if (!(parent instanceof PsiTryStatement)) { + return false; + } + final PsiTryStatement tryStatement = (PsiTryStatement)parent; + final PsiResourceList resourceList = tryStatement.getResourceList(); + if (resourceList == null) { + return false; + } + final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); + if (tryBlock == null) { + return false; + } + return resourceList.getResourceVariablesCount() > 1; + } + + private static class SplitTryWithResourcesVisitor extends BaseInspectionVisitor { + @Override + public void visitKeyword(PsiKeyword keyword) { + super.visitKeyword(keyword); + if (isAcceptable(keyword)) { + registerError(keyword); + } + } + + @Override + public void visitResourceList(PsiResourceList resourceList) { + super.visitResourceList(resourceList); + if (isAcceptable(resourceList)) { + registerError(resourceList); + } + } + } + + private static class SplitTryWithResourcesFix extends InspectionGadgetsFix { + @Override + protected void doFix(Project project, ProblemDescriptor descriptor) { + doFixImpl(descriptor.getPsiElement()); + } + + @Nls + @NotNull + @Override + public String getName() { + return InspectionGadgetsBundle.message("split.try.with.multiple.resources.descriptor"); + } + + @Nls + @NotNull + @Override + public String getFamilyName() { + return getName(); + } + } +} diff --git a/plugins/InspectionGadgets/src/com/siyeh/ig/style/ReplaceLambdaWithAnonymousInspection.java b/plugins/InspectionGadgets/src/com/siyeh/ig/style/ReplaceLambdaWithAnonymousInspection.java index c8c4beb6f2f8..6233797e070e 100644 --- a/plugins/InspectionGadgets/src/com/siyeh/ig/style/ReplaceLambdaWithAnonymousInspection.java +++ b/plugins/InspectionGadgets/src/com/siyeh/ig/style/ReplaceLambdaWithAnonymousInspection.java @@ -37,8 +37,7 @@ import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.util.List; -import java.util.Map; +import java.util.*; public class ReplaceLambdaWithAnonymousInspection extends BaseInspection { private static final Logger LOG = Logger.getInstance("#" + ReplaceLambdaWithAnonymousInspection.class.getName()); @@ -123,7 +122,7 @@ public class ReplaceLambdaWithAnonymousInspection extends BaseInspection { final PsiThisExpression thisAccessExpr = thisClass instanceof PsiAnonymousClass ? null : RefactoringChangeUtil .createThisExpression(lambdaExpression.getManager(), thisClass); ChangeContextUtil.decodeContextInfo(blockFromText, thisClass, thisAccessExpr); - final Map replacements = new HashMap(); + final Set replacements = new HashSet<>(); blockFromText.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitClass(PsiClass aClass) {} @@ -132,7 +131,7 @@ public class ReplaceLambdaWithAnonymousInspection extends BaseInspection { public void visitSuperExpression(PsiSuperExpression expression) { super.visitSuperExpression(expression); if (expression.getQualifier() == null) { - replacements.put(expression, psiElementFactory.createExpressionFromText(thisClassName + "." + expression.getText(), expression)); + replacements.add(expression); } } @@ -141,14 +140,23 @@ public class ReplaceLambdaWithAnonymousInspection extends BaseInspection { super.visitMethodCallExpression(expression); if (thisAccessExpr != null) { final PsiMethod psiMethod = expression.resolveMethod(); - if (psiMethod != null && !psiMethod.hasModifierProperty(PsiModifier.STATIC) && expression.getMethodExpression().getQualifierExpression() == null) { - replacements.put(expression, psiElementFactory.createExpressionFromText(thisAccessExpr.getText() + "." + expression.getText(), expression)); + final PsiReferenceExpression methodExpression = expression.getMethodExpression(); + if (psiMethod != null && !psiMethod.hasModifierProperty(PsiModifier.STATIC) && methodExpression.getQualifierExpression() == null) { + replacements.add(expression); } } } }); - for (PsiElement psiElement : replacements.keySet()) { - psiElement.replace(replacements.get(psiElement)); + for (PsiExpression expression : replacements) { + if (expression instanceof PsiSuperExpression) { + expression.replace(psiElementFactory.createExpressionFromText(thisClassName + "." + expression.getText(), expression)); + } + else if (expression instanceof PsiMethodCallExpression) { + ((PsiMethodCallExpression)expression).getMethodExpression().setQualifierExpression(thisAccessExpr); + } + else { + LOG.error("Unexpected expression"); + } } } } diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html b/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html deleted file mode 100644 index 7ab9a5bcbb08..000000000000 --- a/plugins/InspectionGadgets/src/inspectionDescriptions/CovariantCompareTo.html +++ /dev/null @@ -1,10 +0,0 @@ - - -Reports a class having a compareTo() -method taking an argument other than java.lang.Object, if the class does not have a compareTo() method -which does take java.lang.Object as its argument. Normally, this is a mistake. - -

- - - \ No newline at end of file diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SplitMultiCatch.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SplitMultiCatch.html new file mode 100644 index 000000000000..e54812932fc8 --- /dev/null +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SplitMultiCatch.html @@ -0,0 +1,6 @@ + + +This inspection splits a multi-catch section into separate catch blocks. +

+ + diff --git a/plugins/InspectionGadgets/src/inspectionDescriptions/SplitTryWithMultipleResources.html b/plugins/InspectionGadgets/src/inspectionDescriptions/SplitTryWithMultipleResources.html new file mode 100644 index 000000000000..f52392d04636 --- /dev/null +++ b/plugins/InspectionGadgets/src/inspectionDescriptions/SplitTryWithMultipleResources.html @@ -0,0 +1,6 @@ + + +This inspection looks for try statements with multiple resources, +and suggests to split them into nested try-with-resources statements. + + diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtCodeBlock.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtCodeBlock.java new file mode 100644 index 000000000000..d633b99f6505 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtCodeBlock.java @@ -0,0 +1,10 @@ +import java.io.*; + +public class AtCodeBlock { + void foo() { + try { + Reader reader = new FileReader(""); + } catch (IndexOutOfBoundsException | FileNotFoundException e) { + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.after.java new file mode 100644 index 000000000000..b5eacc83956f --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.after.java @@ -0,0 +1,16 @@ +import java.io.IOException; +import java.net.*; + +public class AtParameter { + void f() { + try { + throw new NoRouteToHostException(); + } catch (NoRouteToHostException e) { + e.printStackTrace(); + } catch (SocketException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.java new file mode 100644 index 000000000000..7a6913fa5ead --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/AtParameter.java @@ -0,0 +1,12 @@ +import java.io.IOException; +import java.net.*; + +public class AtParameter { + void f() { + try { + throw new NoRouteToHostException(); + } catch (NoRouteToHostException | SocketException | IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/Simple_after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/Simple.after.java similarity index 100% rename from plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/Simple_after.java rename to plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/Simple.after.java diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/Simple.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/Simple.java similarity index 100% rename from plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/Simple.java rename to plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/Simple.java diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/TypeAnno_after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/TypeAnno.after.java similarity index 100% rename from plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/TypeAnno_after.java rename to plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/TypeAnno.after.java diff --git a/plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/TypeAnno.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/TypeAnno.java similarity index 100% rename from plugins/IntentionPowerPak/test/com/siyeh/ipp/exceptions/splitMultiCatch/TypeAnno.java rename to plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/split_multi_catch/TypeAnno.java diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/AtCodeBlock.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/AtCodeBlock.java new file mode 100644 index 000000000000..810d0c6defd0 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/AtCodeBlock.java @@ -0,0 +1,8 @@ +import java.io.*; +class Simple { + void foo(File file1, File file2) throws IOException { + try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.after.java new file mode 100644 index 000000000000..9744325cf701 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.after.java @@ -0,0 +1,11 @@ +import java.io.*; +class C { + void m() throws Exception { + Reader r2 = new StringReader(); + try (Reader r1 = new StringReader()) { + try (r2) { + System.out.println(r1 + ", " + r2); + } + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.java new file mode 100644 index 000000000000..91de87cd7ced --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/MixedResources.java @@ -0,0 +1,9 @@ +import java.io.*; +class C { + void m() throws Exception { + Reader r2 = new StringReader(); + try (Reader r1 = new StringReader(); r2) { + System.out.println(r1 + ", " + r2); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.after.java new file mode 100644 index 000000000000..47283fdac6d6 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.after.java @@ -0,0 +1,10 @@ +import java.io.*; +class Simple { + void foo(File file1, File file2) throws IOException { + try (FileInputStream in = new FileInputStream(file1)) { + try (FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.java new file mode 100644 index 000000000000..7540166bbe2c --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/Simple.java @@ -0,0 +1,8 @@ +import java.io.*; +class Simple { + void foo(File file1, File file2) throws IOException { + try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.after.java new file mode 100644 index 000000000000..77d3f4578a8c --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.after.java @@ -0,0 +1,12 @@ +import java.io.*; +class C { + void foo(File file1, File file2) { + try (FileInputStream in = new FileInputStream(file1)) { + try (FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.java new file mode 100644 index 000000000000..93aae5f99e60 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithCatch.java @@ -0,0 +1,10 @@ +import java.io.*; +class C { + void foo(File file1, File file2) { + try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } catch (IOException e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.after.java new file mode 100644 index 000000000000..e67c467003e2 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.after.java @@ -0,0 +1,12 @@ +import java.io.*; +class WithFinally { + void foo(File file1, File file2) throws IOException { + try (FileInputStream in = new FileInputStream(file1)) { + try (FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } + } finally { + System.out.println(); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.java new file mode 100644 index 000000000000..9e6ee97ebaa9 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/exceptions/try_multiple_resource/WithFinally.java @@ -0,0 +1,10 @@ +import java.io.*; +class WithFinally { + void foo(File file1, File file2) throws IOException { + try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) { + System.out.println(in + ", " + out); + } finally { + System.out.println(); + } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.after.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.after.java new file mode 100644 index 000000000000..34783f9e3632 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.after.java @@ -0,0 +1,33 @@ +class T { + static class A { + final String n; + + A(String n) { + this.n = n; + } + + void f(String s) { + System.out.println(s + " " + n); + } + } + + static class B extends A { + B(String n) { + super(n); + } + + void f2(String s) { + new Thread(new Runnable() { + @Override + public void run() { + B.this.f(s + " " + B.super.n); + } + }).start(); + } + } + + public static void main(String[] args) { + new A("a").f("run"); + new B("b").f2("run"); + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.java b/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.java new file mode 100644 index 000000000000..a82803559346 --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igfixes/style/lambda2anonymous/QualifyThisAndSuperInside.java @@ -0,0 +1,28 @@ +class T { + static class A { + final String n; + + A(String n) { + this.n = n; + } + + void f(String s) { + System.out.println(s + " " + n); + } + } + + static class B extends A { + B(String n) { + super(n); + } + + void f2(String s) { + new Thread(() -> f(s + " " + super.n)).start(); + } + } + + public static void main(String[] args) { + new A("a").f("run"); + new B("b").f2("run"); + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/Simple.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/Simple.java deleted file mode 100644 index 52fed23d835d..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/Simple.java +++ /dev/null @@ -1,11 +0,0 @@ -import java.lang.Comparable; - -class Foo implements Comparable { - public int compareTo(Foo o) { - return 0; //To change body of implemented methods use File | Settings | File Templates. - } - - public int compareTo(String o) { - return 0; //To change body of implemented methods use File | Settings | File Templates. - } -} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/expected.xml deleted file mode 100644 index 4704d91e891d..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/covariantCompareTo/simple/expected.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/equals_with_itself/EqualsWithItself.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/equals_with_itself/EqualsWithItself.java index 03347da345a5..850406b12534 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/equals_with_itself/EqualsWithItself.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/bugs/equals_with_itself/EqualsWithItself.java @@ -1,17 +1,21 @@ class EqualsWithItself { boolean foo(Object o) { - return o.equals(((o))); + return o.equals(((o))); } boolean withGetter() { - return getValue().equals(getValue()); + return getValue().equals(getValue()); } boolean withMethodCall() { return build().equals(build()); } + void selfEquality() { + boolean b = equals(this); + } + private Integer value = 1; public Integer getValue() { return value; diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/dataflow/scope/TooBroadScope.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/dataflow/scope/TooBroadScope.java index eebef28cf208..44ffdf41a6e5 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/dataflow/scope/TooBroadScope.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/dataflow/scope/TooBroadScope.java @@ -1,7 +1,6 @@ package com.siyeh.igtest.dataflow.scope; -import java.util.ArrayList; -import java.util.Collection; import java.util.List; +import java.util.*; public class TooBroadScope { @@ -141,4 +140,25 @@ public class TooBroadScope System.out.println(); System.out.println(yes); } + + private final Map important = new HashMap<>(); + public void processImportant() { + final HashMap copy = new HashMap(important); + important.clear(); + System.out.println(); + System.out.println(copy); + } + + private final String[] EMPTY = {}; + void abc() { + String[] strings = EMPTY; + System.out.println(); + System.out.println(); + System.out.println(strings); + + List list = new ArrayList<>(Arrays.asList(EMPTY)); + System.out.println(); + System.out.println(); + System.out.println(list); + } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolon.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolon.java new file mode 100644 index 000000000000..b99b8ef7bd1f --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolon.java @@ -0,0 +1,52 @@ +/* + * Copyright 2000-2016 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.siyeh.igtest.style.unnecessary_semicolon;; + +import java.util.List;; + +class UnnecessarySemicolon { + int i; + ; // comment + public UnnecessarySemicolon() { + ; // this is a comment + ; /* another */ + } +} ; // comment + +enum Status { + BUSY ("BUSY" ), + DONE ("DONE" ) ; // <<---- THIS IS NOT UNNECESSARY + + public final String text; ; + private Status (String i_text) { + text = i_text; + } +} + +enum BuildType { + ; + + public String toString() { + return super.toString(); + } +} + +class C { + void m() throws Exception { + try (AutoCloseable r1 = null; AutoCloseable r2 = null /*ok*/ ) { } + try (AutoCloseable r1 = null; AutoCloseable r2 = null; /*warn*/ ) { } + } +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolonInspection.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolonInspection.java deleted file mode 100644 index 67524e40023f..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/UnnecessarySemicolonInspection.java +++ /dev/null @@ -1,37 +0,0 @@ - -package com.siyeh.igtest.style.unnecessary_semicolon;; -import java.util.List;; -public class UnnecessarySemicolonInspection -{ - int i; - ; // comment - public UnnecessarySemicolonInspection() - { - ; // this is a comment - ; /* another */ - } -} ; // comment -enum Status -{ - BUSY ("BUSY" ), - DONE ("DONE" ) ; // <<---- THIS IS NOT UNNECESSARY - - public final String text; ; - private Status (String i_text) { - text = i_text; - } -} -enum BuildType -{ - ; - - public String toString() { - return super.toString(); - } -} -class C { - void m() throws Exception { - try (AutoCloseable r1 = null; AutoCloseable r2 = null /*ok*/ ) { } - try (AutoCloseable r1 = null; AutoCloseable r2 = null; /*warn*/ ) { } - } -} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/expected.xml deleted file mode 100644 index 91898089593e..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/expected.xml +++ /dev/null @@ -1,58 +0,0 @@ - - - - UnnecessarySemicolonInspection.java - 2 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 3 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 7 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 10 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 11 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 13 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 19 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - - - UnnecessarySemicolonInspection.java - 35 - Unnecessary semicolon - Unnecessary semicolon <code>;</code> #loc - - \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/module-info.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/module-info.java new file mode 100644 index 000000000000..adf9053489ca --- /dev/null +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_semicolon/module-info.java @@ -0,0 +1,3 @@ +module M { + ; +} \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/UnnecessarySuperQualifier.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/UnnecessarySuperQualifier.java index 8ebe5372a650..845617ffad5b 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/UnnecessarySuperQualifier.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/UnnecessarySuperQualifier.java @@ -20,8 +20,8 @@ public class UnnecessarySuperQualifier { private static class Up extends Base { void foo() { - super.test("asfd"); - System.out.println(super.field); + super.test("asfd"); + System.out.println(super.field); } } @@ -34,4 +34,50 @@ public class UnnecessarySuperQualifier { super.prot = prot; } } + + public static abstract class Parent { + + private final int f = 0; + + private void a() {} + + static class Child extends Parent { + + @Override + public String toString() { + super.a(); + return String.valueOf(super.f); + } + } + } + private class OtherChild extends Parent { + + public String toString() { + super.a(); + return String.valueOf(super.f); + } + } + + public static abstract class Uncle { + + final int f = 0; + + void a() {} + + static class Nephew extends Uncle { + + @Override + public String toString() { + super.a(); + return String.valueOf(super.f); + } + } + } + private class Niece extends Uncle { + + public String toString() { + super.a(); + return String.valueOf(super.f); + } + } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/expected.xml b/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/expected.xml deleted file mode 100644 index a3f99717de6e..000000000000 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/style/unnecessary_super_qualifier/expected.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - UnnecessarySuperQualifier.java - 23 - Unnecessary 'super' qualifier - Qualifier <code>super</code> is unnecessary in this context #loc - - - - UnnecessarySuperQualifier.java - 24 - Unnecessary 'super' qualifier - Qualifier <code>super</code> is unnecessary in this context #loc - - \ No newline at end of file diff --git a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/StaticInitializerReferencesSubClass/StaticInitializer.java b/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/StaticInitializerReferencesSubClass/StaticInitializer.java index f5cc496d9d95..e7050f5444e5 100644 --- a/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/StaticInitializerReferencesSubClass/StaticInitializer.java +++ b/plugins/InspectionGadgets/test/com/siyeh/igtest/threading/StaticInitializerReferencesSubClass/StaticInitializer.java @@ -7,6 +7,7 @@ class Super { static Super USED_PRIVATE = new MyUsedSub(); static Object OK_INSIDE_ANONYMOUS = new Object() {{ Sub s = new Sub(); }}; + static Runnable OK_INSIDE_LAMBDA = () -> { Sub s = new Sub(); }; static Object OK_UNRELATED = "abc"; static Super OK_SAME = new Super(); static Super OK_SAME_ANONYMOUS = new Super(){}; diff --git a/plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java index 4cd6626c2a54..44ce20674302 100644 --- a/plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/intellij/codeInspection/visibility/AccessCanBeTightenedInspectionTest.java @@ -21,7 +21,17 @@ import com.intellij.profile.codeInspection.InspectionProjectProfileManager; import com.intellij.util.ReflectionUtil; import com.siyeh.ig.LightInspectionTestCase; +@SuppressWarnings("WeakerAccess") public class AccessCanBeTightenedInspectionTest extends LightInspectionTestCase { + @Override + protected LocalInspectionTool getInspection() { + VisibilityInspection inspection = new VisibilityInspection(); + inspection.SUGGEST_PRIVATE_FOR_INNERS = true; + inspection.SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES = true; + inspection.SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = true; + return inspection.getSharedLocalInspectionTool(); + } + public void testSimple() { doTest("import java.util.*;\n" + "class C {\n" + @@ -187,12 +197,29 @@ public class AccessCanBeTightenedInspectionTest extends LightInspectionTestCase myFixture.checkHighlighting(); } - @Override - protected LocalInspectionTool getInspection() { - VisibilityInspection inspection = new VisibilityInspection(); - inspection.SUGGEST_PRIVATE_FOR_INNERS = true; - inspection.SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES = true; - inspection.SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS = true; - return inspection.getSharedLocalInspectionTool(); + public void testInnerClassIsUnusedButItsMethodsAre() { + myFixture.allowTreeAccessForAllFiles(); + myFixture.addFileToProject("x/Outer.java", + "package x;\n" + + "class Outer {\n" + + " static Inner makeInner() {\n" + + " return new Inner();\n" + + " }\n" + + "\n" + + " static class Inner {\n" + + " void frob() {}\n" + + " }\n" + + "}\n" + + ""); + myFixture.addFileToProject("x/Consumer.java", + "package x;\n" + + "public class Consumer {\n" + + " public void doIt() {\n" + + " Outer.makeInner().frob();\n" + + " }\n" + + "}" + + ""); + myFixture.configureByFiles("x/Outer.java", "x/Consumer.java"); + myFixture.checkHighlighting(); } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitMultiCatchFixTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitMultiCatchFixTest.java new file mode 100644 index 000000000000..cbbda6c4a7aa --- /dev/null +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitMultiCatchFixTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2000-2016 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.siyeh.ig.fixes.exceptions; + +import com.siyeh.InspectionGadgetsBundle; +import com.siyeh.ig.IGQuickFixesTestCase; +import com.siyeh.ig.exceptions.SplitMultiCatchInspection; + +public class SplitMultiCatchFixTest extends IGQuickFixesTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + myFixture.enableInspections(new SplitMultiCatchInspection()); + myDefaultHint = InspectionGadgetsBundle.message("split.multi.catch.descriptor"); + myRelativePath = "exceptions/split_multi_catch"; + } + + public void testSimple() { doTest(); } + public void testTypeAnno() { doTest(); } + public void testAtParameter() { doTest(); } + public void testAtCodeBlock() { assertQuickfixNotAvailable(); } +} diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitTryWithMultipleResourcesFixTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitTryWithMultipleResourcesFixTest.java new file mode 100644 index 000000000000..e2cd4ce0e393 --- /dev/null +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/exceptions/SplitTryWithMultipleResourcesFixTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2000-2016 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.siyeh.ig.fixes.exceptions; + +import com.siyeh.InspectionGadgetsBundle; +import com.siyeh.ig.IGQuickFixesTestCase; +import com.siyeh.ig.exceptions.SplitTryWithMultipleResourcesInspection; + +/** + * @author Bas Leijdekkers + */ +public class SplitTryWithMultipleResourcesFixTest extends IGQuickFixesTestCase { + @Override + protected void setUp() throws Exception { + super.setUp(); + myFixture.enableInspections(new SplitTryWithMultipleResourcesInspection()); + myDefaultHint = InspectionGadgetsBundle.message("split.try.with.multiple.resources.descriptor"); + myRelativePath = "exceptions/try_multiple_resource"; + } + + public void testSimple() { + doTest(); + } + + public void testWithCatch() { + doTest(); + } + + public void testWithFinally() { + doTest(); + } + + public void testMixedResources() { + doTest(); + } + + public void testAtCodeBlock() { + assertQuickfixNotAvailable(); + } +} diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/style/ReplaceLambdaWithAnonymousFixTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/style/ReplaceLambdaWithAnonymousFixTest.java index 6176e78ed151..ed9a8b544444 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/style/ReplaceLambdaWithAnonymousFixTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/fixes/style/ReplaceLambdaWithAnonymousFixTest.java @@ -87,6 +87,10 @@ public class ReplaceLambdaWithAnonymousFixTest extends IGQuickFixesTestCase { doTest(); } + public void testQualifyThisAndSuperInside() throws Exception { + doTest(); + } + public void testStaticCalls() { doTest(); } diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySemicolonInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySemicolonInspectionTest.java index 33c3cc8af3ce..44c9bfafbe36 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySemicolonInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySemicolonInspectionTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -15,22 +15,25 @@ */ package com.siyeh.ig.style; -import com.intellij.openapi.projectRoots.Sdk; -import com.intellij.openapi.projectRoots.impl.JavaSdkImpl; -import com.intellij.openapi.roots.LanguageLevelProjectExtension; -import com.intellij.pom.java.LanguageLevel; -import com.intellij.testFramework.IdeaTestUtil; -import com.siyeh.ig.IGInspectionTestCase; +import com.intellij.codeInspection.InspectionProfileEntry; +import com.intellij.testFramework.LightProjectDescriptor; +import com.siyeh.ig.LightInspectionTestCase; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; -public class UnnecessarySemicolonInspectionTest extends IGInspectionTestCase { +public class UnnecessarySemicolonInspectionTest extends LightInspectionTestCase { + public void testUnnecessarySemicolon() { doTest(); } + public void testModuleInfo() { doNamedTest("module-info"); } + + @NotNull @Override - protected Sdk getTestProjectSdk() { - LanguageLevelProjectExtension.getInstance(getProject()).setLanguageLevel(LanguageLevel.JDK_1_7); - return IdeaTestUtil.getMockJdk17(); + protected LightProjectDescriptor getProjectDescriptor() { + return JAVA_9; } - public void test() throws Exception { - doTest("com/siyeh/igtest/style/unnecessary_semicolon", - new UnnecessarySemicolonInspection()); + @Nullable + @Override + protected InspectionProfileEntry getInspection() { + return new UnnecessarySemicolonInspection(); } } \ No newline at end of file diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySuperQualifierInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySuperQualifierInspectionTest.java index d4ee42d943c1..5403dbdca6e0 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySuperQualifierInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarySuperQualifierInspectionTest.java @@ -1,12 +1,36 @@ +/* + * Copyright 2000-2016 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.siyeh.ig.style; -import com.siyeh.ig.IGInspectionTestCase; +import com.intellij.codeInspection.InspectionProfileEntry; +import com.siyeh.ig.LightInspectionTestCase; +import org.jetbrains.annotations.Nullable; -public class UnnecessarySuperQualifierInspectionTest - extends IGInspectionTestCase { +/** + * @author Bas Leijdekkers + */ +public class UnnecessarySuperQualifierInspectionTest extends LightInspectionTestCase { - public void test() throws Exception { - doTest("com/siyeh/igtest/style/unnecessary_super_qualifier", - new UnnecessarySuperQualifierInspection()); + public void testUnnecessarySuperQualifier() { + doTest(); + } + + @Nullable + @Override + protected InspectionProfileEntry getInspection() { + return new UnnecessarySuperQualifierInspection(); } } \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/META-INF/IntentionPowerPack.xml b/plugins/IntentionPowerPak/src/META-INF/IntentionPowerPack.xml index 8d7b8d730f80..9296de9c5bf0 100644 --- a/plugins/IntentionPowerPak/src/META-INF/IntentionPowerPack.xml +++ b/plugins/IntentionPowerPak/src/META-INF/IntentionPowerPack.xml @@ -481,11 +481,6 @@ com.siyeh.IntentionPowerPackBundle intention.category.try.statements - - com.siyeh.ipp.exceptions.SplitMultiCatchIntention - com.siyeh.IntentionPowerPackBundle - intention.category.try.statements - com.siyeh.ipp.exceptions.ReplaceArmWithTryFinallyIntention com.siyeh.IntentionPowerPackBundle @@ -496,11 +491,6 @@ com.siyeh.IntentionPowerPackBundle intention.category.try.statements - - com.siyeh.ipp.exceptions.SplitTryWithMultipleResourcesIntention - com.siyeh.IntentionPowerPackBundle - intention.category.try.statements - com.siyeh.ipp.exceptions.ObscureThrownExceptionsIntention com.siyeh.IntentionPowerPackBundle diff --git a/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties b/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties index 2bbffe605bb5..ec79b02c346c 100644 --- a/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties +++ b/plugins/IntentionPowerPak/src/com/siyeh/IntentionPowerPackBundle.properties @@ -152,14 +152,10 @@ expand.to.normal.annotation.intention.name=Add 'value=' to annotation attribute annotate.overridden.methods.intention.family.name=Annotate overriding methods and their parameters annotate.overridden.methods.intention.method.name=Annotate overriding methods as ''{0}'' annotate.overridden.methods.intention.parameters.name=Annotate same parameter of overriding methods as ''{0}'' -split.multi.catch.intention.name=Split multi-catch into separate 'catch' blocks -split.multi.catch.intention.family.name=Split Multi-Catch into Separate Catch Blocks replace.arm.with.try.finally.intention.name=Replace 'try-with-resources' with 'try finally' replace.arm.with.try.finally.intention.family.name=Replace Try-With-Resources with Try-Finally merge.nested.try.statements.intention.name=Merge nested 'try' statements merge.nested.try.statements.intention.family.name=Merge Nested Try Statements -split.try.with.multiple.resources.intention.name=Split 'try' statement with multiple resources -split.try.with.multiple.resources.intention.family.name=Split Try Statement with Multiple Resources obscure.thrown.exceptions.intention.family.name=Replace Exceptions in Throws Clause with Single More General Exception add.array.creation.expression.intention.family.name=Add Array Creation Expression make.public.intention.name=Make 'public' diff --git a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/MulticatchPredicate.java b/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/MulticatchPredicate.java deleted file mode 100644 index 5866835ccd43..000000000000 --- a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/MulticatchPredicate.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2011-2013 Bas Leijdekkers - * - * 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.siyeh.ipp.exceptions; - -import com.intellij.psi.*; -import com.siyeh.ipp.base.PsiElementPredicate; - -class MulticatchPredicate implements PsiElementPredicate { - - public boolean satisfiedBy(PsiElement element) { - if (element instanceof PsiCodeBlock) { - return false; - } - final PsiElement parent = element.getParent(); - if (!(parent instanceof PsiCatchSection)) { - return false; - } - final PsiCatchSection catchSection = (PsiCatchSection)parent; - final PsiType type = catchSection.getCatchType(); - return type instanceof PsiDisjunctionType; - } -} diff --git a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitMultiCatchIntention.java b/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitMultiCatchIntention.java deleted file mode 100644 index d6de66af803a..000000000000 --- a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitMultiCatchIntention.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2011 Bas Leijdekkers - * - * 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.siyeh.ipp.exceptions; - -import com.intellij.psi.*; -import com.intellij.psi.codeStyle.JavaCodeStyleManager; -import com.intellij.util.IncorrectOperationException; -import com.siyeh.ipp.base.Intention; -import com.siyeh.ipp.base.PsiElementPredicate; -import org.jetbrains.annotations.NotNull; - -import static com.intellij.util.ObjectUtils.assertNotNull; - -public class SplitMultiCatchIntention extends Intention { - - @NotNull - @Override - protected PsiElementPredicate getElementPredicate() { - return new MulticatchPredicate(); - } - - @Override - protected void processIntention(@NotNull PsiElement element) throws IncorrectOperationException { - final PsiElement parent = element.getParent(); - if (!(parent instanceof PsiCatchSection)) { - return; - } - final PsiCatchSection catchSection = (PsiCatchSection)parent; - final PsiElement grandParent = catchSection.getParent(); - if (!(grandParent instanceof PsiTryStatement)) { - return; - } - final PsiParameter parameter = catchSection.getParameter(); - if (parameter == null) { - return; - } - final PsiType type = parameter.getType(); - if (!(type instanceof PsiDisjunctionType)) { - return; - } - - final PsiElementFactory factory = JavaPsiFacade.getElementFactory(element.getProject()); - final JavaCodeStyleManager styleManager = JavaCodeStyleManager.getInstance(element.getProject()); - for (PsiType disjunction : ((PsiDisjunctionType)type).getDisjunctions()) { - final PsiCatchSection copy = (PsiCatchSection)catchSection.copy(); - - final PsiTypeElement typeElement = assertNotNull(assertNotNull(copy.getParameter()).getTypeElement()); - final PsiTypeElement newTypeElement = factory.createTypeElementFromText(disjunction.getCanonicalText(true), catchSection); - final PsiElement replaced = typeElement.replace(newTypeElement); - - grandParent.addBefore(copy, catchSection); - styleManager.shortenClassReferences(replaced); - } - - catchSection.delete(); - } -} diff --git a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntention.java b/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntention.java deleted file mode 100644 index 2f6003e476ac..000000000000 --- a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntention.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright 2000-2015 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.siyeh.ipp.exceptions; - -import com.intellij.psi.*; -import com.intellij.util.IncorrectOperationException; -import com.siyeh.ig.PsiReplacementUtil; -import com.siyeh.ipp.base.Intention; -import com.siyeh.ipp.base.PsiElementPredicate; -import org.jetbrains.annotations.NotNull; - -/** - * @author Bas Leijdekkers - */ -public class SplitTryWithMultipleResourcesIntention extends Intention { - - @NotNull - @Override - protected PsiElementPredicate getElementPredicate() { - return new TryWithMultipleResourcesPredicate(); - } - - @Override - protected void processIntention(@NotNull PsiElement element) throws IncorrectOperationException { - final PsiTryStatement tryStatement = (PsiTryStatement)element.getParent(); - final PsiResourceList resourceList = tryStatement.getResourceList(); - if (resourceList == null) { - return; - } - final StringBuilder newTryStatementText = new StringBuilder(); - int count = 0; - for (PsiResourceListElement resource : resourceList) { - if (count > 0) { - newTryStatementText.append("{\n"); - } - ++count; - newTryStatementText.append("try (").append(resource.getText()).append(")"); - } - final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); - if (tryBlock == null) { - return; - } - newTryStatementText.append(tryBlock.getText()); - for (int i = 1; i < count; i++) { - newTryStatementText.append("\n}"); - } - final PsiCatchSection[] catchSections = tryStatement.getCatchSections(); - for (PsiCatchSection catchSection : catchSections) { - newTryStatementText.append(catchSection.getText()); - } - final PsiCodeBlock finallyBlock = tryStatement.getFinallyBlock(); - if (finallyBlock != null) { - newTryStatementText.append("finally").append(finallyBlock.getText()); - } - PsiReplacementUtil.replaceStatement(tryStatement, newTryStatementText.toString()); - } -} diff --git a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/TryWithMultipleResourcesPredicate.java b/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/TryWithMultipleResourcesPredicate.java deleted file mode 100644 index 6643f47cf285..000000000000 --- a/plugins/IntentionPowerPak/src/com/siyeh/ipp/exceptions/TryWithMultipleResourcesPredicate.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2000-2015 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.siyeh.ipp.exceptions; - -import com.intellij.psi.*; -import com.intellij.psi.tree.IElementType; -import com.siyeh.ipp.base.PsiElementPredicate; - -/** - * @author Bas Leijdekkers - */ -class TryWithMultipleResourcesPredicate implements PsiElementPredicate { - - @Override - public boolean satisfiedBy(PsiElement element) { - - if (element instanceof PsiJavaToken) { - final PsiJavaToken javaToken = (PsiJavaToken)element; - final IElementType tokenType = javaToken.getTokenType(); - if (!JavaTokenType.TRY_KEYWORD.equals(tokenType)) { - return false; - } - } - else if (!(element instanceof PsiResourceList)) { - return false; - } - final PsiElement parent = element.getParent(); - if (!(parent instanceof PsiTryStatement)) { - return false; - } - final PsiTryStatement tryStatement = (PsiTryStatement)parent; - final PsiResourceList resourceList = tryStatement.getResourceList(); - if (resourceList == null) { - return false; - } - final PsiCodeBlock tryBlock = tryStatement.getTryBlock(); - if (tryBlock == null) { - return false; - } - return resourceList.getResourceVariablesCount() > 1; - } -} diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/after.java.template deleted file mode 100644 index 8a3ba03bb373..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/after.java.template +++ /dev/null @@ -1,16 +0,0 @@ -import java.io.IOException; -import java.net.*; - -public class X { - void f() { - try { - throw new NoRouteToHostException(); - } catch (NoRouteToHostException e) { - e.printStackTrace(); - } catch (SocketException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/before.java.template deleted file mode 100644 index 8d08a5453a3b..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/before.java.template +++ /dev/null @@ -1,12 +0,0 @@ -import java.io.IOException; -import java.net.*; - -public class X { - void f() { - try { - throw new NoRouteToHostException(); - } catch (NoRouteToHostException | SocketException | IOException e) { - e.printStackTrace(); - } - } -} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/description.html deleted file mode 100644 index 0cc13ea9ca45..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitMultiCatchIntention/description.html +++ /dev/null @@ -1,6 +0,0 @@ - - -This intention splits a multi-catch section into separate catch blocks. -

- - diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/after.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/after.java.template deleted file mode 100644 index 8b181b89ddb8..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/after.java.template +++ /dev/null @@ -1,11 +0,0 @@ -import java.io.*; - -public class X { - void f(File file1, File file2) throws FileNotFoundException { - try (FileInputStream in = new FileInputStream(file1)) { - try (FileOutputStream out = new FileOutputStream(file2)) { - // do something - } - } - } -} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/before.java.template b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/before.java.template deleted file mode 100644 index 2736a4bb3c03..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/before.java.template +++ /dev/null @@ -1,9 +0,0 @@ -import java.io.*; - -public class X { - void f(File file1, File file2) throws FileNotFoundException { - try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) { - // do something - } - } -} \ No newline at end of file diff --git a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/description.html b/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/description.html deleted file mode 100644 index 4a618540be5a..000000000000 --- a/plugins/IntentionPowerPak/src/intentionDescriptions/SplitTryWithMultipleResourcesIntention/description.html +++ /dev/null @@ -1,5 +0,0 @@ - - -This intention splits a try statement with multiple resources into two nested try-with-resources statements. - - diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java deleted file mode 100644 index 360ea156ba14..000000000000 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitMultiCatchIntentionTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2000-2013 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.siyeh.ipp.exceptions; - -import com.siyeh.IntentionPowerPackBundle; -import com.siyeh.ipp.IPPTestCase; - -public class SplitMultiCatchIntentionTest extends IPPTestCase { - public void testSimple() { doTest(); } - public void testTypeAnno() { doTest(); } - - @Override - protected String getIntentionName() { - return IntentionPowerPackBundle.message("split.multi.catch.intention.name"); - } - - @Override - protected String getRelativePath() { - return "exceptions/splitMultiCatch"; - } -} diff --git a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java b/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java deleted file mode 100644 index 505c0c5f4a62..000000000000 --- a/plugins/IntentionPowerPak/testSrc/com/siyeh/ipp/exceptions/SplitTryWithMultipleResourcesIntentionTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright 2000-2015 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.siyeh.ipp.exceptions; - -import com.siyeh.ipp.IPPTestCase; - -/** - * @see SplitTryWithMultipleResourcesIntention - * @author Bas Leijdekkers - */ -public class SplitTryWithMultipleResourcesIntentionTest extends IPPTestCase { - - public void testSimple() { - doTest( - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) throws IOException {\n" + - " /*_Split 'try' statement with multiple resources*/try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " }\n" + - " }\n" + - "}", - - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) throws IOException {\n" + - " try (FileInputStream in = new FileInputStream(file1)) {\n" + - " try (FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " }\n" + - " }\n" + - " }\n" + - "}"); - } - - public void testWithCatch() { - doTest( - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) {\n" + - " try (FileInputStream in = new FileInputStream(file1); /*_Split 'try' statement with multiple resources*/FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " } catch (IOException e) {\n" + - " e.printStackTrace();\n" + - " }\n" + - " }\n" + - "}", - - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) {\n" + - " try (FileInputStream in = new FileInputStream(file1)) {\n" + - " try (FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " }\n" + - " } catch (IOException e) {\n" + - " e.printStackTrace();\n" + - " }\n" + - " }\n" + - "}"); - } - - public void testWithFinally() { - doTest( - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) throws IOException {\n" + - " /*_Split 'try' statement with multiple resources*/try (FileInputStream in = new FileInputStream(file1); FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " } finally {\n" + - " System.out.println();\n" + - " }\n" + - " }\n" + - "}", - - "import java.io.*;\n" + - "class C {\n" + - " void foo(File file1, File file2) throws IOException {\n" + - " try (FileInputStream in = new FileInputStream(file1)) {\n" + - " try (FileOutputStream out = new FileOutputStream(file2)) {\n" + - " System.out.println(in + \", \" + out);\n" + - " }\n" + - " } finally {\n" + - " System.out.println();\n" + - " }\n" + - " }\n" + - "}"); - } - - public void testMixedResources() { - doTest( - "import java.io.*;\n" + - "class C {\n" + - " void m() throws Exception {\n" + - " Reader r2 = new StringReader();\n" + - " /*_Split 'try' statement with multiple resources*/try (Reader r1 = new StringReader(); r2) {\n" + - " System.out.println(r1 + \", \" + r2);\n" + - " }\n" + - " }\n" + - "}", - - "import java.io.*;\n" + - "class C {\n" + - " void m() throws Exception {\n" + - " Reader r2 = new StringReader();\n" + - " try (Reader r1 = new StringReader()) {\n" + - " try (r2) {\n" + - " System.out.println(r1 + \", \" + r2);\n" + - " }\n" + - " }\n" + - " }\n" + - "}"); - } -} diff --git a/plugins/ant/jps-plugin/testSrc/org/jetbrains/jps/ant/JpsAntSerializationTest.java b/plugins/ant/jps-plugin/testSrc/org/jetbrains/jps/ant/JpsAntSerializationTest.java index 23c1ed692885..80b85cf099bc 100644 --- a/plugins/ant/jps-plugin/testSrc/org/jetbrains/jps/ant/JpsAntSerializationTest.java +++ b/plugins/ant/jps-plugin/testSrc/org/jetbrains/jps/ant/JpsAntSerializationTest.java @@ -88,7 +88,7 @@ public class JpsAntSerializationTest extends JpsSerializationTestCase { assertContainsElements(toFiles(installation2.getClasspath()), PathManagerEx.findFileUnderCommunityHome("lib/ant/lib/ant.jar"), PathManagerEx.findFileUnderCommunityHome("lib/trove4j.jar"), - PathManagerEx.findFileUnderCommunityHome("lib/dev/easymock.jar")); + PathManagerEx.findFileUnderCommunityHome("lib/dev/easymock-3.4.jar")); } @Override diff --git a/plugins/devkit/src/inspections/PluginXmlDomInspection.java b/plugins/devkit/src/inspections/PluginXmlDomInspection.java index 3622a6a74f07..b0a9c5067fec 100644 --- a/plugins/devkit/src/inspections/PluginXmlDomInspection.java +++ b/plugins/devkit/src/inspections/PluginXmlDomInspection.java @@ -48,6 +48,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * @author mike @@ -153,7 +154,7 @@ public class PluginXmlDomInspection extends BasicDomElementsInspection= FIRST_BRANCH_SUPPORTING_STAR; + } + return false; + } + private static void annotateExtension(Extension extension, DomElementAnnotationHolder holder) { final ExtensionPoint extensionPoint = extension.getExtensionPoint(); if (extensionPoint == null) return; diff --git a/plugins/devkit/testData/codeInsight/pluginForOldIdeWith9999InUntilBuild.xml b/plugins/devkit/testData/codeInsight/pluginForOldIdeWith9999InUntilBuild.xml new file mode 100644 index 000000000000..de4e8d5e3e95 --- /dev/null +++ b/plugins/devkit/testData/codeInsight/pluginForOldIdeWith9999InUntilBuild.xml @@ -0,0 +1,4 @@ + + test + + diff --git a/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.groovy b/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.groovy index e28bdd30e2c9..8adb4847724c 100644 --- a/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.groovy +++ b/plugins/devkit/testSources/codeInsight/PluginXmlFunctionalTest.groovy @@ -319,6 +319,10 @@ public class PluginXmlFunctionalTest extends JavaCodeInsightFixtureTestCase { myFixture.testHighlighting("pluginWith9999InUntilBuild.xml"); } + public void testPluginForOldIdeWith9999InUntilBuild() { + myFixture.testHighlighting("pluginForOldIdeWith9999InUntilBuild.xml"); + } + public void testPluginWith10000InUntilBuild() { myFixture.testHighlighting("pluginWith10000InUntilBuild.xml"); } diff --git a/plugins/git4idea/rt/src/org/jetbrains/git4idea/ssh/SSHMain.java b/plugins/git4idea/rt/src/org/jetbrains/git4idea/ssh/SSHMain.java index 67a74b92b0ac..368b1422e69f 100644 --- a/plugins/git4idea/rt/src/org/jetbrains/git4idea/ssh/SSHMain.java +++ b/plugins/git4idea/rt/src/org/jetbrains/git4idea/ssh/SSHMain.java @@ -609,7 +609,7 @@ public class SSHMain implements GitExternalApp { @Override public String toString() { return String - .format("SSHMain{myHost=%s, myHandlerNo=%d, myCommand='%s', myExitCode=%d, myLastError='%s'}", myHost, myHandlerNo, myCommand, + .format("SSHMain{myHost=%s, myHandlerNo=%s, myCommand='%s', myExitCode=%d, myLastError='%s'}", myHost, myHandlerNo, myCommand, myExitCode, myLastError); } diff --git a/plugins/git4idea/src/git4idea/GitVcs.java b/plugins/git4idea/src/git4idea/GitVcs.java index eed4c7bb4549..5de354f4d328 100644 --- a/plugins/git4idea/src/git4idea/GitVcs.java +++ b/plugins/git4idea/src/git4idea/GitVcs.java @@ -168,7 +168,7 @@ public class GitVcs extends AbstractVcs { * @param task the task to run */ public static void runInBackground(Task.Backgroundable task) { - UIUtil.invokeLaterIfNeeded(() -> task.queue()); + task.queue(); } @Override diff --git a/plugins/git4idea/src/git4idea/branch/GitBranchUiHandlerImpl.java b/plugins/git4idea/src/git4idea/branch/GitBranchUiHandlerImpl.java index 75d95078d76f..f39461d60290 100644 --- a/plugins/git4idea/src/git4idea/branch/GitBranchUiHandlerImpl.java +++ b/plugins/git4idea/src/git4idea/branch/GitBranchUiHandlerImpl.java @@ -17,6 +17,8 @@ package git4idea.branch; import com.intellij.notification.Notification; import com.intellij.notification.NotificationListener; +import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.Messages; @@ -149,12 +151,9 @@ public class GitBranchUiHandlerImpl implements GitBranchUiHandler { @NotNull final String unmergedBranch, @NotNull final List mergedToBranches, @NotNull final String baseBranch) { final AtomicBoolean forceDelete = new AtomicBoolean(); - UIUtil.invokeAndWaitIfNeeded(new Runnable() { - @Override - public void run() { - forceDelete.set(GitBranchIsNotFullyMergedDialog.showAndGetAnswer(myProject, history, unmergedBranch, mergedToBranches, baseBranch)); - } - }); + ApplicationManager.getApplication().invokeAndWait(() -> forceDelete.set( + GitBranchIsNotFullyMergedDialog.showAndGetAnswer(myProject, history, unmergedBranch, mergedToBranches, baseBranch)), + ModalityState.defaultModalityState()); return forceDelete.get(); } diff --git a/plugins/github/src/META-INF/plugin.xml b/plugins/github/src/META-INF/plugin.xml index df953721686f..eee908182364 100644 --- a/plugins/github/src/META-INF/plugin.xml +++ b/plugins/github/src/META-INF/plugin.xml @@ -47,11 +47,9 @@ - - - - - + + + diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubCreateGistAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubCreateGistAction.java index 1c08e2592313..68cb51c02905 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubCreateGistAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubCreateGistAction.java @@ -74,10 +74,10 @@ public class GithubCreateGistAction extends DumbAwareAction { VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); if ((editor == null && file == null && files == null) || (editor != null && editor.getDocument().getTextLength() == 0)) { - GithubUtil.setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } - GithubUtil.setVisibleEnabled(e, true, true); + e.getPresentation().setEnabledAndVisible(true); } @Override @@ -118,6 +118,8 @@ public class GithubCreateGistAction extends DumbAwareAction { @Override public void run(@NotNull ProgressIndicator indicator) { List contents = collectContents(project, editor, file, files); + if (contents.isEmpty()) return; + String gistUrl = createGist(project, authHolder, indicator, contents, dialog.isPrivate(), dialog.getDescription(), dialog.getFileName()); url.set(gistUrl); @@ -237,6 +239,10 @@ public class GithubCreateGistAction extends DumbAwareAction { if (file.isDirectory()) { return getContentFromDirectory(file, project, prefix); } + if (file.getFileType().isBinary()) { + GithubNotifications.showWarning(project, FAILED_TO_CREATE_GIST, "Can't upload binary file: " + file); + return Collections.emptyList(); + } String content = ReadAction.compute(() -> { try { Document document = FileDocumentManager.getInstance().getDocument(file); diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestAction.java index d3fa265dc389..0a613e211625 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestAction.java @@ -28,8 +28,6 @@ import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.github.ui.GithubCreatePullRequestDialog; import org.jetbrains.plugins.github.util.GithubUtil; -import static org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled; - /** * @author Aleksey Pivovarov */ @@ -42,22 +40,22 @@ public class GithubCreatePullRequestAction extends DumbAwareAction { final Project project = e.getData(CommonDataKeys.PROJECT); final VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (project == null || project.isDefault()) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } final GitRepository gitRepository = GithubUtil.getGitRepository(project, file); if (gitRepository == null) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } if (!GithubUtil.isRepositoryOnGitHub(gitRepository)) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } - setVisibleEnabled(e, true, true); + e.getPresentation().setEnabledAndVisible(true); } @Override diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java index 9bf132c91fee..04f452e97e21 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubCreatePullRequestWorker.java @@ -478,7 +478,7 @@ public class GithubCreatePullRequestWorker { public void createPullRequest(@NotNull final BranchInfo branch, @NotNull final String title, @NotNull final String description) { - new Task.Backgroundable(myProject, "Creating pull request...") { + new Task.Backgroundable(myProject, "Creating Pull Request...") { @Override public void run(@NotNull ProgressIndicator indicator) { LOG.info("Pushing current branch"); diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java index 8c7934454734..15250412e308 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubOpenInBrowserAction.java @@ -38,7 +38,6 @@ import git4idea.GitRevisionNumber; import git4idea.GitUtil; import git4idea.history.GitHistoryUtils; import git4idea.repo.GitRepository; -import git4idea.repo.GitRepositoryManager; import icons.GithubIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -47,7 +46,6 @@ import org.jetbrains.plugins.github.util.GithubUrlUtil; import org.jetbrains.plugins.github.util.GithubUtil; import static org.jetbrains.plugins.github.util.GithubUtil.LOG; -import static org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled; /** * Created by IntelliJ IDEA. @@ -56,96 +54,84 @@ import static org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled; * @date 12/10/10 */ public class GithubOpenInBrowserAction extends DumbAwareAction { - public static final String CANNOT_OPEN_IN_BROWSER = "Cannot open in browser"; + public static final String CANNOT_OPEN_IN_BROWSER = "Can't open in browser"; protected GithubOpenInBrowserAction() { - super("Open on GitHub", "Open corresponding link in browser", GithubIcons.Github_icon); + super("Open on GitHub", "Open selected file in browser", GithubIcons.Github_icon); } @Override - public void update(final AnActionEvent e) { + public void update(AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); if (project == null || project.isDefault() || virtualFile == null) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } - GitRepositoryManager manager = GitUtil.getRepositoryManager(project); - final GitRepository gitRepository = manager.getRepositoryForFile(virtualFile); + GitRepository gitRepository = GitUtil.getRepositoryManager(project).getRepositoryForFile(virtualFile); if (gitRepository == null) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } if (!GithubUtil.isRepositoryOnGitHub(gitRepository)) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } ChangeListManager changeListManager = ChangeListManager.getInstance(project); if (changeListManager.isUnversioned(virtualFile)) { - setVisibleEnabled(e, true, false); + e.getPresentation().setVisible(true); + e.getPresentation().setEnabled(false); return; } Change change = changeListManager.getChange(virtualFile); if (change != null && change.getType() == Change.Type.NEW) { - setVisibleEnabled(e, true, false); + e.getPresentation().setVisible(true); + e.getPresentation().setEnabled(false); return; } - setVisibleEnabled(e, true, true); + e.getPresentation().setEnabledAndVisible(true); } @Override - public void actionPerformed(final AnActionEvent e) { - final Project project = e.getData(CommonDataKeys.PROJECT); - final VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); - final Editor editor = e.getData(CommonDataKeys.EDITOR); + public void actionPerformed(AnActionEvent e) { + Project project = e.getData(CommonDataKeys.PROJECT); + VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); + Editor editor = e.getData(CommonDataKeys.EDITOR); if (virtualFile == null || project == null || project.isDisposed()) { return; } - String urlToOpen = getGithubUrl(project, virtualFile, editor); - if (urlToOpen != null) { - BrowserUtil.browse(urlToOpen); - } - } + GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForFile(virtualFile); + assert repository != null; - @Nullable - private static String getGithubUrl(@NotNull Project project, @NotNull VirtualFile virtualFile, @Nullable Editor editor) { - GitRepositoryManager manager = GitUtil.getRepositoryManager(project); - final GitRepository repository = manager.getRepositoryForFile(virtualFile); - if (repository == null) { - StringBuilder details = new StringBuilder("file: " + virtualFile.getPresentableUrl() + "; Git repositories: "); - for (GitRepository repo : manager.getRepositories()) { - details.append(repo.getPresentableUrl()).append("; "); - } - GithubNotifications.showError(project, CANNOT_OPEN_IN_BROWSER, "Can't find git repository", details.toString()); - return null; - } - - final String githubRemoteUrl = GithubUtil.findGithubRemoteUrl(repository); + String githubRemoteUrl = GithubUtil.findGithubRemoteUrl(repository); if (githubRemoteUrl == null) { GithubNotifications.showError(project, CANNOT_OPEN_IN_BROWSER, "Can't find github remote"); - return null; + return; } String relativePath = VfsUtilCore.getRelativePath(virtualFile, repository.getRoot()); if (relativePath == null) { GithubNotifications.showError(project, CANNOT_OPEN_IN_BROWSER, "File is not under repository root", "Root: " + repository.getRoot().getPresentableUrl() + ", file: " + virtualFile.getPresentableUrl()); - return null; + return; } String hash = getCurrentFileRevisionHash(project, virtualFile); - if (hash != null) { - return makeUrlToOpen(editor, relativePath, hash, githubRemoteUrl); + if (hash == null) { + GithubNotifications.showError(project, CANNOT_OPEN_IN_BROWSER, "Can't get last revision."); + return; } - GithubNotifications.showError(project, CANNOT_OPEN_IN_BROWSER, "Can't get last revision."); - return null; + String url = makeUrlToOpen(editor, relativePath, hash, githubRemoteUrl); + if (url != null) { + BrowserUtil.browse(url); + } } @Nullable @@ -153,11 +139,10 @@ public class GithubOpenInBrowserAction extends DumbAwareAction { @NotNull String relativePath, @NotNull String branch, @NotNull String githubRemoteUrl) { - final StringBuilder builder = new StringBuilder(); - final String githubRepoUrl = GithubUrlUtil.makeGithubRepoUrlFromRemoteUrl(githubRemoteUrl); - if (githubRepoUrl == null) { - return null; - } + StringBuilder builder = new StringBuilder(); + String githubRepoUrl = GithubUrlUtil.makeGithubRepoUrlFromRemoteUrl(githubRemoteUrl); + if (githubRepoUrl == null) return null; + if (StringUtil.isEmptyOrSpaces(relativePath)) { builder.append(githubRepoUrl).append("/tree/").append(branch); } @@ -182,8 +167,8 @@ public class GithubOpenInBrowserAction extends DumbAwareAction { @Nullable private static String getCurrentFileRevisionHash(@NotNull final Project project, @NotNull final VirtualFile file) { - final Ref ref = new Ref(); - ProgressManager.getInstance().run(new Task.Modal(project, "Getting last revision", true) { + final Ref ref = new Ref<>(); + ProgressManager.getInstance().run(new Task.Modal(project, "Getting Last Revision", true) { @Override public void run(@NotNull ProgressIndicator indicator) { try { diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java index 7705e6ebc3da..25c05de62d35 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubRebaseAction.java @@ -51,7 +51,6 @@ import java.util.Collections; import java.util.List; import static git4idea.commands.GitLocalChangesWouldBeOverwrittenDetector.Operation.CHECKOUT; -import static org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled; /** * Created by IntelliJ IDEA. @@ -71,22 +70,22 @@ public class GithubRebaseAction extends DumbAwareAction { final Project project = e.getData(CommonDataKeys.PROJECT); final VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (project == null || project.isDefault()) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } final GitRepository gitRepository = GithubUtil.getGitRepository(project, file); if (gitRepository == null) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } if (!GithubUtil.isRepositoryOnGitHub(gitRepository)) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } - setVisibleEnabled(e, true, true); + e.getPresentation().setEnabledAndVisible(true); } @Override @@ -109,7 +108,7 @@ public class GithubRebaseAction extends DumbAwareAction { } BasicAction.saveAll(); - new Task.Backgroundable(project, "Rebasing GitHub fork...") { + new Task.Backgroundable(project, "Rebasing GitHub Fork...") { @Override public void run(@NotNull ProgressIndicator indicator) { gitRepository.update(); diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java index 7e93fd1f0492..a3fa4991f3ff 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java @@ -16,7 +16,9 @@ package org.jetbrains.plugins.github; import com.intellij.ide.BrowserUtil; -import com.intellij.openapi.actionSystem.*; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.CommonDataKeys; +import com.intellij.openapi.actionSystem.DataProvider; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.diagnostic.Logger; @@ -51,6 +53,7 @@ import git4idea.util.GitFileUtils; import git4idea.util.GitUIUtil; import icons.GithubIcons; import org.apache.http.HttpStatus; +import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.github.api.GithubApiUtil; @@ -68,8 +71,6 @@ import javax.swing.*; import java.io.IOException; import java.util.*; -import static org.jetbrains.plugins.github.util.GithubUtil.setVisibleEnabled; - /** * @author oleg */ @@ -83,10 +84,10 @@ public class GithubShareAction extends DumbAwareAction { public void update(AnActionEvent e) { final Project project = e.getData(CommonDataKeys.PROJECT); if (project == null || project.isDefault()) { - setVisibleEnabled(e, false, false); + e.getPresentation().setEnabledAndVisible(false); return; } - setVisibleEnabled(e, true, true); + e.getPresentation().setEnabledAndVisible(true); } // get gitRepository @@ -149,7 +150,7 @@ public class GithubShareAction extends DumbAwareAction { final String description = shareDialog.getDescription(); final String remoteName = shareDialog.getRemoteName(); - new Task.Backgroundable(project, "Sharing project on GitHub...") { + new Task.Backgroundable(project, "Sharing Project on GitHub...") { @Override public void run(@NotNull ProgressIndicator indicator) { // create GitHub repo (network) @@ -405,7 +406,7 @@ public class GithubShareAction extends DumbAwareAction { return true; } - public static class GithubUntrackedFilesDialog extends SelectFilesDialog implements TypeSafeDataProvider { + public static class GithubUntrackedFilesDialog extends SelectFilesDialog implements DataProvider { @NotNull private final Project myProject; private CommitMessage myCommitMessagePanel; @@ -442,11 +443,13 @@ public class GithubShareAction extends DumbAwareAction { return myCommitMessagePanel.getComment(); } + @Nullable @Override - public void calcData(DataKey key, DataSink sink) { - if (key == VcsDataKeys.COMMIT_MESSAGE_CONTROL) { - sink.put(VcsDataKeys.COMMIT_MESSAGE_CONTROL, myCommitMessagePanel); + public Object getData(@NonNls String dataId) { + if (VcsDataKeys.COMMIT_MESSAGE_CONTROL.is(dataId)) { + return myCommitMessagePanel; } + return null; } @Override diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserAction.java index 36e5bc4b99ec..117d53336832 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserAction.java @@ -16,36 +16,60 @@ package org.jetbrains.plugins.github; import com.intellij.ide.BrowserUtil; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.actionSystem.CommonDataKeys; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.project.Project; +import com.intellij.openapi.vcs.FilePath; +import com.intellij.openapi.vcs.VcsDataKeys; +import com.intellij.openapi.vcs.history.VcsFileRevision; +import com.intellij.util.containers.ContainerUtil; +import com.intellij.vcs.log.CommitId; +import com.intellij.vcs.log.VcsLog; +import com.intellij.vcs.log.VcsLogDataKeys; +import git4idea.GitFileRevision; import git4idea.GitUtil; import git4idea.repo.GitRepository; import icons.GithubIcons; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.github.api.GithubFullPath; import org.jetbrains.plugins.github.util.GithubNotifications; import org.jetbrains.plugins.github.util.GithubUrlUtil; import org.jetbrains.plugins.github.util.GithubUtil; -/** - * @author Kirill Likhodedov - */ -abstract class GithubShowCommitInBrowserAction extends DumbAwareAction { +import java.util.List; +public class GithubShowCommitInBrowserAction extends DumbAwareAction { public GithubShowCommitInBrowserAction() { - super("Open on GitHub", "Open the selected commit in browser", GithubIcons.Github_icon); + super("Open on GitHub", "Open selected commit in browser", GithubIcons.Github_icon); } - protected static void openInBrowser(Project project, GitRepository repository, String revisionHash) { + @Override + public void update(AnActionEvent e) { + CommitData data = getData(e); + e.getPresentation().setEnabled(data != null && data.revisionHash != null); + e.getPresentation().setVisible(data != null); + } + + @Override + public void actionPerformed(AnActionEvent e) { + CommitData data = getData(e); + assert data != null && data.revisionHash != null; + openInBrowser(data.project, data.repository, data.revisionHash); + } + + protected static void openInBrowser(@NotNull Project project, @NotNull GitRepository repository, @NotNull String revisionHash) { String url = GithubUtil.findGithubRemoteUrl(repository); if (url == null) { GithubUtil.LOG.info(String.format("Repository is not under GitHub. Root: %s, Remotes: %s", repository.getRoot(), - GitUtil.getPrintableRemotes(repository.getRemotes()))); + GitUtil.getPrintableRemotes(repository.getRemotes()))); return; } GithubFullPath userAndRepository = GithubUrlUtil.getUserAndRepositoryFromRemoteUrl(url); if (userAndRepository == null) { GithubNotifications - .showError(project, GithubOpenInBrowserAction.CANNOT_OPEN_IN_BROWSER, "Cannot extract info about repository: " + url); + .showError(project, GithubOpenInBrowserAction.CANNOT_OPEN_IN_BROWSER, "Can't extract info about repository: " + url); return; } @@ -54,4 +78,55 @@ abstract class GithubShowCommitInBrowserAction extends DumbAwareAction { BrowserUtil.browse(githubUrl); } + @Nullable + protected CommitData getData(AnActionEvent e) { + CommitData data = getDataFromHistory(e); + if (data == null) data = getDataFromLog(e); + return data; + } + + @Nullable + private static CommitData getDataFromHistory(AnActionEvent e) { + Project project = e.getData(CommonDataKeys.PROJECT); + FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); + VcsFileRevision fileRevision = e.getData(VcsDataKeys.VCS_FILE_REVISION); + if (project == null || filePath == null || fileRevision == null) return null; + + if (!(fileRevision instanceof GitFileRevision)) return null; + + GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForFile(filePath); + if (repository == null || !GithubUtil.isRepositoryOnGitHub(repository)) return null; + + return new CommitData(project, repository, fileRevision.getRevisionNumber().asString()); + } + + @Nullable + private static CommitData getDataFromLog(AnActionEvent e) { + Project project = e.getData(CommonDataKeys.PROJECT); + VcsLog log = e.getData(VcsLogDataKeys.VCS_LOG); + if (project == null || log == null) return null; + + List selectedCommits = log.getSelectedCommits(); + if (selectedCommits.size() != 1) return null; + + CommitId commit = ContainerUtil.getFirstItem(selectedCommits); + if (commit == null) return null; + + GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForRoot(commit.getRoot()); + if (repository == null || !GithubUtil.isRepositoryOnGitHub(repository)) return null; + + return new CommitData(project, repository, commit.getHash().asString()); + } + + protected static class CommitData { + @NotNull private final Project project; + @NotNull private final GitRepository repository; + @Nullable private final String revisionHash; + + public CommitData(@NotNull Project project, @NotNull GitRepository repository, @Nullable String revisionHash) { + this.project = project; + this.repository = repository; + this.revisionHash = revisionHash; + } + } } diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromAnnotateAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromAnnotateAction.java index 4700d3b8b174..a1219e362da7 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromAnnotateAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromAnnotateAction.java @@ -26,90 +26,38 @@ import com.intellij.openapi.vcs.history.VcsRevisionNumber; import com.intellij.openapi.vfs.VirtualFile; import git4idea.GitUtil; import git4idea.repo.GitRepository; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.jetbrains.plugins.github.util.GithubUtil; -/** - * @author Kirill Likhodedov - */ public class GithubShowCommitInBrowserFromAnnotateAction extends GithubShowCommitInBrowserAction implements UpToDateLineNumberListener { - private final FileAnnotation myAnnotation; private int myLineNumber = -1; public GithubShowCommitInBrowserFromAnnotateAction(FileAnnotation annotation) { - super(); myAnnotation = annotation; } - @Override - public void update(AnActionEvent e) { - EventData eventData = calcData(e, myLineNumber); - if (eventData == null) { - e.getPresentation().setEnabled(false); - e.getPresentation().setVisible(false); - return; - } - e.getPresentation().setEnabled(myLineNumber >= 0 && myAnnotation.getLineRevisionNumber(myLineNumber) != null); - e.getPresentation().setVisible(GithubUtil.isRepositoryOnGitHub(eventData.getRepository())); - } - - @Override - public void actionPerformed(AnActionEvent e) { - EventData eventData = calcData(e, myLineNumber); - if (eventData == null) { - return; - } - - final VcsRevisionNumber revisionNumber = myAnnotation.getLineRevisionNumber(myLineNumber); - if (revisionNumber != null) { - openInBrowser(eventData.getProject(), eventData.getRepository(), revisionNumber.asString()); - } - } - @Nullable - private static EventData calcData(AnActionEvent e, int lineNumber) { + @Override + protected CommitData getData(AnActionEvent e) { + if (myLineNumber < 0) return null; + Project project = e.getData(CommonDataKeys.PROJECT); VirtualFile virtualFile = e.getData(CommonDataKeys.VIRTUAL_FILE); - if (project == null || virtualFile == null) { - return null; - } + if (project == null || virtualFile == null) return null; + Document document = FileDocumentManager.getInstance().getDocument(virtualFile); - if (document == null) { - return null; - } + if (document == null) return null; GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForFile(virtualFile); - if (repository == null) { - return null; - } + if (repository == null || !GithubUtil.isRepositoryOnGitHub(repository)) return null; - return new EventData(project, repository); + VcsRevisionNumber revisionNumber = myAnnotation.getLineRevisionNumber(myLineNumber); + return new CommitData(project, repository, revisionNumber != null ? revisionNumber.asString() : null); } @Override public void consume(Integer integer) { myLineNumber = integer; } - - private static class EventData { - @NotNull private final Project myProject; - @NotNull private final GitRepository myRepository; - - private EventData(@NotNull Project project, @NotNull GitRepository repository) { - myProject = project; - myRepository = repository; - } - - @NotNull - public Project getProject() { - return myProject; - } - - @NotNull - public GitRepository getRepository() { - return myRepository; - } - } } diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromHistoryAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromHistoryAction.java deleted file mode 100644 index d70466bd58ef..000000000000 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromHistoryAction.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2000-2016 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 org.jetbrains.plugins.github; - -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.FilePath; -import com.intellij.openapi.vcs.VcsDataKeys; -import com.intellij.openapi.vcs.history.VcsFileRevision; -import git4idea.GitFileRevision; -import git4idea.GitRevisionNumber; -import git4idea.GitUtil; -import git4idea.repo.GitRepository; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.plugins.github.util.GithubUtil; - -public class GithubShowCommitInBrowserFromHistoryAction extends GithubShowCommitInBrowserAction { - @Override - public void update(@NotNull AnActionEvent e) { - Project project = e.getData(CommonDataKeys.PROJECT); - FilePath filePath = e.getData(VcsDataKeys.FILE_PATH); - VcsFileRevision fileRevision = e.getData(VcsDataKeys.VCS_FILE_REVISION); - if (project == null || filePath == null || fileRevision == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForFile(filePath); - boolean isOnGithub = repository != null && GithubUtil.isRepositoryOnGitHub(repository); - e.getPresentation().setEnabledAndVisible(isOnGithub && fileRevision instanceof GitFileRevision); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - Project project = e.getRequiredData(CommonDataKeys.PROJECT); - FilePath filePath = e.getRequiredData(VcsDataKeys.FILE_PATH); - VcsFileRevision fileRevision = e.getRequiredData(VcsDataKeys.VCS_FILE_REVISION); - GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForFile(filePath); - openInBrowser(project, repository, ((GitRevisionNumber)fileRevision.getRevisionNumber()).getRev()); - } -} diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromLogAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromLogAction.java deleted file mode 100644 index 95e5eaa13f2d..000000000000 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShowCommitInBrowserFromLogAction.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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 org.jetbrains.plugins.github; - -import com.intellij.openapi.actionSystem.AnActionEvent; -import com.intellij.openapi.actionSystem.CommonDataKeys; -import com.intellij.openapi.project.Project; -import com.intellij.util.containers.ContainerUtil; -import com.intellij.vcs.log.CommitId; -import com.intellij.vcs.log.Hash; -import com.intellij.vcs.log.VcsLog; -import com.intellij.vcs.log.VcsLogDataKeys; -import com.intellij.vcs.log.data.LoadingDetails; -import git4idea.GitUtil; -import git4idea.repo.GitRepository; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.plugins.github.util.GithubUtil; - -import java.util.List; - -public class GithubShowCommitInBrowserFromLogAction extends GithubShowCommitInBrowserAction { - - @Override - public void update(@NotNull AnActionEvent e) { - Project project = e.getData(CommonDataKeys.PROJECT); - VcsLog log = e.getData(VcsLogDataKeys.VCS_LOG); - if (project == null || log == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - List selectedCommits = log.getSelectedCommits(); - if (selectedCommits.size() != 1) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - CommitId commit = ContainerUtil.getFirstItem(selectedCommits); - if (commit == null) { - e.getPresentation().setEnabledAndVisible(false); - return; - } - GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForRoot(commit.getRoot()); - e.getPresentation().setEnabledAndVisible(repository != null && GithubUtil.isRepositoryOnGitHub(repository)); - } - - @Override - public void actionPerformed(@NotNull AnActionEvent e) { - Project project = e.getRequiredData(CommonDataKeys.PROJECT); - CommitId commit = ContainerUtil.getFirstItem(e.getRequiredData(VcsLogDataKeys.VCS_LOG).getSelectedCommits()); - assert commit != null; - GitRepository repository = GitUtil.getRepositoryManager(project).getRepositoryForRoot(commit.getRoot()); - openInBrowser(project, repository, commit.getHash().asString()); - } - -} diff --git a/plugins/github/src/org/jetbrains/plugins/github/util/GithubUtil.java b/plugins/github/src/org/jetbrains/plugins/github/util/GithubUtil.java index dcffc231b0ef..3dbedcd68e24 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/util/GithubUtil.java +++ b/plugins/github/src/org/jetbrains/plugins/github/util/GithubUtil.java @@ -445,11 +445,6 @@ public class GithubUtil { return findGithubRemoteUrl(repository) != null; } - public static void setVisibleEnabled(AnActionEvent e, boolean visible, boolean enabled) { - e.getPresentation().setVisible(visible); - e.getPresentation().setEnabled(enabled); - } - @NotNull public static String getErrorTextFromException(@NotNull Exception e) { if (e instanceof UnknownHostException) { diff --git a/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java b/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java index b32f77b0c03a..da64988f5b16 100644 --- a/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java +++ b/plugins/github/test/org/jetbrains/plugins/github/test/GithubTest.java @@ -206,9 +206,4 @@ public abstract class GithubTest extends GitPlatformTest { protected void afterTest() throws Exception { } - - @Override - protected boolean isRunInEdt() { - return true; - } } diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/AbstractProjectImportErrorHandler.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/AbstractProjectImportErrorHandler.java index be9121b52b42..38959f0a0728 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/AbstractProjectImportErrorHandler.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/AbstractProjectImportErrorHandler.java @@ -64,10 +64,11 @@ public abstract class AbstractProjectImportErrorHandler { if (location == null) { location = getLocationFrom(rootCause); } - if (rootCause.getCause() == null || rootCause.getCause().getMessage() == null) { + Throwable cause = rootCause.getCause(); + if (cause == null || cause.getMessage() == null && !(cause instanceof StackOverflowError)) { break; } - rootCause = rootCause.getCause(); + rootCause = cause; } //noinspection ConstantConditions return Pair.create(rootCause, location); diff --git a/plugins/gradle/testSources/org/jetbrains/plugins/gradle/compiler/GradleResourceFilteringTest.java b/plugins/gradle/testSources/org/jetbrains/plugins/gradle/compiler/GradleResourceFilteringTest.java index 0da7b2ea953b..005a60356120 100644 --- a/plugins/gradle/testSources/org/jetbrains/plugins/gradle/compiler/GradleResourceFilteringTest.java +++ b/plugins/gradle/testSources/org/jetbrains/plugins/gradle/compiler/GradleResourceFilteringTest.java @@ -215,6 +215,24 @@ public class GradleResourceFilteringTest extends GradleCompilingTestCase { assertCopied("build/resources/main/dir/file.txt", "some text myPropValue another text"); } + @Test + public void testEscapeUnicodeFilter() throws Exception { + createProjectSubFile( + "src/main/resources/dir/file.txt", "some text テキスト"); + importProject( + "apply plugin: 'java'\n" + + "\n" + + "import org.apache.tools.ant.filters.*\n" + + "processResources {\n" + + " filter (EscapeUnicode)\n" + + "}" + ); + assertModules("project", "project_main", "project_test"); + compileModules("project_main"); + + assertCopied("build/resources/main/dir/file.txt", "some text \\u30c6\\u30ad\\u30b9\\u30c8"); + } + @Test public void testFiltersChain() throws Exception { createProjectSubFile( diff --git a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/ExternalProjectBuilderImpl.groovy b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/ExternalProjectBuilderImpl.groovy index ed5056cb05cf..91efbcd0988c 100644 --- a/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/ExternalProjectBuilderImpl.groovy +++ b/plugins/gradle/tooling-extension-impl/src/org/jetbrains/plugins/gradle/tooling/builder/ExternalProjectBuilderImpl.groovy @@ -463,23 +463,26 @@ class ExternalProjectBuilderImpl implements ModelBuilderService { if(copyActions) { copyActions.each { Action action -> - if (action.hasProperty('val$filterType') && action.hasProperty('val$properties')) { + if (action.hasProperty('val$filterType')) { //noinspection GrUnresolvedAccess def filterType = (action?.val$filterType as Class).name def filter = [filterType: filterType] as DefaultExternalFilter - //noinspection GrUnresolvedAccess - def props = action?.val$properties - if (props) { - if ('org.apache.tools.ant.filters.ExpandProperties'.equals(filterType) && props['project']) { - if (props['project']) filter.propertiesAsJsonMap = new GsonBuilder().create().toJson(props['project'].properties); - } - else { - filter.propertiesAsJsonMap = new GsonBuilder().create().toJson(props); + + if(action.hasProperty('val$properties')) { + //noinspection GrUnresolvedAccess + def props = action?.val$properties + if (props) { + if ('org.apache.tools.ant.filters.ExpandProperties' == filterType && props['project']) { + if (props['project']) filter.propertiesAsJsonMap = new GsonBuilder().create().toJson(props['project'].properties); + } + else { + filter.propertiesAsJsonMap = new GsonBuilder().create().toJson(props); + } } } filterReaders << filter } - else if (action.class.simpleName.equals('RenamingCopyAction') && action.hasProperty('transformer')) { + else if (action.class.simpleName == 'RenamingCopyAction' && action.hasProperty('transformer')) { //noinspection GrUnresolvedAccess if (action.transformer.hasProperty('matcher') && action?.transformer?.hasProperty('replacement')) { //noinspection GrUnresolvedAccess diff --git a/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/GroovycOutputParser.java b/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/GroovycOutputParser.java index f0478e46d97c..3b807aca3464 100644 --- a/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/GroovycOutputParser.java +++ b/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/GroovycOutputParser.java @@ -158,6 +158,11 @@ public class GroovycOutputParser { ? BuildMessage.Kind.WARNING : BuildMessage.Kind.INFO; + if (StringUtil.isEmpty(url) || "null".equals(url)) { + url = null; + message = "While compiling " + myChunk.getPresentableShortName() + ": " + message; + } + CompilerMessage compilerMessage = new CompilerMessage("Groovyc", kind, message, url, -1, -1, -1, lineInt, columnInt); if (LOG.isDebugEnabled()) { LOG.debug("Message: " + compilerMessage); @@ -227,7 +232,7 @@ public class GroovycOutputParser { if (msg.contains(GroovyRtConstants.NO_GROOVY)) { messages.add(reportNoGroovy()); } else { - messages.add(new CompilerMessage("Groovyc", BuildMessage.Kind.INFO, msg)); + messages.add(new CompilerMessage("Groovyc", BuildMessage.Kind.INFO, "While compiling " + myChunk.getPresentableShortName() + ":" + msg)); } } diff --git a/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/JointCompilationClassLoader.java b/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/JointCompilationClassLoader.java index 00e5fc8af2cd..8ded22a10c9d 100644 --- a/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/JointCompilationClassLoader.java +++ b/plugins/groovy/jps-plugin/src/org/jetbrains/jps/incremental/groovy/JointCompilationClassLoader.java @@ -32,6 +32,18 @@ class JointCompilationClassLoader extends UrlClassLoader { myClassPath = super.getClassPath(); } + @Override + protected Class _defineClass(String name, byte[] b) { + try { + return super._defineClass(name, b); + } + catch (NoClassDefFoundError e) { + NoClassDefFoundError wrap = new NoClassDefFoundError(e.getMessage() + " needed for " + name); + wrap.initCause(e); + throw wrap; + } + } + @NotNull @Override protected ClassPath getClassPath() { diff --git a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java index 7819f1fccb2b..fdcc5a2bb95b 100644 --- a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java +++ b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovyCompilerWrapper.java @@ -73,7 +73,7 @@ public class GroovyCompilerWrapper { } catch (NoClassDefFoundError e) { final String className = e.getMessage(); - if (className.startsWith("org/apache/ivy/")) { + if (className.contains("org/apache/ivy/")) { addMessageWithoutLocation("Cannot @Grab without Ivy, please add it to your module dependencies (NoClassDefFoundError: " + className + ")", true); } else { throw e; diff --git a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovycRunner.java b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovycRunner.java index e254767a777c..0da20acd5b4f 100644 --- a/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovycRunner.java +++ b/plugins/groovy/rt/src/org/jetbrains/groovy/compiler/rt/GroovycRunner.java @@ -23,6 +23,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; import java.util.*; @@ -135,7 +136,8 @@ public class GroovycRunner { method.invoke(null, forStubs, argPath, configScript, mailbox); } catch (Throwable e) { - while (e.getCause() != null) { + //noinspection InstanceofCatchParameter + while (e instanceof InvocationTargetException) { e = e.getCause(); } e.printStackTrace(); diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenPropertiesVirtualFile.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenPropertiesVirtualFile.java index 000b855c5ac4..baa3b46c4a10 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenPropertiesVirtualFile.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/vfs/MavenPropertiesVirtualFile.java @@ -24,6 +24,7 @@ import org.jetbrains.annotations.NotNull; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.Arrays; import java.util.Properties; import java.util.Set; import java.util.TreeSet; @@ -109,7 +110,7 @@ public class MavenPropertiesVirtualFile extends VirtualFile { @Override public long getModificationStamp() { - return myContent.hashCode(); + return Arrays.hashCode(myContent); } @Override diff --git a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java index a891c10c36de..e03186c1d218 100644 --- a/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java +++ b/plugins/maven/src/test/java/org/jetbrains/idea/maven/MavenTestCase.java @@ -16,6 +16,7 @@ package org.jetbrains.idea.maven; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.application.Result; import com.intellij.openapi.application.WriteAction; import com.intellij.openapi.command.WriteCommandAction; @@ -55,7 +56,7 @@ import java.util.concurrent.TimeUnit; public abstract class MavenTestCase extends UsefulTestCase { protected static final MavenConsole NULL_MAVEN_CONSOLE = new NullMavenConsole(); // should not be static - protected static MavenProgressIndicator EMPTY_MAVEN_PROCESS = new MavenProgressIndicator(new EmptyProgressIndicator()); + protected static MavenProgressIndicator EMPTY_MAVEN_PROCESS = new MavenProgressIndicator(new EmptyProgressIndicator(ModalityState.NON_MODAL)); private File ourTempDir; diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/CustomResourceBundle.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/CustomResourceBundle.java index b6efa805ec7e..a9bc85ad7015 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/CustomResourceBundle.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/CustomResourceBundle.java @@ -21,14 +21,12 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.psi.PsiManager; -import com.intellij.util.Function; import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.List; /** @@ -92,7 +90,7 @@ public class CustomResourceBundle extends ResourceBundle { if (o == null || getClass() != o.getClass()) return false; final CustomResourceBundle resourceBundle = (CustomResourceBundle)o; - return resourceBundle.getPropertiesFiles().equals(resourceBundle.getPropertiesFiles()) && + return resourceBundle.getPropertiesFiles().equals(getPropertiesFiles()) && resourceBundle.getBaseName().equals(getBaseName()); } diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesReferenceManager.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesReferenceManager.java index 0bd2b30d54c8..a8487c8ae4f2 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesReferenceManager.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/PropertiesReferenceManager.java @@ -123,7 +123,7 @@ public class PropertiesReferenceManager { public boolean processPropertiesFiles(@NotNull final GlobalSearchScope searchScope, @NotNull final PropertiesFileProcessor processor, @NotNull final BundleNameEvaluator evaluator) { - for(VirtualFile file:FileBasedIndex.getInstance().getContainingFiles(FileTypeIndex.NAME, PropertiesFileType.INSTANCE, searchScope)) { + for(VirtualFile file:FileTypeIndex.getFiles(PropertiesFileType.INSTANCE, searchScope)) { if (!processFile(file, evaluator, processor)) return false; } if (!myDumbService.isDumb()) { diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/references/PropertyReferenceBase.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/references/PropertyReferenceBase.java index e8ea30f5dc76..bd5a0dc543c1 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/references/PropertyReferenceBase.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/references/PropertyReferenceBase.java @@ -20,11 +20,15 @@ import com.intellij.lang.properties.IProperty; import com.intellij.lang.properties.PropertiesBundle; import com.intellij.lang.properties.PropertiesImplUtil; import com.intellij.lang.properties.psi.PropertiesFile; +import com.intellij.lang.properties.xml.XmlPropertiesFileImpl; +import com.intellij.lang.properties.xml.XmlProperty; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.TextRange; +import com.intellij.pom.PomTargetPsiElement; import com.intellij.pom.references.PomService; import com.intellij.psi.*; +import com.intellij.psi.xml.XmlTag; import com.intellij.util.ArrayUtil; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.ContainerUtil; @@ -32,7 +36,6 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; -import java.util.Comparator; import java.util.List; import java.util.Set; @@ -40,7 +43,7 @@ import java.util.Set; * @author nik */ public abstract class PropertyReferenceBase implements PsiPolyVariantReference, EmptyResolveMessageProvider { - private static final Logger LOG = Logger.getInstance("#com.intellij.lang.properties.references.PropertyReferenceBase"); + private static final Logger LOG = Logger.getInstance(PropertyReferenceBase.class); protected final String myKey; protected final PsiElement myElement; protected boolean mySoft; @@ -114,6 +117,7 @@ public abstract class PropertyReferenceBase implements PsiPolyVariantReference, } public boolean isReferenceTo(PsiElement element) { + if (!isProperty(element)) return false; for (ResolveResult result : multiResolve(false)) { final PsiElement el = result.getElement(); if (el != null && el.isEquivalentTo(element)) return true; @@ -181,4 +185,17 @@ public abstract class PropertyReferenceBase implements PsiPolyVariantReference, public Object[] getVariants() { return ArrayUtil.EMPTY_OBJECT_ARRAY; } + + private static boolean isProperty(PsiElement element) { + if (element instanceof IProperty) { + return true; + } + if (element instanceof PomTargetPsiElement) { + return ((PomTargetPsiElement)element).getTarget() instanceof XmlProperty; + } + if (element instanceof XmlTag && ((XmlTag)element).getName().equals(XmlPropertiesFileImpl.ENTRY_TAG_NAME)) { + return PropertiesImplUtil.isPropertiesFile(element.getContainingFile()); + } + return false; + } } diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/xml/XmlPropertiesFileImpl.java b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/xml/XmlPropertiesFileImpl.java index 243538ca581e..f1db7c69d264 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/xml/XmlPropertiesFileImpl.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/lang/properties/xml/XmlPropertiesFileImpl.java @@ -46,6 +46,8 @@ import java.util.*; * Date: 7/26/11 */ public class XmlPropertiesFileImpl extends XmlPropertiesFile { + public static final String ENTRY_TAG_NAME = "entry"; + private static final Key> KEY = Key.create("xml properties file"); private final XmlFile myFile; @@ -62,7 +64,7 @@ public class XmlPropertiesFileImpl extends XmlPropertiesFile { XmlTag rootTag = myFile.getRootTag(); final List propertiesOrder = new ArrayList(); if (rootTag != null) { - XmlTag[] entries = rootTag.findSubTags("entry"); + XmlTag[] entries = rootTag.findSubTags(ENTRY_TAG_NAME); for (XmlTag entry : entries) { XmlProperty property = new XmlProperty(entry, this); propertiesOrder.add(property); diff --git a/plugins/properties/src/com/intellij/lang/properties/PropertiesFilesManager.java b/plugins/properties/src/com/intellij/lang/properties/PropertiesFilesManager.java index ef269a9d60de..41eff3060713 100644 --- a/plugins/properties/src/com/intellij/lang/properties/PropertiesFilesManager.java +++ b/plugins/properties/src/com/intellij/lang/properties/PropertiesFilesManager.java @@ -25,7 +25,6 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.openapi.vfs.encoding.EncodingManager; import com.intellij.psi.search.FileTypeIndex; import com.intellij.psi.search.GlobalSearchScope; -import com.intellij.util.indexing.FileBasedIndex; import org.jetbrains.annotations.NotNull; import java.beans.PropertyChangeEvent; @@ -54,8 +53,7 @@ public class PropertiesFilesManager extends AbstractProjectComponent { EncodingManager.PROP_PROPERTIES_FILES_ENCODING.equals(propertyName) ) { DumbService.getInstance(myProject).smartInvokeLater(() -> ApplicationManager.getApplication().runWriteAction(() -> { - Collection filesToRefresh = FileBasedIndex.getInstance() - .getContainingFiles(FileTypeIndex.NAME, PropertiesFileType.INSTANCE, GlobalSearchScope.allScope(myProject)); + Collection filesToRefresh = FileTypeIndex.getFiles(PropertiesFileType.INSTANCE, GlobalSearchScope.allScope(myProject)); VirtualFile[] virtualFiles = VfsUtilCore.toVirtualFileArray(filesToRefresh); FileDocumentManager.getInstance().saveAllDocuments(); diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/RepositoryLoader.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/RepositoryLoader.java index 6786d8648300..77b672c74292 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/RepositoryLoader.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/dialogs/browserCache/RepositoryLoader.java @@ -94,13 +94,7 @@ class RepositoryLoader extends Loader { ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { @Override public void run() { - ProgressManager.getInstance().runProcess(new LoadTask(data), new EmptyProgressIndicator() { - @NotNull - @Override - public ModalityState getModalityState() { - return state; - } - }); + ProgressManager.getInstance().runProcess(new LoadTask(data), new EmptyProgressIndicator(state)); } }); } diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectComponent.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectComponent.java index 3dec53619b9f..de9b472fd0ce 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectComponent.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCProjectComponent.java @@ -17,6 +17,7 @@ import com.jetbrains.edu.learning.courseFormat.Course; import com.jetbrains.edu.learning.courseFormat.Lesson; import com.jetbrains.edu.learning.courseFormat.Task; import com.jetbrains.edu.learning.courseFormat.TaskFile; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import org.jetbrains.annotations.NotNull; import java.io.File; @@ -104,6 +105,7 @@ public class CCProjectComponent extends AbstractProjectComponent { public void projectOpened() { migrateIfNeeded(); VirtualFileManager.getInstance().addVirtualFileListener(myTaskFileLifeListener); + EduUsagesCollector.projectTypeOpened(CCUtils.COURSE_MODE); } public void projectClosed() { diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCUtils.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCUtils.java index 66e036be3f03..c3cce2b1be2a 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCUtils.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/CCUtils.java @@ -224,7 +224,8 @@ public class CCUtils { Document patternDocument = StudyUtils.getPatternDocument(entry.getValue(), name); Document document = FileDocumentManager.getInstance().getDocument(child); if (document == null || patternDocument == null) { - return; + LOG.info("pattern file for " + child.getPath() + " not found"); + continue; } DocumentUtil.writeInRunUndoTransparentAction(() -> { patternDocument.replaceString(0, patternDocument.getTextLength(), document.getCharsSequence()); diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCAddAnswerPlaceholder.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCAddAnswerPlaceholder.java index 2ad1d79faf1f..7de216ebcd34 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCAddAnswerPlaceholder.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCAddAnswerPlaceholder.java @@ -54,14 +54,13 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction { } final SelectionModel model = editor.getSelectionModel(); - final int offset = model.getSelectionStart(); + final int offset = model.hasSelection() ? model.getSelectionStart() : editor.getCaretModel().getOffset(); final AnswerPlaceholder answerPlaceholder = new AnswerPlaceholder(); answerPlaceholder.setOffset(offset); answerPlaceholder.setUseLength(false); - String selectedText = model.getSelectedText(); - answerPlaceholder.setPossibleAnswer(selectedText); + answerPlaceholder.setPossibleAnswer(model.hasSelection() ? model.getSelectedText() : EduNames.PLACEHOLDER); CCCreateAnswerPlaceholderDialog dlg = new CCCreateAnswerPlaceholderDialog(project, answerPlaceholder); dlg.show(); @@ -69,6 +68,10 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction { return; } + if (!model.hasSelection()) { + DocumentUtil.writeInRunUndoTransparentAction(() -> document.insertString(offset, EduNames.PLACEHOLDER)); + } + TaskFile taskFile = state.getTaskFile(); int index = taskFile.getAnswerPlaceholders().size() + 1; answerPlaceholder.setIndex(index); @@ -147,7 +150,7 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction { presentation.setVisible(true); if (canAddPlaceholder(state) || canDeletePlaceholder(state)) { presentation.setEnabled(true); - presentation.setText((state.getAnswerPlaceholder() == null ? "Add " : "Delete ") + EduNames.PLACEHOLDER); + presentation.setText((state.getAnswerPlaceholder() == null ? "Add " : "Delete ") + EduNames.ANSWER_PLACEHOLDER); } } @@ -155,12 +158,13 @@ public class CCAddAnswerPlaceholder extends CCAnswerPlaceholderAction { private static boolean canAddPlaceholder(@NotNull CCState state) { Editor editor = state.getEditor(); SelectionModel selectionModel = editor.getSelectionModel(); - if (!selectionModel.hasSelection()) { - return false; + if (selectionModel.hasSelection()) { + int start = selectionModel.getSelectionStart(); + int end = selectionModel.getSelectionEnd(); + return !arePlaceholdersIntersect(state.getTaskFile(), start, end); } - int start = selectionModel.getSelectionStart(); - int end = selectionModel.getSelectionEnd(); - return !arePlaceholdersIntersect(state.getTaskFile(), start, end); + int offset = editor.getCaretModel().getOffset(); + return state.getTaskFile().getAnswerPlaceholder(offset) == null; } private static boolean canDeletePlaceholder(@NotNull CCState state) { diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCCreateCourseArchive.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCCreateCourseArchive.java index 50e2336444f5..013ccf4682ba 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCCreateCourseArchive.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCCreateCourseArchive.java @@ -27,6 +27,7 @@ import com.jetbrains.edu.learning.StudyTaskManager; import com.jetbrains.edu.learning.core.EduNames; import com.jetbrains.edu.learning.core.EduUtils; import com.jetbrains.edu.learning.courseFormat.*; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import org.jetbrains.annotations.NotNull; import java.io.*; @@ -71,6 +72,7 @@ public class CCCreateCourseArchive extends DumbAwareAction { return; } createCourseArchive(project, module, myZipName, myLocationDir, true); + EduUsagesCollector.createdCourseArchive(); } public static void createCourseArchive(final Project project, Module module, String zipName, String locationDir, boolean showMessage) { diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCDeleteAllAnswerPlaceholdersAction.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCDeleteAllAnswerPlaceholdersAction.java index 7c10fba712b4..d5ca9e5b8838 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCDeleteAllAnswerPlaceholdersAction.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCDeleteAllAnswerPlaceholdersAction.java @@ -28,7 +28,7 @@ import java.util.List; public class CCDeleteAllAnswerPlaceholdersAction extends DumbAwareAction { - public static final String ACTION_NAME = "Delete All " + EduNames.PLACEHOLDER + "s"; + public static final String ACTION_NAME = "Delete All " + EduNames.ANSWER_PLACEHOLDER + "s"; public CCDeleteAllAnswerPlaceholdersAction() { super(ACTION_NAME); diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCPushCourse.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCPushCourse.java index f1a1f3006bf6..2a24bb066e3d 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCPushCourse.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/actions/CCPushCourse.java @@ -10,6 +10,7 @@ import com.intellij.openapi.project.Project; import com.jetbrains.edu.coursecreator.CCUtils; import com.jetbrains.edu.learning.StudyTaskManager; import com.jetbrains.edu.learning.courseFormat.Course; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import com.jetbrains.edu.learning.stepic.EduStepicConnector; import org.jetbrains.annotations.NotNull; @@ -37,6 +38,7 @@ public class CCPushCourse extends DumbAwareAction { return; } EduStepicConnector.postCourseWithProgress(project, course); + EduUsagesCollector.courseUploaded(); } } \ No newline at end of file diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java index 09a6012c5ca7..f932a185d02d 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCCreateAnswerPlaceholderPanel.java @@ -17,6 +17,7 @@ public class CCCreateAnswerPlaceholderPanel extends JPanel { myHintText.setLineWrap(true); myHintText.setWrapStyleWord(true); myHintText.setBorder(BorderFactory.createLineBorder(JBColor.border())); + myHintText.setFont(myAnswerPlaceholderText.getFont()); myAnswerPlaceholderText.grabFocus(); } diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.form b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.form index 67b2e6c3e5fe..d4c33c0524d1 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.form +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.form @@ -1,6 +1,6 @@

- + @@ -20,7 +20,7 @@ - + @@ -46,7 +46,7 @@ - + @@ -60,14 +60,6 @@ - - - - - - - - diff --git a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.java b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.java index 5e7de6356b55..b3b141d6cb8c 100644 --- a/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.java +++ b/python/educational-core/course-creator/src/com/jetbrains/edu/coursecreator/ui/CCNewProjectPanel.java @@ -27,6 +27,7 @@ public class CCNewProjectPanel { myAuthorField.getDocument().addDocumentListener(new MyValidator()); myDescription.setBorder(BorderFactory.createLineBorder(JBColor.border())); + myDescription.setFont(myAuthorField.getFont()); } public CCNewProjectPanel(String name, String author, String description) { diff --git a/python/educational-core/student/resources/META-INF/plugin.xml b/python/educational-core/student/resources/META-INF/plugin.xml index aafd06787e4e..5e67a898cc09 100644 --- a/python/educational-core/student/resources/META-INF/plugin.xml +++ b/python/educational-core/student/resources/META-INF/plugin.xml @@ -98,6 +98,9 @@ + + + diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/StudyProjectComponent.java b/python/educational-core/student/src/com/jetbrains/edu/learning/StudyProjectComponent.java index 5a505d0bb7f3..be6f45a3abce 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/StudyProjectComponent.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/StudyProjectComponent.java @@ -35,6 +35,7 @@ import com.jetbrains.edu.learning.courseFormat.Lesson; import com.jetbrains.edu.learning.courseFormat.Task; import com.jetbrains.edu.learning.courseFormat.TaskFile; import com.jetbrains.edu.learning.editor.StudyEditorFactoryListener; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import com.jetbrains.edu.learning.ui.StudyToolWindow; import com.jetbrains.edu.learning.ui.StudyToolWindowFactory; import javafx.application.Platform; @@ -82,6 +83,7 @@ public class StudyProjectComponent implements ProjectComponent { UISettings.getInstance().HIDE_TOOL_STRIPES = false; UISettings.getInstance().fireUISettingsChanged(); registerShortcuts(); + EduUsagesCollector.projectTypeOpened(course.isAdaptive() ? EduNames.ADAPTIVE : EduNames.STUDY); } } }); diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/StudySerializationUtils.java b/python/educational-core/student/src/com/jetbrains/edu/learning/StudySerializationUtils.java index cb4524aab5cb..d9e6e10d07ae 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/StudySerializationUtils.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/StudySerializationUtils.java @@ -334,7 +334,7 @@ public class StudySerializationUtils { for (Map.Entry taskFile : taskObject.getAsJsonObject(TASK_FILES).entrySet()) { String name = taskFile.getKey(); String filePath = FileUtil.join(myCourseFile.getParent(), EduNames.LESSON + lessonIndex, EduNames.TASK + taskIndex, name); - VirtualFile resourceFile = LocalFileSystem.getInstance().findFileByIoFile(new File(filePath)); + VirtualFile resourceFile = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(filePath)); if (resourceFile == null) { continue; } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyShowHintAction.java b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyShowHintAction.java index ab390c5b0405..35b3a70bd532 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyShowHintAction.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyShowHintAction.java @@ -18,6 +18,7 @@ import com.jetbrains.edu.learning.StudyTaskManager; import com.jetbrains.edu.learning.StudyUtils; import com.jetbrains.edu.learning.courseFormat.AnswerPlaceholder; import com.jetbrains.edu.learning.courseFormat.Course; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import icons.InteractiveLearningIcons; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -59,6 +60,7 @@ public class StudyShowHintAction extends StudyActionWithShortcut { if (file == null) { return; } + EduUsagesCollector.hintShown(); String hintText = ourWarningMessage; if (answerPlaceholder != null) { String hint = answerPlaceholder.getHint(); diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyTaskNavigationAction.java b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyTaskNavigationAction.java index 614d78671fab..9e85361f40a1 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyTaskNavigationAction.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/actions/StudyTaskNavigationAction.java @@ -15,6 +15,7 @@ import com.jetbrains.edu.learning.core.EduNames; import com.jetbrains.edu.learning.courseFormat.Task; import com.jetbrains.edu.learning.courseFormat.TaskFile; import com.jetbrains.edu.learning.editor.StudyEditor; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -36,16 +37,16 @@ abstract public class StudyTaskNavigationAction extends StudyActionWithShortcut if (!studyState.isValid()) { return; } - Task nextTask = getTargetTask(studyState.getTask()); - if (nextTask == null) { + Task targetTask = getTargetTask(studyState.getTask()); + if (targetTask == null) { return; } for (VirtualFile file : FileEditorManager.getInstance(project).getOpenFiles()) { FileEditorManager.getInstance(project).closeFile(file); } - int nextTaskIndex = nextTask.getIndex(); - int lessonIndex = nextTask.getLesson().getIndex(); - Map nextTaskFiles = nextTask.getTaskFiles(); + int nextTaskIndex = targetTask.getIndex(); + int lessonIndex = targetTask.getLesson().getIndex(); + Map nextTaskFiles = targetTask.getTaskFiles(); VirtualFile projectDir = project.getBaseDir(); String lessonDirName = EduNames.LESSON + String.valueOf(lessonIndex); if (projectDir == null) { @@ -64,7 +65,7 @@ abstract public class StudyTaskNavigationAction extends StudyActionWithShortcut ProjectView.getInstance(project).select(taskDir, taskDir, false); return; } - + EduUsagesCollector.taskNavigation(); VirtualFile shouldBeActive = getFileToActivate(project, nextTaskFiles, taskDir); updateProjectView(project, shouldBeActive); diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduNames.java b/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduNames.java index cf6d4fd21c2e..48fb4c23ef4a 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduNames.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/core/EduNames.java @@ -40,11 +40,14 @@ public class EduNames { public static final String SANDBOX_DIR = "Sandbox"; public static final String COURSE_META_FILE = "course.json"; - public static final String STUDY = "Study"; public static final String PYCHARM_ADDITIONAL = "PyCharm additional materials"; public static final String PYCHARM = "PyCharm"; - public static final String PLACEHOLDER = "Answer Placeholder"; + public static final String STUDY = "Study"; + public static final String ADAPTIVE = "Adaptive"; + + public static final String ANSWER_PLACEHOLDER = "Answer Placeholder"; + public static final String PLACEHOLDER = "placeholder"; public static final String SRC = "src"; private EduNames() { } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java b/python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java index 8cef6f48da9c..6f5ccf8c6a16 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/courseGeneration/StudyProjectGenerator.java @@ -33,6 +33,7 @@ import com.jetbrains.edu.learning.courseFormat.Course; import com.jetbrains.edu.learning.courseFormat.Lesson; import com.jetbrains.edu.learning.courseFormat.Task; import com.jetbrains.edu.learning.courseFormat.TaskFile; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import com.jetbrains.edu.learning.stepic.CourseInfo; import com.jetbrains.edu.learning.stepic.EduStepicConnector; import com.jetbrains.edu.learning.stepic.StepicUser; @@ -102,6 +103,7 @@ public class StudyProjectGenerator { VirtualFileManager.getInstance().refreshWithoutFileWatcher(true); StudyProjectComponent.getInstance(project).registerStudyToolWindow(course); openFirstTask(course, project); + EduUsagesCollector.projectTypeCreated(course.isAdaptive() ? EduNames.ADAPTIVE : EduNames.STUDY); }); } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/statistics/EduUsagesCollector.java b/python/educational-core/student/src/com/jetbrains/edu/learning/statistics/EduUsagesCollector.java new file mode 100644 index 000000000000..f500a1ee179e --- /dev/null +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/statistics/EduUsagesCollector.java @@ -0,0 +1,84 @@ +/* + * Copyright 2000-2016 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.jetbrains.edu.learning.statistics; + +import com.intellij.internal.statistic.CollectUsagesException; +import com.intellij.internal.statistic.UsagesCollector; +import com.intellij.internal.statistic.beans.GroupDescriptor; +import com.intellij.internal.statistic.beans.UsageDescriptor; +import com.intellij.openapi.components.ServiceManager; +import com.intellij.util.containers.FactoryMap; +import com.intellij.util.containers.hash.HashSet; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.Set; + +public class EduUsagesCollector extends UsagesCollector { + private static final String GROUP_ID = "educational"; + + private final FactoryMap myUsageDescriptors = new FactoryMap() { + @Nullable + @Override + protected UsageDescriptor create(String key) { + return new UsageDescriptor(key, 0); + } + }; + + public static void projectTypeCreated(@NotNull String projectTypeId) { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("project.created." + projectTypeId).advance(); + } + + public static void projectTypeOpened(@NotNull String projectTypeId) { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("project.opened." + projectTypeId).advance(); + } + + public static void taskChecked() { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("checkTask.").advance(); + } + + public static void hintShown() { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("showHint.").advance(); + } + + public static void taskNavigation() { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("navigateToTask.").advance(); + } + + public static void courseUploaded() { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("uploadCourse.").advance(); + } + + public static void createdCourseArchive() { + ServiceManager.getService(EduUsagesCollector.class).myUsageDescriptors.get("courseArchive.").advance(); + } + + @NotNull + @Override + public Set getUsages() throws CollectUsagesException { + HashSet descriptors = new HashSet<>(); + descriptors.addAll(myUsageDescriptors.values()); + myUsageDescriptors.clear(); + return descriptors; + } + + + @NotNull + @Override + public GroupDescriptor getGroupId() { + return GroupDescriptor.create(GROUP_ID); + } +} diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/stepic/EduStepicConnector.java b/python/educational-core/student/src/com/jetbrains/edu/learning/stepic/EduStepicConnector.java index 665586af22a2..e472f4350d0d 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/stepic/EduStepicConnector.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/stepic/EduStepicConnector.java @@ -1,6 +1,8 @@ package com.jetbrains.edu.learning.stepic; -import com.google.gson.*; +import com.google.gson.FieldNamingPolicy; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.ModalityState; import com.intellij.openapi.diagnostic.Logger; @@ -297,6 +299,9 @@ public class EduStepicConnector { info.addAuthor(author); } + String name = info.getName().replaceAll("[^a-zA-Z0-9\\s]", ""); + info.setName(name.trim()); + result.add(info); } } diff --git a/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyNewProjectPanel.java b/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyNewProjectPanel.java index 5b89e8bf62a8..fce2da4a59db 100644 --- a/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyNewProjectPanel.java +++ b/python/educational-core/student/src/com/jetbrains/edu/learning/ui/StudyNewProjectPanel.java @@ -105,6 +105,7 @@ public class StudyNewProjectPanel extends JPanel implements PanelWithAnchor { myDescriptionPane.setEnabled(true); myAuthorLabel.setEnabled(true); myDescriptionPane.setPreferredSize(new Dimension(150, 100)); + myDescriptionPane.setFont(coursesCombo.getFont()); myInfoPanel.add(myAuthorLabel); myInfoPanel.add(myDescriptionPane); myInfoPanel.setBorder(BorderFactory.createLineBorder(new JBColor(10067616, 10067616))); diff --git a/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/PyCCProjectGenerator.java b/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/PyCCProjectGenerator.java index 4af7914d2da4..b0b612df6f2e 100644 --- a/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/PyCCProjectGenerator.java +++ b/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/PyCCProjectGenerator.java @@ -24,6 +24,7 @@ import com.jetbrains.edu.learning.StudyProjectComponent; import com.jetbrains.edu.learning.StudyTaskManager; import com.jetbrains.edu.learning.core.EduNames; import com.jetbrains.edu.learning.courseFormat.Course; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import com.jetbrains.python.PythonLanguage; import com.jetbrains.python.newProject.PythonProjectGenerator; import icons.CourseCreatorPythonIcons; @@ -63,6 +64,7 @@ public class PyCCProjectGenerator extends PythonProjectGenerator implements Dire @NotNull final String name, @NotNull final String[] authors, @NotNull final String description) { final Course course = getCourse(project, name, authors, description); + EduUsagesCollector.projectTypeCreated(CCUtils.COURSE_MODE); final PsiDirectory projectDir = PsiManager.getInstance(project).findDirectory(baseDir); if (projectDir == null) return; diff --git a/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/run/PyCCCommandLineState.java b/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/run/PyCCCommandLineState.java index f4678a97a665..bb2264dbc18d 100644 --- a/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/run/PyCCCommandLineState.java +++ b/python/educational-python/course-creator-python/src/com/jetbrains/edu/coursecreator/run/PyCCCommandLineState.java @@ -10,6 +10,7 @@ import com.intellij.execution.process.ProcessEvent; import com.intellij.execution.process.ProcessHandler; import com.intellij.execution.runners.ExecutionEnvironment; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.openapi.fileEditor.impl.text.TextEditorProvider; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.vfs.LocalFileSystem; @@ -22,11 +23,13 @@ import com.jetbrains.edu.learning.core.EduNames; import com.jetbrains.edu.learning.core.EduUtils; import com.jetbrains.edu.learning.courseFormat.Course; import com.jetbrains.edu.learning.courseFormat.Task; +import com.jetbrains.edu.learning.courseFormat.TaskFile; import com.jetbrains.python.run.CommandLinePatcher; import com.jetbrains.python.run.PythonCommandLineState; -import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.io.File; +import java.util.Map; public class PyCCCommandLineState extends PythonCommandLineState { private final PyCCRunTestConfiguration myRunConfiguration; @@ -58,16 +61,36 @@ public class PyCCCommandLineState extends PythonCommandLineState { group.addParameter(myRunConfiguration.getPathToTest()); group.addParameter(new File(course.getCourseDirectory()).getPath()); - group.addParameter(getFirstTaskFilePath()); + String path = getFirstTaskFilePath(); + if (path != null) { + group.addParameter(path); + } } - @NotNull + @Nullable private String getFirstTaskFilePath() { - String firstTaskFileName = StudyUtils.getFirst(myTask.getTaskFiles().keySet()); + for (Map.Entry entry : myTask.getTaskFiles().entrySet()) { + String path = getTaskFilePath(entry.getKey()); + if (!entry.getValue().getAnswerPlaceholders().isEmpty()) { + return path; + } + VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByPath(path); + if (virtualFile == null) { + continue; + } + if (TextEditorProvider.isTextFile(virtualFile)) { + return path; + } + } + return null; + } + + + private String getTaskFilePath(String name) { String taskDirPath = FileUtil.toSystemDependentName(myTaskDir.getPath()); return myTaskDir.findChild(EduNames.SRC) != null ? - FileUtil.join(taskDirPath, EduNames.SRC, firstTaskFileName) : - FileUtil.join(taskDirPath, firstTaskFileName); + FileUtil.join(taskDirPath, EduNames.SRC, name) : + FileUtil.join(taskDirPath, name); } @Override diff --git a/python/educational-python/resources/pycharm_edu_about.png b/python/educational-python/resources/pycharm_edu_about.png index c194f3e14a08..9fa130e0f2ec 100644 Binary files a/python/educational-python/resources/pycharm_edu_about.png and b/python/educational-python/resources/pycharm_edu_about.png differ diff --git a/python/educational-python/resources/pycharm_edu_about@2x.png b/python/educational-python/resources/pycharm_edu_about@2x.png index 27cf95447f8f..9676c0a20fc6 100644 Binary files a/python/educational-python/resources/pycharm_edu_about@2x.png and b/python/educational-python/resources/pycharm_edu_about@2x.png differ diff --git a/python/educational-python/resources/pycharm_edu_logo.png b/python/educational-python/resources/pycharm_edu_logo.png index d755d009ec2f..b88268330c0d 100644 Binary files a/python/educational-python/resources/pycharm_edu_logo.png and b/python/educational-python/resources/pycharm_edu_logo.png differ diff --git a/python/educational-python/resources/pycharm_edu_logo@2x.png b/python/educational-python/resources/pycharm_edu_logo@2x.png index 47ad226316c6..cc9b392479e5 100644 Binary files a/python/educational-python/resources/pycharm_edu_logo@2x.png and b/python/educational-python/resources/pycharm_edu_logo@2x.png differ diff --git a/python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyCheckAction.java b/python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyCheckAction.java index b3252a761426..9bea1b5a731a 100644 --- a/python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyCheckAction.java +++ b/python/educational-python/student-python/src/com/jetbrains/edu/learning/PyStudyCheckAction.java @@ -21,6 +21,7 @@ import com.jetbrains.edu.learning.courseFormat.StudyStatus; import com.jetbrains.edu.learning.courseFormat.Task; import com.jetbrains.edu.learning.courseFormat.TaskFile; import com.jetbrains.edu.learning.editor.StudyEditor; +import com.jetbrains.edu.learning.statistics.EduUsagesCollector; import com.jetbrains.edu.learning.ui.StudyToolWindow; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -32,6 +33,7 @@ public class PyStudyCheckAction extends StudyCheckAction { public static final String ACTION_ID = "PyCheckAction"; public void check(@NotNull Project project) { + EduUsagesCollector.taskChecked(); ApplicationManager.getApplication().runWriteAction(() -> CommandProcessor.getInstance().runUndoTransparentAction(() -> { final StudyEditor selectedEditor = StudyUtils.getSelectedStudyEditor(project); if (selectedEditor == null) return; diff --git a/python/helpers/pycharm/_jb_tox_runner.py b/python/helpers/pycharm/_jb_tox_runner.py index 2b82041edb79..57abbc16596e 100644 --- a/python/helpers/pycharm/_jb_tox_runner.py +++ b/python/helpers/pycharm/_jb_tox_runner.py @@ -81,27 +81,26 @@ class _MySession(tox_session.Session): class _Unit2(object): - def fix(self, command, dir_to_run, bin): + def fix(self, command, bin): if command[0] == "unit2": - return [bin, os.path.join(helpers_dir, "utrunner.py"), dir_to_run] + command[1:] + ["true"] + return [bin, os.path.join(helpers_dir, "utrunner.py")] + command[1:] + ["true"] elif command == ["python", "-m", "unittest", "discover"]: - return [bin, os.path.join(helpers_dir, "utrunner.py"), dir_to_run, "true"] + return [bin, os.path.join(helpers_dir, "utrunner.py"), "true"] return None class _PyTest(object): - def fix(self, command, dir_to_run, bin): + def fix(self, command, bin): if command[0] != "py.test": return None - normal_path = os.path.normpath(dir_to_run) + os.sep - return [bin, os.path.join(helpers_dir, "pytestrunner.py"), "-p", "pytest_teamcity", normal_path] + command[1:] + return [bin, os.path.join(helpers_dir, "pytestrunner.py"), "-p", "pytest_teamcity"] + command[1:] class _Nose(object): - def fix(self, command, dir_to_run, bin): + def fix(self, command, bin): if command[0] != "nosetests": return None - return [bin, os.path.join(helpers_dir, "noserunner.py"), dir_to_run] + command[1:] + return [bin, os.path.join(helpers_dir, "noserunner.py")] + command[1:] _RUNNERS = [_Unit2(), _PyTest(), _Nose()] @@ -116,10 +115,9 @@ for env, tmp_config in config.envconfigs.items(): continue for fixer in _RUNNERS: _env = config.envconfigs[env] - dir_to_run = str(_env.changedir) for i, command in enumerate(commands): if command: - fixed_command = fixer.fix(command, dir_to_run, str(_env.envpython)) + fixed_command = fixer.fix(command, str(_env.envpython)) if fixed_command: commands[i] = fixed_command tmp_config.commands = commands diff --git a/python/helpers/pycharm/utrunner.py b/python/helpers/pycharm/utrunner.py index 180dada8d602..f387e2c824d4 100644 --- a/python/helpers/pycharm/utrunner.py +++ b/python/helpers/pycharm/utrunner.py @@ -122,6 +122,9 @@ if __name__ == "__main__": all = unittest.TestSuite() pure_unittest = True + if len(sys.argv) == 2: # If folder not provided, we need pretend folder is current + sys.argv.insert(1, ".") + options = {} for arg in sys.argv[1:-1]: arg = arg.strip() diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py b/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py index 698e52ffbfa8..5ecdaeb85a65 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py @@ -52,6 +52,7 @@ if IS_JYTHON: IS_JYTH_LESS25 = True CYTHON_SUPPORTED = False +GC_SUPPORTED = False try: import platform @@ -60,6 +61,7 @@ except: pass else: if python_implementation == 'CPython': + GC_SUPPORTED = True # Only available for CPython! if ( (sys.version_info[0] == 2 and sys.version_info[1] >= 7) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython.c b/python/helpers/pydev/_pydevd_bundle/pydevd_cython.c index b8d925229992..7a558460a162 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_cython.c +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_cython.c @@ -456,7 +456,6 @@ static const char *__pyx_f[] = { /*--- Type declarations ---*/ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer; -struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values; /* "_pydevd_bundle/pydevd_cython.pyx":16 * #======================================================================================================================= @@ -484,7 +483,7 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo { }; -/* "_pydevd_bundle/pydevd_cython.pyx":965 +/* "_pydevd_bundle/pydevd_cython.pyx":950 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: # <<<<<<<<<<<<<< @@ -497,19 +496,6 @@ struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer { }; -/* "_pydevd_bundle/pydevd_cython.pyx":466 - * thread = None - * - * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< - * - * def get_full_name_if_method(func_name): - */ -struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values { - PyObject_HEAD - PyObject *__pyx_v_frame; -}; - - /* --- Runtime support code (head) --- */ #ifndef CYTHON_REFNANNY #define CYTHON_REFNANNY 0 @@ -696,10 +682,6 @@ static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 @@ -786,6 +768,8 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, i PyObject_RichCompare(op1, op2, Py_EQ) #endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); + static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); @@ -838,7 +822,6 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /* Module declarations from '_pydevd_bundle.pydevd_cython' */ static PyTypeObject *__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = 0; static PyTypeObject *__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = 0; -static PyTypeObject *__pyx_ptype_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values = 0; #define __Pyx_MODULE_NAME "_pydevd_bundle.pydevd_cython" int __pyx_module_is_main__pydevd_bundle__pydevd_cython = 0; @@ -856,18 +839,18 @@ static PyObject *__pyx_builtin_Exception; static char __pyx_k_[] = ""; static char __pyx_k_f[] = "f"; static char __pyx_k_t[] = "t"; -static char __pyx_k__5[] = "."; -static char __pyx_k__8[] = "?"; +static char __pyx_k__7[] = "?"; static char __pyx_k_id[] = "id"; static char __pyx_k_os[] = "os"; static char __pyx_k_re[] = "re"; static char __pyx_k_tb[] = "tb"; -static char __pyx_k__31[] = "_"; +static char __pyx_k__30[] = "_"; static char __pyx_k_arg[] = "arg"; static char __pyx_k_doc[] = "__doc__"; static char __pyx_k_get[] = "get"; static char __pyx_k_msg[] = "msg"; static char __pyx_k_run[] = "run"; +static char __pyx_k_s_s[] = "%s.%s"; static char __pyx_k_sys[] = "sys"; static char __pyx_k_val[] = "val"; static char __pyx_k_None[] = "None"; @@ -875,7 +858,6 @@ static char __pyx_k_args[] = "args"; static char __pyx_k_back[] = "back"; static char __pyx_k_base[] = "base"; static char __pyx_k_call[] = "call"; -static char __pyx_k_code[] = "__code__"; static char __pyx_k_eval[] = "eval"; static char __pyx_k_flag[] = "flag"; static char __pyx_k_info[] = "info"; @@ -883,14 +865,13 @@ static char __pyx_k_init[] = "__init__"; static char __pyx_k_join[] = "join"; static char __pyx_k_line[] = "line"; static char __pyx_k_main[] = "__main__"; -static char __pyx_k_name[] = "__name__"; +static char __pyx_k_name[] = "name"; static char __pyx_k_path[] = "path"; static char __pyx_k_self[] = "self"; static char __pyx_k_stat[] = "stat"; static char __pyx_k_stop[] = "stop"; static char __pyx_k_test[] = "__test__"; static char __pyx_k_Error[] = "\n\nError:\n"; -static char __pyx_k_class[] = "__class__"; static char __pyx_k_clear[] = "clear"; static char __pyx_k_debug[] = "debug"; static char __pyx_k_error[] = "error"; @@ -914,9 +895,7 @@ static char __pyx_k_f_code[] = "f_code"; static char __pyx_k_import[] = "__import__"; static char __pyx_k_kwargs[] = "kwargs"; static char __pyx_k_merged[] = "merged"; -static char __pyx_k_method[] = "method"; static char __pyx_k_module[] = ""; -static char __pyx_k_name_2[] = "name"; static char __pyx_k_plugin[] = "plugin"; static char __pyx_k_result[] = "result"; static char __pyx_k_retVal[] = "retVal"; @@ -933,7 +912,6 @@ static char __pyx_k_f_trace[] = "f_trace"; static char __pyx_k_getline[] = "getline"; static char __pyx_k_inspect[] = "inspect"; static char __pyx_k_invalid[] = ".invalid."; -static char __pyx_k_isclass[] = "isclass"; static char __pyx_k_os_path[] = "os.path"; static char __pyx_k_prepare[] = "__prepare__"; static char __pyx_k_st_size[] = "st_size"; @@ -943,6 +921,7 @@ static char __pyx_k_weakref[] = "weakref"; static char __pyx_k_SetTrace[] = "SetTrace"; static char __pyx_k_basename[] = "basename"; static char __pyx_k_can_skip[] = "can_skip"; +static char __pyx_k_cls_name[] = "cls_name"; static char __pyx_k_co_flags[] = "co_flags"; static char __pyx_k_code_obj[] = "code_obj"; static char __pyx_k_dict_pop[] = "dict_pop"; @@ -967,7 +946,6 @@ static char __pyx_k_dict_keys[] = "dict_keys"; static char __pyx_k_exception[] = "exception"; static char __pyx_k_f_globals[] = "f_globals"; static char __pyx_k_file_type[] = "file_type"; -static char __pyx_k_func_code[] = "func_code"; static char __pyx_k_func_name[] = "func_name"; static char __pyx_k_last_stat[] = "last_stat"; static char __pyx_k_linecache[] = "linecache"; @@ -995,7 +973,6 @@ static char __pyx_k_DEBUG_START[] = "DEBUG_START"; static char __pyx_k_ImportError[] = "ImportError"; static char __pyx_k_breakpoints[] = "breakpoints"; static char __pyx_k_co_filename[] = "co_filename"; -static char __pyx_k_co_varnames[] = "co_varnames"; static char __pyx_k_just_raised[] = "just_raised"; static char __pyx_k_plugin_stop[] = "plugin_stop"; static char __pyx_k_pydevd_vars[] = "pydevd_vars"; @@ -1019,8 +996,8 @@ static char __pyx_k_cmd_step_over[] = "cmd_step_over"; static char __pyx_k_currentThread[] = "currentThread"; static char __pyx_k_dict_contains[] = "dict_contains"; static char __pyx_k_extract_stack[] = "extract_stack"; -static char __pyx_k_first_arg_obj[] = "first_arg_obj"; static char __pyx_k_get_file_type[] = "get_file_type"; +static char __pyx_k_get_func_name[] = "get_func_name"; static char __pyx_k_get_thread_id[] = "get_thread_id"; static char __pyx_k_lines_ignored[] = "lines_ignored"; static char __pyx_k_main_debugger[] = "main_debugger"; @@ -1032,7 +1009,6 @@ static char __pyx_k_PYTHON_SUSPEND[] = "PYTHON_SUSPEND"; static char __pyx_k_TRACE_PROPERTY[] = "TRACE_PROPERTY"; static char __pyx_k_curr_func_name[] = "curr_func_name"; static char __pyx_k_current_frames[] = "_current_frames"; -static char __pyx_k_first_arg_name[] = "first_arg_name"; static char __pyx_k_get_breakpoint[] = "get_breakpoint"; static char __pyx_k_output_checker[] = "output_checker"; static char __pyx_k_plugin_manager[] = "plugin_manager"; @@ -1045,7 +1021,6 @@ static char __pyx_k_check_trace_obj[] = "check_trace_obj"; static char __pyx_k_dict_iter_items[] = "dict_iter_items"; static char __pyx_k_do_wait_suspend[] = "do_wait_suspend"; static char __pyx_k_exception_break[] = "exception_break"; -static char __pyx_k_first_arg_class[] = "first_arg_class"; static char __pyx_k_from_user_input[] = "from_user_input"; static char __pyx_k_is_thread_alive[] = "is_thread_alive"; static char __pyx_k_thread_analyser[] = "thread_analyser"; @@ -1076,6 +1051,7 @@ static char __pyx_k_is_filter_libraries[] = "is_filter_libraries"; static char __pyx_k_IGNORE_EXCEPTION_TAG[] = "IGNORE_EXCEPTION_TAG"; static char __pyx_k_breakpoints_for_file[] = "breakpoints_for_file"; static char __pyx_k_exception_breakpoint[] = "exception_breakpoint"; +static char __pyx_k_get_clsname_for_code[] = "get_clsname_for_code"; static char __pyx_k_manage_return_values[] = "manage_return_values"; static char __pyx_k_overwrite_prev_trace[] = "overwrite_prev_trace"; static char __pyx_k_CMD_STEP_INTO_MY_CODE[] = "CMD_STEP_INTO_MY_CODE"; @@ -1090,7 +1066,6 @@ static char __pyx_k_add_exception_to_frame[] = "add_exception_to_frame"; static char __pyx_k_has_plugin_line_breaks[] = "has_plugin_line_breaks"; static char __pyx_k_kill_all_pydev_threads[] = "kill_all_pydev_threads"; static char __pyx_k_threadingCurrentThread[] = "threadingCurrentThread"; -static char __pyx_k_get_full_name_if_method[] = "get_full_name_if_method"; static char __pyx_k_pydevd_traceproperty_py[] = "pydevd_traceproperty.py"; static char __pyx_k_PyDBFrame_trace_dispatch[] = "PyDBFrame.trace_dispatch"; static char __pyx_k_finish_debugging_session[] = "_finish_debugging_session"; @@ -1111,6 +1086,7 @@ static char __pyx_k_add_additional_frame_by_id[] = "add_additional_frame_by_id"; static char __pyx_k_break_on_caught_exceptions[] = "break_on_caught_exceptions"; static char __pyx_k_notify_on_first_raise_only[] = "notify_on_first_raise_only"; static char __pyx_k_pydevd_bundle_pydevd_frame[] = "_pydevd_bundle.pydevd_frame"; +static char __pyx_k_pydevd_bundle_pydevd_utils[] = "_pydevd_bundle.pydevd_utils"; static char __pyx_k_State_s_Stop_s_Cmd_s_Kill_s[] = "State:%s Stop:%s Cmd: %s Kill:%s"; static char __pyx_k_has_plugin_exception_breaks[] = "has_plugin_exception_breaks"; static char __pyx_k_pydevd_bundle_pydevd_cython[] = "_pydevd_bundle.pydevd_cython"; @@ -1134,7 +1110,7 @@ static char __pyx_k_pydevd_bundle_pydevd_kill_all_p[] = "_pydevd_bundle.pydevd_k static char __pyx_k_set_trace_for_frame_and_parents[] = "set_trace_for_frame_and_parents"; static char __pyx_k_suspend_on_breakpoint_exception[] = "suspend_on_breakpoint_exception"; static char __pyx_k_Error_while_evaluating_expressio[] = "Error while evaluating expression: %s\n"; -static char __pyx_k_PyDBFrame_manage_return_values_l[] = "PyDBFrame.manage_return_values..get_full_name_if_method"; +static char __pyx_k_PyDBFrame_manage_return_values_l[] = "PyDBFrame.manage_return_values..get_func_name"; static char __pyx_k_PyDBFrame_should_stop_on_excepti[] = "PyDBFrame.should_stop_on_exception"; static char __pyx_k_This_makes_the_tracing_for_a_giv[] = "This makes the tracing for a given frame, so, the trace_dispatch\n is used initially when we enter into a new context ('call') and then\n is reused for the entire context.\n "; static char __pyx_k_This_method_should_not_be_called[] = "This method should not be called on cython (PyDbFrame should be used directly)."; @@ -1194,9 +1170,8 @@ static PyObject *__pyx_n_s_SystemExit; static PyObject *__pyx_n_s_TRACE_PROPERTY; static PyObject *__pyx_kp_s_This_makes_the_tracing_for_a_giv; static PyObject *__pyx_kp_s_This_method_should_not_be_called; -static PyObject *__pyx_n_s__31; -static PyObject *__pyx_kp_s__5; -static PyObject *__pyx_kp_s__8; +static PyObject *__pyx_n_s__30; +static PyObject *__pyx_kp_s__7; static PyObject *__pyx_n_s_add_additional_frame_by_id; static PyObject *__pyx_n_s_add_exception_to_frame; static PyObject *__pyx_n_s_additional_info; @@ -1220,15 +1195,13 @@ static PyObject *__pyx_n_s_can_not_skip; static PyObject *__pyx_n_s_can_skip; static PyObject *__pyx_n_s_check_trace_obj; static PyObject *__pyx_n_s_checkcache; -static PyObject *__pyx_n_s_class; static PyObject *__pyx_n_s_clear; +static PyObject *__pyx_n_s_cls_name; static PyObject *__pyx_n_s_cmd_step_into; static PyObject *__pyx_n_s_cmd_step_over; static PyObject *__pyx_n_s_co_filename; static PyObject *__pyx_n_s_co_flags; static PyObject *__pyx_n_s_co_name; -static PyObject *__pyx_n_s_co_varnames; -static PyObject *__pyx_n_s_code; static PyObject *__pyx_n_s_code_obj; static PyObject *__pyx_n_s_compile; static PyObject *__pyx_n_s_condition; @@ -1271,23 +1244,20 @@ static PyObject *__pyx_n_s_filename_to_lines_where_exceptio; static PyObject *__pyx_n_s_filename_to_stat_info; static PyObject *__pyx_n_s_finish_debugging_session; static PyObject *__pyx_n_s_first_appearance_in_scope; -static PyObject *__pyx_n_s_first_arg_class; -static PyObject *__pyx_n_s_first_arg_name; -static PyObject *__pyx_n_s_first_arg_obj; static PyObject *__pyx_n_s_first_breakpoint_reached; static PyObject *__pyx_n_s_flag; static PyObject *__pyx_n_s_format_exception_only; static PyObject *__pyx_n_s_frame; static PyObject *__pyx_n_s_frame_id_to_frame; static PyObject *__pyx_n_s_from_user_input; -static PyObject *__pyx_n_s_func_code; static PyObject *__pyx_n_s_func_name; static PyObject *__pyx_n_s_get; static PyObject *__pyx_n_s_get_abs_path_real_path_and_base; static PyObject *__pyx_n_s_get_breakpoint; +static PyObject *__pyx_n_s_get_clsname_for_code; static PyObject *__pyx_n_s_get_exception_breakpoint; static PyObject *__pyx_n_s_get_file_type; -static PyObject *__pyx_n_s_get_full_name_if_method; +static PyObject *__pyx_n_s_get_func_name; static PyObject *__pyx_n_s_get_thread_id; static PyObject *__pyx_n_s_getline; static PyObject *__pyx_n_s_handle_exception; @@ -1310,7 +1280,6 @@ static PyObject *__pyx_n_s_is_filter_enabled; static PyObject *__pyx_n_s_is_filter_libraries; static PyObject *__pyx_n_s_is_ignored_by_filters; static PyObject *__pyx_n_s_is_thread_alive; -static PyObject *__pyx_n_s_isclass; static PyObject *__pyx_n_s_join; static PyObject *__pyx_n_s_just_raised; static PyObject *__pyx_n_s_kill_all_pydev_threads; @@ -1326,12 +1295,10 @@ static PyObject *__pyx_n_s_manage_return_values; static PyObject *__pyx_n_s_match; static PyObject *__pyx_n_s_merged; static PyObject *__pyx_n_s_metaclass; -static PyObject *__pyx_n_s_method; static PyObject *__pyx_kp_s_module; static PyObject *__pyx_n_s_module_2; static PyObject *__pyx_n_s_msg; static PyObject *__pyx_n_s_name; -static PyObject *__pyx_n_s_name_2; static PyObject *__pyx_n_s_need_trace_return; static PyObject *__pyx_n_s_new_frame; static PyObject *__pyx_n_s_not_in_scope; @@ -1365,6 +1332,7 @@ static PyObject *__pyx_n_s_pydevd_bundle_pydevd_frame_util; static PyObject *__pyx_n_s_pydevd_bundle_pydevd_kill_all_p; static PyObject *__pyx_n_s_pydevd_bundle_pydevd_signature; static PyObject *__pyx_n_s_pydevd_bundle_pydevd_tracing; +static PyObject *__pyx_n_s_pydevd_bundle_pydevd_utils; static PyObject *__pyx_n_s_pydevd_dont_trace; static PyObject *__pyx_n_s_pydevd_file_utils; static PyObject *__pyx_kp_s_pydevd_py; @@ -1380,6 +1348,7 @@ static PyObject *__pyx_n_s_result; static PyObject *__pyx_n_s_retVal; static PyObject *__pyx_n_s_return; static PyObject *__pyx_n_s_run; +static PyObject *__pyx_kp_s_s_s; static PyObject *__pyx_n_s_self; static PyObject *__pyx_n_s_send_caught_exception_stack; static PyObject *__pyx_n_s_send_caught_exception_stack_proc; @@ -1478,7 +1447,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_6trace_exc static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_8trace_return(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_10should_stop_on_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, CYTHON_UNUSED PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12handle_exception(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_full_name_if_method(PyObject *__pyx_self, PyObject *__pyx_v_func_name); /* proto */ +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_func_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_return_values(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_py_db, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg); /* proto */ @@ -1489,41 +1458,40 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__se static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_4__del__(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *__pyx_v_self); /* proto */ static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython_ThreadTracer(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_neg_1; static PyObject *__pyx_tuple__2; static PyObject *__pyx_tuple__3; static PyObject *__pyx_tuple__4; -static PyObject *__pyx_tuple__6; +static PyObject *__pyx_tuple__5; +static PyObject *__pyx_tuple__8; static PyObject *__pyx_tuple__9; -static PyObject *__pyx_tuple__10; +static PyObject *__pyx_tuple__11; static PyObject *__pyx_tuple__12; static PyObject *__pyx_tuple__13; static PyObject *__pyx_tuple__14; -static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__17; -static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__21; -static PyObject *__pyx_tuple__23; -static PyObject *__pyx_tuple__25; -static PyObject *__pyx_tuple__27; -static PyObject *__pyx_tuple__29; -static PyObject *__pyx_tuple__32; -static PyObject *__pyx_tuple__34; -static PyObject *__pyx_codeobj__7; -static PyObject *__pyx_codeobj__11; -static PyObject *__pyx_codeobj__16; -static PyObject *__pyx_codeobj__18; -static PyObject *__pyx_codeobj__20; -static PyObject *__pyx_codeobj__22; -static PyObject *__pyx_codeobj__24; -static PyObject *__pyx_codeobj__26; -static PyObject *__pyx_codeobj__28; -static PyObject *__pyx_codeobj__30; -static PyObject *__pyx_codeobj__33; -static PyObject *__pyx_codeobj__35; +static PyObject *__pyx_tuple__16; +static PyObject *__pyx_tuple__18; +static PyObject *__pyx_tuple__20; +static PyObject *__pyx_tuple__22; +static PyObject *__pyx_tuple__24; +static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__28; +static PyObject *__pyx_tuple__31; +static PyObject *__pyx_tuple__33; +static PyObject *__pyx_codeobj__6; +static PyObject *__pyx_codeobj__10; +static PyObject *__pyx_codeobj__15; +static PyObject *__pyx_codeobj__17; +static PyObject *__pyx_codeobj__19; +static PyObject *__pyx_codeobj__21; +static PyObject *__pyx_codeobj__23; +static PyObject *__pyx_codeobj__25; +static PyObject *__pyx_codeobj__27; +static PyObject *__pyx_codeobj__29; +static PyObject *__pyx_codeobj__32; +static PyObject *__pyx_codeobj__34; /* "_pydevd_bundle/pydevd_cython.pyx":55 * # ENDIF @@ -8014,7 +7982,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_12handle_e * * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< * - * def get_full_name_if_method(func_name): + * def get_func_name(frame): */ /* Python wrapper */ @@ -8109,419 +8077,220 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15manage_r /* "_pydevd_bundle/pydevd_cython.pyx":468 * def manage_return_values(self, main_debugger, frame, event, arg): * - * def get_full_name_if_method(func_name): # <<<<<<<<<<<<<< - * # In the frame we have access to the code object, but not to the callable object, - * # that's why we're trying to get the name of class for methods in such a tricky way: + * def get_func_name(frame): # <<<<<<<<<<<<<< + * code_obj = frame.f_code + * func_name = code_obj.co_name */ /* Python wrapper */ -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_full_name_if_method(PyObject *__pyx_self, PyObject *__pyx_v_func_name); /*proto*/ -static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_full_name_if_method = {"get_full_name_if_method", (PyCFunction)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_full_name_if_method, METH_O, 0}; -static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_full_name_if_method(PyObject *__pyx_self, PyObject *__pyx_v_func_name) { +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_func_name(PyObject *__pyx_self, PyObject *__pyx_v_frame); /*proto*/ +static PyMethodDef __pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_func_name = {"get_func_name", (PyCFunction)__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_func_name, METH_O, 0}; +static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_func_name(PyObject *__pyx_self, PyObject *__pyx_v_frame) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("get_full_name_if_method (wrapper)", 0); - __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_full_name_if_method(__pyx_self, ((PyObject *)__pyx_v_func_name)); + __Pyx_RefNannySetupContext("get_func_name (wrapper)", 0); + __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_func_name(__pyx_self, ((PyObject *)__pyx_v_frame)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_full_name_if_method(PyObject *__pyx_self, PyObject *__pyx_v_func_name) { - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *__pyx_cur_scope; - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *__pyx_outer_scope; +static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_func_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_frame) { PyObject *__pyx_v_code_obj = NULL; - PyObject *__pyx_v_first_arg_name = NULL; - PyObject *__pyx_v_first_arg_obj = NULL; - PyObject *__pyx_v_first_arg_class = NULL; - PyObject *__pyx_v_method = NULL; - PyObject *__pyx_v_func_code = NULL; + PyObject *__pyx_v_func_name = NULL; + PyObject *__pyx_v_cls_name = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - Py_ssize_t __pyx_t_5; - int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + Py_ssize_t __pyx_t_7; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; + int __pyx_t_9; int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_full_name_if_method", 0); - __pyx_outer_scope = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *) __Pyx_CyFunction_GetClosure(__pyx_self); - __pyx_cur_scope = __pyx_outer_scope; + __Pyx_RefNannySetupContext("get_func_name", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":472 - * # that's why we're trying to get the name of class for methods in such a tricky way: - * # we are checking the first argument of the function (`self` or `cls` for methods). + /* "_pydevd_bundle/pydevd_cython.pyx":469 + * + * def get_func_name(frame): + * code_obj = frame.f_code # <<<<<<<<<<<<<< + * func_name = code_obj.co_name + * try: + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_code_obj = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":470 + * def get_func_name(frame): + * code_obj = frame.f_code + * func_name = code_obj.co_name # <<<<<<<<<<<<<< + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + */ + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_func_name = __pyx_t_1; + __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":471 + * code_obj = frame.f_code + * func_name = code_obj.co_name * try: # <<<<<<<<<<<<<< - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ { - __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3); - __Pyx_XGOTREF(__pyx_t_1); + __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4); __Pyx_XGOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_t_3); + __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":473 - * # we are checking the first argument of the function (`self` or `cls` for methods). + /* "_pydevd_bundle/pydevd_cython.pyx":472 + * func_name = code_obj.co_name * try: - * code_obj = frame.f_code # <<<<<<<<<<<<<< - * if len(code_obj.co_varnames) > 0: - * first_arg_name = code_obj.co_varnames[0] + * cls_name = get_clsname_for_code(code_obj, frame) # <<<<<<<<<<<<<< + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) */ - if (unlikely(!__pyx_cur_scope->__pyx_v_frame)) { __Pyx_RaiseClosureNameError("frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_code_obj = __pyx_t_4; - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":474 - * try: - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: # <<<<<<<<<<<<<< - * first_arg_name = code_obj.co_varnames[0] - * first_arg_obj = frame.f_locals[first_arg_name] - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_varnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyObject_Length(__pyx_t_4); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = ((__pyx_t_5 > 0) != 0); + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; + __pyx_t_7 = 0; + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + __pyx_t_7 = 1; + } + } + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { + __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; + } + __Pyx_INCREF(__pyx_v_code_obj); + __Pyx_GIVEREF(__pyx_v_code_obj); + PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_code_obj); + __Pyx_INCREF(__pyx_v_frame); + __Pyx_GIVEREF(__pyx_v_frame); + PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_frame); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_v_cls_name = __pyx_t_1; + __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":475 - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: - * first_arg_name = code_obj.co_varnames[0] # <<<<<<<<<<<<<< - * first_arg_obj = frame.f_locals[first_arg_name] - * if inspect.isclass(first_arg_obj): # class method + /* "_pydevd_bundle/pydevd_cython.pyx":473 + * try: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_code_obj, __pyx_n_s_co_varnames); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_7 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_first_arg_name = __pyx_t_7; - __pyx_t_7 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":476 - * if len(code_obj.co_varnames) > 0: - * first_arg_name = code_obj.co_varnames[0] - * first_arg_obj = frame.f_locals[first_arg_name] # <<<<<<<<<<<<<< - * if inspect.isclass(first_arg_obj): # class method - * first_arg_class = first_arg_obj - */ - if (unlikely(!__pyx_cur_scope->__pyx_v_frame)) { __Pyx_RaiseClosureNameError("frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = PyObject_GetItem(__pyx_t_7, __pyx_v_first_arg_name); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 476; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_v_first_arg_obj = __pyx_t_4; - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":477 - * first_arg_name = code_obj.co_varnames[0] - * first_arg_obj = frame.f_locals[first_arg_name] - * if inspect.isclass(first_arg_obj): # class method # <<<<<<<<<<<<<< - * first_arg_class = first_arg_obj - * else: # instance method - */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_inspect); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_isclass); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_7); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); - } - } - if (!__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_first_arg_obj); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - } else { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_INCREF(__pyx_v_first_arg_obj); - __Pyx_GIVEREF(__pyx_v_first_arg_obj); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_first_arg_obj); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (__pyx_t_6) { - - /* "_pydevd_bundle/pydevd_cython.pyx":478 - * first_arg_obj = frame.f_locals[first_arg_name] - * if inspect.isclass(first_arg_obj): # class method - * first_arg_class = first_arg_obj # <<<<<<<<<<<<<< - * else: # instance method - * first_arg_class = first_arg_obj.__class__ - */ - __Pyx_INCREF(__pyx_v_first_arg_obj); - __pyx_v_first_arg_class = __pyx_v_first_arg_obj; - - /* "_pydevd_bundle/pydevd_cython.pyx":477 - * first_arg_name = code_obj.co_varnames[0] - * first_arg_obj = frame.f_locals[first_arg_name] - * if inspect.isclass(first_arg_obj): # class method # <<<<<<<<<<<<<< - * first_arg_class = first_arg_obj - * else: # instance method - */ - goto __pyx_L12; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":480 - * first_arg_class = first_arg_obj - * else: # instance method - * first_arg_class = first_arg_obj.__class__ # <<<<<<<<<<<<<< - * if hasattr(first_arg_class, func_name): - * method = getattr(first_arg_class, func_name) - */ - /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first_arg_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_first_arg_class = __pyx_t_4; - __pyx_t_4 = 0; - } - __pyx_L12:; - - /* "_pydevd_bundle/pydevd_cython.pyx":481 - * else: # instance method - * first_arg_class = first_arg_obj.__class__ - * if hasattr(first_arg_class, func_name): # <<<<<<<<<<<<<< - * method = getattr(first_arg_class, func_name) - * func_code = None - */ - __pyx_t_6 = PyObject_HasAttr(__pyx_v_first_arg_class, __pyx_v_func_name); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 481; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_t_10 = (__pyx_t_6 != 0); - if (__pyx_t_10) { - - /* "_pydevd_bundle/pydevd_cython.pyx":482 - * first_arg_class = first_arg_obj.__class__ - * if hasattr(first_arg_class, func_name): - * method = getattr(first_arg_class, func_name) # <<<<<<<<<<<<<< - * func_code = None - * if hasattr(method, 'func_code'): # Python2 - */ - __pyx_t_4 = __Pyx_GetAttr(__pyx_v_first_arg_class, __pyx_v_func_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_v_method = __pyx_t_4; - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":483 - * if hasattr(first_arg_class, func_name): - * method = getattr(first_arg_class, func_name) - * func_code = None # <<<<<<<<<<<<<< - * if hasattr(method, 'func_code'): # Python2 - * func_code = method.func_code - */ - __Pyx_INCREF(Py_None); - __pyx_v_func_code = Py_None; - - /* "_pydevd_bundle/pydevd_cython.pyx":484 - * method = getattr(first_arg_class, func_name) - * func_code = None - * if hasattr(method, 'func_code'): # Python2 # <<<<<<<<<<<<<< - * func_code = method.func_code - * elif hasattr(method, '__code__'): # Python3 - */ - __pyx_t_10 = PyObject_HasAttr(__pyx_v_method, __pyx_n_s_func_code); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_t_6 = (__pyx_t_10 != 0); - if (__pyx_t_6) { - - /* "_pydevd_bundle/pydevd_cython.pyx":485 - * func_code = None - * if hasattr(method, 'func_code'): # Python2 - * func_code = method.func_code # <<<<<<<<<<<<<< - * elif hasattr(method, '__code__'): # Python3 - * func_code = method.__code__ - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_func_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_func_code, __pyx_t_4); - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":484 - * method = getattr(first_arg_class, func_name) - * func_code = None - * if hasattr(method, 'func_code'): # Python2 # <<<<<<<<<<<<<< - * func_code = method.func_code - * elif hasattr(method, '__code__'): # Python3 - */ - goto __pyx_L14; - } - - /* "_pydevd_bundle/pydevd_cython.pyx":486 - * if hasattr(method, 'func_code'): # Python2 - * func_code = method.func_code - * elif hasattr(method, '__code__'): # Python3 # <<<<<<<<<<<<<< - * func_code = method.__code__ - * if func_code and func_code == code_obj: - */ - __pyx_t_6 = PyObject_HasAttr(__pyx_v_method, __pyx_n_s_code); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_t_10 = (__pyx_t_6 != 0); - if (__pyx_t_10) { - - /* "_pydevd_bundle/pydevd_cython.pyx":487 - * func_code = method.func_code - * elif hasattr(method, '__code__'): # Python3 - * func_code = method.__code__ # <<<<<<<<<<<<<< - * if func_code and func_code == code_obj: - * return first_arg_class.__name__ + "." + func_name - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_method, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF_SET(__pyx_v_func_code, __pyx_t_4); - __pyx_t_4 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":486 - * if hasattr(method, 'func_code'): # Python2 - * func_code = method.func_code - * elif hasattr(method, '__code__'): # Python3 # <<<<<<<<<<<<<< - * func_code = method.__code__ - * if func_code and func_code == code_obj: - */ - } - __pyx_L14:; - - /* "_pydevd_bundle/pydevd_cython.pyx":488 - * elif hasattr(method, '__code__'): # Python3 - * func_code = method.__code__ - * if func_code and func_code == code_obj: # <<<<<<<<<<<<<< - * return first_arg_class.__name__ + "." + func_name - * return func_name - */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_func_code); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - if (__pyx_t_6) { - } else { - __pyx_t_10 = __pyx_t_6; - goto __pyx_L16_bool_binop_done; - } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_func_code, __pyx_v_code_obj, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_10 = __pyx_t_6; - __pyx_L16_bool_binop_done:; - if (__pyx_t_10) { - - /* "_pydevd_bundle/pydevd_cython.pyx":489 - * func_code = method.__code__ - * if func_code and func_code == code_obj: - * return first_arg_class.__name__ + "." + func_name # <<<<<<<<<<<<<< - * return func_name - * except: - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_first_arg_class, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyNumber_Add(__pyx_t_4, __pyx_kp_s__5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_v_func_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_r = __pyx_t_4; - __pyx_t_4 = 0; - goto __pyx_L7_try_return; - - /* "_pydevd_bundle/pydevd_cython.pyx":488 - * elif hasattr(method, '__code__'): # Python3 - * func_code = method.__code__ - * if func_code and func_code == code_obj: # <<<<<<<<<<<<<< - * return first_arg_class.__name__ + "." + func_name - * return func_name - */ - } - - /* "_pydevd_bundle/pydevd_cython.pyx":481 - * else: # instance method - * first_arg_class = first_arg_obj.__class__ - * if hasattr(first_arg_class, func_name): # <<<<<<<<<<<<<< - * method = getattr(first_arg_class, func_name) - * func_code = None - */ - } + __pyx_t_9 = (__pyx_v_cls_name != Py_None); + __pyx_t_10 = (__pyx_t_9 != 0); + if (__pyx_t_10) { /* "_pydevd_bundle/pydevd_cython.pyx":474 + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: + * return "%s.%s" % (cls_name, func_name) # <<<<<<<<<<<<<< + * else: + * return func_name + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_cls_name); + __Pyx_GIVEREF(__pyx_v_cls_name); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_cls_name); + __Pyx_INCREF(__pyx_v_func_name); + __Pyx_GIVEREF(__pyx_v_func_name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_func_name); + __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 474; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_5; + __pyx_t_5 = 0; + goto __pyx_L7_try_return; + + /* "_pydevd_bundle/pydevd_cython.pyx":473 * try: - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: # <<<<<<<<<<<<<< - * first_arg_name = code_obj.co_varnames[0] - * first_arg_obj = frame.f_locals[first_arg_name] + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: # <<<<<<<<<<<<<< + * return "%s.%s" % (cls_name, func_name) + * else: */ } - /* "_pydevd_bundle/pydevd_cython.pyx":490 - * if func_code and func_code == code_obj: - * return first_arg_class.__name__ + "." + func_name - * return func_name # <<<<<<<<<<<<<< + /* "_pydevd_bundle/pydevd_cython.pyx":476 + * return "%s.%s" % (cls_name, func_name) + * else: + * return func_name # <<<<<<<<<<<<<< * except: * traceback.print_exc() */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_func_name); - __pyx_r = __pyx_v_func_name; - goto __pyx_L7_try_return; + /*else*/ { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_func_name); + __pyx_r = __pyx_v_func_name; + goto __pyx_L7_try_return; + } - /* "_pydevd_bundle/pydevd_cython.pyx":472 - * # that's why we're trying to get the name of class for methods in such a tricky way: - * # we are checking the first argument of the function (`self` or `cls` for methods). + /* "_pydevd_bundle/pydevd_cython.pyx":471 + * code_obj = frame.f_code + * func_name = code_obj.co_name * try: # <<<<<<<<<<<<<< - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ } __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":491 - * return first_arg_class.__name__ + "." + func_name - * return func_name + /* "_pydevd_bundle/pydevd_cython.pyx":477 + * else: + * return func_name * except: # <<<<<<<<<<<<<< * traceback.print_exc() * return func_name */ /*except:*/ { - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values.get_full_name_if_method", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_8, &__pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_4); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_8); - __Pyx_GOTREF(__pyx_t_9); - /* "_pydevd_bundle/pydevd_cython.pyx":492 - * return func_name + /* "_pydevd_bundle/pydevd_cython.pyx":478 + * return func_name * except: * traceback.print_exc() # <<<<<<<<<<<<<< * return func_name * */ - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -8535,16 +8304,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_r } } if (__pyx_t_11) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 478; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } - __Pyx_GOTREF(__pyx_t_7); + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":493 + /* "_pydevd_bundle/pydevd_cython.pyx":479 * except: * traceback.print_exc() * return func_name # <<<<<<<<<<<<<< @@ -8554,64 +8323,61 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_r __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_func_name); __pyx_r = __pyx_v_func_name; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L6_except_return; } __pyx_L5_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":472 - * # that's why we're trying to get the name of class for methods in such a tricky way: - * # we are checking the first argument of the function (`self` or `cls` for methods). + /* "_pydevd_bundle/pydevd_cython.pyx":471 + * code_obj = frame.f_code + * func_name = code_obj.co_name * try: # <<<<<<<<<<<<<< - * code_obj = frame.f_code - * if len(code_obj.co_varnames) > 0: + * cls_name = get_clsname_for_code(code_obj, frame) + * if cls_name is not None: */ - __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L1_error; __pyx_L7_try_return:; - __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; __pyx_L6_except_return:; - __Pyx_XGIVEREF(__pyx_t_1); __Pyx_XGIVEREF(__pyx_t_2); __Pyx_XGIVEREF(__pyx_t_3); - __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); + __Pyx_XGIVEREF(__pyx_t_4); + __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); goto __pyx_L0; } /* "_pydevd_bundle/pydevd_cython.pyx":468 * def manage_return_values(self, main_debugger, frame, event, arg): * - * def get_full_name_if_method(func_name): # <<<<<<<<<<<<<< - * # In the frame we have access to the code object, but not to the callable object, - * # that's why we're trying to get the name of class for methods in such a tricky way: + * def get_func_name(frame): # <<<<<<<<<<<<<< + * code_obj = frame.f_code + * func_name = code_obj.co_name */ /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); - __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values.get_full_name_if_method", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values.get_func_name", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; __Pyx_XDECREF(__pyx_v_code_obj); - __Pyx_XDECREF(__pyx_v_first_arg_name); - __Pyx_XDECREF(__pyx_v_first_arg_obj); - __Pyx_XDECREF(__pyx_v_first_arg_class); - __Pyx_XDECREF(__pyx_v_method); - __Pyx_XDECREF(__pyx_v_func_code); + __Pyx_XDECREF(__pyx_v_func_name); + __Pyx_XDECREF(__pyx_v_cls_name); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -8622,12 +8388,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_r * * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< * - * def get_full_name_if_method(func_name): + * def get_func_name(frame): */ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_return_values(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_main_debugger, PyObject *__pyx_v_frame, PyObject *__pyx_v_event, PyObject *__pyx_v_arg) { - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *__pyx_cur_scope; - PyObject *__pyx_v_get_full_name_if_method = 0; + PyObject *__pyx_v_get_func_name = 0; PyObject *__pyx_v_name = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8648,29 +8413,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("manage_return_values", 0); - __pyx_cur_scope = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *)__pyx_tp_new_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(__pyx_ptype_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values, __pyx_empty_tuple, NULL); - if (unlikely(!__pyx_cur_scope)) { - __Pyx_RefNannyFinishContext(); - return NULL; - } - __Pyx_GOTREF(__pyx_cur_scope); - __pyx_cur_scope->__pyx_v_frame = __pyx_v_frame; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_frame); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_frame); /* "_pydevd_bundle/pydevd_cython.pyx":468 * def manage_return_values(self, main_debugger, frame, event, arg): * - * def get_full_name_if_method(func_name): # <<<<<<<<<<<<<< - * # In the frame we have access to the code object, but not to the callable object, - * # that's why we're trying to get the name of class for methods in such a tricky way: + * def get_func_name(frame): # <<<<<<<<<<<<<< + * code_obj = frame.f_code + * func_name = code_obj.co_name */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_full_name_if_method, 0, __pyx_n_s_PyDBFrame_manage_return_values_l, ((PyObject*)__pyx_cur_scope), __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_1get_func_name, 0, __pyx_n_s_PyDBFrame_manage_return_values_l, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_v_get_full_name_if_method = __pyx_t_1; + __pyx_v_get_func_name = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":495 + /* "_pydevd_bundle/pydevd_cython.pyx":481 * return func_name * * try: # <<<<<<<<<<<<<< @@ -8684,106 +8440,85 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":496 + /* "_pydevd_bundle/pydevd_cython.pyx":482 * * try: * if main_debugger.show_return_values: # <<<<<<<<<<<<<< * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - * name = frame.f_code.co_name + * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "_pydevd_bundle/pydevd_cython.pyx":497 + /* "_pydevd_bundle/pydevd_cython.pyx":483 * try: * if main_debugger.show_return_values: * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): # <<<<<<<<<<<<<< - * name = frame.f_code.co_name * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): + * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): */ - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} if (__pyx_t_6) { } else { __pyx_t_5 = __pyx_t_6; goto __pyx_L13_bool_binop_done; } - __pyx_t_1 = __pyx_cur_scope->__pyx_v_frame; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_6 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L13_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_7 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_7 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L13_bool_binop_done:; if (__pyx_t_5) { - /* "_pydevd_bundle/pydevd_cython.pyx":498 + /* "_pydevd_bundle/pydevd_cython.pyx":484 * if main_debugger.show_return_values: * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - * name = frame.f_code.co_name # <<<<<<<<<<<<<< - * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): - * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_name = __pyx_t_8; - __pyx_t_8 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":499 - * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - * name = frame.f_code.co_name * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): # <<<<<<<<<<<<<< * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} */ - __pyx_t_8 = __pyx_cur_scope->__pyx_v_frame; - __Pyx_INCREF(__pyx_t_8); - __pyx_t_6 = PyObject_HasAttr(__pyx_t_8, __pyx_n_s_f_back); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_6 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L17_bool_binop_done; } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyObject_HasAttr(__pyx_t_8, __pyx_n_s_f_locals); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_7 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_f_locals); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 484; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_7 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L17_bool_binop_done:; if (__pyx_t_5) { - /* "_pydevd_bundle/pydevd_cython.pyx":500 - * name = frame.f_code.co_name + /* "_pydevd_bundle/pydevd_cython.pyx":485 + * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): # <<<<<<<<<<<<<< * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - * name = get_full_name_if_method(name) + * name = get_func_name(frame) */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; @@ -8797,187 +8532,187 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r } } if (!__pyx_t_10) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_11); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_8); } else { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":501 + /* "_pydevd_bundle/pydevd_cython.pyx":486 * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} # <<<<<<<<<<<<<< - * name = get_full_name_if_method(name) + * name = get_func_name(frame) * frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = PyDict_New(); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - if (unlikely(PyObject_SetItem(__pyx_t_9, __pyx_t_8, __pyx_t_1) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(PyObject_SetItem(__pyx_t_9, __pyx_t_1, __pyx_t_8) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":500 - * name = frame.f_code.co_name + /* "_pydevd_bundle/pydevd_cython.pyx":485 + * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): # <<<<<<<<<<<<<< * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - * name = get_full_name_if_method(name) + * name = get_func_name(frame) */ } - /* "_pydevd_bundle/pydevd_cython.pyx":502 + /* "_pydevd_bundle/pydevd_cython.pyx":487 * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - * name = get_full_name_if_method(name) # <<<<<<<<<<<<<< + * name = get_func_name(frame) # <<<<<<<<<<<<<< * frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg * if main_debugger.remove_return_values_flag: */ - __pyx_t_1 = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_full_name_if_method(__pyx_v_get_full_name_if_method, __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); - __pyx_t_1 = 0; + __pyx_t_8 = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_20manage_return_values_get_func_name(__pyx_v_get_func_name, __pyx_v_frame); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_v_name = __pyx_t_8; + __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":503 + /* "_pydevd_bundle/pydevd_cython.pyx":488 * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - * name = get_full_name_if_method(name) + * name = get_func_name(frame) * frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg # <<<<<<<<<<<<<< * if main_debugger.remove_return_values_flag: * # Showing return values was turned off, we should remove them from locals dict. */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_GetItem(__pyx_t_8, __pyx_t_1); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; - __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_9 = PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(__pyx_t_9 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(PyObject_SetItem(__pyx_t_9, __pyx_v_name, __pyx_v_arg) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(PyObject_SetItem(__pyx_t_9, __pyx_v_name, __pyx_v_arg) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":499 + /* "_pydevd_bundle/pydevd_cython.pyx":484 + * if main_debugger.show_return_values: * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - * name = frame.f_code.co_name * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): # <<<<<<<<<<<<<< * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): * frame.f_back.f_locals[RETURN_VALUES_DICT] = {} */ } - /* "_pydevd_bundle/pydevd_cython.pyx":497 + /* "_pydevd_bundle/pydevd_cython.pyx":483 * try: * if main_debugger.show_return_values: * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): # <<<<<<<<<<<<<< - * name = frame.f_code.co_name * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): + * if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): */ } - /* "_pydevd_bundle/pydevd_cython.pyx":496 + /* "_pydevd_bundle/pydevd_cython.pyx":482 * * try: * if main_debugger.show_return_values: # <<<<<<<<<<<<<< * if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - * name = frame.f_code.co_name + * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): */ } - /* "_pydevd_bundle/pydevd_cython.pyx":504 - * name = get_full_name_if_method(name) + /* "_pydevd_bundle/pydevd_cython.pyx":489 + * name = get_func_name(frame) * frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg * if main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< * # Showing return values was turned off, we should remove them from locals dict. * # The values can be in the current frame or in the back one */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":507 + /* "_pydevd_bundle/pydevd_cython.pyx":492 * # Showing return values was turned off, we should remove them from locals dict. * # The values can be in the current frame or in the back one * if RETURN_VALUES_DICT in dict_keys(frame.f_locals): # <<<<<<<<<<<<<< * dict_pop(frame.f_locals, RETURN_VALUES_DICT) * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): */ - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = NULL; - if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8); + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_11)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_11); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (!__pyx_t_11) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_8); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_9, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_pydevd_bundle/pydevd_cython.pyx":508 + /* "_pydevd_bundle/pydevd_cython.pyx":493 * # The values can be in the current frame or in the back one * if RETURN_VALUES_DICT in dict_keys(frame.f_locals): * dict_pop(frame.f_locals, RETURN_VALUES_DICT) # <<<<<<<<<<<<<< * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): */ - __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_pop); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_pop); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); __pyx_t_12 = NULL; __pyx_t_13 = 0; @@ -8991,24 +8726,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r __pyx_t_13 = 1; } } - __pyx_t_11 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_11 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_12) { __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); __pyx_t_12 = NULL; } - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_13, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_13, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_13, __pyx_t_10); - __pyx_t_8 = 0; + __pyx_t_1 = 0; __pyx_t_10 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":507 + /* "_pydevd_bundle/pydevd_cython.pyx":492 * # Showing return values was turned off, we should remove them from locals dict. * # The values can be in the current frame or in the back one * if RETURN_VALUES_DICT in dict_keys(frame.f_locals): # <<<<<<<<<<<<<< @@ -9017,47 +8752,44 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r */ } - /* "_pydevd_bundle/pydevd_cython.pyx":509 + /* "_pydevd_bundle/pydevd_cython.pyx":494 * if RETURN_VALUES_DICT in dict_keys(frame.f_locals): * dict_pop(frame.f_locals, RETURN_VALUES_DICT) * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): # <<<<<<<<<<<<<< * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): * dict_pop(frame.f_back.f_locals, RETURN_VALUES_DICT) */ - __pyx_t_1 = __pyx_cur_scope->__pyx_v_frame; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_6 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_f_back); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { } else { __pyx_t_5 = __pyx_t_7; goto __pyx_L23_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyObject_HasAttr(__pyx_t_1, __pyx_n_s_f_locals); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = PyObject_HasAttr(__pyx_t_8, __pyx_n_s_f_locals); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_6 = (__pyx_t_7 != 0); __pyx_t_5 = __pyx_t_6; __pyx_L23_bool_binop_done:; if (__pyx_t_5) { - /* "_pydevd_bundle/pydevd_cython.pyx":510 + /* "_pydevd_bundle/pydevd_cython.pyx":495 * dict_pop(frame.f_locals, RETURN_VALUES_DICT) * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): # <<<<<<<<<<<<<< * dict_pop(frame.f_back.f_locals, RETURN_VALUES_DICT) * main_debugger.remove_return_values_flag = False */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_keys); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_11); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_10); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_10 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_11))) { @@ -9070,59 +8802,59 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r } } if (!__pyx_t_10) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_9); } else { - __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL; - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8); - __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_12, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_pydevd_bundle/pydevd_cython.pyx":511 + /* "_pydevd_bundle/pydevd_cython.pyx":496 * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): * dict_pop(frame.f_back.f_locals, RETURN_VALUES_DICT) # <<<<<<<<<<<<<< * main_debugger.remove_return_values_flag = False * except: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_pop); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_8 = NULL; + __pyx_t_1 = NULL; __pyx_t_13 = 0; - if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_8)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_8); + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); + __Pyx_DECREF_SET(__pyx_t_8, function); __pyx_t_13 = 1; } } - __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_10 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_10); - if (__pyx_t_8) { - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; } __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_13, __pyx_t_12); @@ -9130,13 +8862,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_13, __pyx_t_11); __pyx_t_12 = 0; __pyx_t_11 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 496; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":510 + /* "_pydevd_bundle/pydevd_cython.pyx":495 * dict_pop(frame.f_locals, RETURN_VALUES_DICT) * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): # <<<<<<<<<<<<<< @@ -9145,7 +8877,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r */ } - /* "_pydevd_bundle/pydevd_cython.pyx":509 + /* "_pydevd_bundle/pydevd_cython.pyx":494 * if RETURN_VALUES_DICT in dict_keys(frame.f_locals): * dict_pop(frame.f_locals, RETURN_VALUES_DICT) * if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): # <<<<<<<<<<<<<< @@ -9154,17 +8886,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r */ } - /* "_pydevd_bundle/pydevd_cython.pyx":512 + /* "_pydevd_bundle/pydevd_cython.pyx":497 * if RETURN_VALUES_DICT in dict_keys(frame.f_back.f_locals): * dict_pop(frame.f_back.f_locals, RETURN_VALUES_DICT) * main_debugger.remove_return_values_flag = False # <<<<<<<<<<<<<< * except: * main_debugger.remove_return_values_flag = False */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 497; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":504 - * name = get_full_name_if_method(name) + /* "_pydevd_bundle/pydevd_cython.pyx":489 + * name = get_func_name(frame) * frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg * if main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< * # Showing return values was turned off, we should remove them from locals dict. @@ -9172,7 +8904,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r */ } - /* "_pydevd_bundle/pydevd_cython.pyx":495 + /* "_pydevd_bundle/pydevd_cython.pyx":481 * return func_name * * try: # <<<<<<<<<<<<<< @@ -9185,14 +8917,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L10_try_end; __pyx_L3_error:; - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":513 + /* "_pydevd_bundle/pydevd_cython.pyx":498 * dict_pop(frame.f_back.f_locals, RETURN_VALUES_DICT) * main_debugger.remove_return_values_flag = False * except: # <<<<<<<<<<<<<< @@ -9201,59 +8933,59 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_8, &__pyx_t_10) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_10); - /* "_pydevd_bundle/pydevd_cython.pyx":514 + /* "_pydevd_bundle/pydevd_cython.pyx":499 * main_debugger.remove_return_values_flag = False * except: * main_debugger.remove_return_values_flag = False # <<<<<<<<<<<<<< * traceback.print_exc() * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag, Py_False) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 499; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":515 + /* "_pydevd_bundle/pydevd_cython.pyx":500 * except: * main_debugger.remove_return_values_flag = False * traceback.print_exc() # <<<<<<<<<<<<<< * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_12); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; - if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_8); + if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { + __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1); if (likely(__pyx_t_12)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); __Pyx_INCREF(__pyx_t_12); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_1, function); } } if (__pyx_t_12) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } else { - __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} } __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_exception_handled; } __pyx_L5_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":495 + /* "_pydevd_bundle/pydevd_cython.pyx":481 * return func_name * * try: # <<<<<<<<<<<<<< @@ -9278,7 +9010,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r * * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< * - * def get_full_name_if_method(func_name): + * def get_func_name(frame): */ /* function exit code */ @@ -9294,15 +9026,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_14manage_r __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.manage_return_values", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_get_full_name_if_method); + __Pyx_XDECREF(__pyx_v_get_func_name); __Pyx_XDECREF(__pyx_v_name); - __Pyx_DECREF(((PyObject *)__pyx_cur_scope)); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":518 +/* "_pydevd_bundle/pydevd_cython.pyx":503 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< @@ -9346,21 +9077,21 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_17trace_di case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trace_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trace_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -9377,13 +9108,13 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_17trace_di } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_event), (&PyString_Type), 1, "event", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_dispatch(__pyx_self, __pyx_v_self, __pyx_v_frame, __pyx_v_event, __pyx_v_arg); /* function exit code */ @@ -9480,14 +9211,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_RefNannySetupContext("trace_dispatch", 0); __Pyx_INCREF(__pyx_v_frame); - /* "_pydevd_bundle/pydevd_cython.pyx":532 + /* "_pydevd_bundle/pydevd_cython.pyx":517 * # ENDIF * * main_debugger, filename, info, thread = self._args # <<<<<<<<<<<<<< * try: * # print 'frame trace_dispatch', frame.f_lineno, frame.f_code.co_name, event */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -9499,7 +9230,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -9522,7 +9253,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -9532,7 +9263,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5}; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -9541,7 +9272,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L4_unpacking_done; @@ -9549,11 +9280,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L4_unpacking_done:; } - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 532; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_main_debugger = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_filename = ((PyObject*)__pyx_t_3); @@ -9563,7 +9294,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_thread = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":533 + /* "_pydevd_bundle/pydevd_cython.pyx":518 * * main_debugger, filename, info, thread = self._args * try: # <<<<<<<<<<<<<< @@ -9572,7 +9303,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":535 + /* "_pydevd_bundle/pydevd_cython.pyx":520 * try: * # print 'frame trace_dispatch', frame.f_lineno, frame.f_code.co_name, event * info.is_tracing = True # <<<<<<<<<<<<<< @@ -9581,7 +9312,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_info->is_tracing = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":536 + /* "_pydevd_bundle/pydevd_cython.pyx":521 * # print 'frame trace_dispatch', frame.f_lineno, frame.f_code.co_name, event * info.is_tracing = True * need_trace_return = False # <<<<<<<<<<<<<< @@ -9591,20 +9322,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __pyx_v_need_trace_return = Py_False; - /* "_pydevd_bundle/pydevd_cython.pyx":538 + /* "_pydevd_bundle/pydevd_cython.pyx":523 * need_trace_return = False * * if main_debugger._finish_debugging_session: # <<<<<<<<<<<<<< * return None * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":539 + /* "_pydevd_bundle/pydevd_cython.pyx":524 * * if main_debugger._finish_debugging_session: * return None # <<<<<<<<<<<<<< @@ -9616,7 +9347,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_r = Py_None; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":538 + /* "_pydevd_bundle/pydevd_cython.pyx":523 * need_trace_return = False * * if main_debugger._finish_debugging_session: # <<<<<<<<<<<<<< @@ -9625,36 +9356,36 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":541 + /* "_pydevd_bundle/pydevd_cython.pyx":526 * return None * * if event == 'call' and main_debugger.signature_factory: # <<<<<<<<<<<<<< * need_trace_return = send_signature_call_trace(main_debugger, frame, filename) * if event == 'return' and main_debugger.signature_factory: */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L10_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_10; __pyx_L10_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":542 + /* "_pydevd_bundle/pydevd_cython.pyx":527 * * if event == 'call' and main_debugger.signature_factory: * need_trace_return = send_signature_call_trace(main_debugger, frame, filename) # <<<<<<<<<<<<<< * if event == 'return' and main_debugger.signature_factory: * send_signature_return_trace(main_debugger, frame, filename, arg) */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_send_signature_call_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_send_signature_call_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -9668,7 +9399,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -9682,14 +9413,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_11, __pyx_v_filename); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_need_trace_return, __pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":541 + /* "_pydevd_bundle/pydevd_cython.pyx":526 * return None * * if event == 'call' and main_debugger.signature_factory: # <<<<<<<<<<<<<< @@ -9698,36 +9429,36 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":543 + /* "_pydevd_bundle/pydevd_cython.pyx":528 * if event == 'call' and main_debugger.signature_factory: * need_trace_return = send_signature_call_trace(main_debugger, frame, filename) * if event == 'return' and main_debugger.signature_factory: # <<<<<<<<<<<<<< * send_signature_return_trace(main_debugger, frame, filename, arg) * */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L13_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_signature_factory); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L13_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":544 + /* "_pydevd_bundle/pydevd_cython.pyx":529 * need_trace_return = send_signature_call_trace(main_debugger, frame, filename) * if event == 'return' and main_debugger.signature_factory: * send_signature_return_trace(main_debugger, frame, filename, arg) # <<<<<<<<<<<<<< * * plugin_manager = main_debugger.plugin */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_send_signature_return_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_send_signature_return_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -9741,7 +9472,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_4 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -9758,13 +9489,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_11, __pyx_v_arg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 544; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":543 + /* "_pydevd_bundle/pydevd_cython.pyx":528 * if event == 'call' and main_debugger.signature_factory: * need_trace_return = send_signature_call_trace(main_debugger, frame, filename) * if event == 'return' and main_debugger.signature_factory: # <<<<<<<<<<<<<< @@ -9773,53 +9504,53 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":546 + /* "_pydevd_bundle/pydevd_cython.pyx":531 * send_signature_return_trace(main_debugger, frame, filename, arg) * * plugin_manager = main_debugger.plugin # <<<<<<<<<<<<<< * * is_exception_event = event == 'exception' */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 546; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_plugin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_plugin_manager = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":548 + /* "_pydevd_bundle/pydevd_cython.pyx":533 * plugin_manager = main_debugger.plugin * * is_exception_event = event == 'exception' # <<<<<<<<<<<<<< * has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks * */ - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_v_is_exception_event = __pyx_t_8; - /* "_pydevd_bundle/pydevd_cython.pyx":549 + /* "_pydevd_bundle/pydevd_cython.pyx":534 * * is_exception_event = event == 'exception' * has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks # <<<<<<<<<<<<<< * * if is_exception_event: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_break_on_caught_exceptions); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L15_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_exception_breaks); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L15_bool_binop_done:; __pyx_v_has_exception_breakpoints = __pyx_t_8; - /* "_pydevd_bundle/pydevd_cython.pyx":551 + /* "_pydevd_bundle/pydevd_cython.pyx":536 * has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks * * if is_exception_event: # <<<<<<<<<<<<<< @@ -9829,7 +9560,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_is_exception_event != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":552 + /* "_pydevd_bundle/pydevd_cython.pyx":537 * * if is_exception_event: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -9839,14 +9570,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_has_exception_breakpoints != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":553 + /* "_pydevd_bundle/pydevd_cython.pyx":538 * if is_exception_event: * if has_exception_breakpoints: * flag, frame = self.should_stop_on_exception(frame, event, arg) # <<<<<<<<<<<<<< * if flag: * self.handle_exception(frame, event, arg) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_stop_on_exception); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -9860,7 +9591,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -9874,7 +9605,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_11, __pyx_v_arg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -9888,7 +9619,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -9901,15 +9632,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -9917,7 +9648,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_3 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L19_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L20_unpacking_done; @@ -9925,7 +9656,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 538; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_L20_unpacking_done:; } __pyx_v_flag = __pyx_t_5; @@ -9933,24 +9664,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_frame, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":554 + /* "_pydevd_bundle/pydevd_cython.pyx":539 * if has_exception_breakpoints: * flag, frame = self.should_stop_on_exception(frame, event, arg) * if flag: # <<<<<<<<<<<<<< * self.handle_exception(frame, event, arg) * return self.trace_dispatch */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 539; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":555 + /* "_pydevd_bundle/pydevd_cython.pyx":540 * flag, frame = self.should_stop_on_exception(frame, event, arg) * if flag: * self.handle_exception(frame, event, arg) # <<<<<<<<<<<<<< * return self.trace_dispatch * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_handle_exception); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -9964,7 +9695,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_4 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -9978,13 +9709,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_11, __pyx_v_arg); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":556 + /* "_pydevd_bundle/pydevd_cython.pyx":541 * if flag: * self.handle_exception(frame, event, arg) * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -9992,13 +9723,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * elif event not in ('line', 'call', 'return'): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 541; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":554 + /* "_pydevd_bundle/pydevd_cython.pyx":539 * if has_exception_breakpoints: * flag, frame = self.should_stop_on_exception(frame, event, arg) * if flag: # <<<<<<<<<<<<<< @@ -10007,7 +9738,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":552 + /* "_pydevd_bundle/pydevd_cython.pyx":537 * * if is_exception_event: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -10016,7 +9747,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":551 + /* "_pydevd_bundle/pydevd_cython.pyx":536 * has_exception_breakpoints = main_debugger.break_on_caught_exceptions or main_debugger.has_plugin_exception_breaks * * if is_exception_event: # <<<<<<<<<<<<<< @@ -10026,7 +9757,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L17; } - /* "_pydevd_bundle/pydevd_cython.pyx":558 + /* "_pydevd_bundle/pydevd_cython.pyx":543 * return self.trace_dispatch * * elif event not in ('line', 'call', 'return'): # <<<<<<<<<<<<<< @@ -10035,21 +9766,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_v_event); __pyx_t_12 = __pyx_v_event; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L22_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_call, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_call, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L22_bool_binop_done; } - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_NE)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = (__pyx_t_9 != 0); __pyx_t_8 = __pyx_t_10; __pyx_L22_bool_binop_done:; @@ -10057,7 +9788,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":560 + /* "_pydevd_bundle/pydevd_cython.pyx":545 * elif event not in ('line', 'call', 'return'): * #I believe this can only happen in jython on some frontiers on jython and java code, which we don't want to trace. * return None # <<<<<<<<<<<<<< @@ -10069,7 +9800,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_r = Py_None; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":558 + /* "_pydevd_bundle/pydevd_cython.pyx":543 * return self.trace_dispatch * * elif event not in ('line', 'call', 'return'): # <<<<<<<<<<<<<< @@ -10079,7 +9810,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L17:; - /* "_pydevd_bundle/pydevd_cython.pyx":562 + /* "_pydevd_bundle/pydevd_cython.pyx":547 * return None * * stop_frame = info.pydev_step_stop # <<<<<<<<<<<<<< @@ -10091,7 +9822,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_stop_frame = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":563 + /* "_pydevd_bundle/pydevd_cython.pyx":548 * * stop_frame = info.pydev_step_stop * step_cmd = info.pydev_step_cmd # <<<<<<<<<<<<<< @@ -10101,7 +9832,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_13 = __pyx_v_info->pydev_step_cmd; __pyx_v_step_cmd = __pyx_t_13; - /* "_pydevd_bundle/pydevd_cython.pyx":565 + /* "_pydevd_bundle/pydevd_cython.pyx":550 * step_cmd = info.pydev_step_cmd * * if is_exception_event: # <<<<<<<<<<<<<< @@ -10111,7 +9842,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = (__pyx_v_is_exception_event != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":566 + /* "_pydevd_bundle/pydevd_cython.pyx":551 * * if is_exception_event: * breakpoints_for_file = None # <<<<<<<<<<<<<< @@ -10121,14 +9852,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_None); __pyx_v_breakpoints_for_file = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":567 + /* "_pydevd_bundle/pydevd_cython.pyx":552 * if is_exception_event: * breakpoints_for_file = None * if stop_frame and stop_frame is not frame and step_cmd is CMD_STEP_OVER and \ # <<<<<<<<<<<<<< * arg[0] in (StopIteration, GeneratorExit) and arg[2] is None: * info.pydev_step_cmd = CMD_STEP_INTO */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_stop_frame); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_stop_frame); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (__pyx_t_8) { } else { __pyx_t_10 = __pyx_t_8; @@ -10141,9 +9872,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = __pyx_t_9; goto __pyx_L27_bool_binop_done; } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 567; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 552; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (__pyx_t_1 == __pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10155,25 +9886,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L27_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":568 + /* "_pydevd_bundle/pydevd_cython.pyx":553 * breakpoints_for_file = None * if stop_frame and stop_frame is not frame and step_cmd is CMD_STEP_OVER and \ * arg[0] in (StopIteration, GeneratorExit) and arg[2] is None: # <<<<<<<<<<<<<< * info.pydev_step_cmd = CMD_STEP_INTO * info.pydev_step_stop = None */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arg, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arg, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_StopIteration, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_StopIteration, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L32_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_GeneratorExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_builtin_GeneratorExit, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L32_bool_binop_done:; @@ -10184,7 +9915,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = __pyx_t_9; goto __pyx_L27_bool_binop_done; } - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arg, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_arg, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L6_error;}; __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (__pyx_t_3 == Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10192,7 +9923,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = __pyx_t_8; __pyx_L27_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":567 + /* "_pydevd_bundle/pydevd_cython.pyx":552 * if is_exception_event: * breakpoints_for_file = None * if stop_frame and stop_frame is not frame and step_cmd is CMD_STEP_OVER and \ # <<<<<<<<<<<<<< @@ -10201,20 +9932,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":569 + /* "_pydevd_bundle/pydevd_cython.pyx":554 * if stop_frame and stop_frame is not frame and step_cmd is CMD_STEP_OVER and \ * arg[0] in (StopIteration, GeneratorExit) and arg[2] is None: * info.pydev_step_cmd = CMD_STEP_INTO # <<<<<<<<<<<<<< * info.pydev_step_stop = None * else: */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_info->pydev_step_cmd = __pyx_t_13; - /* "_pydevd_bundle/pydevd_cython.pyx":570 + /* "_pydevd_bundle/pydevd_cython.pyx":555 * arg[0] in (StopIteration, GeneratorExit) and arg[2] is None: * info.pydev_step_cmd = CMD_STEP_INTO * info.pydev_step_stop = None # <<<<<<<<<<<<<< @@ -10227,7 +9958,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_v_info->pydev_step_stop); __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":567 + /* "_pydevd_bundle/pydevd_cython.pyx":552 * if is_exception_event: * breakpoints_for_file = None * if stop_frame and stop_frame is not frame and step_cmd is CMD_STEP_OVER and \ # <<<<<<<<<<<<<< @@ -10236,7 +9967,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":565 + /* "_pydevd_bundle/pydevd_cython.pyx":550 * step_cmd = info.pydev_step_cmd * * if is_exception_event: # <<<<<<<<<<<<<< @@ -10246,7 +9977,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L25; } - /* "_pydevd_bundle/pydevd_cython.pyx":578 + /* "_pydevd_bundle/pydevd_cython.pyx":563 * # Note: this is especially troublesome when we're skipping code with the * # @DontTrace comment. * if stop_frame is frame and event is 'return' and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER): # <<<<<<<<<<<<<< @@ -10269,28 +10000,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L35_bool_binop_done; } __pyx_t_13 = __pyx_v_step_cmd; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L38_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L38_bool_binop_done:; @@ -10299,43 +10030,43 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L35_bool_binop_done:; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":579 + /* "_pydevd_bundle/pydevd_cython.pyx":564 * # @DontTrace comment. * if stop_frame is frame and event is 'return' and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER): * if not frame.f_code.co_flags & CO_GENERATOR: # <<<<<<<<<<<<<< * info.pydev_step_cmd = CMD_STEP_INTO * info.pydev_step_stop = None */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyNumber_And(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 564; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = ((!__pyx_t_10) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":580 + /* "_pydevd_bundle/pydevd_cython.pyx":565 * if stop_frame is frame and event is 'return' and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER): * if not frame.f_code.co_flags & CO_GENERATOR: * info.pydev_step_cmd = CMD_STEP_INTO # <<<<<<<<<<<<<< * info.pydev_step_stop = None * */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_info->pydev_step_cmd = __pyx_t_13; - /* "_pydevd_bundle/pydevd_cython.pyx":581 + /* "_pydevd_bundle/pydevd_cython.pyx":566 * if not frame.f_code.co_flags & CO_GENERATOR: * info.pydev_step_cmd = CMD_STEP_INTO * info.pydev_step_stop = None # <<<<<<<<<<<<<< @@ -10348,7 +10079,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_v_info->pydev_step_stop); __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":579 + /* "_pydevd_bundle/pydevd_cython.pyx":564 * # @DontTrace comment. * if stop_frame is frame and event is 'return' and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER): * if not frame.f_code.co_flags & CO_GENERATOR: # <<<<<<<<<<<<<< @@ -10357,7 +10088,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":578 + /* "_pydevd_bundle/pydevd_cython.pyx":563 * # Note: this is especially troublesome when we're skipping code with the * # @DontTrace comment. * if stop_frame is frame and event is 'return' and step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER): # <<<<<<<<<<<<<< @@ -10366,16 +10097,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":583 + /* "_pydevd_bundle/pydevd_cython.pyx":568 * info.pydev_step_stop = None * * breakpoints_for_file = main_debugger.breakpoints.get(filename) # <<<<<<<<<<<<<< * * can_skip = False */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_breakpoints); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -10389,16 +10120,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_3) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_filename); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -10406,7 +10137,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_breakpoints_for_file = __pyx_t_4; __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":585 + /* "_pydevd_bundle/pydevd_cython.pyx":570 * breakpoints_for_file = main_debugger.breakpoints.get(filename) * * can_skip = False # <<<<<<<<<<<<<< @@ -10415,25 +10146,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_can_skip = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":587 + /* "_pydevd_bundle/pydevd_cython.pyx":572 * can_skip = False * * if info.pydev_state == STATE_RUN: # <<<<<<<<<<<<<< * #we can skip if: * #- we have no stop marked */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":591 + /* "_pydevd_bundle/pydevd_cython.pyx":576 * #- we have no stop marked * #- we should make a step return/step over and we're not in the current frame * can_skip = (step_cmd == -1 and stop_frame is None)\ # <<<<<<<<<<<<<< @@ -10454,7 +10185,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L43_next_or:; - /* "_pydevd_bundle/pydevd_cython.pyx":592 + /* "_pydevd_bundle/pydevd_cython.pyx":577 * #- we should make a step return/step over and we're not in the current frame * can_skip = (step_cmd == -1 and stop_frame is None)\ * or (step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER) and stop_frame is not frame) # <<<<<<<<<<<<<< @@ -10462,28 +10193,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * if can_skip and plugin_manager is not None and main_debugger.has_plugin_line_breaks: */ __pyx_t_13 = __pyx_v_step_cmd; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L46_bool_binop_done; } - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_t_13); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 577; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = __pyx_t_10; __pyx_L46_bool_binop_done:; @@ -10499,7 +10230,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L42_bool_binop_done:; __pyx_v_can_skip = __pyx_t_9; - /* "_pydevd_bundle/pydevd_cython.pyx":587 + /* "_pydevd_bundle/pydevd_cython.pyx":572 * can_skip = False * * if info.pydev_state == STATE_RUN: # <<<<<<<<<<<<<< @@ -10508,7 +10239,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":594 + /* "_pydevd_bundle/pydevd_cython.pyx":579 * or (step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER) and stop_frame is not frame) * * if can_skip and plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< @@ -10528,22 +10259,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = __pyx_t_10; goto __pyx_L49_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L49_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":595 + /* "_pydevd_bundle/pydevd_cython.pyx":580 * * if can_skip and plugin_manager is not None and main_debugger.has_plugin_line_breaks: * can_skip = not plugin_manager.can_not_skip(main_debugger, self, frame) # <<<<<<<<<<<<<< * * if can_skip and main_debugger.show_return_values: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_can_not_skip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_can_not_skip); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -10557,7 +10288,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -10571,15 +10302,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_11, __pyx_v_frame); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 595; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_can_skip = (!__pyx_t_9); - /* "_pydevd_bundle/pydevd_cython.pyx":594 + /* "_pydevd_bundle/pydevd_cython.pyx":579 * or (step_cmd in (CMD_STEP_RETURN, CMD_STEP_OVER) and stop_frame is not frame) * * if can_skip and plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< @@ -10588,7 +10319,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":597 + /* "_pydevd_bundle/pydevd_cython.pyx":582 * can_skip = not plugin_manager.can_not_skip(main_debugger, self, frame) * * if can_skip and main_debugger.show_return_values: # <<<<<<<<<<<<<< @@ -10601,53 +10332,53 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = __pyx_t_10; goto __pyx_L53_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L53_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":599 + /* "_pydevd_bundle/pydevd_cython.pyx":584 * if can_skip and main_debugger.show_return_values: * # trace function for showing return values after step over * if info.pydev_step_cmd == CMD_STEP_OVER and hasattr(frame, "f_back") and frame.f_back == info.pydev_step_stop: # <<<<<<<<<<<<<< * can_skip = False * */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L56_bool_binop_done; } - __pyx_t_10 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L56_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_info->pydev_step_stop, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_v_info->pydev_step_stop, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L56_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":600 + /* "_pydevd_bundle/pydevd_cython.pyx":585 * # trace function for showing return values after step over * if info.pydev_step_cmd == CMD_STEP_OVER and hasattr(frame, "f_back") and frame.f_back == info.pydev_step_stop: * can_skip = False # <<<<<<<<<<<<<< @@ -10656,7 +10387,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_can_skip = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":599 + /* "_pydevd_bundle/pydevd_cython.pyx":584 * if can_skip and main_debugger.show_return_values: * # trace function for showing return values after step over * if info.pydev_step_cmd == CMD_STEP_OVER and hasattr(frame, "f_back") and frame.f_back == info.pydev_step_stop: # <<<<<<<<<<<<<< @@ -10665,7 +10396,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":597 + /* "_pydevd_bundle/pydevd_cython.pyx":582 * can_skip = not plugin_manager.can_not_skip(main_debugger, self, frame) * * if can_skip and main_debugger.show_return_values: # <<<<<<<<<<<<<< @@ -10674,18 +10405,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":606 + /* "_pydevd_bundle/pydevd_cython.pyx":591 * #also, after we hit a breakpoint and go to some other debugging state, we have to force the set trace anyway, * #so, that's why the additional checks are there. * if not breakpoints_for_file: # <<<<<<<<<<<<<< * if can_skip: * if has_exception_breakpoints: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints_for_file); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoints_for_file); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":607 + /* "_pydevd_bundle/pydevd_cython.pyx":592 * #so, that's why the additional checks are there. * if not breakpoints_for_file: * if can_skip: # <<<<<<<<<<<<<< @@ -10695,7 +10426,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_can_skip != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":608 + /* "_pydevd_bundle/pydevd_cython.pyx":593 * if not breakpoints_for_file: * if can_skip: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -10705,7 +10436,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_has_exception_breakpoints != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":609 + /* "_pydevd_bundle/pydevd_cython.pyx":594 * if can_skip: * if has_exception_breakpoints: * return self.trace_exception # <<<<<<<<<<<<<< @@ -10713,13 +10444,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * if need_trace_return: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":608 + /* "_pydevd_bundle/pydevd_cython.pyx":593 * if not breakpoints_for_file: * if can_skip: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -10728,7 +10459,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":611 + /* "_pydevd_bundle/pydevd_cython.pyx":596 * return self.trace_exception * else: * if need_trace_return: # <<<<<<<<<<<<<< @@ -10736,10 +10467,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * else: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_need_trace_return); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_need_trace_return); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":612 + /* "_pydevd_bundle/pydevd_cython.pyx":597 * else: * if need_trace_return: * return self.trace_return # <<<<<<<<<<<<<< @@ -10747,13 +10478,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * return None */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_return); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_return); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":611 + /* "_pydevd_bundle/pydevd_cython.pyx":596 * return self.trace_exception * else: * if need_trace_return: # <<<<<<<<<<<<<< @@ -10762,7 +10493,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":614 + /* "_pydevd_bundle/pydevd_cython.pyx":599 * return self.trace_return * else: * return None # <<<<<<<<<<<<<< @@ -10777,7 +10508,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } - /* "_pydevd_bundle/pydevd_cython.pyx":607 + /* "_pydevd_bundle/pydevd_cython.pyx":592 * #so, that's why the additional checks are there. * if not breakpoints_for_file: * if can_skip: # <<<<<<<<<<<<<< @@ -10786,7 +10517,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":606 + /* "_pydevd_bundle/pydevd_cython.pyx":591 * #also, after we hit a breakpoint and go to some other debugging state, we have to force the set trace anyway, * #so, that's why the additional checks are there. * if not breakpoints_for_file: # <<<<<<<<<<<<<< @@ -10796,7 +10527,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L59; } - /* "_pydevd_bundle/pydevd_cython.pyx":618 + /* "_pydevd_bundle/pydevd_cython.pyx":603 * else: * #checks the breakpoint to see if there is a context match in some function * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< @@ -10804,16 +10535,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * #global context is set with an empty name */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_co_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 618; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_v_curr_func_name = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":621 + /* "_pydevd_bundle/pydevd_cython.pyx":606 * * #global context is set with an empty name * if curr_func_name in ('?', ''): # <<<<<<<<<<<<<< @@ -10822,14 +10553,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_v_curr_func_name); __pyx_t_12 = __pyx_v_curr_func_name; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__7, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (!__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L64_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = (__pyx_t_10 != 0); __pyx_t_8 = __pyx_t_9; __pyx_L64_bool_binop_done:; @@ -10837,7 +10568,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":622 + /* "_pydevd_bundle/pydevd_cython.pyx":607 * #global context is set with an empty name * if curr_func_name in ('?', ''): * curr_func_name = '' # <<<<<<<<<<<<<< @@ -10847,7 +10578,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_kp_s_); __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); - /* "_pydevd_bundle/pydevd_cython.pyx":621 + /* "_pydevd_bundle/pydevd_cython.pyx":606 * * #global context is set with an empty name * if curr_func_name in ('?', ''): # <<<<<<<<<<<<<< @@ -10856,14 +10587,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":624 + /* "_pydevd_bundle/pydevd_cython.pyx":609 * curr_func_name = '' * * for breakpoint in dict_iter_values(breakpoints_for_file): #jython does not support itervalues() # <<<<<<<<<<<<<< * #will match either global or some function * if breakpoint.func_name in ('None', curr_func_name): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_iter_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_iter_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -10876,16 +10607,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_breakpoints_for_file); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_breakpoints_for_file); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_breakpoints_for_file); __Pyx_GIVEREF(__pyx_v_breakpoints_for_file); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_breakpoints_for_file); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -10894,9 +10625,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -10904,17 +10635,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); #endif } @@ -10924,7 +10655,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 609; __pyx_clineno = __LINE__; goto __pyx_L6_error;} } break; } @@ -10933,29 +10664,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF_SET(__pyx_v_breakpoint, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":626 + /* "_pydevd_bundle/pydevd_cython.pyx":611 * for breakpoint in dict_iter_values(breakpoints_for_file): #jython does not support itervalues() * #will match either global or some function * if breakpoint.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< * break * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_func_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_func_name); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_None, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_None, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (!__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L69_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_v_curr_func_name, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_v_curr_func_name, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __pyx_t_9 = __pyx_t_8; __pyx_L69_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":627 + /* "_pydevd_bundle/pydevd_cython.pyx":612 * #will match either global or some function * if breakpoint.func_name in ('None', curr_func_name): * break # <<<<<<<<<<<<<< @@ -10964,7 +10695,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ goto __pyx_L67_break; - /* "_pydevd_bundle/pydevd_cython.pyx":626 + /* "_pydevd_bundle/pydevd_cython.pyx":611 * for breakpoint in dict_iter_values(breakpoints_for_file): #jython does not support itervalues() * #will match either global or some function * if breakpoint.func_name in ('None', curr_func_name): # <<<<<<<<<<<<<< @@ -10973,7 +10704,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":624 + /* "_pydevd_bundle/pydevd_cython.pyx":609 * curr_func_name = '' * * for breakpoint in dict_iter_values(breakpoints_for_file): #jython does not support itervalues() # <<<<<<<<<<<<<< @@ -10983,7 +10714,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } /*else*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":630 + /* "_pydevd_bundle/pydevd_cython.pyx":615 * * else: # if we had some break, it won't get here (so, that's a context that we want to skip) * if can_skip: # <<<<<<<<<<<<<< @@ -10993,7 +10724,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_can_skip != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":631 + /* "_pydevd_bundle/pydevd_cython.pyx":616 * else: # if we had some break, it won't get here (so, that's a context that we want to skip) * if can_skip: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -11003,7 +10734,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_v_has_exception_breakpoints != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":632 + /* "_pydevd_bundle/pydevd_cython.pyx":617 * if can_skip: * if has_exception_breakpoints: * return self.trace_exception # <<<<<<<<<<<<<< @@ -11011,14 +10742,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * if need_trace_return: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 632; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_exception); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 617; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":631 + /* "_pydevd_bundle/pydevd_cython.pyx":616 * else: # if we had some break, it won't get here (so, that's a context that we want to skip) * if can_skip: * if has_exception_breakpoints: # <<<<<<<<<<<<<< @@ -11027,7 +10758,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":634 + /* "_pydevd_bundle/pydevd_cython.pyx":619 * return self.trace_exception * else: * if need_trace_return: # <<<<<<<<<<<<<< @@ -11035,10 +10766,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * else: */ /*else*/ { - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_need_trace_return); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_need_trace_return); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L6_error;} if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":635 + /* "_pydevd_bundle/pydevd_cython.pyx":620 * else: * if need_trace_return: * return self.trace_return # <<<<<<<<<<<<<< @@ -11046,14 +10777,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * return None */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_return); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_return); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L5_return; - /* "_pydevd_bundle/pydevd_cython.pyx":634 + /* "_pydevd_bundle/pydevd_cython.pyx":619 * return self.trace_exception * else: * if need_trace_return: # <<<<<<<<<<<<<< @@ -11062,7 +10793,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":637 + /* "_pydevd_bundle/pydevd_cython.pyx":622 * return self.trace_return * else: * return None # <<<<<<<<<<<<<< @@ -11078,7 +10809,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } - /* "_pydevd_bundle/pydevd_cython.pyx":630 + /* "_pydevd_bundle/pydevd_cython.pyx":615 * * else: # if we had some break, it won't get here (so, that's a context that we want to skip) * if can_skip: # <<<<<<<<<<<<<< @@ -11088,7 +10819,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } - /* "_pydevd_bundle/pydevd_cython.pyx":624 + /* "_pydevd_bundle/pydevd_cython.pyx":609 * curr_func_name = '' * * for breakpoint in dict_iter_values(breakpoints_for_file): #jython does not support itervalues() # <<<<<<<<<<<<<< @@ -11102,7 +10833,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L25:; - /* "_pydevd_bundle/pydevd_cython.pyx":643 + /* "_pydevd_bundle/pydevd_cython.pyx":628 * #print 'NOT skipped', frame.f_lineno, frame.f_code.co_name, event * * try: # <<<<<<<<<<<<<< @@ -11116,20 +10847,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":644 + /* "_pydevd_bundle/pydevd_cython.pyx":629 * * try: * line = frame.f_lineno # <<<<<<<<<<<<<< * flag = False * #return is not taken into account for breakpoint hit because we'd have a double-hit in this case */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 629; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_line = __pyx_t_13; - /* "_pydevd_bundle/pydevd_cython.pyx":645 + /* "_pydevd_bundle/pydevd_cython.pyx":630 * try: * line = frame.f_lineno * flag = False # <<<<<<<<<<<<<< @@ -11139,19 +10870,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_XDECREF_SET(__pyx_v_flag, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":649 + /* "_pydevd_bundle/pydevd_cython.pyx":634 * #(one for the line and the other for the return). * * stop_info = {} # <<<<<<<<<<<<<< * breakpoint = None * exist_result = False */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 649; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 634; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_stop_info = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":650 + /* "_pydevd_bundle/pydevd_cython.pyx":635 * * stop_info = {} * breakpoint = None # <<<<<<<<<<<<<< @@ -11161,7 +10892,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_None); __Pyx_XDECREF_SET(__pyx_v_breakpoint, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":651 + /* "_pydevd_bundle/pydevd_cython.pyx":636 * stop_info = {} * breakpoint = None * exist_result = False # <<<<<<<<<<<<<< @@ -11170,7 +10901,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_exist_result = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":652 + /* "_pydevd_bundle/pydevd_cython.pyx":637 * breakpoint = None * exist_result = False * stop = False # <<<<<<<<<<<<<< @@ -11180,7 +10911,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __pyx_v_stop = Py_False; - /* "_pydevd_bundle/pydevd_cython.pyx":653 + /* "_pydevd_bundle/pydevd_cython.pyx":638 * exist_result = False * stop = False * bp_type = None # <<<<<<<<<<<<<< @@ -11190,35 +10921,35 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_None); __pyx_v_bp_type = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":654 + /* "_pydevd_bundle/pydevd_cython.pyx":639 * stop = False * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ # <<<<<<<<<<<<<< * and dict_contains(breakpoints_for_file, line): * breakpoint = breakpoints_for_file[line] */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { } else { __pyx_t_8 = __pyx_t_10; goto __pyx_L84_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_NE)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L84_bool_binop_done; } - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 654; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_9) { } else { @@ -11226,7 +10957,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L84_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":655 + /* "_pydevd_bundle/pydevd_cython.pyx":640 * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ * and dict_contains(breakpoints_for_file, line): # <<<<<<<<<<<<<< @@ -11235,7 +10966,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_t_9 = (__pyx_v_breakpoints_for_file != Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":654 + /* "_pydevd_bundle/pydevd_cython.pyx":639 * stop = False * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ # <<<<<<<<<<<<<< @@ -11249,16 +10980,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L84_bool_binop_done; } - /* "_pydevd_bundle/pydevd_cython.pyx":655 + /* "_pydevd_bundle/pydevd_cython.pyx":640 * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ * and dict_contains(breakpoints_for_file, line): # <<<<<<<<<<<<<< * breakpoint = breakpoints_for_file[line] * new_frame = frame */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_contains); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_dict_contains); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -11272,7 +11003,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -11283,16 +11014,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = __pyx_t_10; __pyx_L84_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":654 + /* "_pydevd_bundle/pydevd_cython.pyx":639 * stop = False * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ # <<<<<<<<<<<<<< @@ -11301,19 +11032,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":656 + /* "_pydevd_bundle/pydevd_cython.pyx":641 * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ * and dict_contains(breakpoints_for_file, line): * breakpoint = breakpoints_for_file[line] # <<<<<<<<<<<<<< * new_frame = frame * stop = True */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_breakpoints_for_file, __pyx_v_line, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_breakpoints_for_file, __pyx_v_line, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 641; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_breakpoint, __pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":657 + /* "_pydevd_bundle/pydevd_cython.pyx":642 * and dict_contains(breakpoints_for_file, line): * breakpoint = breakpoints_for_file[line] * new_frame = frame # <<<<<<<<<<<<<< @@ -11323,7 +11054,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_frame); __pyx_v_new_frame = __pyx_v_frame; - /* "_pydevd_bundle/pydevd_cython.pyx":658 + /* "_pydevd_bundle/pydevd_cython.pyx":643 * breakpoint = breakpoints_for_file[line] * new_frame = frame * stop = True # <<<<<<<<<<<<<< @@ -11333,21 +11064,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_stop, Py_True); - /* "_pydevd_bundle/pydevd_cython.pyx":659 + /* "_pydevd_bundle/pydevd_cython.pyx":644 * new_frame = frame * stop = True * if step_cmd == CMD_STEP_OVER and stop_frame is frame and event in ('line', 'return'): # <<<<<<<<<<<<<< * stop = False #we don't stop on breakpoint if we have to stop by step-over (it will be processed later) * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_10) { } else { @@ -11363,14 +11094,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __Pyx_INCREF(__pyx_v_event); __pyx_t_12 = __pyx_v_event; - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_18 = (__pyx_t_10 != 0); if (!__pyx_t_18) { } else { __pyx_t_9 = __pyx_t_18; goto __pyx_L93_bool_binop_done; } - __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_10 = (__pyx_t_18 != 0); __pyx_t_9 = __pyx_t_10; __pyx_L93_bool_binop_done:; @@ -11380,7 +11111,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L90_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":660 + /* "_pydevd_bundle/pydevd_cython.pyx":645 * stop = True * if step_cmd == CMD_STEP_OVER and stop_frame is frame and event in ('line', 'return'): * stop = False #we don't stop on breakpoint if we have to stop by step-over (it will be processed later) # <<<<<<<<<<<<<< @@ -11390,7 +11121,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":659 + /* "_pydevd_bundle/pydevd_cython.pyx":644 * new_frame = frame * stop = True * if step_cmd == CMD_STEP_OVER and stop_frame is frame and event in ('line', 'return'): # <<<<<<<<<<<<<< @@ -11399,7 +11130,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":654 + /* "_pydevd_bundle/pydevd_cython.pyx":639 * stop = False * bp_type = None * if not flag and event != 'return' and info.pydev_state != STATE_SUSPEND and breakpoints_for_file is not None \ # <<<<<<<<<<<<<< @@ -11409,7 +11140,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L83; } - /* "_pydevd_bundle/pydevd_cython.pyx":661 + /* "_pydevd_bundle/pydevd_cython.pyx":646 * if step_cmd == CMD_STEP_OVER and stop_frame is frame and event in ('line', 'return'): * stop = False #we don't stop on breakpoint if we have to stop by step-over (it will be processed later) * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< @@ -11423,24 +11154,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = __pyx_t_9; goto __pyx_L95_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_has_plugin_line_breaks); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L95_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":662 + /* "_pydevd_bundle/pydevd_cython.pyx":647 * stop = False #we don't stop on breakpoint if we have to stop by step-over (it will be processed later) * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) # <<<<<<<<<<<<<< * if result: * exist_result = True */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_get_breakpoint); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_get_breakpoint); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; __pyx_t_11 = 0; @@ -11454,7 +11185,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_5 = PyTuple_New(5+__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = PyTuple_New(5+__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_1) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL; @@ -11474,24 +11205,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_11, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 647; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_result = __pyx_t_2; __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":663 + /* "_pydevd_bundle/pydevd_cython.pyx":648 * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) * if result: # <<<<<<<<<<<<<< * exist_result = True * (flag, breakpoint, new_frame, bp_type) = result */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":664 + /* "_pydevd_bundle/pydevd_cython.pyx":649 * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) * if result: * exist_result = True # <<<<<<<<<<<<<< @@ -11500,7 +11231,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_exist_result = 1; - /* "_pydevd_bundle/pydevd_cython.pyx":665 + /* "_pydevd_bundle/pydevd_cython.pyx":650 * if result: * exist_result = True * (flag, breakpoint, new_frame, bp_type) = result # <<<<<<<<<<<<<< @@ -11517,7 +11248,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L75_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -11540,7 +11271,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_5,&__pyx_t_4}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -11549,7 +11280,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_5,&__pyx_t_4}; - __pyx_t_1 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_1 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; for (index=0; index < 4; index++) { @@ -11557,7 +11288,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_1), 4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L99_unpacking_done; @@ -11565,7 +11296,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_L99_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_flag, __pyx_t_2); @@ -11577,7 +11308,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_bp_type, __pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":663 + /* "_pydevd_bundle/pydevd_cython.pyx":648 * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: * result = plugin_manager.get_breakpoint(main_debugger, self, frame, event, self._args) * if result: # <<<<<<<<<<<<<< @@ -11586,7 +11317,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":661 + /* "_pydevd_bundle/pydevd_cython.pyx":646 * if step_cmd == CMD_STEP_OVER and stop_frame is frame and event in ('line', 'return'): * stop = False #we don't stop on breakpoint if we have to stop by step-over (it will be processed later) * elif plugin_manager is not None and main_debugger.has_plugin_line_breaks: # <<<<<<<<<<<<<< @@ -11596,24 +11327,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L83:; - /* "_pydevd_bundle/pydevd_cython.pyx":667 + /* "_pydevd_bundle/pydevd_cython.pyx":652 * (flag, breakpoint, new_frame, bp_type) = result * * if breakpoint: # <<<<<<<<<<<<<< * #ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint * # lets do the conditional stuff here */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_breakpoint); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":670 + /* "_pydevd_bundle/pydevd_cython.pyx":655 * #ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint * # lets do the conditional stuff here * if stop or exist_result: # <<<<<<<<<<<<<< * condition = breakpoint.condition * if condition is not None: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (!__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; @@ -11624,19 +11355,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L102_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":671 + /* "_pydevd_bundle/pydevd_cython.pyx":656 * # lets do the conditional stuff here * if stop or exist_result: * condition = breakpoint.condition # <<<<<<<<<<<<<< * if condition is not None: * try: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_condition); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_condition); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 656; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_v_condition = __pyx_t_4; __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":672 + /* "_pydevd_bundle/pydevd_cython.pyx":657 * if stop or exist_result: * condition = breakpoint.condition * if condition is not None: # <<<<<<<<<<<<<< @@ -11647,7 +11378,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":673 + /* "_pydevd_bundle/pydevd_cython.pyx":658 * condition = breakpoint.condition * if condition is not None: * try: # <<<<<<<<<<<<<< @@ -11661,20 +11392,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_21); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":674 + /* "_pydevd_bundle/pydevd_cython.pyx":659 * if condition is not None: * try: * val = eval(condition, new_frame.f_globals, new_frame.f_locals) # <<<<<<<<<<<<<< * if not val: * return self.trace_dispatch */ - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} } + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_condition); __Pyx_GIVEREF(__pyx_v_condition); @@ -11685,24 +11416,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_val = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":675 + /* "_pydevd_bundle/pydevd_cython.pyx":660 * try: * val = eval(condition, new_frame.f_globals, new_frame.f_locals) * if not val: # <<<<<<<<<<<<<< * return self.trace_dispatch * */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_val); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 660; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":676 + /* "_pydevd_bundle/pydevd_cython.pyx":661 * val = eval(condition, new_frame.f_globals, new_frame.f_locals) * if not val: * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -11710,13 +11441,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * except: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L105_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L105_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L109_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":675 + /* "_pydevd_bundle/pydevd_cython.pyx":660 * try: * val = eval(condition, new_frame.f_globals, new_frame.f_locals) * if not val: # <<<<<<<<<<<<<< @@ -11725,7 +11456,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":673 + /* "_pydevd_bundle/pydevd_cython.pyx":658 * condition = breakpoint.condition * if condition is not None: * try: # <<<<<<<<<<<<<< @@ -11746,7 +11477,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":678 + /* "_pydevd_bundle/pydevd_cython.pyx":663 * return self.trace_dispatch * * except: # <<<<<<<<<<<<<< @@ -11755,50 +11486,50 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_3, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 663; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); - /* "_pydevd_bundle/pydevd_cython.pyx":679 + /* "_pydevd_bundle/pydevd_cython.pyx":664 * * except: * if type(condition) != type(''): # <<<<<<<<<<<<<< * if hasattr(condition, 'encode'): * condition = condition.encode('utf-8') */ - __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_condition)), ((PyObject *)Py_TYPE(__pyx_kp_s_)), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_condition)), ((PyObject *)Py_TYPE(__pyx_kp_s_)), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":680 + /* "_pydevd_bundle/pydevd_cython.pyx":665 * except: * if type(condition) != type(''): * if hasattr(condition, 'encode'): # <<<<<<<<<<<<<< * condition = condition.encode('utf-8') * */ - __pyx_t_8 = PyObject_HasAttr(__pyx_v_condition, __pyx_n_s_encode); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_8 = PyObject_HasAttr(__pyx_v_condition, __pyx_n_s_encode); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 665; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":681 + /* "_pydevd_bundle/pydevd_cython.pyx":666 * if type(condition) != type(''): * if hasattr(condition, 'encode'): * condition = condition.encode('utf-8') # <<<<<<<<<<<<<< * * msg = 'Error while evaluating expression: %s\n' % (condition,) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_condition, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_condition, __pyx_n_s_encode); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_condition, __pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":680 + /* "_pydevd_bundle/pydevd_cython.pyx":665 * except: * if type(condition) != type(''): * if hasattr(condition, 'encode'): # <<<<<<<<<<<<<< @@ -11807,7 +11538,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":679 + /* "_pydevd_bundle/pydevd_cython.pyx":664 * * except: * if type(condition) != type(''): # <<<<<<<<<<<<<< @@ -11816,37 +11547,37 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":683 + /* "_pydevd_bundle/pydevd_cython.pyx":668 * condition = condition.encode('utf-8') * * msg = 'Error while evaluating expression: %s\n' % (condition,) # <<<<<<<<<<<<<< * sys.stderr.write(msg) * traceback.print_exc() */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_condition); __Pyx_GIVEREF(__pyx_v_condition); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_condition); - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Error_while_evaluating_expressio, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Error_while_evaluating_expressio, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 668; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_msg = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":684 + /* "_pydevd_bundle/pydevd_cython.pyx":669 * * msg = 'Error while evaluating expression: %s\n' % (condition,) * sys.stderr.write(msg) # <<<<<<<<<<<<<< * traceback.print_exc() * if not main_debugger.suspend_on_breakpoint_exception: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stderr); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -11860,32 +11591,32 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_msg); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_6); __pyx_t_6 = NULL; __Pyx_INCREF(__pyx_v_msg); __Pyx_GIVEREF(__pyx_v_msg); PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_v_msg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 684; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":685 + /* "_pydevd_bundle/pydevd_cython.pyx":670 * msg = 'Error while evaluating expression: %s\n' % (condition,) * sys.stderr.write(msg) * traceback.print_exc() # <<<<<<<<<<<<<< * if not main_debugger.suspend_on_breakpoint_exception: * return self.trace_dispatch */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -11899,30 +11630,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":686 + /* "_pydevd_bundle/pydevd_cython.pyx":671 * sys.stderr.write(msg) * traceback.print_exc() * if not main_debugger.suspend_on_breakpoint_exception: # <<<<<<<<<<<<<< * return self.trace_dispatch * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_suspend_on_breakpoint_exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_suspend_on_breakpoint_exception); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 671; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":687 + /* "_pydevd_bundle/pydevd_cython.pyx":672 * traceback.print_exc() * if not main_debugger.suspend_on_breakpoint_exception: * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -11930,7 +11661,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * stop = True */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L107_except_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -11939,7 +11670,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L108_except_return; - /* "_pydevd_bundle/pydevd_cython.pyx":686 + /* "_pydevd_bundle/pydevd_cython.pyx":671 * sys.stderr.write(msg) * traceback.print_exc() * if not main_debugger.suspend_on_breakpoint_exception: # <<<<<<<<<<<<<< @@ -11948,7 +11679,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":689 + /* "_pydevd_bundle/pydevd_cython.pyx":674 * return self.trace_dispatch * else: * stop = True # <<<<<<<<<<<<<< @@ -11959,7 +11690,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_stop, Py_True); - /* "_pydevd_bundle/pydevd_cython.pyx":690 + /* "_pydevd_bundle/pydevd_cython.pyx":675 * else: * stop = True * try: # <<<<<<<<<<<<<< @@ -11973,16 +11704,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_25); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":692 + /* "_pydevd_bundle/pydevd_cython.pyx":677 * try: * # add exception_type and stacktrace into thread additional info * etype, value, tb = sys.exc_info() # <<<<<<<<<<<<<< * try: * error = ''.join(traceback.format_exception_only(etype, value)) */ - __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = NULL; @@ -11996,10 +11727,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_22) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_22); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12013,7 +11744,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -12029,17 +11760,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_26 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + __pyx_t_26 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __Pyx_GOTREF(__pyx_t_26); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_26)->tp_iternext; @@ -12049,7 +11780,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(__pyx_t_22); index = 2; __pyx_t_6 = __pyx_t_7(__pyx_t_26); if (unlikely(!__pyx_t_6)) goto __pyx_L127_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_26), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_26), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; goto __pyx_L128_unpacking_done; @@ -12057,7 +11788,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L119_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 677; __pyx_clineno = __LINE__; goto __pyx_L119_error;} __pyx_L128_unpacking_done:; } __pyx_v_etype = __pyx_t_1; @@ -12067,7 +11798,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_tb = __pyx_t_6; __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":693 + /* "_pydevd_bundle/pydevd_cython.pyx":678 * # add exception_type and stacktrace into thread additional info * etype, value, tb = sys.exc_info() * try: # <<<<<<<<<<<<<< @@ -12076,16 +11807,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":694 + /* "_pydevd_bundle/pydevd_cython.pyx":679 * etype, value, tb = sys.exc_info() * try: * error = ''.join(traceback.format_exception_only(etype, value)) # <<<<<<<<<<<<<< * stack = traceback.extract_stack(f=tb.tb_frame.f_back) * */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_format_exception_only); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_format_exception_only); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12100,7 +11831,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_1 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -12111,60 +11842,60 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_11, __pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = __Pyx_PyString_Join(__pyx_kp_s_, __pyx_t_2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 679; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_error = ((PyObject*)__pyx_t_22); __pyx_t_22 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":695 + /* "_pydevd_bundle/pydevd_cython.pyx":680 * try: * error = ''.join(traceback.format_exception_only(etype, value)) * stack = traceback.extract_stack(f=tb.tb_frame.f_back) # <<<<<<<<<<<<<< * * # On self.set_suspend(thread, CMD_SET_BREAK) this info will be */ - __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_extract_stack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_extract_stack); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = PyDict_New(); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = PyDict_New(); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_tb, __pyx_n_s_tb_frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + if (PyDict_SetItem(__pyx_t_22, __pyx_n_s_f, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_22); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_22); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 680; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_v_stack = __pyx_t_6; __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":700 + /* "_pydevd_bundle/pydevd_cython.pyx":685 * # sent to the client. * info.conditional_breakpoint_exception = \ * ('Condition:\n' + condition + '\n\nError:\n' + error, stack) # <<<<<<<<<<<<<< * finally: * etype, value, tb = None, None, None */ - __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Condition, __pyx_v_condition); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_6 = PyNumber_Add(__pyx_kp_s_Condition, __pyx_v_condition); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_22 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_Error); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = PyNumber_Add(__pyx_t_6, __pyx_kp_s_Error); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_22, __pyx_v_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_6 = PyNumber_Add(__pyx_t_22, __pyx_v_error); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 700; __pyx_clineno = __LINE__; goto __pyx_L132_error;} + __pyx_t_22 = PyTuple_New(2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L132_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_6); @@ -12173,7 +11904,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di PyTuple_SET_ITEM(__pyx_t_22, 1, __pyx_v_stack); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":699 + /* "_pydevd_bundle/pydevd_cython.pyx":684 * # On self.set_suspend(thread, CMD_SET_BREAK) this info will be * # sent to the client. * info.conditional_breakpoint_exception = \ # <<<<<<<<<<<<<< @@ -12187,7 +11918,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_22 = 0; } - /* "_pydevd_bundle/pydevd_cython.pyx":702 + /* "_pydevd_bundle/pydevd_cython.pyx":687 * ('Condition:\n' + condition + '\n\nError:\n' + error, stack) * finally: * etype, value, tb = None, None, None # <<<<<<<<<<<<<< @@ -12259,7 +11990,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L133:; } - /* "_pydevd_bundle/pydevd_cython.pyx":690 + /* "_pydevd_bundle/pydevd_cython.pyx":675 * else: * stop = True * try: # <<<<<<<<<<<<<< @@ -12279,7 +12010,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":703 + /* "_pydevd_bundle/pydevd_cython.pyx":688 * finally: * etype, value, tb = None, None, None * except: # <<<<<<<<<<<<<< @@ -12288,21 +12019,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} + if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 688; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); - /* "_pydevd_bundle/pydevd_cython.pyx":704 + /* "_pydevd_bundle/pydevd_cython.pyx":689 * etype, value, tb = None, None, None * except: * traceback.print_exc() # <<<<<<<<<<<<<< * * if breakpoint.expression is not None: */ - __pyx_t_26 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} + __pyx_t_26 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} __Pyx_GOTREF(__pyx_t_26); - __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} + __pyx_t_35 = __Pyx_PyObject_GetAttrStr(__pyx_t_26, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} __Pyx_GOTREF(__pyx_t_35); __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; __pyx_t_26 = NULL; @@ -12316,10 +12047,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_26) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_35, __pyx_t_26); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_35, __pyx_t_26); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} __Pyx_DECREF(__pyx_t_26); __pyx_t_26 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_35); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_35); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 689; __pyx_clineno = __LINE__; goto __pyx_L121_except_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; @@ -12331,7 +12062,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L121_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":690 + /* "_pydevd_bundle/pydevd_cython.pyx":675 * else: * stop = True * try: # <<<<<<<<<<<<<< @@ -12358,7 +12089,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L107_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":673 + /* "_pydevd_bundle/pydevd_cython.pyx":658 * condition = breakpoint.condition * if condition is not None: * try: # <<<<<<<<<<<<<< @@ -12390,7 +12121,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L112_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":672 + /* "_pydevd_bundle/pydevd_cython.pyx":657 * if stop or exist_result: * condition = breakpoint.condition * if condition is not None: # <<<<<<<<<<<<<< @@ -12399,21 +12130,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":706 + /* "_pydevd_bundle/pydevd_cython.pyx":691 * traceback.print_exc() * * if breakpoint.expression is not None: # <<<<<<<<<<<<<< * try: * try: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 691; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = (__pyx_t_4 != Py_None); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":707 + /* "_pydevd_bundle/pydevd_cython.pyx":692 * * if breakpoint.expression is not None: * try: # <<<<<<<<<<<<<< @@ -12422,7 +12153,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":708 + /* "_pydevd_bundle/pydevd_cython.pyx":693 * if breakpoint.expression is not None: * try: * try: # <<<<<<<<<<<<<< @@ -12436,22 +12167,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":709 + /* "_pydevd_bundle/pydevd_cython.pyx":694 * try: * try: * val = eval(breakpoint.expression, new_frame.f_globals, new_frame.f_locals) # <<<<<<<<<<<<<< * except: * val = sys.exc_info()[1] */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_breakpoint, __pyx_n_s_expression); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} } + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_globals); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} __Pyx_GOTREF(__pyx_t_3); - if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} + if (unlikely(!__pyx_v_new_frame)) { __Pyx_RaiseUnboundLocalError("new_frame"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_frame, __pyx_n_s_f_locals); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); @@ -12462,13 +12193,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_4 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L146_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_eval, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L146_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":708 + /* "_pydevd_bundle/pydevd_cython.pyx":693 * if breakpoint.expression is not None: * try: * try: # <<<<<<<<<<<<<< @@ -12492,7 +12223,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":710 + /* "_pydevd_bundle/pydevd_cython.pyx":695 * try: * val = eval(breakpoint.expression, new_frame.f_globals, new_frame.f_locals) * except: # <<<<<<<<<<<<<< @@ -12501,21 +12232,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":711 + /* "_pydevd_bundle/pydevd_cython.pyx":696 * val = eval(breakpoint.expression, new_frame.f_globals, new_frame.f_locals) * except: * val = sys.exc_info()[1] # <<<<<<<<<<<<<< * finally: * if val is not None: */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -12529,14 +12260,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_22, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_22); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_22); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;}; + __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L148_except_error;}; __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_22); @@ -12548,7 +12279,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L148_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":708 + /* "_pydevd_bundle/pydevd_cython.pyx":693 * if breakpoint.expression is not None: * try: * try: # <<<<<<<<<<<<<< @@ -12569,7 +12300,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } - /* "_pydevd_bundle/pydevd_cython.pyx":713 + /* "_pydevd_bundle/pydevd_cython.pyx":698 * val = sys.exc_info()[1] * finally: * if val is not None: # <<<<<<<<<<<<<< @@ -12582,29 +12313,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":714 + /* "_pydevd_bundle/pydevd_cython.pyx":699 * finally: * if val is not None: * info.pydev_message = str(val) # <<<<<<<<<<<<<< * * if not main_debugger.first_breakpoint_reached: */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_val); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_info->pydev_message); __Pyx_DECREF(__pyx_v_info->pydev_message); __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":713 + /* "_pydevd_bundle/pydevd_cython.pyx":698 * val = sys.exc_info()[1] * finally: * if val is not None: # <<<<<<<<<<<<<< @@ -12637,35 +12368,35 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_23); __pyx_t_27 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_36 = __pyx_filename; { - if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L160_error;} } + if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L160_error;} } __pyx_t_8 = (__pyx_v_val != Py_None); __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":714 + /* "_pydevd_bundle/pydevd_cython.pyx":699 * finally: * if val is not None: * info.pydev_message = str(val) # <<<<<<<<<<<<<< * * if not main_debugger.first_breakpoint_reached: */ - if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L160_error;} } - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L160_error;} + if (unlikely(!__pyx_v_val)) { __Pyx_RaiseUnboundLocalError("val"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L160_error;} } + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L160_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_val); __Pyx_GIVEREF(__pyx_v_val); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_val); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L160_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L160_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L160_error;} + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 699; __pyx_clineno = __LINE__; goto __pyx_L160_error;} __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_info->pydev_message); __Pyx_DECREF(__pyx_v_info->pydev_message); __pyx_v_info->pydev_message = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":713 + /* "_pydevd_bundle/pydevd_cython.pyx":698 * val = sys.exc_info()[1] * finally: * if val is not None: # <<<<<<<<<<<<<< @@ -12703,7 +12434,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L145:; } - /* "_pydevd_bundle/pydevd_cython.pyx":706 + /* "_pydevd_bundle/pydevd_cython.pyx":691 * traceback.print_exc() * * if breakpoint.expression is not None: # <<<<<<<<<<<<<< @@ -12712,55 +12443,55 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":716 + /* "_pydevd_bundle/pydevd_cython.pyx":701 * info.pydev_message = str(val) * * if not main_debugger.first_breakpoint_reached: # <<<<<<<<<<<<<< * if event == 'call': * if hasattr(frame, 'f_back'): */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_first_breakpoint_reached); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_first_breakpoint_reached); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = ((!__pyx_t_9) != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":717 + /* "_pydevd_bundle/pydevd_cython.pyx":702 * * if not main_debugger.first_breakpoint_reached: * if event == 'call': # <<<<<<<<<<<<<< * if hasattr(frame, 'f_back'): * back = frame.f_back */ - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_call, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":718 + /* "_pydevd_bundle/pydevd_cython.pyx":703 * if not main_debugger.first_breakpoint_reached: * if event == 'call': * if hasattr(frame, 'f_back'): # <<<<<<<<<<<<<< * back = frame.f_back * if back is not None: */ - __pyx_t_9 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 718; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_9 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 703; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":719 + /* "_pydevd_bundle/pydevd_cython.pyx":704 * if event == 'call': * if hasattr(frame, 'f_back'): * back = frame.f_back # <<<<<<<<<<<<<< * if back is not None: * # When we start debug session, we call execfile in pydevd run function. It produces an additional */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_v_back = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":720 + /* "_pydevd_bundle/pydevd_cython.pyx":705 * if hasattr(frame, 'f_back'): * back = frame.f_back * if back is not None: # <<<<<<<<<<<<<< @@ -12771,14 +12502,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":723 + /* "_pydevd_bundle/pydevd_cython.pyx":708 * # When we start debug session, we call execfile in pydevd run function. It produces an additional * # 'call' event for tracing and we stop on the first line of code twice. * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) # <<<<<<<<<<<<<< * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ * (base == DEBUG_START_PY3K[0] and back.f_code.co_name == DEBUG_START_PY3K[1]): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -12791,16 +12522,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_back); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_5); __pyx_t_5 = NULL; __Pyx_INCREF(__pyx_v_back); __Pyx_GIVEREF(__pyx_v_back); PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_v_back); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_22, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_22, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } @@ -12815,7 +12546,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -12831,17 +12562,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_22); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_22 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -12851,7 +12582,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(__pyx_t_22); index = 2; __pyx_t_5 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L166_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L167_unpacking_done; @@ -12859,7 +12590,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 708; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __pyx_L167_unpacking_done:; } __pyx_v__ = __pyx_t_2; @@ -12869,40 +12600,40 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_base = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":724 + /* "_pydevd_bundle/pydevd_cython.pyx":709 * # 'call' event for tracing and we stop on the first line of code twice. * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ # <<<<<<<<<<<<<< * (base == DEBUG_START_PY3K[0] and back.f_code.co_name == DEBUG_START_PY3K[1]): * stop = False */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_base, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_base, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_8) { goto __pyx_L170_next_or; } else { } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; + __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_8) { } else { @@ -12911,46 +12642,46 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L170_next_or:; - /* "_pydevd_bundle/pydevd_cython.pyx":725 + /* "_pydevd_bundle/pydevd_cython.pyx":710 * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ * (base == DEBUG_START_PY3K[0] and back.f_code.co_name == DEBUG_START_PY3K[1]): # <<<<<<<<<<<<<< * stop = False * main_debugger.first_breakpoint_reached = True */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; + __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_v_base, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_v_base, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L169_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START_PY3K); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_5 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;}; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_22, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_22, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L169_bool_binop_done:; - /* "_pydevd_bundle/pydevd_cython.pyx":724 + /* "_pydevd_bundle/pydevd_cython.pyx":709 * # 'call' event for tracing and we stop on the first line of code twice. * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ # <<<<<<<<<<<<<< @@ -12959,7 +12690,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":726 + /* "_pydevd_bundle/pydevd_cython.pyx":711 * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ * (base == DEBUG_START_PY3K[0] and back.f_code.co_name == DEBUG_START_PY3K[1]): * stop = False # <<<<<<<<<<<<<< @@ -12969,16 +12700,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":727 + /* "_pydevd_bundle/pydevd_cython.pyx":712 * (base == DEBUG_START_PY3K[0] and back.f_code.co_name == DEBUG_START_PY3K[1]): * stop = False * main_debugger.first_breakpoint_reached = True # <<<<<<<<<<<<<< * else: * # if the frame is traced after breakpoint stop, */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_first_breakpoint_reached, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_main_debugger, __pyx_n_s_first_breakpoint_reached, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 712; __pyx_clineno = __LINE__; goto __pyx_L75_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":724 + /* "_pydevd_bundle/pydevd_cython.pyx":709 * # 'call' event for tracing and we stop on the first line of code twice. * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if (base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]) or \ # <<<<<<<<<<<<<< @@ -12987,7 +12718,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":720 + /* "_pydevd_bundle/pydevd_cython.pyx":705 * if hasattr(frame, 'f_back'): * back = frame.f_back * if back is not None: # <<<<<<<<<<<<<< @@ -12996,7 +12727,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":718 + /* "_pydevd_bundle/pydevd_cython.pyx":703 * if not main_debugger.first_breakpoint_reached: * if event == 'call': * if hasattr(frame, 'f_back'): # <<<<<<<<<<<<<< @@ -13005,7 +12736,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":717 + /* "_pydevd_bundle/pydevd_cython.pyx":702 * * if not main_debugger.first_breakpoint_reached: * if event == 'call': # <<<<<<<<<<<<<< @@ -13014,7 +12745,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":716 + /* "_pydevd_bundle/pydevd_cython.pyx":701 * info.pydev_message = str(val) * * if not main_debugger.first_breakpoint_reached: # <<<<<<<<<<<<<< @@ -13023,7 +12754,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":670 + /* "_pydevd_bundle/pydevd_cython.pyx":655 * #ok, hit breakpoint, now, we have to discover if it is a conditional breakpoint * # lets do the conditional stuff here * if stop or exist_result: # <<<<<<<<<<<<<< @@ -13032,7 +12763,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":667 + /* "_pydevd_bundle/pydevd_cython.pyx":652 * (flag, breakpoint, new_frame, bp_type) = result * * if breakpoint: # <<<<<<<<<<<<<< @@ -13042,7 +12773,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L100; } - /* "_pydevd_bundle/pydevd_cython.pyx":731 + /* "_pydevd_bundle/pydevd_cython.pyx":716 * # if the frame is traced after breakpoint stop, * # but the file should be ignored while stepping because of filters * if step_cmd != -1: # <<<<<<<<<<<<<< @@ -13053,23 +12784,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = ((__pyx_v_step_cmd != -1L) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":732 + /* "_pydevd_bundle/pydevd_cython.pyx":717 * # but the file should be ignored while stepping because of filters * if step_cmd != -1: * if main_debugger.is_filter_enabled and main_debugger.is_ignored_by_filters(filename): # <<<<<<<<<<<<<< * # ignore files matching stepping filters * return self.trace_dispatch */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_filter_enabled); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_filter_enabled); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L175_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_ignored_by_filters); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_ignored_by_filters); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_22 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -13082,27 +12813,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_22) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_22); __pyx_t_22 = NULL; __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_filename); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L175_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":734 + /* "_pydevd_bundle/pydevd_cython.pyx":719 * if main_debugger.is_filter_enabled and main_debugger.is_ignored_by_filters(filename): * # ignore files matching stepping filters * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -13110,13 +12841,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * # ignore library files while stepping */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 734; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L79_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":732 + /* "_pydevd_bundle/pydevd_cython.pyx":717 * # but the file should be ignored while stepping because of filters * if step_cmd != -1: * if main_debugger.is_filter_enabled and main_debugger.is_ignored_by_filters(filename): # <<<<<<<<<<<<<< @@ -13125,23 +12856,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":735 + /* "_pydevd_bundle/pydevd_cython.pyx":720 * # ignore files matching stepping filters * return self.trace_dispatch * if main_debugger.is_filter_libraries and main_debugger.not_in_scope(filename): # <<<<<<<<<<<<<< * # ignore library files while stepping * return self.trace_dispatch */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_filter_libraries); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_is_filter_libraries); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L178_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) { @@ -13154,27 +12885,27 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_2) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_22 = PyTuple_New(1+1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_22, 0+1, __pyx_v_filename); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_22, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_22, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L178_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":737 + /* "_pydevd_bundle/pydevd_cython.pyx":722 * if main_debugger.is_filter_libraries and main_debugger.not_in_scope(filename): * # ignore library files while stepping * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -13182,13 +12913,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * if main_debugger.show_return_values or main_debugger.remove_return_values_flag: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 722; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L79_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":735 + /* "_pydevd_bundle/pydevd_cython.pyx":720 * # ignore files matching stepping filters * return self.trace_dispatch * if main_debugger.is_filter_libraries and main_debugger.not_in_scope(filename): # <<<<<<<<<<<<<< @@ -13197,7 +12928,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":731 + /* "_pydevd_bundle/pydevd_cython.pyx":716 * # if the frame is traced after breakpoint stop, * # but the file should be ignored while stepping because of filters * if step_cmd != -1: # <<<<<<<<<<<<<< @@ -13208,38 +12939,38 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L100:; - /* "_pydevd_bundle/pydevd_cython.pyx":739 + /* "_pydevd_bundle/pydevd_cython.pyx":724 * return self.trace_dispatch * * if main_debugger.show_return_values or main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< * self.manage_return_values(main_debugger, frame, event, arg) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_show_return_values); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L181_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_remove_return_values_flag); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L181_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":740 + /* "_pydevd_bundle/pydevd_cython.pyx":725 * * if main_debugger.show_return_values or main_debugger.remove_return_values_flag: * self.manage_return_values(main_debugger, frame, event, arg) # <<<<<<<<<<<<<< * * if stop: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_manage_return_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_manage_return_values); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_22 = NULL; __pyx_t_11 = 0; @@ -13253,7 +12984,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_2 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_22); __pyx_t_22 = NULL; @@ -13270,13 +13001,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_11, __pyx_v_arg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":739 + /* "_pydevd_bundle/pydevd_cython.pyx":724 * return self.trace_dispatch * * if main_debugger.show_return_values or main_debugger.remove_return_values_flag: # <<<<<<<<<<<<<< @@ -13285,26 +13016,26 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":742 + /* "_pydevd_bundle/pydevd_cython.pyx":727 * self.manage_return_values(main_debugger, frame, event, arg) * * if stop: # <<<<<<<<<<<<<< * self.set_suspend(thread, CMD_SET_BREAK) * elif flag and plugin_manager is not None: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 742; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":743 + /* "_pydevd_bundle/pydevd_cython.pyx":728 * * if stop: * self.set_suspend(thread, CMD_SET_BREAK) # <<<<<<<<<<<<<< * elif flag and plugin_manager is not None: * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SET_BREAK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SET_BREAK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_22 = NULL; __pyx_t_11 = 0; @@ -13318,7 +13049,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_22) { __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_22); __pyx_t_22 = NULL; @@ -13329,13 +13060,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":742 + /* "_pydevd_bundle/pydevd_cython.pyx":727 * self.manage_return_values(main_debugger, frame, event, arg) * * if stop: # <<<<<<<<<<<<<< @@ -13345,14 +13076,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L183; } - /* "_pydevd_bundle/pydevd_cython.pyx":744 + /* "_pydevd_bundle/pydevd_cython.pyx":729 * if stop: * self.set_suspend(thread, CMD_SET_BREAK) * elif flag and plugin_manager is not None: # <<<<<<<<<<<<<< * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) * if result: */ - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; @@ -13364,14 +13095,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L184_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":745 + /* "_pydevd_bundle/pydevd_cython.pyx":730 * self.set_suspend(thread, CMD_SET_BREAK) * elif flag and plugin_manager is not None: * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) # <<<<<<<<<<<<<< * if result: * frame = result */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -13385,7 +13116,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_2 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -13402,24 +13133,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_bp_type); __Pyx_GIVEREF(__pyx_v_bp_type); PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_11, __pyx_v_bp_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 730; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":746 + /* "_pydevd_bundle/pydevd_cython.pyx":731 * elif flag and plugin_manager is not None: * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) * if result: # <<<<<<<<<<<<<< * frame = result * */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L75_error;} if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":747 + /* "_pydevd_bundle/pydevd_cython.pyx":732 * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) * if result: * frame = result # <<<<<<<<<<<<<< @@ -13429,7 +13160,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_result); __Pyx_DECREF_SET(__pyx_v_frame, __pyx_v_result); - /* "_pydevd_bundle/pydevd_cython.pyx":746 + /* "_pydevd_bundle/pydevd_cython.pyx":731 * elif flag and plugin_manager is not None: * result = plugin_manager.suspend(main_debugger, thread, frame, bp_type) * if result: # <<<<<<<<<<<<<< @@ -13438,7 +13169,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":744 + /* "_pydevd_bundle/pydevd_cython.pyx":729 * if stop: * self.set_suspend(thread, CMD_SET_BREAK) * elif flag and plugin_manager is not None: # <<<<<<<<<<<<<< @@ -13448,32 +13179,32 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L183:; - /* "_pydevd_bundle/pydevd_cython.pyx":750 + /* "_pydevd_bundle/pydevd_cython.pyx":735 * * # if thread has a suspend flag, we suspend with a busy wait * if info.pydev_state == STATE_SUSPEND: # <<<<<<<<<<<<<< * self.do_wait_suspend(thread, frame, event, arg) * return self.trace_dispatch */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_info->pydev_state); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":751 + /* "_pydevd_bundle/pydevd_cython.pyx":736 * # if thread has a suspend flag, we suspend with a busy wait * if info.pydev_state == STATE_SUSPEND: * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< * return self.trace_dispatch * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -13487,7 +13218,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_4 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_4 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -13504,13 +13235,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_4, 3+__pyx_t_11, __pyx_v_arg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":752 + /* "_pydevd_bundle/pydevd_cython.pyx":737 * if info.pydev_state == STATE_SUSPEND: * self.do_wait_suspend(thread, frame, event, arg) * return self.trace_dispatch # <<<<<<<<<<<<<< @@ -13518,13 +13249,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * except: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L75_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L75_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L79_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":750 + /* "_pydevd_bundle/pydevd_cython.pyx":735 * * # if thread has a suspend flag, we suspend with a busy wait * if info.pydev_state == STATE_SUSPEND: # <<<<<<<<<<<<<< @@ -13533,7 +13264,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":643 + /* "_pydevd_bundle/pydevd_cython.pyx":628 * #print 'NOT skipped', frame.f_lineno, frame.f_code.co_name, event * * try: # <<<<<<<<<<<<<< @@ -13557,7 +13288,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":754 + /* "_pydevd_bundle/pydevd_cython.pyx":739 * return self.trace_dispatch * * except: # <<<<<<<<<<<<<< @@ -13566,21 +13297,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); - /* "_pydevd_bundle/pydevd_cython.pyx":755 + /* "_pydevd_bundle/pydevd_cython.pyx":740 * * except: * traceback.print_exc() # <<<<<<<<<<<<<< * raise * */ - __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + __pyx_t_22 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_22); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_22, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __pyx_t_22 = NULL; @@ -13594,16 +13325,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_22) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_22); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_22); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} } __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":756 + /* "_pydevd_bundle/pydevd_cython.pyx":741 * except: * traceback.print_exc() * raise # <<<<<<<<<<<<<< @@ -13615,11 +13346,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGIVEREF(__pyx_t_4); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_5, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L77_except_error;} } __pyx_L77_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":643 + /* "_pydevd_bundle/pydevd_cython.pyx":628 * #print 'NOT skipped', frame.f_lineno, frame.f_code.co_name, event * * try: # <<<<<<<<<<<<<< @@ -13640,7 +13371,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L82_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":759 + /* "_pydevd_bundle/pydevd_cython.pyx":744 * * #step handling. We stop when we hit the right frame * try: # <<<<<<<<<<<<<< @@ -13654,7 +13385,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_15); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":760 + /* "_pydevd_bundle/pydevd_cython.pyx":745 * #step handling. We stop when we hit the right frame * try: * should_skip = 0 # <<<<<<<<<<<<<< @@ -13664,16 +13395,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_int_0); __pyx_v_should_skip = __pyx_int_0; - /* "_pydevd_bundle/pydevd_cython.pyx":761 + /* "_pydevd_bundle/pydevd_cython.pyx":746 * try: * should_skip = 0 * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< * if self.should_skip == -1: * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 746; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = (__pyx_t_5 != Py_None); @@ -13681,32 +13412,32 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":762 + /* "_pydevd_bundle/pydevd_cython.pyx":747 * should_skip = 0 * if pydevd_dont_trace.should_trace_hook is not None: * if self.should_skip == -1: # <<<<<<<<<<<<<< * # I.e.: cache the result on self.should_skip (no need to evaluate the same frame multiple times). * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_skip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_skip); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyInt_EqObjC(__pyx_t_5, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":766 + /* "_pydevd_bundle/pydevd_cython.pyx":751 * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code * # Which will be handled by this frame is read-only, so, we can cache it safely. * if not pydevd_dont_trace.should_trace_hook(frame, filename): # <<<<<<<<<<<<<< * # -1, 0, 1 to be Cython-friendly * should_skip = self.should_skip = 1 */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -13721,7 +13452,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -13732,16 +13463,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_11, __pyx_v_filename); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = ((!__pyx_t_10) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":768 + /* "_pydevd_bundle/pydevd_cython.pyx":753 * if not pydevd_dont_trace.should_trace_hook(frame, filename): * # -1, 0, 1 to be Cython-friendly * should_skip = self.should_skip = 1 # <<<<<<<<<<<<<< @@ -13750,9 +13481,9 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_int_1); __Pyx_DECREF_SET(__pyx_v_should_skip, __pyx_int_1); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_should_skip, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_should_skip, __pyx_int_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L190_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":766 + /* "_pydevd_bundle/pydevd_cython.pyx":751 * # Note that on a code reload, we won't re-evaluate this because in practice, the frame.f_code * # Which will be handled by this frame is read-only, so, we can cache it safely. * if not pydevd_dont_trace.should_trace_hook(frame, filename): # <<<<<<<<<<<<<< @@ -13762,7 +13493,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L200; } - /* "_pydevd_bundle/pydevd_cython.pyx":770 + /* "_pydevd_bundle/pydevd_cython.pyx":755 * should_skip = self.should_skip = 1 * else: * should_skip = self.should_skip = 0 # <<<<<<<<<<<<<< @@ -13772,11 +13503,11 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di /*else*/ { __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_should_skip, __pyx_int_0); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_should_skip, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_should_skip, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L190_error;} } __pyx_L200:; - /* "_pydevd_bundle/pydevd_cython.pyx":762 + /* "_pydevd_bundle/pydevd_cython.pyx":747 * should_skip = 0 * if pydevd_dont_trace.should_trace_hook is not None: * if self.should_skip == -1: # <<<<<<<<<<<<<< @@ -13786,7 +13517,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L199; } - /* "_pydevd_bundle/pydevd_cython.pyx":772 + /* "_pydevd_bundle/pydevd_cython.pyx":757 * should_skip = self.should_skip = 0 * else: * should_skip = self.should_skip # <<<<<<<<<<<<<< @@ -13794,14 +13525,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * plugin_stop = False */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_skip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_should_skip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_should_skip, __pyx_t_4); __pyx_t_4 = 0; } __pyx_L199:; - /* "_pydevd_bundle/pydevd_cython.pyx":761 + /* "_pydevd_bundle/pydevd_cython.pyx":746 * try: * should_skip = 0 * if pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< @@ -13810,7 +13541,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":774 + /* "_pydevd_bundle/pydevd_cython.pyx":759 * should_skip = self.should_skip * * plugin_stop = False # <<<<<<<<<<<<<< @@ -13820,17 +13551,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __pyx_v_plugin_stop = Py_False; - /* "_pydevd_bundle/pydevd_cython.pyx":775 + /* "_pydevd_bundle/pydevd_cython.pyx":760 * * plugin_stop = False * if should_skip: # <<<<<<<<<<<<<< * stop = False * */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_should_skip); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_should_skip); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":776 + /* "_pydevd_bundle/pydevd_cython.pyx":761 * plugin_stop = False * if should_skip: * stop = False # <<<<<<<<<<<<<< @@ -13840,7 +13571,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":775 + /* "_pydevd_bundle/pydevd_cython.pyx":760 * * plugin_stop = False * if should_skip: # <<<<<<<<<<<<<< @@ -13850,25 +13581,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":778 + /* "_pydevd_bundle/pydevd_cython.pyx":763 * stop = False * * elif step_cmd == CMD_STEP_INTO: # <<<<<<<<<<<<<< * stop = event in ('line', 'return') * if plugin_manager is not None: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 778; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":779 + /* "_pydevd_bundle/pydevd_cython.pyx":764 * * elif step_cmd == CMD_STEP_INTO: * stop = event in ('line', 'return') # <<<<<<<<<<<<<< @@ -13877,24 +13608,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_v_event); __pyx_t_12 = __pyx_v_event; - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (!__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L202_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_8 != 0); __pyx_t_9 = __pyx_t_10; __pyx_L202_bool_binop_done:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 764; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":780 + /* "_pydevd_bundle/pydevd_cython.pyx":765 * elif step_cmd == CMD_STEP_INTO: * stop = event in ('line', 'return') * if plugin_manager is not None: # <<<<<<<<<<<<<< @@ -13905,16 +13636,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":781 + /* "_pydevd_bundle/pydevd_cython.pyx":766 * stop = event in ('line', 'return') * if plugin_manager is not None: * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) # <<<<<<<<<<<<<< * if result: * stop, plugin_stop = result */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_into); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_into); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -13928,7 +13659,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_6 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -13951,24 +13682,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_v_stop); PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_11, __pyx_v_stop); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 766; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":782 + /* "_pydevd_bundle/pydevd_cython.pyx":767 * if plugin_manager is not None: * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) * if result: # <<<<<<<<<<<<<< * stop, plugin_stop = result * */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 767; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":783 + /* "_pydevd_bundle/pydevd_cython.pyx":768 * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) * if result: * stop, plugin_stop = result # <<<<<<<<<<<<<< @@ -13985,7 +13716,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -13998,21 +13729,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); #endif } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L206_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L206_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L207_unpacking_done; @@ -14020,7 +13751,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 768; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_L207_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_3); @@ -14028,7 +13759,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":782 + /* "_pydevd_bundle/pydevd_cython.pyx":767 * if plugin_manager is not None: * result = plugin_manager.cmd_step_into(main_debugger, frame, event, self._args, stop_info, stop) * if result: # <<<<<<<<<<<<<< @@ -14037,7 +13768,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":780 + /* "_pydevd_bundle/pydevd_cython.pyx":765 * elif step_cmd == CMD_STEP_INTO: * stop = event in ('line', 'return') * if plugin_manager is not None: # <<<<<<<<<<<<<< @@ -14046,7 +13777,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":778 + /* "_pydevd_bundle/pydevd_cython.pyx":763 * stop = False * * elif step_cmd == CMD_STEP_INTO: # <<<<<<<<<<<<<< @@ -14056,36 +13787,36 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":785 + /* "_pydevd_bundle/pydevd_cython.pyx":770 * stop, plugin_stop = result * * elif step_cmd == CMD_STEP_INTO_MY_CODE: # <<<<<<<<<<<<<< * if not main_debugger.not_in_scope(frame.f_code.co_filename): * stop = event == 'line' */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO_MY_CODE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_INTO_MY_CODE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 770; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":786 + /* "_pydevd_bundle/pydevd_cython.pyx":771 * * elif step_cmd == CMD_STEP_INTO_MY_CODE: * if not main_debugger.not_in_scope(frame.f_code.co_filename): # <<<<<<<<<<<<<< * stop = event == 'line' * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -14099,40 +13830,40 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_6); } else { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = ((!__pyx_t_10) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":787 + /* "_pydevd_bundle/pydevd_cython.pyx":772 * elif step_cmd == CMD_STEP_INTO_MY_CODE: * if not main_debugger.not_in_scope(frame.f_code.co_filename): * stop = event == 'line' # <<<<<<<<<<<<<< * * elif step_cmd == CMD_STEP_OVER: */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L190_error;} - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 772; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":786 + /* "_pydevd_bundle/pydevd_cython.pyx":771 * * elif step_cmd == CMD_STEP_INTO_MY_CODE: * if not main_debugger.not_in_scope(frame.f_code.co_filename): # <<<<<<<<<<<<<< @@ -14141,7 +13872,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":785 + /* "_pydevd_bundle/pydevd_cython.pyx":770 * stop, plugin_stop = result * * elif step_cmd == CMD_STEP_INTO_MY_CODE: # <<<<<<<<<<<<<< @@ -14151,25 +13882,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":789 + /* "_pydevd_bundle/pydevd_cython.pyx":774 * stop = event == 'line' * * elif step_cmd == CMD_STEP_OVER: # <<<<<<<<<<<<<< * stop = stop_frame is frame and event in ('line', 'return') * */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 774; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":790 + /* "_pydevd_bundle/pydevd_cython.pyx":775 * * elif step_cmd == CMD_STEP_OVER: * stop = stop_frame is frame and event in ('line', 'return') # <<<<<<<<<<<<<< @@ -14179,7 +13910,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_v_stop_frame == __pyx_v_frame); if (__pyx_t_9) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_9); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -14187,20 +13918,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __Pyx_INCREF(__pyx_v_event); __pyx_t_12 = __pyx_v_event; - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (!__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L211_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_8 != 0); __pyx_t_9 = __pyx_t_10; __pyx_L211_bool_binop_done:; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_10 = __pyx_t_9; - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 790; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = __pyx_t_3; __pyx_t_3 = 0; @@ -14208,29 +13939,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":792 + /* "_pydevd_bundle/pydevd_cython.pyx":777 * stop = stop_frame is frame and event in ('line', 'return') * * if frame.f_code.co_flags & CO_GENERATOR: # <<<<<<<<<<<<<< * if event is 'return': * stop = False */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_flags); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyNumber_And(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyNumber_And(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":793 + /* "_pydevd_bundle/pydevd_cython.pyx":778 * * if frame.f_code.co_flags & CO_GENERATOR: * if event is 'return': # <<<<<<<<<<<<<< @@ -14241,7 +13972,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":794 + /* "_pydevd_bundle/pydevd_cython.pyx":779 * if frame.f_code.co_flags & CO_GENERATOR: * if event is 'return': * stop = False # <<<<<<<<<<<<<< @@ -14251,7 +13982,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":793 + /* "_pydevd_bundle/pydevd_cython.pyx":778 * * if frame.f_code.co_flags & CO_GENERATOR: * if event is 'return': # <<<<<<<<<<<<<< @@ -14260,7 +13991,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":792 + /* "_pydevd_bundle/pydevd_cython.pyx":777 * stop = stop_frame is frame and event in ('line', 'return') * * if frame.f_code.co_flags & CO_GENERATOR: # <<<<<<<<<<<<<< @@ -14269,7 +14000,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":796 + /* "_pydevd_bundle/pydevd_cython.pyx":781 * stop = False * * if plugin_manager is not None: # <<<<<<<<<<<<<< @@ -14280,16 +14011,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":797 + /* "_pydevd_bundle/pydevd_cython.pyx":782 * * if plugin_manager is not None: * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) # <<<<<<<<<<<<<< * if result: * stop, plugin_stop = result */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_over); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_cmd_step_over); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -14303,7 +14034,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_2 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyTuple_New(6+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -14326,24 +14057,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_v_stop); PyTuple_SET_ITEM(__pyx_t_2, 5+__pyx_t_11, __pyx_v_stop); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 782; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_result, __pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":798 + /* "_pydevd_bundle/pydevd_cython.pyx":783 * if plugin_manager is not None: * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) * if result: # <<<<<<<<<<<<<< * stop, plugin_stop = result * */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 798; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_result); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":799 + /* "_pydevd_bundle/pydevd_cython.pyx":784 * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) * if result: * stop, plugin_stop = result # <<<<<<<<<<<<<< @@ -14360,7 +14091,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -14373,21 +14104,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); #endif } else { Py_ssize_t index = -1; - __pyx_t_2 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L217_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_2); if (unlikely(!__pyx_t_5)) goto __pyx_L217_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_2), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L218_unpacking_done; @@ -14395,7 +14126,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 784; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_L218_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_6); @@ -14403,7 +14134,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_plugin_stop, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":798 + /* "_pydevd_bundle/pydevd_cython.pyx":783 * if plugin_manager is not None: * result = plugin_manager.cmd_step_over(main_debugger, frame, event, self._args, stop_info, stop) * if result: # <<<<<<<<<<<<<< @@ -14412,7 +14143,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":796 + /* "_pydevd_bundle/pydevd_cython.pyx":781 * stop = False * * if plugin_manager is not None: # <<<<<<<<<<<<<< @@ -14421,7 +14152,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":789 + /* "_pydevd_bundle/pydevd_cython.pyx":774 * stop = event == 'line' * * elif step_cmd == CMD_STEP_OVER: # <<<<<<<<<<<<<< @@ -14431,25 +14162,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":801 + /* "_pydevd_bundle/pydevd_cython.pyx":786 * stop, plugin_stop = result * * elif step_cmd == CMD_SMART_STEP_INTO: # <<<<<<<<<<<<<< * stop = False * if info.pydev_smart_step_stop is frame: */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SMART_STEP_INTO); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SMART_STEP_INTO); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 801; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":802 + /* "_pydevd_bundle/pydevd_cython.pyx":787 * * elif step_cmd == CMD_SMART_STEP_INTO: * stop = False # <<<<<<<<<<<<<< @@ -14459,7 +14190,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":803 + /* "_pydevd_bundle/pydevd_cython.pyx":788 * elif step_cmd == CMD_SMART_STEP_INTO: * stop = False * if info.pydev_smart_step_stop is frame: # <<<<<<<<<<<<<< @@ -14470,7 +14201,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":804 + /* "_pydevd_bundle/pydevd_cython.pyx":789 * stop = False * if info.pydev_smart_step_stop is frame: * info.pydev_func_name = '.invalid.' # Must match the type in cython # <<<<<<<<<<<<<< @@ -14483,7 +14214,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_v_info->pydev_func_name); __pyx_v_info->pydev_func_name = __pyx_kp_s_invalid; - /* "_pydevd_bundle/pydevd_cython.pyx":805 + /* "_pydevd_bundle/pydevd_cython.pyx":790 * if info.pydev_smart_step_stop is frame: * info.pydev_func_name = '.invalid.' # Must match the type in cython * info.pydev_smart_step_stop = None # <<<<<<<<<<<<<< @@ -14496,7 +14227,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_v_info->pydev_smart_step_stop); __pyx_v_info->pydev_smart_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":803 + /* "_pydevd_bundle/pydevd_cython.pyx":788 * elif step_cmd == CMD_SMART_STEP_INTO: * stop = False * if info.pydev_smart_step_stop is frame: # <<<<<<<<<<<<<< @@ -14505,43 +14236,43 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":807 + /* "_pydevd_bundle/pydevd_cython.pyx":792 * info.pydev_smart_step_stop = None * * if event == 'line' or event == 'exception': # <<<<<<<<<<<<<< * curr_func_name = frame.f_code.co_name * */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (!__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L221_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 807; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 792; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_8 != 0); __pyx_t_9 = __pyx_t_10; __pyx_L221_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":808 + /* "_pydevd_bundle/pydevd_cython.pyx":793 * * if event == 'line' or event == 'exception': * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< * * #global context is set with an empty name */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_co_name); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_XDECREF_SET(__pyx_v_curr_func_name, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":811 + /* "_pydevd_bundle/pydevd_cython.pyx":796 * * #global context is set with an empty name * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< @@ -14550,14 +14281,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_v_curr_func_name); __pyx_t_12 = __pyx_v_curr_func_name; - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__7, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_18 = (__pyx_t_8 != 0); if (!__pyx_t_18) { } else { __pyx_t_10 = __pyx_t_18; goto __pyx_L226_bool_binop_done; } - __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 796; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_18 != 0); __pyx_t_10 = __pyx_t_8; __pyx_L226_bool_binop_done:; @@ -14574,7 +14305,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L224_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":812 + /* "_pydevd_bundle/pydevd_cython.pyx":797 * #global context is set with an empty name * if curr_func_name in ('?', '') or curr_func_name is None: * curr_func_name = '' # <<<<<<<<<<<<<< @@ -14584,7 +14315,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_kp_s_); __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); - /* "_pydevd_bundle/pydevd_cython.pyx":811 + /* "_pydevd_bundle/pydevd_cython.pyx":796 * * #global context is set with an empty name * if curr_func_name in ('?', '') or curr_func_name is None: # <<<<<<<<<<<<<< @@ -14593,18 +14324,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":814 + /* "_pydevd_bundle/pydevd_cython.pyx":799 * curr_func_name = '' * * if curr_func_name == info.pydev_func_name: # <<<<<<<<<<<<<< * stop = True * */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":815 + /* "_pydevd_bundle/pydevd_cython.pyx":800 * * if curr_func_name == info.pydev_func_name: * stop = True # <<<<<<<<<<<<<< @@ -14614,7 +14345,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_stop, Py_True); - /* "_pydevd_bundle/pydevd_cython.pyx":814 + /* "_pydevd_bundle/pydevd_cython.pyx":799 * curr_func_name = '' * * if curr_func_name == info.pydev_func_name: # <<<<<<<<<<<<<< @@ -14623,7 +14354,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":807 + /* "_pydevd_bundle/pydevd_cython.pyx":792 * info.pydev_smart_step_stop = None * * if event == 'line' or event == 'exception': # <<<<<<<<<<<<<< @@ -14632,7 +14363,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":801 + /* "_pydevd_bundle/pydevd_cython.pyx":786 * stop, plugin_stop = result * * elif step_cmd == CMD_SMART_STEP_INTO: # <<<<<<<<<<<<<< @@ -14642,42 +14373,42 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":817 + /* "_pydevd_bundle/pydevd_cython.pyx":802 * stop = True * * elif step_cmd == CMD_STEP_RETURN: # <<<<<<<<<<<<<< * stop = event == 'return' and stop_frame is frame * */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 817; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":818 + /* "_pydevd_bundle/pydevd_cython.pyx":803 * * elif step_cmd == CMD_STEP_RETURN: * stop = event == 'return' and stop_frame is frame # <<<<<<<<<<<<<< * * elif step_cmd == CMD_RUN_TO_LINE or step_cmd == CMD_SET_NEXT_STATEMENT: */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_10) { } else { - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L229_bool_binop_done; } __pyx_t_10 = (__pyx_v_stop_frame == __pyx_v_frame); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; @@ -14685,7 +14416,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF_SET(__pyx_v_stop, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":817 + /* "_pydevd_bundle/pydevd_cython.pyx":802 * stop = True * * elif step_cmd == CMD_STEP_RETURN: # <<<<<<<<<<<<<< @@ -14695,41 +14426,41 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":820 + /* "_pydevd_bundle/pydevd_cython.pyx":805 * stop = event == 'return' and stop_frame is frame * * elif step_cmd == CMD_RUN_TO_LINE or step_cmd == CMD_SET_NEXT_STATEMENT: # <<<<<<<<<<<<<< * stop = False * */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_RUN_TO_LINE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_RUN_TO_LINE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_9) { } else { __pyx_t_10 = __pyx_t_9; goto __pyx_L231_bool_binop_done; } - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SET_NEXT_STATEMENT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CMD_SET_NEXT_STATEMENT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_10 = __pyx_t_9; __pyx_L231_bool_binop_done:; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":821 + /* "_pydevd_bundle/pydevd_cython.pyx":806 * * elif step_cmd == CMD_RUN_TO_LINE or step_cmd == CMD_SET_NEXT_STATEMENT: * stop = False # <<<<<<<<<<<<<< @@ -14739,43 +14470,43 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":823 + /* "_pydevd_bundle/pydevd_cython.pyx":808 * stop = False * * if event == 'line' or event == 'exception': # <<<<<<<<<<<<<< * #Yes, we can only act on line events (weird hum?) * #Note: This code is duplicated at pydevd.py */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (!__pyx_t_8) { } else { __pyx_t_10 = __pyx_t_8; goto __pyx_L234_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_exception, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_9 = (__pyx_t_8 != 0); __pyx_t_10 = __pyx_t_9; __pyx_L234_bool_binop_done:; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":827 + /* "_pydevd_bundle/pydevd_cython.pyx":812 * #Note: This code is duplicated at pydevd.py * #Acting on exception events after debugger breaks with exception * curr_func_name = frame.f_code.co_name # <<<<<<<<<<<<<< * * #global context is set with an empty name */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 827; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_XDECREF_SET(__pyx_v_curr_func_name, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":830 + /* "_pydevd_bundle/pydevd_cython.pyx":815 * * #global context is set with an empty name * if curr_func_name in ('?', ''): # <<<<<<<<<<<<<< @@ -14784,14 +14515,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __Pyx_INCREF(__pyx_v_curr_func_name); __pyx_t_12 = __pyx_v_curr_func_name; - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s__7, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (!__pyx_t_8) { } else { __pyx_t_10 = __pyx_t_8; goto __pyx_L237_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 830; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_12, __pyx_kp_s_module, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 815; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_9 = (__pyx_t_8 != 0); __pyx_t_10 = __pyx_t_9; __pyx_L237_bool_binop_done:; @@ -14799,7 +14530,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":831 + /* "_pydevd_bundle/pydevd_cython.pyx":816 * #global context is set with an empty name * if curr_func_name in ('?', ''): * curr_func_name = '' # <<<<<<<<<<<<<< @@ -14809,7 +14540,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_kp_s_); __Pyx_DECREF_SET(__pyx_v_curr_func_name, __pyx_kp_s_); - /* "_pydevd_bundle/pydevd_cython.pyx":830 + /* "_pydevd_bundle/pydevd_cython.pyx":815 * * #global context is set with an empty name * if curr_func_name in ('?', ''): # <<<<<<<<<<<<<< @@ -14818,18 +14549,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":833 + /* "_pydevd_bundle/pydevd_cython.pyx":818 * curr_func_name = '' * * if curr_func_name == info.pydev_func_name: # <<<<<<<<<<<<<< * line = info.pydev_next_line * if frame.f_lineno == line: */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 833; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_curr_func_name, __pyx_v_info->pydev_func_name, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 818; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":834 + /* "_pydevd_bundle/pydevd_cython.pyx":819 * * if curr_func_name == info.pydev_func_name: * line = info.pydev_next_line # <<<<<<<<<<<<<< @@ -14839,25 +14570,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_13 = __pyx_v_info->pydev_next_line; __pyx_v_line = __pyx_t_13; - /* "_pydevd_bundle/pydevd_cython.pyx":835 + /* "_pydevd_bundle/pydevd_cython.pyx":820 * if curr_func_name == info.pydev_func_name: * line = info.pydev_next_line * if frame.f_lineno == line: # <<<<<<<<<<<<<< * stop = True * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 820; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_10) { - /* "_pydevd_bundle/pydevd_cython.pyx":836 + /* "_pydevd_bundle/pydevd_cython.pyx":821 * line = info.pydev_next_line * if frame.f_lineno == line: * stop = True # <<<<<<<<<<<<<< @@ -14867,7 +14598,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_stop, Py_True); - /* "_pydevd_bundle/pydevd_cython.pyx":835 + /* "_pydevd_bundle/pydevd_cython.pyx":820 * if curr_func_name == info.pydev_func_name: * line = info.pydev_next_line * if frame.f_lineno == line: # <<<<<<<<<<<<<< @@ -14877,7 +14608,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L240; } - /* "_pydevd_bundle/pydevd_cython.pyx":838 + /* "_pydevd_bundle/pydevd_cython.pyx":823 * stop = True * else: * if frame.f_trace is None: # <<<<<<<<<<<<<< @@ -14885,26 +14616,26 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * frame.f_lineno = line */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 823; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_10 = (__pyx_t_6 == Py_None); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":839 + /* "_pydevd_bundle/pydevd_cython.pyx":824 * else: * if frame.f_trace is None: * frame.f_trace = self.trace_dispatch # <<<<<<<<<<<<<< * frame.f_lineno = line * frame.f_trace = None */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 839; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 824; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":838 + /* "_pydevd_bundle/pydevd_cython.pyx":823 * stop = True * else: * if frame.f_trace is None: # <<<<<<<<<<<<<< @@ -14913,28 +14644,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":840 + /* "_pydevd_bundle/pydevd_cython.pyx":825 * if frame.f_trace is None: * frame.f_trace = self.trace_dispatch * frame.f_lineno = line # <<<<<<<<<<<<<< * frame.f_trace = None * stop = True */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_lineno, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 825; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":841 + /* "_pydevd_bundle/pydevd_cython.pyx":826 * frame.f_trace = self.trace_dispatch * frame.f_lineno = line * frame.f_trace = None # <<<<<<<<<<<<<< * stop = True * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_frame, __pyx_n_s_f_trace, Py_None) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L190_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":842 + /* "_pydevd_bundle/pydevd_cython.pyx":827 * frame.f_lineno = line * frame.f_trace = None * stop = True # <<<<<<<<<<<<<< @@ -14946,7 +14677,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L240:; - /* "_pydevd_bundle/pydevd_cython.pyx":833 + /* "_pydevd_bundle/pydevd_cython.pyx":818 * curr_func_name = '' * * if curr_func_name == info.pydev_func_name: # <<<<<<<<<<<<<< @@ -14955,7 +14686,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":823 + /* "_pydevd_bundle/pydevd_cython.pyx":808 * stop = False * * if event == 'line' or event == 'exception': # <<<<<<<<<<<<<< @@ -14964,7 +14695,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":820 + /* "_pydevd_bundle/pydevd_cython.pyx":805 * stop = event == 'return' and stop_frame is frame * * elif step_cmd == CMD_RUN_TO_LINE or step_cmd == CMD_SET_NEXT_STATEMENT: # <<<<<<<<<<<<<< @@ -14974,7 +14705,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L201; } - /* "_pydevd_bundle/pydevd_cython.pyx":845 + /* "_pydevd_bundle/pydevd_cython.pyx":830 * * else: * stop = False # <<<<<<<<<<<<<< @@ -14987,14 +14718,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L201:; - /* "_pydevd_bundle/pydevd_cython.pyx":847 + /* "_pydevd_bundle/pydevd_cython.pyx":832 * stop = False * * if stop and step_cmd != -1 and IS_PY3K: # <<<<<<<<<<<<<< * # in Py3k we start script via our custom `execfile` function, and we shouldn't stop there * # while stepping when execution is finished */ - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; @@ -15006,65 +14737,65 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = __pyx_t_10; goto __pyx_L243_bool_binop_done; } - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_PY3K); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_IS_PY3K); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 832; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L243_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":850 + /* "_pydevd_bundle/pydevd_cython.pyx":835 * # in Py3k we start script via our custom `execfile` function, and we shouldn't stop there * # while stepping when execution is finished * if event == 'return' and hasattr(frame, "f_back") and hasattr(frame.f_back, "f_code"): # <<<<<<<<<<<<<< * back_filename = os.path.basename(frame.f_back.f_code.co_filename) * file_type = get_file_type(back_filename) */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_return, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_10 != 0); if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L247_bool_binop_done; } - __pyx_t_8 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = PyObject_HasAttr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_10 = (__pyx_t_8 != 0); if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L247_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PyObject_HasAttr(__pyx_t_6, __pyx_n_s_f_code); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_10 = PyObject_HasAttr(__pyx_t_6, __pyx_n_s_f_code); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 835; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = (__pyx_t_10 != 0); __pyx_t_9 = __pyx_t_8; __pyx_L247_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":851 + /* "_pydevd_bundle/pydevd_cython.pyx":836 * # while stepping when execution is finished * if event == 'return' and hasattr(frame, "f_back") and hasattr(frame.f_back, "f_code"): * back_filename = os.path.basename(frame.f_back.f_code.co_filename) # <<<<<<<<<<<<<< * file_type = get_file_type(back_filename) * if file_type == PYDEV_FILE: */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_basename); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -15078,17 +14809,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_3) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_6); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 851; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 836; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -15096,14 +14827,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF_SET(__pyx_v_back_filename, __pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":852 + /* "_pydevd_bundle/pydevd_cython.pyx":837 * if event == 'return' and hasattr(frame, "f_back") and hasattr(frame.f_back, "f_code"): * back_filename = os.path.basename(frame.f_back.f_code.co_filename) * file_type = get_file_type(back_filename) # <<<<<<<<<<<<<< * if file_type == PYDEV_FILE: * stop = False */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) { @@ -15116,16 +14847,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_back_filename); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_back_filename); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_back_filename); __Pyx_GIVEREF(__pyx_v_back_filename); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_back_filename); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 852; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -15133,22 +14864,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_v_file_type = __pyx_t_6; __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":853 + /* "_pydevd_bundle/pydevd_cython.pyx":838 * back_filename = os.path.basename(frame.f_back.f_code.co_filename) * file_type = get_file_type(back_filename) * if file_type == PYDEV_FILE: # <<<<<<<<<<<<<< * stop = False * */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_file_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_v_file_type, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":854 + /* "_pydevd_bundle/pydevd_cython.pyx":839 * file_type = get_file_type(back_filename) * if file_type == PYDEV_FILE: * stop = False # <<<<<<<<<<<<<< @@ -15158,7 +14889,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_stop, Py_False); - /* "_pydevd_bundle/pydevd_cython.pyx":853 + /* "_pydevd_bundle/pydevd_cython.pyx":838 * back_filename = os.path.basename(frame.f_back.f_code.co_filename) * file_type = get_file_type(back_filename) * if file_type == PYDEV_FILE: # <<<<<<<<<<<<<< @@ -15167,7 +14898,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":850 + /* "_pydevd_bundle/pydevd_cython.pyx":835 * # in Py3k we start script via our custom `execfile` function, and we shouldn't stop there * # while stepping when execution is finished * if event == 'return' and hasattr(frame, "f_back") and hasattr(frame.f_back, "f_code"): # <<<<<<<<<<<<<< @@ -15176,7 +14907,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":847 + /* "_pydevd_bundle/pydevd_cython.pyx":832 * stop = False * * if stop and step_cmd != -1 and IS_PY3K: # <<<<<<<<<<<<<< @@ -15185,28 +14916,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":856 + /* "_pydevd_bundle/pydevd_cython.pyx":841 * stop = False * * if plugin_stop: # <<<<<<<<<<<<<< * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) * elif stop: */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_plugin_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 856; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_plugin_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 841; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":857 + /* "_pydevd_bundle/pydevd_cython.pyx":842 * * if plugin_stop: * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) # <<<<<<<<<<<<<< * elif stop: * if event == 'line': */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_stop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_plugin_manager, __pyx_n_s_stop); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; __pyx_t_11 = 0; @@ -15220,7 +14951,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_22 = PyTuple_New(7+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = PyTuple_New(7+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -15246,14 +14977,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di PyTuple_SET_ITEM(__pyx_t_22, 6+__pyx_t_11, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_stopped_on_plugin = __pyx_t_5; __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":856 + /* "_pydevd_bundle/pydevd_cython.pyx":841 * stop = False * * if plugin_stop: # <<<<<<<<<<<<<< @@ -15263,37 +14994,37 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L251; } - /* "_pydevd_bundle/pydevd_cython.pyx":858 + /* "_pydevd_bundle/pydevd_cython.pyx":843 * if plugin_stop: * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) * elif stop: # <<<<<<<<<<<<<< * if event == 'line': * self.set_suspend(thread, step_cmd) */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 858; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_stop); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 843; __pyx_clineno = __LINE__; goto __pyx_L190_error;} if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":859 + /* "_pydevd_bundle/pydevd_cython.pyx":844 * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) * elif stop: * if event == 'line': # <<<<<<<<<<<<<< * self.set_suspend(thread, step_cmd) * self.do_wait_suspend(thread, frame, event, arg) */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 859; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_event, __pyx_n_s_line, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 844; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":860 + /* "_pydevd_bundle/pydevd_cython.pyx":845 * elif stop: * if event == 'line': * self.set_suspend(thread, step_cmd) # <<<<<<<<<<<<<< * self.do_wait_suspend(thread, frame, event, arg) * else: #return event */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -15307,7 +15038,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -15318,20 +15049,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_11, __pyx_t_22); __pyx_t_22 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 860; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 845; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":861 + /* "_pydevd_bundle/pydevd_cython.pyx":846 * if event == 'line': * self.set_suspend(thread, step_cmd) * self.do_wait_suspend(thread, frame, event, arg) # <<<<<<<<<<<<<< * else: #return event * back = frame.f_back */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_2 = NULL; __pyx_t_11 = 0; @@ -15345,7 +15076,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_22 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -15362,13 +15093,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_22, 3+__pyx_t_11, __pyx_v_arg); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":859 + /* "_pydevd_bundle/pydevd_cython.pyx":844 * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) * elif stop: * if event == 'line': # <<<<<<<<<<<<<< @@ -15378,7 +15109,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L252; } - /* "_pydevd_bundle/pydevd_cython.pyx":863 + /* "_pydevd_bundle/pydevd_cython.pyx":848 * self.do_wait_suspend(thread, frame, event, arg) * else: #return event * back = frame.f_back # <<<<<<<<<<<<<< @@ -15386,12 +15117,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di * #When we get to the pydevd run function, the debugging has actually finished for the main thread */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_back); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_back, __pyx_t_5); __pyx_t_5 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":864 + /* "_pydevd_bundle/pydevd_cython.pyx":849 * else: #return event * back = frame.f_back * if back is not None: # <<<<<<<<<<<<<< @@ -15402,14 +15133,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":868 + /* "_pydevd_bundle/pydevd_cython.pyx":853 * #(note that it can still go on for other threads, but for this one, we just make it finish) * #So, just setting it to None should be OK * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) # <<<<<<<<<<<<<< * if base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]: * back = None */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_22 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -15422,16 +15153,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (!__pyx_t_22) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_back); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_back); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_22); __pyx_t_22 = NULL; __Pyx_INCREF(__pyx_v_back); __Pyx_GIVEREF(__pyx_v_back); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_back); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -15446,7 +15177,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { @@ -15462,17 +15193,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_22); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_22 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -15482,7 +15213,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GOTREF(__pyx_t_2); index = 2; __pyx_t_22 = __pyx_t_7(__pyx_t_4); if (unlikely(!__pyx_t_22)) goto __pyx_L254_unpacking_failed; __Pyx_GOTREF(__pyx_t_22); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_4), 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L255_unpacking_done; @@ -15490,7 +15221,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 853; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __pyx_L255_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v__, __pyx_t_6); @@ -15500,47 +15231,47 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF_SET(__pyx_v_base, __pyx_t_22); __pyx_t_22 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":869 + /* "_pydevd_bundle/pydevd_cython.pyx":854 * #So, just setting it to None should be OK * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]: # <<<<<<<<<<<<<< * back = None * */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;}; + __pyx_t_22 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;}; __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_v_base, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_v_base, __pyx_t_22, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_8) { } else { __pyx_t_9 = __pyx_t_8; goto __pyx_L257_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_back, __pyx_n_s_f_code); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_co_name); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_DEBUG_START); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;}; + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;}; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_22, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = PyObject_RichCompare(__pyx_t_22, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 854; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __pyx_t_8; __pyx_L257_bool_binop_done:; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":870 + /* "_pydevd_bundle/pydevd_cython.pyx":855 * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]: * back = None # <<<<<<<<<<<<<< @@ -15550,7 +15281,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_back, Py_None); - /* "_pydevd_bundle/pydevd_cython.pyx":869 + /* "_pydevd_bundle/pydevd_cython.pyx":854 * #So, just setting it to None should be OK * _, back_filename, base = get_abs_path_real_path_and_base_from_frame(back) * if base == DEBUG_START[0] and back.f_code.co_name == DEBUG_START[1]: # <<<<<<<<<<<<<< @@ -15560,22 +15291,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L256; } - /* "_pydevd_bundle/pydevd_cython.pyx":872 + /* "_pydevd_bundle/pydevd_cython.pyx":857 * back = None * * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) * #if we're in a return, we want it to appear to the user in the previous frame! */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TRACE_PROPERTY); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_TRACE_PROPERTY); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_2 = PyObject_RichCompare(__pyx_v_base, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = PyObject_RichCompare(__pyx_v_base, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 872; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 857; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":875 + /* "_pydevd_bundle/pydevd_cython.pyx":860 * # We dont want to trace the return event of pydevd_traceproperty (custom property for debugging) * #if we're in a return, we want it to appear to the user in the previous frame! * return None # <<<<<<<<<<<<<< @@ -15587,7 +15318,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_r = Py_None; goto __pyx_L194_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":872 + /* "_pydevd_bundle/pydevd_cython.pyx":857 * back = None * * elif base == TRACE_PROPERTY: # <<<<<<<<<<<<<< @@ -15596,16 +15327,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":877 + /* "_pydevd_bundle/pydevd_cython.pyx":862 * return None * * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< * if not pydevd_dont_trace.should_trace_hook(back, back_filename): * # In this case, we'll have to skip the previous one because it shouldn't be traced. */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 862; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_5 != Py_None); @@ -15613,16 +15344,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":878 + /* "_pydevd_bundle/pydevd_cython.pyx":863 * * elif pydevd_dont_trace.should_trace_hook is not None: * if not pydevd_dont_trace.should_trace_hook(back, back_filename): # <<<<<<<<<<<<<< * # In this case, we'll have to skip the previous one because it shouldn't be traced. * # Also, we have to reset the tracing, because if the parent's parent (or some */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_should_trace_hook); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -15637,7 +15368,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -15648,40 +15379,40 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_back_filename); __Pyx_GIVEREF(__pyx_v_back_filename); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_11, __pyx_v_back_filename); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_22, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 878; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 863; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":884 + /* "_pydevd_bundle/pydevd_cython.pyx":869 * # we should anymore (so, a step in/over/return may not stop anywhere if no parent is traced). * # Related test: _debugger_case17a.py * main_debugger.set_trace_for_frame_and_parents(back, overwrite_prev_trace=True) # <<<<<<<<<<<<<< * return None * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_set_trace_for_frame_and_parents); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = PyTuple_New(1); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_INCREF(__pyx_v_back); __Pyx_GIVEREF(__pyx_v_back); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_v_back); - __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = PyDict_New(); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_overwrite_prev_trace, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L190_error;} - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_22, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_overwrite_prev_trace, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_22, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":885 + /* "_pydevd_bundle/pydevd_cython.pyx":870 * # Related test: _debugger_case17a.py * main_debugger.set_trace_for_frame_and_parents(back, overwrite_prev_trace=True) * return None # <<<<<<<<<<<<<< @@ -15693,7 +15424,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_r = Py_None; goto __pyx_L194_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":878 + /* "_pydevd_bundle/pydevd_cython.pyx":863 * * elif pydevd_dont_trace.should_trace_hook is not None: * if not pydevd_dont_trace.should_trace_hook(back, back_filename): # <<<<<<<<<<<<<< @@ -15702,7 +15433,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":877 + /* "_pydevd_bundle/pydevd_cython.pyx":862 * return None * * elif pydevd_dont_trace.should_trace_hook is not None: # <<<<<<<<<<<<<< @@ -15712,7 +15443,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L256:; - /* "_pydevd_bundle/pydevd_cython.pyx":864 + /* "_pydevd_bundle/pydevd_cython.pyx":849 * else: #return event * back = frame.f_back * if back is not None: # <<<<<<<<<<<<<< @@ -15721,7 +15452,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":887 + /* "_pydevd_bundle/pydevd_cython.pyx":872 * return None * * if back is not None: # <<<<<<<<<<<<<< @@ -15732,16 +15463,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":889 + /* "_pydevd_bundle/pydevd_cython.pyx":874 * if back is not None: * #if we're in a return, we want it to appear to the user in the previous frame! * self.set_suspend(thread, step_cmd) # <<<<<<<<<<<<<< * self.do_wait_suspend(thread, back, event, arg) * else: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_set_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = __Pyx_PyInt_From_int(__pyx_v_step_cmd); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); __pyx_t_5 = NULL; __pyx_t_11 = 0; @@ -15755,7 +15486,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -15766,20 +15497,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_GIVEREF(__pyx_t_22); PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_t_22); __pyx_t_22 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 874; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":890 + /* "_pydevd_bundle/pydevd_cython.pyx":875 * #if we're in a return, we want it to appear to the user in the previous frame! * self.set_suspend(thread, step_cmd) * self.do_wait_suspend(thread, back, event, arg) # <<<<<<<<<<<<<< * else: * #in jython we may not have a back frame */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_do_wait_suspend); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; __pyx_t_11 = 0; @@ -15793,7 +15524,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_11 = 1; } } - __pyx_t_22 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_22 = PyTuple_New(4+__pyx_t_11); if (unlikely(!__pyx_t_22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_22); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_22, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -15810,13 +15541,13 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_22, 3+__pyx_t_11, __pyx_v_arg); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 890; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_22, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 875; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":887 + /* "_pydevd_bundle/pydevd_cython.pyx":872 * return None * * if back is not None: # <<<<<<<<<<<<<< @@ -15826,7 +15557,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L260; } - /* "_pydevd_bundle/pydevd_cython.pyx":893 + /* "_pydevd_bundle/pydevd_cython.pyx":878 * else: * #in jython we may not have a back frame * info.pydev_step_stop = None # <<<<<<<<<<<<<< @@ -15840,7 +15571,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_DECREF(__pyx_v_info->pydev_step_stop); __pyx_v_info->pydev_step_stop = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":894 + /* "_pydevd_bundle/pydevd_cython.pyx":879 * #in jython we may not have a back frame * info.pydev_step_stop = None * info.pydev_step_cmd = -1 # <<<<<<<<<<<<<< @@ -15849,16 +15580,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_info->pydev_step_cmd = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":895 + /* "_pydevd_bundle/pydevd_cython.pyx":880 * info.pydev_step_stop = None * info.pydev_step_cmd = -1 * info.pydev_state = STATE_RUN # <<<<<<<<<<<<<< * * except KeyboardInterrupt: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 895; __pyx_clineno = __LINE__; goto __pyx_L190_error;} + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 880; __pyx_clineno = __LINE__; goto __pyx_L190_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_info->pydev_state = __pyx_t_13; } @@ -15866,7 +15597,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L252:; - /* "_pydevd_bundle/pydevd_cython.pyx":858 + /* "_pydevd_bundle/pydevd_cython.pyx":843 * if plugin_stop: * stopped_on_plugin = plugin_manager.stop(main_debugger, frame, event, self._args, stop_info, arg, step_cmd) * elif stop: # <<<<<<<<<<<<<< @@ -15876,7 +15607,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L251:; - /* "_pydevd_bundle/pydevd_cython.pyx":759 + /* "_pydevd_bundle/pydevd_cython.pyx":744 * * #step handling. We stop when we hit the right frame * try: # <<<<<<<<<<<<<< @@ -15900,7 +15631,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":897 + /* "_pydevd_bundle/pydevd_cython.pyx":882 * info.pydev_state = STATE_RUN * * except KeyboardInterrupt: # <<<<<<<<<<<<<< @@ -15910,12 +15641,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_t_13 = PyErr_ExceptionMatches(__pyx_builtin_KeyboardInterrupt); if (__pyx_t_13) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_22) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_22) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_22); - /* "_pydevd_bundle/pydevd_cython.pyx":898 + /* "_pydevd_bundle/pydevd_cython.pyx":883 * * except KeyboardInterrupt: * raise # <<<<<<<<<<<<<< @@ -15927,10 +15658,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGIVEREF(__pyx_t_22); __Pyx_ErrRestore(__pyx_t_2, __pyx_t_6, __pyx_t_22); __pyx_t_2 = 0; __pyx_t_6 = 0; __pyx_t_22 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 898; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 883; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} } - /* "_pydevd_bundle/pydevd_cython.pyx":899 + /* "_pydevd_bundle/pydevd_cython.pyx":884 * except KeyboardInterrupt: * raise * except: # <<<<<<<<<<<<<< @@ -15939,12 +15670,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 899; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} + if (__Pyx_GetException(&__pyx_t_22, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 884; __pyx_clineno = __LINE__; goto __pyx_L192_except_error;} __Pyx_GOTREF(__pyx_t_22); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); - /* "_pydevd_bundle/pydevd_cython.pyx":900 + /* "_pydevd_bundle/pydevd_cython.pyx":885 * raise * except: * try: # <<<<<<<<<<<<<< @@ -15958,16 +15689,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XGOTREF(__pyx_t_25); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":901 + /* "_pydevd_bundle/pydevd_cython.pyx":886 * except: * try: * traceback.print_exc() # <<<<<<<<<<<<<< * info.pydev_step_cmd = -1 * except: */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L265_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L265_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L265_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L265_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -15981,16 +15712,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } if (__pyx_t_5) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L265_error;} + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L265_error;} __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 901; __pyx_clineno = __LINE__; goto __pyx_L265_error;} + __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 886; __pyx_clineno = __LINE__; goto __pyx_L265_error;} } __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":902 + /* "_pydevd_bundle/pydevd_cython.pyx":887 * try: * traceback.print_exc() * info.pydev_step_cmd = -1 # <<<<<<<<<<<<<< @@ -15999,7 +15730,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ __pyx_v_info->pydev_step_cmd = -1; - /* "_pydevd_bundle/pydevd_cython.pyx":900 + /* "_pydevd_bundle/pydevd_cython.pyx":885 * raise * except: * try: # <<<<<<<<<<<<<< @@ -16020,7 +15751,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":903 + /* "_pydevd_bundle/pydevd_cython.pyx":888 * traceback.print_exc() * info.pydev_step_cmd = -1 * except: # <<<<<<<<<<<<<< @@ -16029,12 +15760,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.PyDBFrame.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 903; __pyx_clineno = __LINE__; goto __pyx_L267_except_error;} + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_3, &__pyx_t_5) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 888; __pyx_clineno = __LINE__; goto __pyx_L267_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_5); - /* "_pydevd_bundle/pydevd_cython.pyx":904 + /* "_pydevd_bundle/pydevd_cython.pyx":889 * info.pydev_step_cmd = -1 * except: * return None # <<<<<<<<<<<<<< @@ -16054,7 +15785,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L267_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":900 + /* "_pydevd_bundle/pydevd_cython.pyx":885 * raise * except: * try: # <<<<<<<<<<<<<< @@ -16081,7 +15812,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } __pyx_L192_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":759 + /* "_pydevd_bundle/pydevd_cython.pyx":744 * * #step handling. We stop when we hit the right frame * try: # <<<<<<<<<<<<<< @@ -16113,7 +15844,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __pyx_L197_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":907 + /* "_pydevd_bundle/pydevd_cython.pyx":892 * * #if we are quitting, let's stop the tracing * retVal = None # <<<<<<<<<<<<<< @@ -16123,33 +15854,33 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di __Pyx_INCREF(Py_None); __pyx_v_retVal = Py_None; - /* "_pydevd_bundle/pydevd_cython.pyx":908 + /* "_pydevd_bundle/pydevd_cython.pyx":893 * #if we are quitting, let's stop the tracing * retVal = None * if not main_debugger.quitting: # <<<<<<<<<<<<<< * retVal = self.trace_dispatch * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_quitting); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_debugger, __pyx_n_s_quitting); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 893; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":909 + /* "_pydevd_bundle/pydevd_cython.pyx":894 * retVal = None * if not main_debugger.quitting: * retVal = self.trace_dispatch # <<<<<<<<<<<<<< * * return retVal */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L6_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 894; __pyx_clineno = __LINE__; goto __pyx_L6_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_retVal, __pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":908 + /* "_pydevd_bundle/pydevd_cython.pyx":893 * #if we are quitting, let's stop the tracing * retVal = None * if not main_debugger.quitting: # <<<<<<<<<<<<<< @@ -16158,7 +15889,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di */ } - /* "_pydevd_bundle/pydevd_cython.pyx":911 + /* "_pydevd_bundle/pydevd_cython.pyx":896 * retVal = self.trace_dispatch * * return retVal # <<<<<<<<<<<<<< @@ -16171,7 +15902,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di goto __pyx_L5_return; } - /* "_pydevd_bundle/pydevd_cython.pyx":913 + /* "_pydevd_bundle/pydevd_cython.pyx":898 * return retVal * finally: * info.is_tracing = False # <<<<<<<<<<<<<< @@ -16228,7 +15959,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di } } - /* "_pydevd_bundle/pydevd_cython.pyx":518 + /* "_pydevd_bundle/pydevd_cython.pyx":503 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< @@ -16290,7 +16021,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_16trace_di return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":936 +/* "_pydevd_bundle/pydevd_cython.pyx":921 * get_file_type = DONT_TRACE.get * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< @@ -16334,21 +16065,21 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_3trace_dispatch(PyObj case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_frame)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 3: if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, 3); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trace_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trace_dispatch") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { goto __pyx_L5_argtuple_error; @@ -16365,7 +16096,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_3trace_dispatch(PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("trace_dispatch", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -16400,14 +16131,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("trace_dispatch", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":938 + /* "_pydevd_bundle/pydevd_cython.pyx":923 * def trace_dispatch(py_db, frame, event, arg): * #try: * t = threadingCurrentThread() # <<<<<<<<<<<<<< * #except: * #this could give an exception (python 2.5 bug), but should not be there anymore... */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threadingCurrentThread); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threadingCurrentThread); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -16420,30 +16151,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_t = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":946 + /* "_pydevd_bundle/pydevd_cython.pyx":931 * #return py_db.trace_dispatch * * if getattr(t, 'pydev_do_not_trace', None): # <<<<<<<<<<<<<< * return None * */ - __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_t, __pyx_n_s_pydev_do_not_trace, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_t, __pyx_n_s_pydev_do_not_trace, Py_None); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 931; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "_pydevd_bundle/pydevd_cython.pyx":947 + /* "_pydevd_bundle/pydevd_cython.pyx":932 * * if getattr(t, 'pydev_do_not_trace', None): * return None # <<<<<<<<<<<<<< @@ -16455,7 +16186,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __pyx_r = Py_None; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":946 + /* "_pydevd_bundle/pydevd_cython.pyx":931 * #return py_db.trace_dispatch * * if getattr(t, 'pydev_do_not_trace', None): # <<<<<<<<<<<<<< @@ -16464,7 +16195,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO */ } - /* "_pydevd_bundle/pydevd_cython.pyx":949 + /* "_pydevd_bundle/pydevd_cython.pyx":934 * return None * * try: # <<<<<<<<<<<<<< @@ -16478,19 +16209,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":950 + /* "_pydevd_bundle/pydevd_cython.pyx":935 * * try: * additional_info = t.additional_info # <<<<<<<<<<<<<< * if additional_info is None: * raise AttributeError() */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_t, __pyx_n_s_additional_info); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_additional_info = __pyx_t_1; __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":951 + /* "_pydevd_bundle/pydevd_cython.pyx":936 * try: * additional_info = t.additional_info * if additional_info is None: # <<<<<<<<<<<<<< @@ -16501,20 +16232,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __pyx_t_8 = (__pyx_t_4 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":952 + /* "_pydevd_bundle/pydevd_cython.pyx":937 * additional_info = t.additional_info * if additional_info is None: * raise AttributeError() # <<<<<<<<<<<<<< * except: * additional_info = t.additional_info = PyDBAdditionalThreadInfo() */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_AttributeError); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L4_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L4_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L4_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":951 + /* "_pydevd_bundle/pydevd_cython.pyx":936 * try: * additional_info = t.additional_info * if additional_info is None: # <<<<<<<<<<<<<< @@ -16523,7 +16254,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO */ } - /* "_pydevd_bundle/pydevd_cython.pyx":949 + /* "_pydevd_bundle/pydevd_cython.pyx":934 * return None * * try: # <<<<<<<<<<<<<< @@ -16540,7 +16271,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":953 + /* "_pydevd_bundle/pydevd_cython.pyx":938 * if additional_info is None: * raise AttributeError() * except: # <<<<<<<<<<<<<< @@ -16549,23 +16280,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.trace_dispatch", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 953; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 938; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":954 + /* "_pydevd_bundle/pydevd_cython.pyx":939 * raise AttributeError() * except: * additional_info = t.additional_info = PyDBAdditionalThreadInfo() # <<<<<<<<<<<<<< * * thread_tracer = ThreadTracer((py_db, t, additional_info)) */ - __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_additional_info, __pyx_t_9); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_additional_info, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_additional_info, __pyx_t_9) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 939; __pyx_clineno = __LINE__; goto __pyx_L6_except_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16574,7 +16305,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO } __pyx_L6_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":949 + /* "_pydevd_bundle/pydevd_cython.pyx":934 * return None * * try: # <<<<<<<<<<<<<< @@ -16594,14 +16325,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __pyx_L11_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":956 + /* "_pydevd_bundle/pydevd_cython.pyx":941 * additional_info = t.additional_info = PyDBAdditionalThreadInfo() * * thread_tracer = ThreadTracer((py_db, t, additional_info)) # <<<<<<<<<<<<<< * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * t._tracer = thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_py_db); __Pyx_GIVEREF(__pyx_v_py_db); @@ -16612,36 +16343,36 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __Pyx_INCREF(__pyx_v_additional_info); __Pyx_GIVEREF(__pyx_v_additional_info); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_additional_info); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 956; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 941; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_thread_tracer = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":958 + /* "_pydevd_bundle/pydevd_cython.pyx":943 * thread_tracer = ThreadTracer((py_db, t, additional_info)) * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * t._tracer = thread_tracer # Hack for cython to keep it alive while the thread is alive (just the method in the SetTrace is not enough). # <<<<<<<<<<<<<< * # ELSE * # ENDIF */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_tracer, ((PyObject *)__pyx_v_thread_tracer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_t, __pyx_n_s_tracer, ((PyObject *)__pyx_v_thread_tracer)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 943; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":961 + /* "_pydevd_bundle/pydevd_cython.pyx":946 * # ELSE * # ENDIF * SetTrace(thread_tracer.__call__) # <<<<<<<<<<<<<< * return thread_tracer.__call__(frame, event, arg) * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SetTrace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SetTrace); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_thread_tracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_thread_tracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -16654,24 +16385,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO } } if (!__pyx_t_9) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 946; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":962 + /* "_pydevd_bundle/pydevd_cython.pyx":947 * # ENDIF * SetTrace(thread_tracer.__call__) * return thread_tracer.__call__(frame, event, arg) # <<<<<<<<<<<<<< @@ -16679,7 +16410,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_thread_tracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_thread_tracer), __pyx_n_s_call_2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_10 = NULL; __pyx_t_11 = 0; @@ -16693,7 +16424,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __pyx_t_11 = 1; } } - __pyx_t_1 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -16707,7 +16438,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_11, __pyx_v_arg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16715,7 +16446,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO __pyx_t_3 = 0; goto __pyx_L0; - /* "_pydevd_bundle/pydevd_cython.pyx":936 + /* "_pydevd_bundle/pydevd_cython.pyx":921 * get_file_type = DONT_TRACE.get * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< @@ -16741,7 +16472,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_2trace_dispatch(CYTHO return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":967 +/* "_pydevd_bundle/pydevd_cython.pyx":952 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -16777,7 +16508,7 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -16788,13 +16519,13 @@ static int __pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_1__init__(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 967; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_args), (&PyTuple_Type), 1, "args", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_ThreadTracer *)__pyx_v_self), __pyx_v_args); /* function exit code */ @@ -16811,7 +16542,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":968 + /* "_pydevd_bundle/pydevd_cython.pyx":953 * cdef public tuple _args; * def __init__(self, tuple args): * self._args = args # <<<<<<<<<<<<<< @@ -16824,7 +16555,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str __Pyx_DECREF(__pyx_v_self->_args); __pyx_v_self->_args = __pyx_v_args; - /* "_pydevd_bundle/pydevd_cython.pyx":967 + /* "_pydevd_bundle/pydevd_cython.pyx":952 * cdef class ThreadTracer: * cdef public tuple _args; * def __init__(self, tuple args): # <<<<<<<<<<<<<< @@ -16838,7 +16569,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer___init__(str return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":976 +/* "_pydevd_bundle/pydevd_cython.pyx":961 * * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -16883,16 +16614,16 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal case 1: if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_event)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -16907,7 +16638,7 @@ static PyObject *__pyx_pw_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_3__cal } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 976; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __Pyx_RaiseArgtupleInvalid("__call__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 961; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -16950,7 +16681,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__call__", 0); - /* "_pydevd_bundle/pydevd_cython.pyx":995 + /* "_pydevd_bundle/pydevd_cython.pyx":980 * cdef PyDBAdditionalThreadInfo additional_info; * # ENDIF * py_db, t, additional_info = self._args # <<<<<<<<<<<<<< @@ -16969,7 +16700,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } #if CYTHON_COMPILING_IN_CPYTHON __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); @@ -16979,18 +16710,18 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_RaiseNoneNotIterableError(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 980; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_py_db = __pyx_t_2; __pyx_t_2 = 0; __pyx_v_t = __pyx_t_3; @@ -16998,7 +16729,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_additional_info = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo *)__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":997 + /* "_pydevd_bundle/pydevd_cython.pyx":982 * py_db, t, additional_info = self._args * * try: # <<<<<<<<<<<<<< @@ -17012,34 +16743,34 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":998 + /* "_pydevd_bundle/pydevd_cython.pyx":983 * * try: * if py_db._finish_debugging_session: # <<<<<<<<<<<<<< * if not py_db._termination_event_set: * #that was not working very well because jython gave some socket errors */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 998; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 983; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":999 + /* "_pydevd_bundle/pydevd_cython.pyx":984 * try: * if py_db._finish_debugging_session: * if not py_db._termination_event_set: # <<<<<<<<<<<<<< * #that was not working very well because jython gave some socket errors * try: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_termination_event_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_termination_event_set); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 999; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 984; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1001 + /* "_pydevd_bundle/pydevd_cython.pyx":986 * if not py_db._termination_event_set: * #that was not working very well because jython gave some socket errors * try: # <<<<<<<<<<<<<< @@ -17053,28 +16784,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1002 + /* "_pydevd_bundle/pydevd_cython.pyx":987 * #that was not working very well because jython gave some socket errors * try: * if py_db.output_checker is None: # <<<<<<<<<<<<<< * kill_all_pydev_threads() * except: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_output_checker); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_output_checker); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 987; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = (__pyx_t_1 == Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1003 + /* "_pydevd_bundle/pydevd_cython.pyx":988 * try: * if py_db.output_checker is None: * kill_all_pydev_threads() # <<<<<<<<<<<<<< * except: * traceback.print_exc() */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_kill_all_pydev_threads); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_kill_all_pydev_threads); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -17087,16 +16818,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L13_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L13_error;} + __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L13_error;} } __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1002 + /* "_pydevd_bundle/pydevd_cython.pyx":987 * #that was not working very well because jython gave some socket errors * try: * if py_db.output_checker is None: # <<<<<<<<<<<<<< @@ -17105,7 +16836,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1001 + /* "_pydevd_bundle/pydevd_cython.pyx":986 * if not py_db._termination_event_set: * #that was not working very well because jython gave some socket errors * try: # <<<<<<<<<<<<<< @@ -17123,7 +16854,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1004 + /* "_pydevd_bundle/pydevd_cython.pyx":989 * if py_db.output_checker is None: * kill_all_pydev_threads() * except: # <<<<<<<<<<<<<< @@ -17132,21 +16863,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1004; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_4, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":1005 + /* "_pydevd_bundle/pydevd_cython.pyx":990 * kill_all_pydev_threads() * except: * traceback.print_exc() # <<<<<<<<<<<<<< * py_db._termination_event_set = True * return None */ - __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __pyx_t_13 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -17160,10 +16891,10 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (__pyx_t_13) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 990; __pyx_clineno = __LINE__; goto __pyx_L15_except_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -17175,7 +16906,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L15_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":1001 + /* "_pydevd_bundle/pydevd_cython.pyx":986 * if not py_db._termination_event_set: * #that was not working very well because jython gave some socket errors * try: # <<<<<<<<<<<<<< @@ -17195,16 +16926,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L20_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1006 + /* "_pydevd_bundle/pydevd_cython.pyx":991 * except: * traceback.print_exc() * py_db._termination_event_set = True # <<<<<<<<<<<<<< * return None * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_termination_event_set, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + if (__Pyx_PyObject_SetAttrStr(__pyx_v_py_db, __pyx_n_s_termination_event_set, Py_True) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":999 + /* "_pydevd_bundle/pydevd_cython.pyx":984 * try: * if py_db._finish_debugging_session: * if not py_db._termination_event_set: # <<<<<<<<<<<<<< @@ -17213,7 +16944,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1007 + /* "_pydevd_bundle/pydevd_cython.pyx":992 * traceback.print_exc() * py_db._termination_event_set = True * return None # <<<<<<<<<<<<<< @@ -17225,7 +16956,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":998 + /* "_pydevd_bundle/pydevd_cython.pyx":983 * * try: * if py_db._finish_debugging_session: # <<<<<<<<<<<<<< @@ -17234,14 +16965,14 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1010 + /* "_pydevd_bundle/pydevd_cython.pyx":995 * * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): # <<<<<<<<<<<<<< * py_db._process_thread_not_alive(get_thread_id(t)) * return None # suspend tracing */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -17254,35 +16985,35 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_t); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_INCREF(__pyx_v_t); __Pyx_GIVEREF(__pyx_v_t); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_t); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1010; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 995; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = ((!__pyx_t_8) != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1011 + /* "_pydevd_bundle/pydevd_cython.pyx":996 * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): * py_db._process_thread_not_alive(get_thread_id(t)) # <<<<<<<<<<<<<< * return None # suspend tracing * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_process_thread_not_alive); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_process_thread_not_alive); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -17295,16 +17026,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_14) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_t); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_INCREF(__pyx_v_t); __Pyx_GIVEREF(__pyx_v_t); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_t); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } @@ -17320,24 +17051,24 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 996; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1012 + /* "_pydevd_bundle/pydevd_cython.pyx":997 * if not is_thread_alive(t): * py_db._process_thread_not_alive(get_thread_id(t)) * return None # suspend tracing # <<<<<<<<<<<<<< @@ -17349,7 +17080,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1010 + /* "_pydevd_bundle/pydevd_cython.pyx":995 * * # if thread is not alive, cancel trace_dispatch processing * if not is_thread_alive(t): # <<<<<<<<<<<<<< @@ -17358,7 +17089,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1014 + /* "_pydevd_bundle/pydevd_cython.pyx":999 * return None # suspend tracing * * try: # <<<<<<<<<<<<<< @@ -17372,29 +17103,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_10); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1016 + /* "_pydevd_bundle/pydevd_cython.pyx":1001 * try: * # Make fast path faster! * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] # <<<<<<<<<<<<<< * except: * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) */ - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L25_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L25_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_frame, __pyx_n_s_f_code); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L25_error;} + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_co_filename); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_t_13); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L25_error;}; + __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_t_13); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L25_error;}; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1016; __pyx_clineno = __LINE__; goto __pyx_L25_error;} + if (!(likely(PyTuple_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L25_error;} __pyx_v_abs_path_real_path_and_base = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1014 + /* "_pydevd_bundle/pydevd_cython.pyx":999 * return None # suspend tracing * * try: # <<<<<<<<<<<<<< @@ -17414,7 +17145,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1017 + /* "_pydevd_bundle/pydevd_cython.pyx":1002 * # Make fast path faster! * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: # <<<<<<<<<<<<<< @@ -17423,19 +17154,19 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1017; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_13, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1002; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":1018 + /* "_pydevd_bundle/pydevd_cython.pyx":1003 * abs_path_real_path_and_base = NORM_PATHS_AND_BASE_CONTAINER[frame.f_code.co_filename] * except: * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) # <<<<<<<<<<<<<< * * if py_db.thread_analyser is not None: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_14 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_1))) { @@ -17448,21 +17179,21 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_14) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_frame); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_frame); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL; __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_frame); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1018; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} + if (!(likely(PyTuple_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_2)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1003; __pyx_clineno = __LINE__; goto __pyx_L27_except_error;} __Pyx_XDECREF_SET(__pyx_v_abs_path_real_path_and_base, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -17472,7 +17203,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L27_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":1014 + /* "_pydevd_bundle/pydevd_cython.pyx":999 * return None # suspend tracing * * try: # <<<<<<<<<<<<<< @@ -17492,30 +17223,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L32_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1020 + /* "_pydevd_bundle/pydevd_cython.pyx":1005 * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) * * if py_db.thread_analyser is not None: # <<<<<<<<<<<<<< * py_db.thread_analyser.log_event(frame) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_thread_analyser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1020; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_thread_analyser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1005; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1021 + /* "_pydevd_bundle/pydevd_cython.pyx":1006 * * if py_db.thread_analyser is not None: * py_db.thread_analyser.log_event(frame) # <<<<<<<<<<<<<< * * if py_db.asyncio_analyser is not None: */ - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_thread_analyser); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_thread_analyser); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_13); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_log_event); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_log_event); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -17529,23 +17260,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_13) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_frame); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_frame); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_frame); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1021; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1020 + /* "_pydevd_bundle/pydevd_cython.pyx":1005 * abs_path_real_path_and_base = get_abs_path_real_path_and_base_from_frame(frame) * * if py_db.thread_analyser is not None: # <<<<<<<<<<<<<< @@ -17554,30 +17285,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1023 + /* "_pydevd_bundle/pydevd_cython.pyx":1008 * py_db.thread_analyser.log_event(frame) * * if py_db.asyncio_analyser is not None: # <<<<<<<<<<<<<< * py_db.asyncio_analyser.log_event(frame) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_asyncio_analyser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_asyncio_analyser); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1008; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1024 + /* "_pydevd_bundle/pydevd_cython.pyx":1009 * * if py_db.asyncio_analyser is not None: * py_db.asyncio_analyser.log_event(frame) # <<<<<<<<<<<<<< * * file_type = get_file_type(abs_path_real_path_and_base[-1]) #we don't want to debug threading or anything related to pydevd */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_asyncio_analyser); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_asyncio_analyser); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_log_event); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_log_event); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -17591,23 +17322,23 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_frame); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_frame); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_INCREF(__pyx_v_frame); __Pyx_GIVEREF(__pyx_v_frame); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_v_frame); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1024; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1009; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1023 + /* "_pydevd_bundle/pydevd_cython.pyx":1008 * py_db.thread_analyser.log_event(frame) * * if py_db.asyncio_analyser is not None: # <<<<<<<<<<<<<< @@ -17616,20 +17347,20 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1026 + /* "_pydevd_bundle/pydevd_cython.pyx":1011 * py_db.asyncio_analyser.log_event(frame) * * file_type = get_file_type(abs_path_real_path_and_base[-1]) #we don't want to debug threading or anything related to pydevd # <<<<<<<<<<<<<< * * if file_type is not None: */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_get_file_type); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_2))) { @@ -17642,17 +17373,17 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } @@ -17660,7 +17391,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_v_file_type = __pyx_t_3; __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1028 + /* "_pydevd_bundle/pydevd_cython.pyx":1013 * file_type = get_file_type(abs_path_real_path_and_base[-1]) #we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -17671,33 +17402,33 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1029 + /* "_pydevd_bundle/pydevd_cython.pyx":1014 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< * if py_db.not_in_scope(abs_path_real_path_and_base[1]): * # print('skipped: trace_dispatch (not in scope)', base, frame.f_lineno, event, frame.f_code.co_name, file_type) */ - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_file_type, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1029; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1014; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1030 + /* "_pydevd_bundle/pydevd_cython.pyx":1015 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if py_db.not_in_scope(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< * # print('skipped: trace_dispatch (not in scope)', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * return None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -17710,26 +17441,26 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_13) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1030; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1032 + /* "_pydevd_bundle/pydevd_cython.pyx":1017 * if py_db.not_in_scope(abs_path_real_path_and_base[1]): * # print('skipped: trace_dispatch (not in scope)', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * return None # <<<<<<<<<<<<<< @@ -17741,7 +17472,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1030 + /* "_pydevd_bundle/pydevd_cython.pyx":1015 * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 * if py_db.not_in_scope(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< @@ -17750,7 +17481,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1029 + /* "_pydevd_bundle/pydevd_cython.pyx":1014 * * if file_type is not None: * if file_type == 1: # inlining LIB_FILE = 1 # <<<<<<<<<<<<<< @@ -17760,7 +17491,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L38; } - /* "_pydevd_bundle/pydevd_cython.pyx":1035 + /* "_pydevd_bundle/pydevd_cython.pyx":1020 * else: * # print('skipped: trace_dispatch', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * return None # <<<<<<<<<<<<<< @@ -17775,7 +17506,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } __pyx_L38:; - /* "_pydevd_bundle/pydevd_cython.pyx":1028 + /* "_pydevd_bundle/pydevd_cython.pyx":1013 * file_type = get_file_type(abs_path_real_path_and_base[-1]) #we don't want to debug threading or anything related to pydevd * * if file_type is not None: # <<<<<<<<<<<<<< @@ -17784,7 +17515,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1037 + /* "_pydevd_bundle/pydevd_cython.pyx":1022 * return None * * if additional_info.pydev_step_cmd != -1: # <<<<<<<<<<<<<< @@ -17794,29 +17525,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_8 = ((__pyx_v_additional_info->pydev_step_cmd != -1L) != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1038 + /* "_pydevd_bundle/pydevd_cython.pyx":1023 * * if additional_info.pydev_step_cmd != -1: * if py_db.is_filter_enabled and py_db.is_ignored_by_filters(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< * # ignore files matching stepping filters * return None */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_filter_enabled); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_filter_enabled); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L42_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_ignored_by_filters); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_ignored_by_filters); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -17829,28 +17560,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_1) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); __pyx_t_1 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L42_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1040 + /* "_pydevd_bundle/pydevd_cython.pyx":1025 * if py_db.is_filter_enabled and py_db.is_ignored_by_filters(abs_path_real_path_and_base[1]): * # ignore files matching stepping filters * return None # <<<<<<<<<<<<<< @@ -17862,7 +17593,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1038 + /* "_pydevd_bundle/pydevd_cython.pyx":1023 * * if additional_info.pydev_step_cmd != -1: * if py_db.is_filter_enabled and py_db.is_ignored_by_filters(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< @@ -17871,29 +17602,29 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1041 + /* "_pydevd_bundle/pydevd_cython.pyx":1026 * # ignore files matching stepping filters * return None * if py_db.is_filter_libraries and py_db.not_in_scope(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< * # ignore library files while stepping * return None */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_filter_libraries); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_is_filter_libraries); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_9) { } else { __pyx_t_8 = __pyx_t_9; goto __pyx_L45_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_not_in_scope); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; __Pyx_GOTREF(__pyx_t_13); __pyx_t_4 = NULL; if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) { @@ -17906,28 +17637,28 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_4) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GOTREF(__pyx_t_3); } else { - __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL; __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1041; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1026; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_8 = __pyx_t_9; __pyx_L45_bool_binop_done:; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1043 + /* "_pydevd_bundle/pydevd_cython.pyx":1028 * if py_db.is_filter_libraries and py_db.not_in_scope(abs_path_real_path_and_base[1]): * # ignore library files while stepping * return None # <<<<<<<<<<<<<< @@ -17939,7 +17670,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1041 + /* "_pydevd_bundle/pydevd_cython.pyx":1026 * # ignore files matching stepping filters * return None * if py_db.is_filter_libraries and py_db.not_in_scope(abs_path_real_path_and_base[1]): # <<<<<<<<<<<<<< @@ -17948,7 +17679,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1037 + /* "_pydevd_bundle/pydevd_cython.pyx":1022 * return None * * if additional_info.pydev_step_cmd != -1: # <<<<<<<<<<<<<< @@ -17957,7 +17688,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1046 + /* "_pydevd_bundle/pydevd_cython.pyx":1031 * * # print('trace_dispatch', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * if additional_info.is_tracing: # <<<<<<<<<<<<<< @@ -17967,7 +17698,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_8 = (__pyx_v_additional_info->is_tracing != 0); if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1047 + /* "_pydevd_bundle/pydevd_cython.pyx":1032 * # print('trace_dispatch', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * if additional_info.is_tracing: * return None #we don't wan't to trace code invoked from pydevd_frame.trace_dispatch # <<<<<<<<<<<<<< @@ -17979,7 +17710,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_r = Py_None; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1046 + /* "_pydevd_bundle/pydevd_cython.pyx":1031 * * # print('trace_dispatch', base, frame.f_lineno, event, frame.f_code.co_name, file_type) * if additional_info.is_tracing: # <<<<<<<<<<<<<< @@ -17988,7 +17719,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1053 + /* "_pydevd_bundle/pydevd_cython.pyx":1038 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * # Note that on Cython we only support more modern idioms (no support for < Python 2.5) * return PyDBFrame((py_db, abs_path_real_path_and_base[1], additional_info, t)).trace_dispatch(frame, event, arg) # <<<<<<<<<<<<<< @@ -17996,15 +17727,15 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal * # return additional_info.create_db_frame((py_db, abs_path_real_path_and_base[1], additional_info, t, frame)).trace_dispatch(frame, event, arg) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PyDBFrame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PyDBFrame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_abs_path_real_path_and_base == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } - __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; + __pyx_t_13 = __Pyx_GetItemInt_Tuple(__pyx_v_abs_path_real_path_and_base, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_13 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;}; __Pyx_GOTREF(__pyx_t_13); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_py_db); __Pyx_GIVEREF(__pyx_v_py_db); @@ -18029,22 +17760,22 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (!__pyx_t_13) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_13); __pyx_t_13 = NULL; __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_trace_dispatch); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -18059,7 +17790,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_16 = 1; } } - __pyx_t_15 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_15 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_15); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -18073,7 +17804,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_INCREF(__pyx_v_arg); __Pyx_GIVEREF(__pyx_v_arg); PyTuple_SET_ITEM(__pyx_t_15, 2+__pyx_t_16, __pyx_v_arg); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_15, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1038; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -18081,7 +17812,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_3 = 0; goto __pyx_L7_try_return; - /* "_pydevd_bundle/pydevd_cython.pyx":997 + /* "_pydevd_bundle/pydevd_cython.pyx":982 * py_db, t, additional_info = self._args * * try: # <<<<<<<<<<<<<< @@ -18098,7 +17829,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1058 + /* "_pydevd_bundle/pydevd_cython.pyx":1043 * # ENDIF * * except SystemExit: # <<<<<<<<<<<<<< @@ -18108,12 +17839,12 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_SystemExit); if (__pyx_t_17) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_15) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_15); - /* "_pydevd_bundle/pydevd_cython.pyx":1059 + /* "_pydevd_bundle/pydevd_cython.pyx":1044 * * except SystemExit: * return None # <<<<<<<<<<<<<< @@ -18129,7 +17860,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L6_except_return; } - /* "_pydevd_bundle/pydevd_cython.pyx":1061 + /* "_pydevd_bundle/pydevd_cython.pyx":1046 * return None * * except Exception: # <<<<<<<<<<<<<< @@ -18139,25 +17870,25 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_t_17 = PyErr_ExceptionMatches(__pyx_builtin_Exception); if (__pyx_t_17) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython.ThreadTracer.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_1, &__pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_15); __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_3); - /* "_pydevd_bundle/pydevd_cython.pyx":1062 + /* "_pydevd_bundle/pydevd_cython.pyx":1047 * * except Exception: * if py_db._finish_debugging_session: # <<<<<<<<<<<<<< * return None # Don't log errors when we're shutting down. * # Log it */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_py_db, __pyx_n_s_finish_debugging_session); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1062; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1047; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_8) { - /* "_pydevd_bundle/pydevd_cython.pyx":1063 + /* "_pydevd_bundle/pydevd_cython.pyx":1048 * except Exception: * if py_db._finish_debugging_session: * return None # Don't log errors when we're shutting down. # <<<<<<<<<<<<<< @@ -18172,7 +17903,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L6_except_return; - /* "_pydevd_bundle/pydevd_cython.pyx":1062 + /* "_pydevd_bundle/pydevd_cython.pyx":1047 * * except Exception: * if py_db._finish_debugging_session: # <<<<<<<<<<<<<< @@ -18181,7 +17912,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1065 + /* "_pydevd_bundle/pydevd_cython.pyx":1050 * return None # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -18195,30 +17926,30 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "_pydevd_bundle/pydevd_cython.pyx":1066 + /* "_pydevd_bundle/pydevd_cython.pyx":1051 * # Log it * try: * if traceback is not None: # <<<<<<<<<<<<<< * # This can actually happen during the interpreter shutdown in Python 2.7 * traceback.print_exc() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1066; __pyx_clineno = __LINE__; goto __pyx_L53_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1051; __pyx_clineno = __LINE__; goto __pyx_L53_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = (__pyx_t_2 != Py_None); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_pydevd_bundle/pydevd_cython.pyx":1068 + /* "_pydevd_bundle/pydevd_cython.pyx":1053 * if traceback is not None: * # This can actually happen during the interpreter shutdown in Python 2.7 * traceback.print_exc() # <<<<<<<<<<<<<< * except: * # Error logging? We're really in the interpreter shutdown... */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_error;} + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L53_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_error;} + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_print_exc); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L53_error;} __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -18232,16 +17963,16 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal } } if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_error;} + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L53_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1068; __pyx_clineno = __LINE__; goto __pyx_L53_error;} + __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1053; __pyx_clineno = __LINE__; goto __pyx_L53_error;} } __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1066 + /* "_pydevd_bundle/pydevd_cython.pyx":1051 * # Log it * try: * if traceback is not None: # <<<<<<<<<<<<<< @@ -18250,7 +17981,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal */ } - /* "_pydevd_bundle/pydevd_cython.pyx":1065 + /* "_pydevd_bundle/pydevd_cython.pyx":1050 * return None # Don't log errors when we're shutting down. * # Log it * try: # <<<<<<<<<<<<<< @@ -18268,7 +17999,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":1069 + /* "_pydevd_bundle/pydevd_cython.pyx":1054 * # This can actually happen during the interpreter shutdown in Python 2.7 * traceback.print_exc() * except: # <<<<<<<<<<<<<< @@ -18287,7 +18018,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal __pyx_L60_try_end:; } - /* "_pydevd_bundle/pydevd_cython.pyx":1073 + /* "_pydevd_bundle/pydevd_cython.pyx":1058 * # (https://github.com/fabioz/PyDev.Debugger/issues/8) * pass * return None # <<<<<<<<<<<<<< @@ -18303,7 +18034,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "_pydevd_bundle/pydevd_cython.pyx":997 + /* "_pydevd_bundle/pydevd_cython.pyx":982 * py_db, t, additional_info = self._args * * try: # <<<<<<<<<<<<<< @@ -18329,7 +18060,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal goto __pyx_L0; } - /* "_pydevd_bundle/pydevd_cython.pyx":976 + /* "_pydevd_bundle/pydevd_cython.pyx":961 * * * def __call__(self, frame, event, arg): # <<<<<<<<<<<<<< @@ -18359,7 +18090,7 @@ static PyObject *__pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__cal return __pyx_r; } -/* "_pydevd_bundle/pydevd_cython.pyx":966 +/* "_pydevd_bundle/pydevd_cython.pyx":951 * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * cdef class ThreadTracer: * cdef public tuple _args; # <<<<<<<<<<<<<< @@ -18417,7 +18148,7 @@ static int __pyx_pf_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_5_args_2__se const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 966; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 951; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -18942,110 +18673,6 @@ static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer = { #endif }; -static struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *__pyx_freelist_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values[8]; -static int __pyx_freecount_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values = 0; - -static PyObject *__pyx_tp_new_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values)))) { - o = (PyObject*)__pyx_freelist_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values[--__pyx_freecount_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values]; - memset(o, 0, sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values)); - (void) PyObject_INIT(o, t); - PyObject_GC_Track(o); - } else { - o = (*t->tp_alloc)(t, 0); - if (unlikely(!o)) return 0; - } - return o; -} - -static void __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(PyObject *o) { - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *)o; - PyObject_GC_UnTrack(o); - Py_CLEAR(p->__pyx_v_frame); - if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values)))) { - __pyx_freelist_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values[__pyx_freecount_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values++] = ((struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *)o); - } else { - (*Py_TYPE(o)->tp_free)(o); - } -} - -static int __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *)o; - if (p->__pyx_v_frame) { - e = (*v)(p->__pyx_v_frame, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values(PyObject *o) { - PyObject* tmp; - struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *p = (struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values *)o; - tmp = ((PyObject*)p->__pyx_v_frame); - p->__pyx_v_frame = Py_None; Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - -static PyTypeObject __pyx_type_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values = { - PyVarObject_HEAD_INIT(0, 0) - "_pydevd_bundle.pydevd_cython.__pyx_scope_struct__manage_return_values", /*tp_name*/ - sizeof(struct __pyx_obj_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ - #endif - #if PY_MAJOR_VERSION >= 3 - 0, /*tp_as_async*/ - #endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - __pyx_tp_traverse_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values, /*tp_traverse*/ - __pyx_tp_clear_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - __pyx_tp_new_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif -}; - static PyMethodDef __pyx_methods[] = { {0, 0, 0, 0} }; @@ -19121,9 +18748,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_TRACE_PROPERTY, __pyx_k_TRACE_PROPERTY, sizeof(__pyx_k_TRACE_PROPERTY), 0, 0, 1, 1}, {&__pyx_kp_s_This_makes_the_tracing_for_a_giv, __pyx_k_This_makes_the_tracing_for_a_giv, sizeof(__pyx_k_This_makes_the_tracing_for_a_giv), 0, 0, 1, 0}, {&__pyx_kp_s_This_method_should_not_be_called, __pyx_k_This_method_should_not_be_called, sizeof(__pyx_k_This_method_should_not_be_called), 0, 0, 1, 0}, - {&__pyx_n_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 1}, - {&__pyx_kp_s__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 0, 1, 0}, - {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, + {&__pyx_n_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 1}, + {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, {&__pyx_n_s_add_additional_frame_by_id, __pyx_k_add_additional_frame_by_id, sizeof(__pyx_k_add_additional_frame_by_id), 0, 0, 1, 1}, {&__pyx_n_s_add_exception_to_frame, __pyx_k_add_exception_to_frame, sizeof(__pyx_k_add_exception_to_frame), 0, 0, 1, 1}, {&__pyx_n_s_additional_info, __pyx_k_additional_info, sizeof(__pyx_k_additional_info), 0, 0, 1, 1}, @@ -19147,15 +18773,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_can_skip, __pyx_k_can_skip, sizeof(__pyx_k_can_skip), 0, 0, 1, 1}, {&__pyx_n_s_check_trace_obj, __pyx_k_check_trace_obj, sizeof(__pyx_k_check_trace_obj), 0, 0, 1, 1}, {&__pyx_n_s_checkcache, __pyx_k_checkcache, sizeof(__pyx_k_checkcache), 0, 0, 1, 1}, - {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1}, {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, + {&__pyx_n_s_cls_name, __pyx_k_cls_name, sizeof(__pyx_k_cls_name), 0, 0, 1, 1}, {&__pyx_n_s_cmd_step_into, __pyx_k_cmd_step_into, sizeof(__pyx_k_cmd_step_into), 0, 0, 1, 1}, {&__pyx_n_s_cmd_step_over, __pyx_k_cmd_step_over, sizeof(__pyx_k_cmd_step_over), 0, 0, 1, 1}, {&__pyx_n_s_co_filename, __pyx_k_co_filename, sizeof(__pyx_k_co_filename), 0, 0, 1, 1}, {&__pyx_n_s_co_flags, __pyx_k_co_flags, sizeof(__pyx_k_co_flags), 0, 0, 1, 1}, {&__pyx_n_s_co_name, __pyx_k_co_name, sizeof(__pyx_k_co_name), 0, 0, 1, 1}, - {&__pyx_n_s_co_varnames, __pyx_k_co_varnames, sizeof(__pyx_k_co_varnames), 0, 0, 1, 1}, - {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1}, {&__pyx_n_s_code_obj, __pyx_k_code_obj, sizeof(__pyx_k_code_obj), 0, 0, 1, 1}, {&__pyx_n_s_compile, __pyx_k_compile, sizeof(__pyx_k_compile), 0, 0, 1, 1}, {&__pyx_n_s_condition, __pyx_k_condition, sizeof(__pyx_k_condition), 0, 0, 1, 1}, @@ -19198,23 +18822,20 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_filename_to_stat_info, __pyx_k_filename_to_stat_info, sizeof(__pyx_k_filename_to_stat_info), 0, 0, 1, 1}, {&__pyx_n_s_finish_debugging_session, __pyx_k_finish_debugging_session, sizeof(__pyx_k_finish_debugging_session), 0, 0, 1, 1}, {&__pyx_n_s_first_appearance_in_scope, __pyx_k_first_appearance_in_scope, sizeof(__pyx_k_first_appearance_in_scope), 0, 0, 1, 1}, - {&__pyx_n_s_first_arg_class, __pyx_k_first_arg_class, sizeof(__pyx_k_first_arg_class), 0, 0, 1, 1}, - {&__pyx_n_s_first_arg_name, __pyx_k_first_arg_name, sizeof(__pyx_k_first_arg_name), 0, 0, 1, 1}, - {&__pyx_n_s_first_arg_obj, __pyx_k_first_arg_obj, sizeof(__pyx_k_first_arg_obj), 0, 0, 1, 1}, {&__pyx_n_s_first_breakpoint_reached, __pyx_k_first_breakpoint_reached, sizeof(__pyx_k_first_breakpoint_reached), 0, 0, 1, 1}, {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1}, {&__pyx_n_s_format_exception_only, __pyx_k_format_exception_only, sizeof(__pyx_k_format_exception_only), 0, 0, 1, 1}, {&__pyx_n_s_frame, __pyx_k_frame, sizeof(__pyx_k_frame), 0, 0, 1, 1}, {&__pyx_n_s_frame_id_to_frame, __pyx_k_frame_id_to_frame, sizeof(__pyx_k_frame_id_to_frame), 0, 0, 1, 1}, {&__pyx_n_s_from_user_input, __pyx_k_from_user_input, sizeof(__pyx_k_from_user_input), 0, 0, 1, 1}, - {&__pyx_n_s_func_code, __pyx_k_func_code, sizeof(__pyx_k_func_code), 0, 0, 1, 1}, {&__pyx_n_s_func_name, __pyx_k_func_name, sizeof(__pyx_k_func_name), 0, 0, 1, 1}, {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1}, {&__pyx_n_s_get_abs_path_real_path_and_base, __pyx_k_get_abs_path_real_path_and_base, sizeof(__pyx_k_get_abs_path_real_path_and_base), 0, 0, 1, 1}, {&__pyx_n_s_get_breakpoint, __pyx_k_get_breakpoint, sizeof(__pyx_k_get_breakpoint), 0, 0, 1, 1}, + {&__pyx_n_s_get_clsname_for_code, __pyx_k_get_clsname_for_code, sizeof(__pyx_k_get_clsname_for_code), 0, 0, 1, 1}, {&__pyx_n_s_get_exception_breakpoint, __pyx_k_get_exception_breakpoint, sizeof(__pyx_k_get_exception_breakpoint), 0, 0, 1, 1}, {&__pyx_n_s_get_file_type, __pyx_k_get_file_type, sizeof(__pyx_k_get_file_type), 0, 0, 1, 1}, - {&__pyx_n_s_get_full_name_if_method, __pyx_k_get_full_name_if_method, sizeof(__pyx_k_get_full_name_if_method), 0, 0, 1, 1}, + {&__pyx_n_s_get_func_name, __pyx_k_get_func_name, sizeof(__pyx_k_get_func_name), 0, 0, 1, 1}, {&__pyx_n_s_get_thread_id, __pyx_k_get_thread_id, sizeof(__pyx_k_get_thread_id), 0, 0, 1, 1}, {&__pyx_n_s_getline, __pyx_k_getline, sizeof(__pyx_k_getline), 0, 0, 1, 1}, {&__pyx_n_s_handle_exception, __pyx_k_handle_exception, sizeof(__pyx_k_handle_exception), 0, 0, 1, 1}, @@ -19237,7 +18858,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_is_filter_libraries, __pyx_k_is_filter_libraries, sizeof(__pyx_k_is_filter_libraries), 0, 0, 1, 1}, {&__pyx_n_s_is_ignored_by_filters, __pyx_k_is_ignored_by_filters, sizeof(__pyx_k_is_ignored_by_filters), 0, 0, 1, 1}, {&__pyx_n_s_is_thread_alive, __pyx_k_is_thread_alive, sizeof(__pyx_k_is_thread_alive), 0, 0, 1, 1}, - {&__pyx_n_s_isclass, __pyx_k_isclass, sizeof(__pyx_k_isclass), 0, 0, 1, 1}, {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, {&__pyx_n_s_just_raised, __pyx_k_just_raised, sizeof(__pyx_k_just_raised), 0, 0, 1, 1}, {&__pyx_n_s_kill_all_pydev_threads, __pyx_k_kill_all_pydev_threads, sizeof(__pyx_k_kill_all_pydev_threads), 0, 0, 1, 1}, @@ -19253,12 +18873,10 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1}, {&__pyx_n_s_merged, __pyx_k_merged, sizeof(__pyx_k_merged), 0, 0, 1, 1}, {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1}, - {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1}, {&__pyx_kp_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 0}, {&__pyx_n_s_module_2, __pyx_k_module_2, sizeof(__pyx_k_module_2), 0, 0, 1, 1}, {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1}, {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, {&__pyx_n_s_need_trace_return, __pyx_k_need_trace_return, sizeof(__pyx_k_need_trace_return), 0, 0, 1, 1}, {&__pyx_n_s_new_frame, __pyx_k_new_frame, sizeof(__pyx_k_new_frame), 0, 0, 1, 1}, {&__pyx_n_s_not_in_scope, __pyx_k_not_in_scope, sizeof(__pyx_k_not_in_scope), 0, 0, 1, 1}, @@ -19292,6 +18910,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_pydevd_bundle_pydevd_kill_all_p, __pyx_k_pydevd_bundle_pydevd_kill_all_p, sizeof(__pyx_k_pydevd_bundle_pydevd_kill_all_p), 0, 0, 1, 1}, {&__pyx_n_s_pydevd_bundle_pydevd_signature, __pyx_k_pydevd_bundle_pydevd_signature, sizeof(__pyx_k_pydevd_bundle_pydevd_signature), 0, 0, 1, 1}, {&__pyx_n_s_pydevd_bundle_pydevd_tracing, __pyx_k_pydevd_bundle_pydevd_tracing, sizeof(__pyx_k_pydevd_bundle_pydevd_tracing), 0, 0, 1, 1}, + {&__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_k_pydevd_bundle_pydevd_utils, sizeof(__pyx_k_pydevd_bundle_pydevd_utils), 0, 0, 1, 1}, {&__pyx_n_s_pydevd_dont_trace, __pyx_k_pydevd_dont_trace, sizeof(__pyx_k_pydevd_dont_trace), 0, 0, 1, 1}, {&__pyx_n_s_pydevd_file_utils, __pyx_k_pydevd_file_utils, sizeof(__pyx_k_pydevd_file_utils), 0, 0, 1, 1}, {&__pyx_kp_s_pydevd_py, __pyx_k_pydevd_py, sizeof(__pyx_k_pydevd_py), 0, 0, 1, 0}, @@ -19307,6 +18926,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_retVal, __pyx_k_retVal, sizeof(__pyx_k_retVal), 0, 0, 1, 1}, {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1}, {&__pyx_n_s_run, __pyx_k_run, sizeof(__pyx_k_run), 0, 0, 1, 1}, + {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1}, {&__pyx_n_s_send_caught_exception_stack, __pyx_k_send_caught_exception_stack, sizeof(__pyx_k_send_caught_exception_stack), 0, 0, 1, 1}, {&__pyx_n_s_send_caught_exception_stack_proc, __pyx_k_send_caught_exception_stack_proc, sizeof(__pyx_k_send_caught_exception_stack_proc), 0, 0, 1, 1}, @@ -19364,13 +18984,13 @@ static int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_GeneratorExit = __Pyx_GetBuiltinName(__pyx_n_s_GeneratorExit); if (!__pyx_builtin_GeneratorExit) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 568; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 897; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 952; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1058; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1061; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_GeneratorExit = __Pyx_GetBuiltinName(__pyx_n_s_GeneratorExit); if (!__pyx_builtin_GeneratorExit) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 553; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_eval = __Pyx_GetBuiltinName(__pyx_n_s_eval); if (!__pyx_builtin_eval) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_KeyboardInterrupt = __Pyx_GetBuiltinName(__pyx_n_s_KeyboardInterrupt); if (!__pyx_builtin_KeyboardInterrupt) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 882; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_SystemExit = __Pyx_GetBuiltinName(__pyx_n_s_SystemExit); if (!__pyx_builtin_SystemExit) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1043; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1046; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -19416,25 +19036,25 @@ static int __Pyx_InitCachedConstants(void) { /* "_pydevd_bundle/pydevd_cython.pyx":468 * def manage_return_values(self, main_debugger, frame, event, arg): * - * def get_full_name_if_method(func_name): # <<<<<<<<<<<<<< - * # In the frame we have access to the code object, but not to the callable object, - * # that's why we're trying to get the name of class for methods in such a tricky way: + * def get_func_name(frame): # <<<<<<<<<<<<<< + * code_obj = frame.f_code + * func_name = code_obj.co_name */ - __pyx_tuple__6 = PyTuple_Pack(7, __pyx_n_s_func_name, __pyx_n_s_code_obj, __pyx_n_s_first_arg_name, __pyx_n_s_first_arg_obj, __pyx_n_s_first_arg_class, __pyx_n_s_method, __pyx_n_s_func_code); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__6); - __Pyx_GIVEREF(__pyx_tuple__6); - __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__6, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_get_full_name_if_method, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__5 = PyTuple_Pack(4, __pyx_n_s_frame, __pyx_n_s_code_obj, __pyx_n_s_func_name, __pyx_n_s_cls_name); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__5); + __Pyx_GIVEREF(__pyx_tuple__5); + __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_get_func_name, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":681 + /* "_pydevd_bundle/pydevd_cython.pyx":666 * if type(condition) != type(''): * if hasattr(condition, 'encode'): * condition = condition.encode('utf-8') # <<<<<<<<<<<<<< * * msg = 'Error while evaluating expression: %s\n' % (condition,) */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 681; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__9); - __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__8); + __Pyx_GIVEREF(__pyx_tuple__8); /* "_pydevd_bundle/pydevd_cython.pyx":225 * from _pydevd_bundle.pydevd_signature import send_signature_call_trace, send_signature_return_trace @@ -19443,10 +19063,10 @@ static int __Pyx_InitCachedConstants(void) { * pass * */ - __pyx_tuple__10 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); - __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_send_signature_call_trace, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__9 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__9); + __Pyx_GIVEREF(__pyx_tuple__9); + __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__9, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_send_signature_call_trace, 225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":230 * basename = os.path.basename @@ -19455,9 +19075,9 @@ static int __Pyx_InitCachedConstants(void) { * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_IgnoreException); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__12); - __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_IgnoreException); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__11); + __Pyx_GIVEREF(__pyx_tuple__11); /* "_pydevd_bundle/pydevd_cython.pyx":231 * @@ -19466,9 +19086,9 @@ static int __Pyx_InitCachedConstants(void) { * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') * TRACE_PROPERTY = 'pydevd_traceproperty.py' */ - __pyx_tuple__13 = PyTuple_Pack(2, __pyx_kp_s_pydevd_py, __pyx_n_s_run); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__13); - __Pyx_GIVEREF(__pyx_tuple__13); + __pyx_tuple__12 = PyTuple_Pack(2, __pyx_kp_s_pydevd_py, __pyx_n_s_run); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); /* "_pydevd_bundle/pydevd_cython.pyx":232 * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') @@ -19477,9 +19097,9 @@ static int __Pyx_InitCachedConstants(void) { * TRACE_PROPERTY = 'pydevd_traceproperty.py' * get_file_type = DONT_TRACE.get */ - __pyx_tuple__14 = PyTuple_Pack(2, __pyx_kp_s_pydev_execfile_py, __pyx_n_s_execfile); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__14); - __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_tuple__13 = PyTuple_Pack(2, __pyx_kp_s_pydev_execfile_py, __pyx_n_s_execfile); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__13); + __Pyx_GIVEREF(__pyx_tuple__13); /* "_pydevd_bundle/pydevd_cython.pyx":255 * @@ -19488,10 +19108,10 @@ static int __Pyx_InitCachedConstants(void) { * self._args = args # In the cython version we don't need to pass the frame * # ELSE */ - __pyx_tuple__15 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_init, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__14 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_init, 255, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":264 * # ENDIF @@ -19500,10 +19120,10 @@ static int __Pyx_InitCachedConstants(void) { * self._args[0].set_suspend(*args, **kwargs) * */ - __pyx_tuple__17 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__17); - __Pyx_GIVEREF(__pyx_tuple__17); - __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__17, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_set_suspend, 264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__16); + __Pyx_GIVEREF(__pyx_tuple__16); + __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_set_suspend, 264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":267 * self._args[0].set_suspend(*args, **kwargs) @@ -19512,10 +19132,10 @@ static int __Pyx_InitCachedConstants(void) { * self._args[0].do_wait_suspend(*args, **kwargs) * */ - __pyx_tuple__19 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); - __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__19, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_do_wait_suspend, 267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__18 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__18); + __Pyx_GIVEREF(__pyx_tuple__18); + __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_do_wait_suspend, 267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":271 * @@ -19524,10 +19144,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef bint flag; * # ELSE */ - __pyx_tuple__21 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); - __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_exception, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__20 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_flag); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__20); + __Pyx_GIVEREF(__pyx_tuple__20); + __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_exception, 271, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":285 * return self.trace_exception @@ -19536,10 +19156,10 @@ static int __Pyx_InitCachedConstants(void) { * if event == 'return': * main_debugger, filename, info, thread = self._args */ - __pyx_tuple__23 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_main_debugger, __pyx_n_s_filename, __pyx_n_s_info, __pyx_n_s_thread); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__23); - __Pyx_GIVEREF(__pyx_tuple__23); - __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_return, 285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__22 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_main_debugger, __pyx_n_s_filename, __pyx_n_s_info, __pyx_n_s_thread); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); + __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(4, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_return, 285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":292 * @@ -19548,10 +19168,10 @@ static int __Pyx_InitCachedConstants(void) { * cdef PyDBAdditionalThreadInfo info; * cdef bint flag; */ - __pyx_tuple__25 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_info, __pyx_n_s_flag, __pyx_n_s_main_debugger, __pyx_n_s_exception, __pyx_n_s_value, __pyx_n_s_trace, __pyx_n_s_exception_breakpoint, __pyx_n_s_result); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); - __pyx_codeobj__26 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__25, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_should_stop_on_exception, 292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__24 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_info, __pyx_n_s_flag, __pyx_n_s_main_debugger, __pyx_n_s_exception, __pyx_n_s_value, __pyx_n_s_trace, __pyx_n_s_exception_breakpoint, __pyx_n_s_result); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__24); + __Pyx_GIVEREF(__pyx_tuple__24); + __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(4, 0, 12, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_should_stop_on_exception, 292, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":345 * return flag, frame @@ -19560,46 +19180,46 @@ static int __Pyx_InitCachedConstants(void) { * try: * # print 'handle_exception', frame.f_lineno, frame.f_code.co_name */ - __pyx_tuple__27 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_trace_obj, __pyx_n_s_main_debugger, __pyx_n_s_initial_trace_obj, __pyx_n_s_check_trace_obj, __pyx_n_s_filename, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_n_s_lines_ignored, __pyx_n_s_curr_stat, __pyx_n_s_last_stat, __pyx_n_s_from_user_input, __pyx_n_s_merged, __pyx_n_s_exc_lineno, __pyx_n_s_line, __pyx_n_s_thread, __pyx_n_s_frame_id_to_frame, __pyx_n_s_f, __pyx_n_s_thread_id); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__27); - __Pyx_GIVEREF(__pyx_tuple__27); - __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(4, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_handle_exception, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__26 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_trace_obj, __pyx_n_s_main_debugger, __pyx_n_s_initial_trace_obj, __pyx_n_s_check_trace_obj, __pyx_n_s_filename, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_n_s_lines_ignored, __pyx_n_s_curr_stat, __pyx_n_s_last_stat, __pyx_n_s_from_user_input, __pyx_n_s_merged, __pyx_n_s_exc_lineno, __pyx_n_s_line, __pyx_n_s_thread, __pyx_n_s_frame_id_to_frame, __pyx_n_s_f, __pyx_n_s_thread_id); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); + __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(4, 0, 21, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_handle_exception, 345, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":466 * thread = None * * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< * - * def get_full_name_if_method(func_name): + * def get_func_name(frame): */ - __pyx_tuple__29 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_main_debugger, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_get_full_name_if_method, __pyx_n_s_get_full_name_if_method, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__29); - __Pyx_GIVEREF(__pyx_tuple__29); - __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_manage_return_values, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__28 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_main_debugger, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_get_func_name, __pyx_n_s_get_func_name, __pyx_n_s_name); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_manage_return_values, 466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":518 + /* "_pydevd_bundle/pydevd_cython.pyx":503 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef str filename; * cdef bint is_exception_event; */ - __pyx_tuple__32 = PyTuple_Pack(43, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_filename, __pyx_n_s_is_exception_event, __pyx_n_s_has_exception_breakpoints, __pyx_n_s_can_skip, __pyx_n_s_info, __pyx_n_s_step_cmd, __pyx_n_s_line, __pyx_n_s_curr_func_name, __pyx_n_s_exist_result, __pyx_n_s_main_debugger, __pyx_n_s_thread, __pyx_n_s_need_trace_return, __pyx_n_s_plugin_manager, __pyx_n_s_flag, __pyx_n_s_stop_frame, __pyx_n_s_breakpoints_for_file, __pyx_n_s_breakpoint, __pyx_n_s_stop_info, __pyx_n_s_stop, __pyx_n_s_bp_type, __pyx_n_s_new_frame, __pyx_n_s_result, __pyx_n_s_condition, __pyx_n_s_val, __pyx_n_s_msg, __pyx_n_s_etype, __pyx_n_s_value, __pyx_n_s_tb, __pyx_n_s_error, __pyx_n_s_stack, __pyx_n_s_back, __pyx_n_s__31, __pyx_n_s_back_filename, __pyx_n_s_base, __pyx_n_s_should_skip, __pyx_n_s_plugin_stop, __pyx_n_s_file_type, __pyx_n_s_stopped_on_plugin, __pyx_n_s_retVal); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); - __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(4, 0, 43, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_dispatch, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__31 = PyTuple_Pack(43, __pyx_n_s_self, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_filename, __pyx_n_s_is_exception_event, __pyx_n_s_has_exception_breakpoints, __pyx_n_s_can_skip, __pyx_n_s_info, __pyx_n_s_step_cmd, __pyx_n_s_line, __pyx_n_s_curr_func_name, __pyx_n_s_exist_result, __pyx_n_s_main_debugger, __pyx_n_s_thread, __pyx_n_s_need_trace_return, __pyx_n_s_plugin_manager, __pyx_n_s_flag, __pyx_n_s_stop_frame, __pyx_n_s_breakpoints_for_file, __pyx_n_s_breakpoint, __pyx_n_s_stop_info, __pyx_n_s_stop, __pyx_n_s_bp_type, __pyx_n_s_new_frame, __pyx_n_s_result, __pyx_n_s_condition, __pyx_n_s_val, __pyx_n_s_msg, __pyx_n_s_etype, __pyx_n_s_value, __pyx_n_s_tb, __pyx_n_s_error, __pyx_n_s_stack, __pyx_n_s_back, __pyx_n_s__30, __pyx_n_s_back_filename, __pyx_n_s_base, __pyx_n_s_should_skip, __pyx_n_s_plugin_stop, __pyx_n_s_file_type, __pyx_n_s_stopped_on_plugin, __pyx_n_s_retVal); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); + __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(4, 0, 43, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_dispatch, 503, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - /* "_pydevd_bundle/pydevd_cython.pyx":936 + /* "_pydevd_bundle/pydevd_cython.pyx":921 * get_file_type = DONT_TRACE.get * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< * #try: * t = threadingCurrentThread() */ - __pyx_tuple__34 = PyTuple_Pack(7, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_dispatch, 936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__33 = PyTuple_Pack(7, __pyx_n_s_py_db, __pyx_n_s_frame, __pyx_n_s_event, __pyx_n_s_arg, __pyx_n_s_t, __pyx_n_s_additional_info, __pyx_n_s_thread_tracer); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__33); + __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(4, 0, 7, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_user_work_ultimate_communi, __pyx_n_s_trace_dispatch, 921, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -19714,11 +19334,11 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo.tp_print = 0; if (PyObject_SetAttrString(__pyx_m, "PyDBAdditionalThreadInfo", (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo = &__pyx_type_14_pydevd_bundle_13pydevd_cython_PyDBAdditionalThreadInfo; - if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer, "__call__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__.doc = __pyx_doc_14_pydevd_bundle_13pydevd_cython_12ThreadTracer_2__call__; @@ -19726,11 +19346,8 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) } } #endif - if (PyObject_SetAttrString(__pyx_m, "ThreadTracer", (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 965; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyObject_SetAttrString(__pyx_m, "ThreadTracer", (PyObject *)&__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 950; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_14_pydevd_bundle_13pydevd_cython_ThreadTracer = &__pyx_type_14_pydevd_bundle_13pydevd_cython_ThreadTracer; - if (PyType_Ready(&__pyx_type_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_type_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values.tp_print = 0; - __pyx_ptype_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values = &__pyx_type_14_pydevd_bundle_13pydevd_cython___pyx_scope_struct__manage_return_values; /*--- Type import code ---*/ /*--- Variable import code ---*/ /*--- Function import code ---*/ @@ -19843,167 +19460,155 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) /* "_pydevd_bundle/pydevd_cython.pyx":198 * # * # ENDIF - * import inspect # <<<<<<<<<<<<<< - * import linecache - * import os.path - */ - __pyx_t_2 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, 0, -1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_inspect, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "_pydevd_bundle/pydevd_cython.pyx":199 - * # ENDIF - * import inspect * import linecache # <<<<<<<<<<<<<< * import os.path * import re */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_linecache, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_linecache, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_linecache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_linecache, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 198; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":200 - * import inspect + /* "_pydevd_bundle/pydevd_cython.pyx":199 + * # ENDIF * import linecache * import os.path # <<<<<<<<<<<<<< * import re * import sys */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_os_path, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":201 + /* "_pydevd_bundle/pydevd_cython.pyx":200 * import linecache * import os.path * import re # <<<<<<<<<<<<<< * import sys * import traceback # @Reimport */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_re, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":202 + /* "_pydevd_bundle/pydevd_cython.pyx":201 * import os.path * import re * import sys # <<<<<<<<<<<<<< * import traceback # @Reimport * */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":203 + /* "_pydevd_bundle/pydevd_cython.pyx":202 * import re * import sys * import traceback # @Reimport # <<<<<<<<<<<<<< * * from _pydev_bundle import pydev_log */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":205 + /* "_pydevd_bundle/pydevd_cython.pyx":204 * import traceback # @Reimport * * from _pydev_bundle import pydev_log # <<<<<<<<<<<<<< * from _pydevd_bundle import pydevd_dont_trace * from _pydevd_bundle import pydevd_vars */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_pydev_log); __Pyx_GIVEREF(__pyx_n_s_pydev_log); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_pydev_log); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydev_bundle, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydev_bundle, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pydev_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydev_log, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 204; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":206 + /* "_pydevd_bundle/pydevd_cython.pyx":205 * * from _pydev_bundle import pydev_log * from _pydevd_bundle import pydevd_dont_trace # <<<<<<<<<<<<<< * from _pydevd_bundle import pydevd_vars * from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_pydevd_dont_trace); __Pyx_GIVEREF(__pyx_n_s_pydevd_dont_trace); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_pydevd_dont_trace); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_pydevd_dont_trace); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydevd_dont_trace, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydevd_dont_trace, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":207 + /* "_pydevd_bundle/pydevd_cython.pyx":206 * from _pydev_bundle import pydev_log * from _pydevd_bundle import pydevd_dont_trace * from _pydevd_bundle import pydevd_vars # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint * from _pydevd_bundle.pydevd_comm import CMD_STEP_CAUGHT_EXCEPTION, CMD_STEP_RETURN, CMD_STEP_OVER, CMD_SET_BREAK, \ */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_pydevd_vars); __Pyx_GIVEREF(__pyx_n_s_pydevd_vars); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_pydevd_vars); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pydevd_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pydevd_vars); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydevd_vars, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pydevd_vars, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 206; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":208 + /* "_pydevd_bundle/pydevd_cython.pyx":207 * from _pydevd_bundle import pydevd_dont_trace * from _pydevd_bundle import pydevd_vars * from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_comm import CMD_STEP_CAUGHT_EXCEPTION, CMD_STEP_RETURN, CMD_STEP_OVER, CMD_SET_BREAK, \ * CMD_STEP_INTO, CMD_SMART_STEP_INTO, CMD_RUN_TO_LINE, CMD_SET_NEXT_STATEMENT, CMD_STEP_INTO_MY_CODE */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_get_exception_breakpoint); __Pyx_GIVEREF(__pyx_n_s_get_exception_breakpoint); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_exception_breakpoint); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_breakpoint, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_breakpoint, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_exception_breakpoint); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_exception_breakpoint, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_exception_breakpoint, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":209 + /* "_pydevd_bundle/pydevd_cython.pyx":208 * from _pydevd_bundle import pydevd_vars * from _pydevd_bundle.pydevd_breakpoints import get_exception_breakpoint * from _pydevd_bundle.pydevd_comm import CMD_STEP_CAUGHT_EXCEPTION, CMD_STEP_RETURN, CMD_STEP_OVER, CMD_SET_BREAK, \ # <<<<<<<<<<<<<< * CMD_STEP_INTO, CMD_SMART_STEP_INTO, CMD_RUN_TO_LINE, CMD_SET_NEXT_STATEMENT, CMD_STEP_INTO_MY_CODE * from _pydevd_bundle.pydevd_constants import STATE_SUSPEND, dict_contains, get_thread_id, STATE_RUN, dict_iter_values, IS_PY3K, \ */ - __pyx_t_2 = PyList_New(9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(9); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION); __Pyx_GIVEREF(__pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION); @@ -20032,55 +19637,55 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_INCREF(__pyx_n_s_CMD_STEP_INTO_MY_CODE); __Pyx_GIVEREF(__pyx_n_s_CMD_STEP_INTO_MY_CODE); PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_CMD_STEP_INTO_MY_CODE); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_comm, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_comm, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_CAUGHT_EXCEPTION, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_RETURN); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_RETURN, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_RETURN, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_OVER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_OVER, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_OVER, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SET_BREAK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SET_BREAK); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_BREAK, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_BREAK, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_INTO, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_INTO, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SMART_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SMART_STEP_INTO); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SMART_STEP_INTO, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SMART_STEP_INTO, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_RUN_TO_LINE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_RUN_TO_LINE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_RUN_TO_LINE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_RUN_TO_LINE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SET_NEXT_STATEMENT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_SET_NEXT_STATEMENT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_NEXT_STATEMENT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_SET_NEXT_STATEMENT, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_INTO_MY_CODE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CMD_STEP_INTO_MY_CODE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_INTO_MY_CODE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CMD_STEP_INTO_MY_CODE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":211 + /* "_pydevd_bundle/pydevd_cython.pyx":210 * from _pydevd_bundle.pydevd_comm import CMD_STEP_CAUGHT_EXCEPTION, CMD_STEP_RETURN, CMD_STEP_OVER, CMD_SET_BREAK, \ * CMD_STEP_INTO, CMD_SMART_STEP_INTO, CMD_RUN_TO_LINE, CMD_SET_NEXT_STATEMENT, CMD_STEP_INTO_MY_CODE * from _pydevd_bundle.pydevd_constants import STATE_SUSPEND, dict_contains, get_thread_id, STATE_RUN, dict_iter_values, IS_PY3K, \ # <<<<<<<<<<<<<< * dict_keys, dict_pop, RETURN_VALUES_DICT * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE */ - __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_STATE_SUSPEND); __Pyx_GIVEREF(__pyx_n_s_STATE_SUSPEND); @@ -20109,55 +19714,55 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_INCREF(__pyx_n_s_RETURN_VALUES_DICT); __Pyx_GIVEREF(__pyx_n_s_RETURN_VALUES_DICT); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_RETURN_VALUES_DICT); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_STATE_SUSPEND); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SUSPEND, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_SUSPEND, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_contains); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_contains); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_contains, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_contains, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_id, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_STATE_RUN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_RUN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_STATE_RUN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_iter_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_iter_values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_iter_values, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_iter_values, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IS_PY3K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IS_PY3K); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PY3K, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_IS_PY3K, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_keys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_keys, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_dict_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_pop, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dict_pop, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_RETURN_VALUES_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 210; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RETURN_VALUES_DICT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RETURN_VALUES_DICT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":213 + /* "_pydevd_bundle/pydevd_cython.pyx":212 * from _pydevd_bundle.pydevd_constants import STATE_SUSPEND, dict_contains, get_thread_id, STATE_RUN, dict_iter_values, IS_PY3K, \ * dict_keys, dict_pop, RETURN_VALUES_DICT * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised - * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_DONT_TRACE); __Pyx_GIVEREF(__pyx_n_s_DONT_TRACE); @@ -20165,27 +19770,27 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_INCREF(__pyx_n_s_PYDEV_FILE); __Pyx_GIVEREF(__pyx_n_s_PYDEV_FILE); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_PYDEV_FILE); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_dont_trace, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_dont_trace, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DONT_TRACE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DONT_TRACE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_PYDEV_FILE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEV_FILE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PYDEV_FILE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":214 + /* "_pydevd_bundle/pydevd_cython.pyx":213 * dict_keys, dict_pop, RETURN_VALUES_DICT * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised # <<<<<<<<<<<<<< + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame - * */ - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_add_exception_to_frame); __Pyx_GIVEREF(__pyx_n_s_add_exception_to_frame); @@ -20193,39 +19798,60 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_INCREF(__pyx_n_s_just_raised); __Pyx_GIVEREF(__pyx_n_s_just_raised); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_just_raised); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_frame_util, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_add_exception_to_frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_exception_to_frame, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_exception_to_frame, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_just_raised); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_just_raised, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_just_raised, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":215 + /* "_pydevd_bundle/pydevd_cython.pyx":214 * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code # <<<<<<<<<<<<<< + * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame + * + */ + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_n_s_get_clsname_for_code); + __Pyx_GIVEREF(__pyx_n_s_get_clsname_for_code); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_clsname_for_code); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_utils, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_clsname_for_code); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_clsname_for_code, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 214; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_pydevd_bundle/pydevd_cython.pyx":215 + * from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised + * from _pydevd_bundle.pydevd_utils import get_clsname_for_code * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame # <<<<<<<<<<<<<< * * try: */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_abs_path_real_path_and_base); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 215; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":217 * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame @@ -20248,19 +19874,19 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * except: * CO_GENERATOR = 0 */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_CO_GENERATOR); __Pyx_GIVEREF(__pyx_n_s_CO_GENERATOR); - PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CO_GENERATOR); - __pyx_t_2 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_1, -1)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_CO_GENERATOR); + __pyx_t_1 = __Pyx_patch_inspect(__Pyx_Import(__pyx_n_s_inspect, __pyx_t_2, -1)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_CO_GENERATOR, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_CO_GENERATOR); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_CO_GENERATOR, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 218; __pyx_clineno = __LINE__; goto __pyx_L2_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":217 * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame @@ -20275,8 +19901,8 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L9_try_end; __pyx_L2_error:; - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":219 * try: @@ -20287,9 +19913,9 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) */ /*except:*/ { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} - __Pyx_GOTREF(__pyx_t_2); + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} __Pyx_GOTREF(__pyx_t_1); + __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_6); /* "_pydevd_bundle/pydevd_cython.pyx":220 @@ -20300,8 +19926,8 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * try: */ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CO_GENERATOR, __pyx_int_0) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L4_except_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L3_exception_handled; } @@ -20356,18 +19982,18 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_INCREF(__pyx_n_s_send_signature_return_trace); __Pyx_GIVEREF(__pyx_n_s_send_signature_return_trace); PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_send_signature_return_trace); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_signature, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_signature, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_send_signature_call_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_send_signature_call_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_signature_call_trace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_send_signature_return_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_send_signature_return_trace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_GOTREF(__pyx_t_6); if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_signature_return_trace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L12_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":222 * CO_GENERATOR = 0 @@ -20382,9 +20008,9 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L19_try_end; __pyx_L12_error:; - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":224 * try: @@ -20396,10 +20022,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_7) { __Pyx_AddTraceback("_pydevd_bundle.pydevd_cython", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_6, &__pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_1); /* "_pydevd_bundle/pydevd_cython.pyx":225 * from _pydevd_bundle.pydevd_signature import send_signature_call_trace, send_signature_return_trace @@ -20412,9 +20038,9 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) __Pyx_GOTREF(__pyx_t_8); if (PyDict_SetItem(__pyx_d, __pyx_n_s_send_signature_call_trace, __pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L14_except_error;} __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L13_exception_handled; } goto __pyx_L14_except_error; @@ -20447,16 +20073,16 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_basename); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_basename); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_basename, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_basename, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":230 * basename = os.path.basename @@ -20465,16 +20091,16 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * DEBUG_START = ('pydevd.py', 'run') * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_compile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_IGNORE_EXCEPTION_TAG, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":231 * @@ -20483,7 +20109,7 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * DEBUG_START_PY3K = ('_pydev_execfile.py', 'execfile') * TRACE_PROPERTY = 'pydevd_traceproperty.py' */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START, __pyx_tuple__13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START, __pyx_tuple__12) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":232 * IGNORE_EXCEPTION_TAG = re.compile('[^#]*#.*@IgnoreException') @@ -20492,7 +20118,7 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * TRACE_PROPERTY = 'pydevd_traceproperty.py' * get_file_type = DONT_TRACE.get */ - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START_PY3K, __pyx_tuple__14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DEBUG_START_PY3K, __pyx_tuple__13) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "_pydevd_bundle/pydevd_cython.pyx":233 * DEBUG_START = ('pydevd.py', 'run') @@ -20510,11 +20136,11 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_file_type, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 234; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -20535,10 +20161,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * filename_to_stat_info = {} * should_skip = -1 */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_filename_to_lines_where_exceptio, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":251 * #considers the user input (so, the actual result must be a join of both). @@ -20547,10 +20173,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * should_skip = -1 * */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_filename_to_stat_info, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_filename_to_stat_info, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":252 * filename_to_lines_where_exceptions_are_ignored = {} @@ -20568,10 +20194,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * self._args = args # In the cython version we don't need to pass the frame * # ELSE */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__, 0, __pyx_n_s_PyDBFrame___init, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__16)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_1__init__, 0, __pyx_n_s_PyDBFrame___init, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__15)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":264 * # ENDIF @@ -20580,10 +20206,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * self._args[0].set_suspend(*args, **kwargs) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, 0, __pyx_n_s_PyDBFrame_set_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_set_suspend, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_3set_suspend, 0, __pyx_n_s_PyDBFrame_set_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__17)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_set_suspend, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 264; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":267 * self._args[0].set_suspend(*args, **kwargs) @@ -20592,10 +20218,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * self._args[0].do_wait_suspend(*args, **kwargs) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, 0, __pyx_n_s_PyDBFrame_do_wait_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_do_wait_suspend, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_5do_wait_suspend, 0, __pyx_n_s_PyDBFrame_do_wait_suspend, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_do_wait_suspend, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":271 * @@ -20604,10 +20230,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * cdef bint flag; * # ELSE */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, 0, __pyx_n_s_PyDBFrame_trace_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_exception, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_7trace_exception, 0, __pyx_n_s_PyDBFrame_trace_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_exception, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":285 * return self.trace_exception @@ -20616,10 +20242,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * if event == 'return': * main_debugger, filename, info, thread = self._args */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9trace_return, 0, __pyx_n_s_PyDBFrame_trace_return, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_return, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_9trace_return, 0, __pyx_n_s_PyDBFrame_trace_return, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_return, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 285; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":292 * @@ -20628,10 +20254,10 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * cdef PyDBAdditionalThreadInfo info; * cdef bint flag; */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11should_stop_on_exception, 0, __pyx_n_s_PyDBFrame_should_stop_on_excepti, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__26)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_should_stop_on_exception, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_11should_stop_on_exception, 0, __pyx_n_s_PyDBFrame_should_stop_on_excepti, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_should_stop_on_exception, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 292; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":345 * return flag, frame @@ -20640,34 +20266,34 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * try: * # print 'handle_exception', frame.f_lineno, frame.f_code.co_name */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13handle_exception, 0, __pyx_n_s_PyDBFrame_handle_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__28)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_handle_exception, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_13handle_exception, 0, __pyx_n_s_PyDBFrame_handle_exception, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_handle_exception, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":466 * thread = None * * def manage_return_values(self, main_debugger, frame, event, arg): # <<<<<<<<<<<<<< * - * def get_full_name_if_method(func_name): + * def get_func_name(frame): */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15manage_return_values, 0, __pyx_n_s_PyDBFrame_manage_return_values, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_manage_return_values, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_15manage_return_values, 0, __pyx_n_s_PyDBFrame_manage_return_values, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_manage_return_values, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 466; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":518 + /* "_pydevd_bundle/pydevd_cython.pyx":503 * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) * def trace_dispatch(self, frame, str event, arg): # <<<<<<<<<<<<<< * cdef str filename; * cdef bint is_exception_event; */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_17trace_dispatch, 0, __pyx_n_s_PyDBFrame_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_dispatch, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_9PyDBFrame_17trace_dispatch, 0, __pyx_n_s_PyDBFrame_trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_trace_dispatch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":240 * # PyDBFrame @@ -20676,229 +20302,229 @@ PyMODINIT_FUNC PyInit_pydevd_cython(void) * '''This makes the tracing for a given frame, so, the trace_dispatch * is used initially when we enter into a new context ('call') and then */ - __pyx_t_2 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_PyDBFrame, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyDBFrame, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_Py3ClassCreate(((PyObject*)&__Pyx_DefaultClassType), __pyx_n_s_PyDBFrame, __pyx_empty_tuple, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PyDBFrame, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":917 + /* "_pydevd_bundle/pydevd_cython.pyx":902 * #end trace_dispatch * * import traceback # <<<<<<<<<<<<<< * * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive */ - __pyx_t_6 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 902; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":919 + /* "_pydevd_bundle/pydevd_cython.pyx":904 * import traceback * * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive # <<<<<<<<<<<<<< * from _pydev_imps._pydev_saved_modules import threading * from _pydevd_bundle.pydevd_constants import get_thread_id */ - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_is_thread_alive); __Pyx_GIVEREF(__pyx_n_s_is_thread_alive); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_is_thread_alive); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydev_bundle_pydev_is_thread_al, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_is_thread_alive); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_thread_alive, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":920 + /* "_pydevd_bundle/pydevd_cython.pyx":905 * * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive * from _pydev_imps._pydev_saved_modules import threading # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_constants import get_thread_id * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_threading); __Pyx_GIVEREF(__pyx_n_s_threading); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_threading); - __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydev_imps__pydev_saved_modules, __pyx_t_2, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_threading); + __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydev_imps__pydev_saved_modules, __pyx_t_1, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_threading); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 920; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_threading); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threading, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 905; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":921 + /* "_pydevd_bundle/pydevd_cython.pyx":906 * from _pydev_bundle.pydev_is_thread_alive import is_thread_alive * from _pydev_imps._pydev_saved_modules import threading * from _pydevd_bundle.pydevd_constants import get_thread_id # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE * from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads */ - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_get_thread_id); __Pyx_GIVEREF(__pyx_n_s_get_thread_id); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_get_thread_id); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_constants, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_get_thread_id); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_id, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_thread_id, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 906; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":922 + /* "_pydevd_bundle/pydevd_cython.pyx":907 * from _pydev_imps._pydev_saved_modules import threading * from _pydevd_bundle.pydevd_constants import get_thread_id * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_DONT_TRACE); __Pyx_GIVEREF(__pyx_n_s_DONT_TRACE); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_DONT_TRACE); - __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_dont_trace, __pyx_t_2, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_DONT_TRACE); + __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_dont_trace, __pyx_t_1, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DONT_TRACE, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 922; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DONT_TRACE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 907; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":923 + /* "_pydevd_bundle/pydevd_cython.pyx":908 * from _pydevd_bundle.pydevd_constants import get_thread_id * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE * from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads # <<<<<<<<<<<<<< * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER * from _pydevd_bundle.pydevd_tracing import SetTrace */ - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_kill_all_pydev_threads); __Pyx_GIVEREF(__pyx_n_s_kill_all_pydev_threads); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_kill_all_pydev_threads); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_kill_all_p, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_kill_all_p, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_kill_all_pydev_threads); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_kill_all_pydev_threads); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_kill_all_pydev_threads, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 923; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_kill_all_pydev_threads, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 908; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":924 + /* "_pydevd_bundle/pydevd_cython.pyx":909 * from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE * from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER # <<<<<<<<<<<<<< * from _pydevd_bundle.pydevd_tracing import SetTrace * */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_get_abs_path_real_path_and_base); __Pyx_GIVEREF(__pyx_n_s_get_abs_path_real_path_and_base); - PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_get_abs_path_real_path_and_base); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_get_abs_path_real_path_and_base); __Pyx_INCREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); __Pyx_GIVEREF(__pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); - PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); - __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_2, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); + __pyx_t_6 = __Pyx_Import(__pyx_n_s_pydevd_file_utils, __pyx_t_1, -1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 924; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_get_abs_path_real_path_and_base); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_abs_path_real_path_and_base, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_NORM_PATHS_AND_BASE_CONTAINER, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 909; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":925 + /* "_pydevd_bundle/pydevd_cython.pyx":910 * from _pydevd_bundle.pydevd_kill_all_pydevd_threads import kill_all_pydev_threads * from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame, NORM_PATHS_AND_BASE_CONTAINER * from _pydevd_bundle.pydevd_tracing import SetTrace # <<<<<<<<<<<<<< * * # IFDEF CYTHON -- DONT EDIT THIS FILE (it is automatically generated) */ - __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyList_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_n_s_SetTrace); __Pyx_GIVEREF(__pyx_n_s_SetTrace); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_SetTrace); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_tracing, __pyx_t_6, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_pydevd_bundle_pydevd_tracing, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SetTrace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SetTrace); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SetTrace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SetTrace, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 910; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":933 + /* "_pydevd_bundle/pydevd_cython.pyx":918 * # ENDIF * * threadingCurrentThread = threading.currentThread # <<<<<<<<<<<<<< * get_file_type = DONT_TRACE.get * */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_currentThread); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_threading); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_currentThread); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_threadingCurrentThread, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_threadingCurrentThread, __pyx_t_6) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 918; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":934 + /* "_pydevd_bundle/pydevd_cython.pyx":919 * * threadingCurrentThread = threading.currentThread * get_file_type = DONT_TRACE.get # <<<<<<<<<<<<<< * * def trace_dispatch(py_db, frame, event, arg): */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_DONT_TRACE); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_file_type, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 934; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem(__pyx_d, __pyx_n_s_get_file_type, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 919; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_pydevd_bundle/pydevd_cython.pyx":936 + /* "_pydevd_bundle/pydevd_cython.pyx":921 * get_file_type = DONT_TRACE.get * * def trace_dispatch(py_db, frame, event, arg): # <<<<<<<<<<<<<< * #try: * t = threadingCurrentThread() */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_3trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 936; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_14_pydevd_bundle_13pydevd_cython_3trace_dispatch, NULL, __pyx_n_s_pydevd_bundle_pydevd_cython); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_trace_dispatch, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 921; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "_pydevd_bundle/pydevd_cython.pyx":1 * # Important: Autogenerated file. # <<<<<<<<<<<<<< * * # DO NOT edit manually! */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /*--- Wrapped vars code ---*/ @@ -21830,22 +21456,6 @@ static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, *tb = tmp_tb; } -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); -} - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { -#if CYTHON_COMPILING_IN_CPYTHON -#if PY_MAJOR_VERSION >= 3 - if (likely(PyUnicode_Check(n))) -#else - if (likely(PyString_Check(n))) -#endif - return __Pyx_PyObject_GetAttrStr(o, n); -#endif - return PyObject_GetAttr(o, n); -} - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; @@ -22548,6 +22158,18 @@ static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED } #endif +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_COMPILING_IN_CPYTHON +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { PyObject *r = __Pyx_GetAttr(o, n); if (unlikely(!r)) { diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython.pyx b/python/helpers/pydev/_pydevd_bundle/pydevd_cython.pyx index 2bd17702a58f..6a9b9410be97 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_cython.pyx +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_cython.pyx @@ -195,7 +195,6 @@ cdef class PyDBAdditionalThreadInfo: # PyDBAdditionalThreadInfo = PyDBAdditionalThreadInfoWithoutCurrentFramesSupport # # ENDIF -import inspect import linecache import os.path import re @@ -212,6 +211,7 @@ from _pydevd_bundle.pydevd_constants import STATE_SUSPEND, dict_contains, get_th dict_keys, dict_pop, RETURN_VALUES_DICT from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised +from _pydevd_bundle.pydevd_utils import get_clsname_for_code from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame try: @@ -465,29 +465,15 @@ class PyDBFrame: # No longer cdef because object was dying when only a reference def manage_return_values(self, main_debugger, frame, event, arg): - def get_full_name_if_method(func_name): - # In the frame we have access to the code object, but not to the callable object, - # that's why we're trying to get the name of class for methods in such a tricky way: - # we are checking the first argument of the function (`self` or `cls` for methods). + def get_func_name(frame): + code_obj = frame.f_code + func_name = code_obj.co_name try: - code_obj = frame.f_code - if len(code_obj.co_varnames) > 0: - first_arg_name = code_obj.co_varnames[0] - first_arg_obj = frame.f_locals[first_arg_name] - if inspect.isclass(first_arg_obj): # class method - first_arg_class = first_arg_obj - else: # instance method - first_arg_class = first_arg_obj.__class__ - if hasattr(first_arg_class, func_name): - method = getattr(first_arg_class, func_name) - func_code = None - if hasattr(method, 'func_code'): # Python2 - func_code = method.func_code - elif hasattr(method, '__code__'): # Python3 - func_code = method.__code__ - if func_code and func_code == code_obj: - return first_arg_class.__name__ + "." + func_name - return func_name + cls_name = get_clsname_for_code(code_obj, frame) + if cls_name is not None: + return "%s.%s" % (cls_name, func_name) + else: + return func_name except: traceback.print_exc() return func_name @@ -495,11 +481,10 @@ class PyDBFrame: # No longer cdef because object was dying when only a reference try: if main_debugger.show_return_values: if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - name = frame.f_code.co_name if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - name = get_full_name_if_method(name) + name = get_func_name(frame) frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg if main_debugger.remove_return_values_flag: # Showing return values was turned off, we should remove them from locals dict. diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_32.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_32.pyd index 144b270ff8ec..252b7642ccc6 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_32.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_32.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_64.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_64.pyd index 163bae17c0f8..ae45e89e53fc 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_64.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_27_64.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_32.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_32.pyd index 4718b84ddad5..8a2e5bf4800a 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_32.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_32.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_64.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_64.pyd index 4232a260e982..62c77991d792 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_64.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_34_64.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_32.cp35-win32.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_32.cp35-win32.pyd index 5708d314ad76..ca2262efa1e9 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_32.cp35-win32.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_32.cp35-win32.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_64.cp35-win_amd64.pyd b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_64.cp35-win_amd64.pyd index afa232aa17f8..79ee30cabf35 100644 Binary files a/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_64.cp35-win_amd64.pyd and b/python/helpers/pydev/_pydevd_bundle/pydevd_cython_win32_35_64.cp35-win_amd64.pyd differ diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_frame.py b/python/helpers/pydev/_pydevd_bundle/pydevd_frame.py index 62f8c3896064..a6786acaf1c8 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_frame.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_frame.py @@ -1,4 +1,3 @@ -import inspect import linecache import os.path import re @@ -15,6 +14,7 @@ from _pydevd_bundle.pydevd_constants import STATE_SUSPEND, dict_contains, get_th dict_keys, dict_pop, RETURN_VALUES_DICT from _pydevd_bundle.pydevd_dont_trace_files import DONT_TRACE, PYDEV_FILE from _pydevd_bundle.pydevd_frame_utils import add_exception_to_frame, just_raised +from _pydevd_bundle.pydevd_utils import get_clsname_for_code from pydevd_file_utils import get_abs_path_real_path_and_base_from_frame try: @@ -268,29 +268,15 @@ class PyDBFrame: # No longer cdef because object was dying when only a reference def manage_return_values(self, main_debugger, frame, event, arg): - def get_full_name_if_method(func_name): - # In the frame we have access to the code object, but not to the callable object, - # that's why we're trying to get the name of class for methods in such a tricky way: - # we are checking the first argument of the function (`self` or `cls` for methods). + def get_func_name(frame): + code_obj = frame.f_code + func_name = code_obj.co_name try: - code_obj = frame.f_code - if len(code_obj.co_varnames) > 0: - first_arg_name = code_obj.co_varnames[0] - first_arg_obj = frame.f_locals[first_arg_name] - if inspect.isclass(first_arg_obj): # class method - first_arg_class = first_arg_obj - else: # instance method - first_arg_class = first_arg_obj.__class__ - if hasattr(first_arg_class, func_name): - method = getattr(first_arg_class, func_name) - func_code = None - if hasattr(method, 'func_code'): # Python2 - func_code = method.func_code - elif hasattr(method, '__code__'): # Python3 - func_code = method.__code__ - if func_code and func_code == code_obj: - return first_arg_class.__name__ + "." + func_name - return func_name + cls_name = get_clsname_for_code(code_obj, frame) + if cls_name is not None: + return "%s.%s" % (cls_name, func_name) + else: + return func_name except: traceback.print_exc() return func_name @@ -298,11 +284,10 @@ class PyDBFrame: # No longer cdef because object was dying when only a reference try: if main_debugger.show_return_values: if event == "return" and hasattr(frame, "f_code") and hasattr(frame.f_code, "co_name"): - name = frame.f_code.co_name if hasattr(frame, "f_back") and hasattr(frame.f_back, "f_locals"): if RETURN_VALUES_DICT not in dict_keys(frame.f_back.f_locals): frame.f_back.f_locals[RETURN_VALUES_DICT] = {} - name = get_full_name_if_method(name) + name = get_func_name(frame) frame.f_back.f_locals[RETURN_VALUES_DICT][name] = arg if main_debugger.remove_return_values_flag: # Showing return values was turned off, we should remove them from locals dict. diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py b/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py index d6fc4aaedc77..d8476199c233 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_signature.py @@ -1,4 +1,3 @@ -import inspect try: import trace @@ -7,11 +6,11 @@ except ImportError: else: trace._warn = lambda *args: None # workaround for http://bugs.python.org/issue17143 (PY-8706) -import gc from _pydevd_bundle.pydevd_comm import CMD_SIGNATURE_CALL_TRACE, NetCommand from _pydevd_bundle import pydevd_vars from _pydevd_bundle.pydevd_constants import xrange, dict_iter_items from _pydevd_bundle import pydevd_utils +from _pydevd_bundle.pydevd_utils import get_clsname_for_code class Signature(object): def __init__(self, file, name): @@ -111,34 +110,13 @@ class SignatureFactory(object): clsname = self._caller_cache[code] else: self._caller_cache[code] = None - ## use of gc.get_referrers() was suggested by Michael Hudson - # all functions which refer to this code object - funcs = [f for f in gc.get_referrers(code) - if inspect.isfunction(f)] - # require len(func) == 1 to avoid ambiguity caused by calls to - # new.function(): "In the face of ambiguity, refuse the - # temptation to guess." - if len(funcs) == 1: - dicts = [d for d in gc.get_referrers(funcs[0]) - if isinstance(d, dict)] - if len(dicts) == 1: - classes = [c for c in gc.get_referrers(dicts[0]) - if hasattr(c, "__bases__") or inspect.isclass(c)] - elif len(dicts) > 1: #new-style classes - classes = [c for c in gc.get_referrers(dicts[1]) - if hasattr(c, "__bases__") or inspect.isclass(c)] - else: - classes = [] - - if len(classes) == 1: - # ditto for new.classobj() - clsname = classes[0].__name__ - # cache the result - assumption is that new.* is - # not called later to disturb this relationship - # _caller_cache could be flushed if functions in - # the new module get called. - self._caller_cache[code] = clsname - + clsname = get_clsname_for_code(code, frame) + if clsname is not None: + # cache the result - assumption is that new.* is + # not called later to disturb this relationship + # _caller_cache could be flushed if functions in + # the new module get called. + self._caller_cache[code] = clsname if clsname is not None: funcname = "%s.%s" % (clsname, funcname) diff --git a/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py b/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py index e529aedc0344..9b2ca6733fa2 100644 --- a/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py +++ b/python/helpers/pydev/_pydevd_bundle/pydevd_utils.py @@ -7,9 +7,14 @@ try: except: from urllib.parse import quote # @UnresolvedImport -from _pydevd_bundle import pydevd_constants +import inspect +from _pydevd_bundle.pydevd_constants import IS_PY3K, GC_SUPPORTED import sys from _pydev_bundle import pydev_log +try: + import gc +except ImportError: + GC_SUPPORTED = False def save_main_module(file, module_name): # patch provided by: Scott Schlesier - when script is run, it does not @@ -67,7 +72,7 @@ def compare_object_attrs(x, y): return x.__cmp__(y) except: - if pydevd_constants.IS_PY3K: + if IS_PY3K: return (to_string(x) > to_string(y)) - (to_string(x) < to_string(y)) else: return cmp(to_string(x), to_string(y)) @@ -91,7 +96,7 @@ def cmp_to_key(mycmp): return mycmp(self.obj, other.obj) != 0 return K -if pydevd_constants.IS_PY3K: +if IS_PY3K: def is_string(x): return isinstance(x, str) @@ -109,7 +114,7 @@ def print_exc(): if traceback: traceback.print_exc() -if pydevd_constants.IS_PY3K: +if IS_PY3K: def quote_smart(s, safe='/'): return quote(s, safe) else: @@ -120,6 +125,55 @@ else: return quote(s, safe) +def get_clsname_for_code(code, frame): + clsname = None + if GC_SUPPORTED: + ## use of gc.get_referrers() was suggested by Michael Hudson + # all functions which refer to this code object + funcs = [f for f in gc.get_referrers(code) + if inspect.isfunction(f)] + # require len(func) == 1 to avoid ambiguity caused by calls to + # new.function(): "In the face of ambiguity, refuse the + # temptation to guess." + if len(funcs) == 1: + dicts = [d for d in gc.get_referrers(funcs[0]) + if isinstance(d, dict)] + if len(dicts) == 1: + classes = [c for c in gc.get_referrers(dicts[0]) + if hasattr(c, "__bases__") or inspect.isclass(c)] + elif len(dicts) > 1: #new-style classes + classes = [c for c in gc.get_referrers(dicts[1]) + if hasattr(c, "__bases__") or inspect.isclass(c)] + else: + classes = [] + + if len(classes) == 1: + # ditto for new.classobj() + clsname = classes[0].__name__ + + if clsname is None: + # If gc is not supported we are checking the first argument of the function + # (`self` or `cls` for methods). + func_name = code.co_name + if len(code.co_varnames) > 0: + first_arg_name = code.co_varnames[0] + first_arg_obj = frame.f_locals[first_arg_name] + if inspect.isclass(first_arg_obj): # class method + first_arg_class = first_arg_obj + else: # instance method + first_arg_class = first_arg_obj.__class__ + if hasattr(first_arg_class, func_name): + method = getattr(first_arg_class, func_name) + func_code = None + if hasattr(method, 'func_code'): # Python2 + func_code = method.func_code + elif hasattr(method, '__code__'): # Python3 + func_code = method.__code__ + if func_code and func_code == code: + clsname = first_arg_class.__name__ + return clsname + + def _get_project_roots(project_roots_cache=[]): # Note: the project_roots_cache is the same instance among the many calls to the method if not project_roots_cache: diff --git a/python/src/com/jetbrains/python/codeInsight/imports/AutoImportQuickFix.java b/python/src/com/jetbrains/python/codeInsight/imports/AutoImportQuickFix.java index a4d8b3fd1206..af2f5f8cdaec 100644 --- a/python/src/com/jetbrains/python/codeInsight/imports/AutoImportQuickFix.java +++ b/python/src/com/jetbrains/python/codeInsight/imports/AutoImportQuickFix.java @@ -200,8 +200,9 @@ public class AutoImportQuickFix extends LocalQuickFixOnPsiElement implements Hig Collections.sort(myImports); } - public int getCandidatesCount() { - return myImports.size(); + @NotNull + public List getCandidates() { + return Collections.unmodifiableList(myImports); } public boolean hasOnlyFunctions() { diff --git a/python/src/com/jetbrains/python/codeInsight/imports/ImportCandidateHolder.java b/python/src/com/jetbrains/python/codeInsight/imports/ImportCandidateHolder.java index 7a89e911db52..c60178052609 100644 --- a/python/src/com/jetbrains/python/codeInsight/imports/ImportCandidateHolder.java +++ b/python/src/com/jetbrains/python/codeInsight/imports/ImportCandidateHolder.java @@ -46,7 +46,7 @@ import java.util.List; * @author dcheryasov */ // visibility is intentionally package-level -class ImportCandidateHolder implements Comparable { +public class ImportCandidateHolder implements Comparable { private final PsiElement myImportable; private final PyImportElement myImportElement; private final PsiFileSystemItem myFile; diff --git a/python/src/com/jetbrains/python/codeInsight/imports/PythonImportUtils.java b/python/src/com/jetbrains/python/codeInsight/imports/PythonImportUtils.java index be95a74f338a..92fa177b2cd0 100644 --- a/python/src/com/jetbrains/python/codeInsight/imports/PythonImportUtils.java +++ b/python/src/com/jetbrains/python/codeInsight/imports/PythonImportUtils.java @@ -88,19 +88,19 @@ public final class PythonImportUtils { private static AutoImportQuickFix addCandidates(PyElement node, PsiReference reference, String refText, @Nullable String asName) { final boolean qualify = !PyCodeInsightSettings.getInstance().PREFER_FROM_IMPORT; AutoImportQuickFix fix = new AutoImportQuickFix(node, reference.getClass(), refText, qualify); - Set seenFileNames = new HashSet(); // true import names + Set seenCandidateNames = new HashSet<>(); // true import names - PsiFile existingImportFile = addCandidatesFromExistingImports(node, refText, fix, seenFileNames); - if (fix.getCandidatesCount() == 0 || fix.hasProjectImports() || Registry.is("python.import.always.ask")) { + PsiFile existingImportFile = addCandidatesFromExistingImports(node, refText, fix, seenCandidateNames); + if (fix.getCandidates().isEmpty()|| fix.hasProjectImports() || Registry.is("python.import.always.ask")) { // maybe some unimported file has it, too ProgressManager.checkCanceled(); // before expensive index searches - addSymbolImportCandidates(node, refText, asName, fix, seenFileNames, existingImportFile); + addSymbolImportCandidates(node, refText, asName, fix, seenCandidateNames, existingImportFile); } for(PyImportCandidateProvider provider: Extensions.getExtensions(PyImportCandidateProvider.EP_NAME)) { provider.addImportCandidates(reference, refText, fix); } - if (fix.getCandidatesCount() > 0) { + if (!fix.getCandidates().isEmpty()) { fix.sortCandidates(); return fix; } @@ -112,27 +112,21 @@ public final class PythonImportUtils { * collect all such statements and analyze. * NOTE: It only makes sense to look at imports in file scope - there is no guarantee that an import in a local scope will * be visible from the scope where the auto-import was invoked - * - * @param node - * @param refText - * @param fix - * @param seenFileNames - * @return */ @Nullable private static PsiFile addCandidatesFromExistingImports(PyElement node, String refText, AutoImportQuickFix fix, - Set seenFileNames) { - PsiFile existingImportFile = null; // if there's a matching existing import, this it the file it imports + Set seenCandidateNames) { + PsiFile existingImportFile = null; // if there's a matching existing import, this is the file it imports PsiFile file = node.getContainingFile(); if (file instanceof PyFile) { PyFile pyFile = (PyFile)file; for (PyImportElement importElement : pyFile.getImportTargets()) { - existingImportFile = addImportViaElement(refText, fix, seenFileNames, existingImportFile, importElement, importElement.resolve()); + existingImportFile = addImportViaElement(refText, fix, seenCandidateNames, existingImportFile, importElement, importElement.resolve()); } for (PyFromImportStatement fromImportStatement : pyFile.getFromImports()) { if (!fromImportStatement.isStarImport() && fromImportStatement.getImportElements().length > 0) { PsiElement source = fromImportStatement.resolveImportSource(); - existingImportFile = addImportViaElement(refText, fix, seenFileNames, existingImportFile, fromImportStatement.getImportElements()[0], source); + existingImportFile = addImportViaElement(refText, fix, seenCandidateNames, existingImportFile, fromImportStatement.getImportElements()[0], source); } } } @@ -141,46 +135,33 @@ public final class PythonImportUtils { private static PsiFile addImportViaElement(String refText, AutoImportQuickFix fix, - Set seenFileNames, + Set seenCandidateNames, PsiFile existingImportFile, PyImportElement importElement, PsiElement source) { PyFile sourceFile = as(PyUtil.turnDirIntoInit(source), PyFile.class); if (sourceFile instanceof PyFileImpl) { - PyStatement importStatement = importElement.getContainingImportStatement(); - String refName = null; - if (importStatement instanceof PyFromImportStatement) { - QualifiedName qName = ((PyFromImportStatement)importStatement).getImportSourceQName(); - if (qName != null) { - refName = qName.toString(); - } - } - else { - QualifiedName importReferenceQName = importElement.getImportedQName(); - if (importReferenceQName != null) { - refName = importReferenceQName.toString(); - } - } - if (refName != null) { - if (seenFileNames.contains(refName)) { - return existingImportFile; - } - seenFileNames.add(refName); - } PsiElement res = sourceFile.findExportedName(refText); + final String name = res instanceof PyQualifiedNameOwner ? ((PyQualifiedNameOwner)res).getQualifiedName() : null; + if (name != null && seenCandidateNames.contains(name)) { + return existingImportFile; + } // allow importing from this source if it either declares the name itself or represents a higher-level package that reexports the name if (res != null && !(res instanceof PyFile) && !(res instanceof PyImportElement) && res.getContainingFile() != null && PsiTreeUtil.isAncestor(source, res.getContainingFile(), false)) { existingImportFile = sourceFile; fix.addImport(res, sourceFile, importElement); + if (name != null) { + seenCandidateNames.add(name); + } } } return existingImportFile; } private static void addSymbolImportCandidates(PyElement node, String refText, @Nullable String asName, AutoImportQuickFix fix, - Set seenFileNames, PsiFile existingImportFile) { + Set seenCandidateNames, PsiFile existingImportFile) { Project project = node.getProject(); List symbols = new ArrayList(); symbols.addAll(PyClassNameIndex.find(refText, project, true)); @@ -198,13 +179,17 @@ public final class PythonImportUtils { PsiFileSystemItem srcfile = symbol instanceof PsiFileSystemItem ? ((PsiFileSystemItem)symbol).getParent() : symbol.getContainingFile(); if (srcfile != null && isAcceptableForImport(node, existingImportFile, srcfile)) { QualifiedName importPath = QualifiedNameFinder.findCanonicalImportPath(symbol, node); - if (symbol instanceof PsiFileSystemItem && importPath != null) { + if (importPath == null) { + continue; + } + if (symbol instanceof PsiFileSystemItem) { importPath = importPath.removeTail(1); } - if (importPath != null && !seenFileNames.contains(importPath.toString())) { + final String symbolImportQName = importPath.append(refText).toString(); + if (!seenCandidateNames.contains(symbolImportQName)) { // a new, valid hit fix.addImport(symbol, srcfile, importPath, asName); - seenFileNames.add(importPath.toString()); // just in case, again + seenCandidateNames.add(symbolImportQName); } } } diff --git a/python/src/com/jetbrains/python/console/PydevConsoleExecuteActionHandler.java b/python/src/com/jetbrains/python/console/PydevConsoleExecuteActionHandler.java index 67f52844bfe9..3ec2c23b24bc 100644 --- a/python/src/com/jetbrains/python/console/PydevConsoleExecuteActionHandler.java +++ b/python/src/com/jetbrains/python/console/PydevConsoleExecuteActionHandler.java @@ -304,7 +304,7 @@ public class PydevConsoleExecuteActionHandler extends ProcessBackedConsoleExecut @Override public void commandExecuted(boolean more) { - if (!more && !ipythonEnabled()) { + if (!more && !ipythonEnabled() && !myConsoleCommunication.isWaitingForInput()) { ordinaryPrompt(); } } diff --git a/python/src/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassHelper.java b/python/src/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassHelper.java index d408ab096d74..f448239d4f38 100644 --- a/python/src/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassHelper.java +++ b/python/src/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassHelper.java @@ -44,6 +44,7 @@ import org.jetbrains.annotations.Nullable; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -79,7 +80,7 @@ public final class PyExtractSuperclassHelper { // PY-12171 final PyMemberInfo objectMember = MembersManager.findMember(selectedMemberInfos, ALLOW_OBJECT); - if (LanguageLevel.forElement(clazz).isPy3K()) { + if (LanguageLevel.forElement(clazz).isPy3K() && !isObjectParentDeclaredExplicitly(clazz)) { // Remove object from list if Py3 if (objectMember != null) { selectedMemberInfos.remove(objectMember); @@ -110,7 +111,13 @@ public final class PyExtractSuperclassHelper { afterData.addElement(newClass); project.getMessageBus().syncPublisher(RefactoringEventListener.REFACTORING_EVENT_TOPIC) .refactoringDone(getRefactoringId(), afterData); + } + /** + * If class explicitly extends object we shall move it even in Py3K + */ + private static boolean isObjectParentDeclaredExplicitly(@NotNull final PyClass clazz) { + return Arrays.stream(clazz.getSuperClassExpressions()).filter(o -> PyNames.OBJECT.equals(o.getName())).findFirst().isPresent(); } private static PyClass placeNewClass(final Project project, PyClass newClass, @NotNull final PyClass clazz, final String targetFile) { diff --git a/python/src/com/jetbrains/python/refactoring/classes/membersManager/MembersManager.java b/python/src/com/jetbrains/python/refactoring/classes/membersManager/MembersManager.java index cbc6d9c4e8d0..726104da3d50 100644 --- a/python/src/com/jetbrains/python/refactoring/classes/membersManager/MembersManager.java +++ b/python/src/com/jetbrains/python/refactoring/classes/membersManager/MembersManager.java @@ -30,6 +30,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; +import java.util.stream.Collectors; /** * Moves members between classes via its plugins (managers). @@ -251,7 +252,7 @@ public abstract class MembersManager implements Function Collection fetchElements(@NotNull final Collection> memberInfos) { - return Collections2.transform(memberInfos, new PyMemberExtractor()); + return memberInfos.stream().map(o -> o.getMember()).filter(o -> o != null).collect(Collectors.toList()); } /** @@ -332,13 +333,6 @@ public abstract class MembersManager implements Function getDependencies(@NotNull MultiMap usedElements); - private static class PyMemberExtractor implements Function, T> { - @SuppressWarnings("NullableProblems") //IDEA-120100 - @Override - public T apply(@NotNull final PyMemberInfo input) { - return input.getMember(); - } - } private static class FindByElement extends NotNullPredicate> { private final PyElement myPyElement; diff --git a/python/src/com/jetbrains/python/run/AbstractPythonRunConfiguration.java b/python/src/com/jetbrains/python/run/AbstractPythonRunConfiguration.java index 866ad1f49471..d4e16f7008c7 100644 --- a/python/src/com/jetbrains/python/run/AbstractPythonRunConfiguration.java +++ b/python/src/com/jetbrains/python/run/AbstractPythonRunConfiguration.java @@ -469,4 +469,12 @@ public abstract class AbstractPythonRunConfiguration testSpecs) { + // By default we simply add them as arguments + paramsGroup.addParameters(testSpecs); + } } diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java b/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java index 7e38682fcf4f..e593af40baa9 100644 --- a/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java +++ b/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java @@ -165,7 +165,7 @@ public class PythonSdkUpdater implements StartupActivity { PyPackageManager.getInstance(sdk12).refreshAndGetPackages(true); } catch (ExecutionException e) { - LOG.error(e); + LOG.warn(e); } } catch (InvalidSdkException e) { diff --git a/python/src/com/jetbrains/python/testing/PythonTestCommandLineStateBase.java b/python/src/com/jetbrains/python/testing/PythonTestCommandLineStateBase.java index f20daa18eb04..4bf3a730fd5b 100644 --- a/python/src/com/jetbrains/python/testing/PythonTestCommandLineStateBase.java +++ b/python/src/com/jetbrains/python/testing/PythonTestCommandLineStateBase.java @@ -158,7 +158,7 @@ public abstract class PythonTestCommandLineStateBase extends PythonCommandLineSt assert scriptParams != null; getRunner().addToGroup(scriptParams, cmd); addBeforeParameters(cmd); - scriptParams.addParameters(getTestSpecs()); + myConfiguration.addTestSpecsAsParameters(scriptParams, getTestSpecs()); addAfterParameters(cmd); } diff --git a/python/src/com/jetbrains/python/testing/tox/PyToxCommandLineState.java b/python/src/com/jetbrains/python/testing/tox/PyToxCommandLineState.java index bc300e4cb950..1c1d33ee3ec8 100644 --- a/python/src/com/jetbrains/python/testing/tox/PyToxCommandLineState.java +++ b/python/src/com/jetbrains/python/testing/tox/PyToxCommandLineState.java @@ -15,16 +15,13 @@ */ package com.jetbrains.python.testing.tox; -import com.intellij.execution.configurations.GeneralCommandLine; -import com.intellij.execution.configurations.ParamsGroup; import com.intellij.execution.runners.ExecutionEnvironment; -import com.intellij.openapi.util.text.StringUtil; import com.jetbrains.python.HelperPackage; import com.jetbrains.python.PythonHelper; import com.jetbrains.python.testing.PythonTestCommandLineStateBase; import org.jetbrains.annotations.NotNull; -import java.util.Collections; +import java.util.Arrays; import java.util.List; /** @@ -47,23 +44,9 @@ class PyToxCommandLineState extends PythonTestCommandLineStateBase { return PythonHelper.TOX; } - - @Override - public GeneralCommandLine generateCommandLine() { - final GeneralCommandLine line = super.generateCommandLine(); - final ParamsGroup group = line.getParametersList().getParamsGroup(GROUP_SCRIPT); - assert group != null : "No group " + GROUP_SCRIPT; - final String[] envs = myConfiguration.getRunOnlyEnvs(); - if (envs.length > 0) { - group.addParameter(String.format("-e %s", StringUtil.join(envs, ","))); - } - group.addParameters(myConfiguration.getArguments()); - return line; - } - @NotNull @Override protected List getTestSpecs() { - return Collections.emptyList(); + return Arrays.asList(myConfiguration.getRunOnlyEnvs()); } } diff --git a/python/src/com/jetbrains/python/testing/tox/PyToxConfiguration.java b/python/src/com/jetbrains/python/testing/tox/PyToxConfiguration.java index e62e82ea4117..dbd7e3ae995f 100644 --- a/python/src/com/jetbrains/python/testing/tox/PyToxConfiguration.java +++ b/python/src/com/jetbrains/python/testing/tox/PyToxConfiguration.java @@ -16,12 +16,17 @@ package com.jetbrains.python.testing.tox; import com.intellij.execution.Executor; +import com.intellij.execution.Location; +import com.intellij.execution.configurations.ParamsGroup; import com.intellij.execution.configurations.RunProfileState; import com.intellij.execution.runners.ExecutionEnvironment; +import com.intellij.execution.testframework.AbstractTestProxy; import com.intellij.openapi.options.SettingsEditor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.util.WriteExternalException; +import com.intellij.openapi.util.text.StringUtil; +import com.intellij.openapi.vfs.VirtualFileManager; import com.intellij.util.ArrayUtil; import com.intellij.util.xmlb.SkipEmptySerializationFilter; import com.intellij.util.xmlb.XmlSerializer; @@ -33,6 +38,8 @@ import org.jdom.Element; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.List; + /** * @author Ilya.Kazakevich */ @@ -99,4 +106,30 @@ public final class PyToxConfiguration extends AbstractPythonRunConfiguration location, @NotNull final AbstractTestProxy failedTest) { + + AbstractTestProxy test = failedTest; + while (test != null) { + final String url = test.getLocationUrl(); + if (url == null) { + continue; + } + final String protocol = VirtualFileManager.extractProtocol(url); + if (PyToxTestLocator.PROTOCOL_ID.equals(protocol)) { + return VirtualFileManager.extractPath(url); + } + test = test.getParent(); + } + return null; + } + + @Override + public void addTestSpecsAsParameters(@NotNull final ParamsGroup paramsGroup, @NotNull final List testSpecs) { + if (!testSpecs.isEmpty()) { + paramsGroup.addParameter(String.format("-e %s", StringUtil.join(testSpecs, ","))); + } + } } diff --git a/python/src/com/jetbrains/python/testing/tox/PyToxTestLocator.java b/python/src/com/jetbrains/python/testing/tox/PyToxTestLocator.java index f6ecea9a3e97..415cd0b9f932 100644 --- a/python/src/com/jetbrains/python/testing/tox/PyToxTestLocator.java +++ b/python/src/com/jetbrains/python/testing/tox/PyToxTestLocator.java @@ -39,11 +39,12 @@ public final class PyToxTestLocator implements PythonTestLocator { private static final String DUMMY_FILE_PADDING = "#env"; private static final Key ENV_NAME_KEY = Key.create("ENV_NAME"); + static final String PROTOCOL_ID = "tox_env"; @NotNull @Override public String getProtocolId() { - return "tox_env"; + return PROTOCOL_ID; } @NotNull diff --git a/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main.py b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main.py new file mode 100644 index 000000000000..d7519db480a5 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main.py @@ -0,0 +1 @@ +join \ No newline at end of file diff --git a/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main_after.py b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main_after.py new file mode 100644 index 000000000000..0f5e4be0b128 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/main_after.py @@ -0,0 +1,3 @@ +from os.path import join + +join \ No newline at end of file diff --git a/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/ntpath.py b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/ntpath.py new file mode 100644 index 000000000000..ad485416a697 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/ntpath.py @@ -0,0 +1,2 @@ +def join(*args): + pass \ No newline at end of file diff --git a/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/os.py b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/os.py new file mode 100644 index 000000000000..d87b27c36c39 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/os.py @@ -0,0 +1,4 @@ +if windows(): + import ntpath as path +else: + import posixpath as path diff --git a/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/posixpath.py b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/posixpath.py new file mode 100644 index 000000000000..947e6834b663 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/osPathFunctions/posixpath.py @@ -0,0 +1,2 @@ +def join(*args): + pass diff --git a/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/__init__.py b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/__init__.py new file mode 100644 index 000000000000..660573bd95aa --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/__init__.py @@ -0,0 +1,6 @@ +from .globals import request + + +class Flask: + def __init__(self, *args, **kwargs): + pass diff --git a/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/globals.py b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/globals.py new file mode 100644 index 000000000000..a8b8cf730f57 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/flask/globals.py @@ -0,0 +1 @@ +request = object() \ No newline at end of file diff --git a/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main.py b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main.py new file mode 100644 index 000000000000..e3aa6d564fb9 --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main.py @@ -0,0 +1,5 @@ +from flask import Flask + +app = Flask(__name__) + +request \ No newline at end of file diff --git a/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main_after.py b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main_after.py new file mode 100644 index 000000000000..ea85c026083a --- /dev/null +++ b/python/testData/quickFixes/AddImportQuickFixTest/reexportedName/main_after.py @@ -0,0 +1,6 @@ +from flask import Flask +from flask import request + +app = Flask(__name__) + +request \ No newline at end of file diff --git a/python/testData/refactoring/extractsuperclass/fieldsNpe.after.py b/python/testData/refactoring/extractsuperclass/fieldsNpe.after.py new file mode 100644 index 000000000000..94167c7fa6bb --- /dev/null +++ b/python/testData/refactoring/extractsuperclass/fieldsNpe.after.py @@ -0,0 +1,12 @@ +class Ancestor(object): + def __init__(self, a, b): + self.a = a + self.b = b + + def func1(self): + return "" + + +class Basic(Ancestor): + def func2(self): + return self.func1() \ No newline at end of file diff --git a/python/testData/refactoring/extractsuperclass/fieldsNpe.before.py b/python/testData/refactoring/extractsuperclass/fieldsNpe.before.py new file mode 100644 index 000000000000..d95a6d7c42ef --- /dev/null +++ b/python/testData/refactoring/extractsuperclass/fieldsNpe.before.py @@ -0,0 +1,10 @@ +class Basic(object): + def __init__(self, a, b): + self.a = a + self.b = b + + def func1(self): + return "" + + def func2(self): + return self.func1() \ No newline at end of file diff --git a/python/testData/refactoring/extractsuperclass/py3ParentHasObject.after.py b/python/testData/refactoring/extractsuperclass/py3ParentHasObject.after.py new file mode 100644 index 000000000000..dd03d9a179c9 --- /dev/null +++ b/python/testData/refactoring/extractsuperclass/py3ParentHasObject.after.py @@ -0,0 +1,7 @@ +class Parent(object): + def spam(self): + pass + + +class Child(Parent): + pass \ No newline at end of file diff --git a/python/testData/refactoring/extractsuperclass/py3ParentHasObject.before.py b/python/testData/refactoring/extractsuperclass/py3ParentHasObject.before.py new file mode 100644 index 000000000000..6cee68ee7f75 --- /dev/null +++ b/python/testData/refactoring/extractsuperclass/py3ParentHasObject.before.py @@ -0,0 +1,3 @@ +class Child(object): + def spam(self): + pass \ No newline at end of file diff --git a/python/testData/toxtest/toxConcreteEnv/tox.ini b/python/testData/toxtest/toxConcreteEnv/tox.ini new file mode 100644 index 000000000000..68d81edafd85 --- /dev/null +++ b/python/testData/toxtest/toxConcreteEnv/tox.ini @@ -0,0 +1,5 @@ +[tox] +skipsdist=True +envlist = py26, py27, py32, py34 +[testenv] +commands=python -c "print 1" \ No newline at end of file diff --git a/python/testData/toxtest/toxDoubleRun/setup.py b/python/testData/toxtest/toxDoubleRun/setup.py new file mode 100644 index 000000000000..9b877e657e2a --- /dev/null +++ b/python/testData/toxtest/toxDoubleRun/setup.py @@ -0,0 +1,14 @@ +#!/usr/bin/python + +import os + +from setuptools import setup +from setuptools import find_packages + +package = 'python_package_template' +setup_dir = os.path.dirname(os.path.abspath(__file__)) + +setup(name=package, + version="!", + include_package_data=True, + ) diff --git a/python/testData/toxtest/toxDoubleRun/test/unit/__init__.py b/python/testData/toxtest/toxDoubleRun/test/unit/__init__.py new file mode 100644 index 000000000000..3ccf298fdf6c --- /dev/null +++ b/python/testData/toxtest/toxDoubleRun/test/unit/__init__.py @@ -0,0 +1 @@ +__author__ = 'rpocase' diff --git a/python/testData/toxtest/toxDoubleRun/test/unit/test_single_test.py b/python/testData/toxtest/toxDoubleRun/test/unit/test_single_test.py new file mode 100644 index 000000000000..97c7c48803d0 --- /dev/null +++ b/python/testData/toxtest/toxDoubleRun/test/unit/test_single_test.py @@ -0,0 +1,5 @@ +from time import sleep + + +def test_empty_class(): + sleep(1) diff --git a/python/testData/toxtest/toxDoubleRun/tox.ini b/python/testData/toxtest/toxDoubleRun/tox.ini new file mode 100644 index 000000000000..f3f4cf26f680 --- /dev/null +++ b/python/testData/toxtest/toxDoubleRun/tox.ini @@ -0,0 +1,10 @@ +[tox] +envlist = py27 + + +[testenv] +commands =py.test test/unit + + +deps = pytest + diff --git a/python/testData/toxtest/toxRerun/tox.ini b/python/testData/toxtest/toxRerun/tox.ini new file mode 100644 index 000000000000..68d81edafd85 --- /dev/null +++ b/python/testData/toxtest/toxRerun/tox.ini @@ -0,0 +1,5 @@ +[tox] +skipsdist=True +envlist = py26, py27, py32, py34 +[testenv] +commands=python -c "print 1" \ No newline at end of file diff --git a/python/testSrc/com/jetbrains/env/ConfigurationBasedProcessRunner.java b/python/testSrc/com/jetbrains/env/ConfigurationBasedProcessRunner.java index a9f2f328752e..8d86fd222cd6 100644 --- a/python/testSrc/com/jetbrains/env/ConfigurationBasedProcessRunner.java +++ b/python/testSrc/com/jetbrains/env/ConfigurationBasedProcessRunner.java @@ -93,6 +93,8 @@ public abstract class ConfigurationBasedProcessRunnerAlways create new runner, to prevent stale artifacts on reruns. */ @NotNull protected abstract T createProcessRunner() throws Exception; diff --git a/python/testSrc/com/jetbrains/env/PyToxTest.java b/python/testSrc/com/jetbrains/env/PyToxTest.java index cf8eb44b615e..5c4ee346bcb4 100644 --- a/python/testSrc/com/jetbrains/env/PyToxTest.java +++ b/python/testSrc/com/jetbrains/env/PyToxTest.java @@ -23,6 +23,7 @@ import com.intellij.openapi.util.Pair; import com.jetbrains.python.sdkTools.SdkCreationType; import com.jetbrains.python.testing.tox.PyToxConfiguration; import com.jetbrains.python.testing.tox.PyToxConfigurationFactory; +import com.jetbrains.python.testing.tox.PyToxTestTools; import org.hamcrest.Matchers; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -31,6 +32,8 @@ import org.junit.Test; import java.io.IOException; import java.util.*; +import java.util.function.Supplier; +import java.util.stream.Collectors; /** * Ensure tox runner works @@ -46,33 +49,33 @@ public final class PyToxTest extends PyEnvTestCase { * Simply ensure tox runner works */ @Test - public void testToxSimpleRun() throws IOException { + public void testToxSimpleRun() { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxSimpleRun/", 2, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( // Should fail, no skip in 26 Pair.create("py26", new InterpreterExpectations( "AttributeError: 'module' object has no attribute 'skip'", false)), Pair.create("py27", new InterpreterExpectations("", true)) - ) - )); + ), + Integer.MAX_VALUE)); } /** * Check tox nose runner */ @Test - public void testToxNose() throws IOException { + public void testToxNose() { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxNose/", 1, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( Pair.create("py26", new InterpreterExpectations("", true)), Pair.create("py27", new InterpreterExpectations("", true)), // Does not support 3.4 Pair.create("py32", new InterpreterExpectations("SyntaxError", false)), Pair.create("py34", new InterpreterExpectations("SyntaxError", false)) - ) - ) + ), + Integer.MAX_VALUE) ); } @@ -80,17 +83,17 @@ public final class PyToxTest extends PyEnvTestCase { * Check tox pytest runner */ @Test - public void testToxPyTest() throws IOException { + public void testToxPyTest() { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxPyTest/", 1, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( Pair.create("py26", new InterpreterExpectations("", true)), Pair.create("py27", new InterpreterExpectations("", true)), // Does not support 3.4 Pair.create("py32", new InterpreterExpectations("SyntaxError", false)), Pair.create("py34", new InterpreterExpectations("SyntaxError", false)) - ) - ) + ), + Integer.MAX_VALUE) ); } @@ -98,17 +101,17 @@ public final class PyToxTest extends PyEnvTestCase { * Check tox unit runner */ @Test - public void testToxUnitTest() throws IOException { + public void testToxUnitTest() { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxUnitTest/", 1, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( Pair.create("py26", new InterpreterExpectations("", true)), Pair.create("py27", new InterpreterExpectations("", true)), // Does not support 3.4 Pair.create("py32", new InterpreterExpectations("SyntaxError", false)), Pair.create("py34", new InterpreterExpectations("SyntaxError", false)) - ) - ) + ), + Integer.MAX_VALUE) ); } @@ -118,57 +121,128 @@ public final class PyToxTest extends PyEnvTestCase { @Test public void textToxOneInterpreter() throws Exception { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxOneInterpreter/", 0, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( Pair.create("py26", new InterpreterExpectations("", true)), Pair.create("py27", new InterpreterExpectations("ython 2.7", true)), Pair.create("py32", new InterpreterExpectations("", true)), Pair.create("py34", new InterpreterExpectations("", true)) - ) - ) + ), + Integer.MAX_VALUE) ); + } + /** + * Ensures test is not launched 2 times because folder added 2 times + */ + @Test + public void testDoubleRun() throws Exception { + runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxDoubleRun/", 1, + () -> new MyTestProcessRunner(), + Collections.singletonList( + Pair.create("py27", new InterpreterExpectations("", true)) + ), + 1) + ); } /** * Big test which should run on any interpreter and check its output */ @Test - public void testToxSuccessTest() throws IOException { + public void testToxSuccessTest() { runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxSuccess/", 1, - new MyTestProcessRunner(), + () -> new MyTestProcessRunner(), Arrays.asList( Pair.create("py26", new InterpreterExpectations("I am 2.6", true)), Pair.create("py27", new InterpreterExpectations("I am 2.7", true)), // Should have output Pair.create("py32", new InterpreterExpectations("I am 3.2", true)), Pair.create("py34", new InterpreterExpectations("I am 3.4", true)) - ) - ) + ), + Integer.MAX_VALUE) ); } + /** + * Ensures rerun works for tox + */ + @Test + public void testEnvRerun() throws Exception { + runPythonTest(new MyPyProcessWithConsoleTestTask("/toxtest/toxConcreteEnv/", 0, + () -> new MyTestProcessRunner(1), + Arrays.asList( + Pair.create("py32", new InterpreterExpectations("", false)), + Pair.create("py34", new InterpreterExpectations("", false)) + ), + Integer.MAX_VALUE) + ); + } + + /** + * Provide certain env and check it is launched + */ + @Test + public void testConcreteEnv() throws Exception { + final String[] envsToRun = {"py27", "py34"}; + runPythonTest( + new PyProcessWithConsoleTestTask>("/toxtest/toxSuccess/", SdkCreationType.EMPTY_SDK) { + @NotNull + @Override + protected PyAbstractTestProcessRunner createProcessRunner() throws Exception { + return new PyAbstractTestProcessRunner(PyToxConfigurationFactory.INSTANCE, PyToxConfiguration.class, 0) { + @Override + protected void configurationCreatedAndWillLaunch(@NotNull final PyToxConfiguration configuration) throws IOException { + super.configurationCreatedAndWillLaunch(configuration); + PyToxTestTools.setRunOnlyEnvs(configuration, envsToRun); + } + }; + } + + @Override + protected void checkTestResults(@NotNull final PyAbstractTestProcessRunner runner, + @NotNull final String stdout, + @NotNull final String stderr, + @NotNull final String all) { + final Set environments = runner.getTestProxy().getChildren().stream().map(t -> t.getName()).collect(Collectors.toSet()); + Assert.assertThat("Wrong environments launched", environments, Matchers.equalTo(Sets.newHashSet(envsToRun))); + } + + @NotNull + @Override + public Set getTags() { + return Sets.newHashSet("tox"); + } + }); + } + private static final class MyPyProcessWithConsoleTestTask extends PyProcessWithConsoleTestTask { + private static final Logger LOGGER = Logger.getInstance(MyPyProcessWithConsoleTestTask.class); @NotNull private final Map myInterpreters = new HashMap<>(); private final int myMinimumSuccessTestCount; + private final int myMaximumSuccessTestCount; @NotNull - private final MyTestProcessRunner myRunner; + private final Supplier myRunnerSupplier; /** - * @param relativeTestDataPath TODO: DOC * @param minimumSuccessTestCount how many success tests should be * @param interpreterExpectations interpreter_name -] expected result + * @param runnerSupplier Lambda to create runner (can't reuse one runner several times, + * see {@link PyProcessWithConsoleTestTask#createProcessRunner()} + * @param maximumTestCount max number of success tests */ private MyPyProcessWithConsoleTestTask(@Nullable final String relativeTestDataPath, final int minimumSuccessTestCount, - @NotNull final MyTestProcessRunner runner, - @NotNull final Collection> interpreterExpectations) { + @NotNull final Supplier runnerSupplier, + @NotNull final Iterable> interpreterExpectations, + final int maximumTestCount) { super(relativeTestDataPath, SdkCreationType.EMPTY_SDK); myMinimumSuccessTestCount = minimumSuccessTestCount; - myRunner = runner; + myMaximumSuccessTestCount = maximumTestCount; + myRunnerSupplier = runnerSupplier; for (final Pair interpreterExpectation : interpreterExpectations) { myInterpreters.put(interpreterExpectation.first, interpreterExpectation.second); } @@ -180,8 +254,12 @@ public final class PyToxTest extends PyEnvTestCase { @NotNull final String stderr, @NotNull final String all) { + final Set expectedInterpreters = + myInterpreters.entrySet().stream().filter(intAndExp -> intAndExp.getValue() != null).map(intAndExp -> intAndExp.getKey()).collect( + Collectors.toSet()); + // Interpreters are used in tox.ini, so there should be such text - for (final String interpreterName : myInterpreters.keySet()) { + for (final String interpreterName : expectedInterpreters) { Assert.assertThat(String.format("No %s used from tox.ini", interpreterName), all, Matchers.containsString(interpreterName)); } @@ -198,6 +276,13 @@ public final class PyToxTest extends PyEnvTestCase { final String interpreterName = interpreterSuite.getName(); checkedInterpreters.add(interpreterName); + final InterpreterExpectations expectations = myInterpreters.get(interpreterName); + if (expectations == null) { + LOGGER.warn(String.format("Launched %s, but no expectation provided, skipping", interpreterName)); + continue; + } + + if (interpreterSuite.getChildren().size() == 1 && interpreterSuite.getChildren().get(0).getName().endsWith("ERROR")) { // Interpreter failed to run final String testOutput = getTestOutput(interpreterSuite.getChildren().get(0)); @@ -208,7 +293,6 @@ public final class PyToxTest extends PyEnvTestCase { continue; } // Some other error? - final InterpreterExpectations expectations = myInterpreters.get(interpreterName); Assert .assertFalse(String.format("Interpreter %s should not fail, but failed: %s", interpreterName, getTestOutput(interpreterSuite)), expectations.myExpectedSuccess); @@ -218,15 +302,20 @@ public final class PyToxTest extends PyEnvTestCase { if (interpreterSuite.getChildren().size() == 1 && interpreterSuite.getChildren().get(0).getName().endsWith("SKIP")) { // The only reason it may be skipped is it does not exist and skip_missing_interpreters = True final String output = getTestOutput(interpreterSuite); - Assert.assertThat("Test marked skipped but not because interpreter not found", output, Matchers.containsString("InterpreterNotFound")); + Assert.assertThat("Test marked skipped but not because interpreter not found", output, + Matchers.containsString("InterpreterNotFound")); } // Interpretr run success, //At least one interpreter tests should passed - Assert.assertThat(String.format("No test passed, should %s at least", myMinimumSuccessTestCount), - new SMRootTestsCounter(interpreterSuite.getRoot()).getPassedTestsCount(), + final int numberOfTests = new SMRootTestsCounter(interpreterSuite.getRoot()).getPassedTestsCount(); + Assert.assertThat(String.format("Not enough test passed, should %s at least", myMinimumSuccessTestCount), + numberOfTests, Matchers.greaterThanOrEqualTo(myMinimumSuccessTestCount)); + Assert.assertThat(String.format("Too many tests passed, should %s maximum", myMaximumSuccessTestCount), + numberOfTests, + Matchers.lessThanOrEqualTo(myMaximumSuccessTestCount)); // Check expected output final String message = String.format("Interpreter %s does not have expected string in output. \n ", interpreterName) + @@ -236,12 +325,13 @@ public final class PyToxTest extends PyEnvTestCase { Assert .assertThat(message, - getTestOutput(interpreterSuite), Matchers.containsString(myInterpreters.get(interpreterName).myExpectedOutput)); + getTestOutput(interpreterSuite), Matchers.containsString(expectations.myExpectedOutput)); } - Assert.assertThat("No all interpreters from tox.ini used", checkedInterpreters, Matchers.equalTo(myInterpreters.keySet())); - assert !skippedInterpreters.equals(myInterpreters.keySet()) : "All interpreters skipped (they do not exist on platform), " + - "we test nothing"; + Assert + .assertThat("No all interpreters from tox.ini used", expectedInterpreters, Matchers.everyItem(Matchers.isIn(checkedInterpreters))); + assert !skippedInterpreters.equals(expectedInterpreters) : "All interpreters skipped (they do not exist on platform), " + + "we test nothing"; } @NotNull @@ -260,16 +350,17 @@ public final class PyToxTest extends PyEnvTestCase { @NotNull @Override protected MyTestProcessRunner createProcessRunner() throws Exception { - return myRunner; + return myRunnerSupplier.get(); } } private static final class MyTestProcessRunner extends PyAbstractTestProcessRunner { - /** - * @param testPath testPath relative to community path - */ private MyTestProcessRunner() { - super(PyToxConfigurationFactory.INSTANCE, PyToxConfiguration.class, 0); + this(0); + } + + private MyTestProcessRunner(final int timesToRerunFailedTests) { + super(PyToxConfigurationFactory.INSTANCE, PyToxConfiguration.class, timesToRerunFailedTests); } } diff --git a/python/testSrc/com/jetbrains/python/codeInsight/testIntegration/PyTestCreatorTest.java b/python/testSrc/com/jetbrains/python/codeInsight/testIntegration/PyTestCreatorTest.java index 33fd6576a2aa..816c58d34073 100644 --- a/python/testSrc/com/jetbrains/python/codeInsight/testIntegration/PyTestCreatorTest.java +++ b/python/testSrc/com/jetbrains/python/codeInsight/testIntegration/PyTestCreatorTest.java @@ -24,8 +24,8 @@ import org.easymock.IMocksControl; import java.util.Arrays; -import static org.easymock.classextension.EasyMock.createNiceControl; -import static org.easymock.classextension.EasyMock.expect; +import static org.easymock.EasyMock.createNiceControl; +import static org.easymock.EasyMock.expect; /** * Checks how test classes are created diff --git a/python/testSrc/com/jetbrains/python/quickFixes/AddImportQuickFixTest.java b/python/testSrc/com/jetbrains/python/quickFixes/AddImportQuickFixTest.java new file mode 100644 index 000000000000..969b7cee4028 --- /dev/null +++ b/python/testSrc/com/jetbrains/python/quickFixes/AddImportQuickFixTest.java @@ -0,0 +1,71 @@ +/* + * Copyright 2000-2016 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.jetbrains.python.quickFixes; + +import com.intellij.codeInsight.intention.IntentionAction; +import com.intellij.codeInspection.ex.QuickFixWrapper; +import com.intellij.util.containers.ContainerUtil; +import com.jetbrains.python.PyQuickFixTestCase; +import com.jetbrains.python.codeInsight.imports.AutoImportQuickFix; +import com.jetbrains.python.codeInsight.imports.ImportCandidateHolder; +import com.jetbrains.python.inspections.unresolvedReference.PyUnresolvedReferencesInspection; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.function.Consumer; + +/** + * @author Mikhail Golubev + */ +public class AddImportQuickFixTest extends PyQuickFixTestCase { + + // PY-19773 + public void testReexportedName() throws Exception { + doMultiFileAutoImportTest("Import 'flask.request'"); + } + + public void testOsPathFunctions() throws Exception { + doMultiFileAutoImportTest("Import", fix -> { + final List candidates = fix.getCandidates(); + final List names = ContainerUtil.map(candidates, c -> c.getPresentableText("join")); + assertSameElements(names, "os.path.join(path, *paths)"); + }); + } + + private void doMultiFileAutoImportTest(@NotNull String hintPrefix) { + doMultiFileAutoImportTest(hintPrefix, null); + } + + private void doMultiFileAutoImportTest(@NotNull String hintPrefix, @Nullable Consumer checkQuickfix) { + myFixture.copyDirectoryToProject(getTestName(true), ""); + myFixture.enableInspections(PyUnresolvedReferencesInspection.class); + final String entryPoint = "main"; + myFixture.configureByFile(entryPoint + ".py"); + myFixture.checkHighlighting(true, false, false); + final List intentions = myFixture.filterAvailableIntentions(hintPrefix); + final IntentionAction intention = ContainerUtil.find(intentions, action -> { + return action instanceof QuickFixWrapper && ((QuickFixWrapper)action).getFix() instanceof AutoImportQuickFix; + }); + assertNotNull("Auto import quick fix starting with '" + hintPrefix + "' wasn't found", intention); + final AutoImportQuickFix quickfix = (AutoImportQuickFix)((QuickFixWrapper)intention).getFix(); + if (checkQuickfix != null) { + checkQuickfix.accept(quickfix); + } + myFixture.launchAction(intention); + myFixture.checkResultByFile(getTestName(true) + "/" + entryPoint + "_after.py", true); + } +} diff --git a/python/testSrc/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassTest.java b/python/testSrc/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassTest.java index 92f0ba72cfe1..31eb4a15ccfa 100644 --- a/python/testSrc/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassTest.java +++ b/python/testSrc/com/jetbrains/python/refactoring/classes/extractSuperclass/PyExtractSuperclassTest.java @@ -44,6 +44,17 @@ public class PyExtractSuperclassTest extends PyClassRefactoringTest { super("extractsuperclass"); } + // Checks if class explicitly extends object we shall move it even in Py3K (PY-19137) + public void testPy3ParentHasObject() throws Exception { + setLanguageLevel(LanguageLevel.PYTHON30); + doSimpleTest("Child", "Parent", null, true, false, ".spam"); + } + + // Ensures refactoring works even if memeberInfo has null element (no npe: PY-19136) + public void testFieldsNpe() throws Exception { + doSimpleTest("Basic", "Ancestor", null, true, false, ".__init__", "#a", "#b", ".func1"); + } + // Checks that moving methods between files moves imports as well public void testImportMultiFile() throws Throwable { multiFileTestHelper(".do_useful_stuff", false); diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/CovariantCompareToInspectionTest.java b/python/testSrc/com/jetbrains/python/testing/tox/PyToxTestTools.java similarity index 58% rename from plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/CovariantCompareToInspectionTest.java rename to python/testSrc/com/jetbrains/python/testing/tox/PyToxTestTools.java index 2109c8b1fcf3..61b5315a5212 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/bugs/CovariantCompareToInspectionTest.java +++ b/python/testSrc/com/jetbrains/python/testing/tox/PyToxTestTools.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -13,17 +13,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.siyeh.ig.bugs; +package com.jetbrains.python.testing.tox; -import com.siyeh.ig.IGInspectionTestCase; +import org.jetbrains.annotations.NotNull; -public class CovariantCompareToInspectionTest extends IGInspectionTestCase { - - public void testSimple() throws Exception { - doTest(); +/** + * Tools to test tox + * @author Ilya.Kazakevich + */ +public final class PyToxTestTools { + private PyToxTestTools() { } - private void doTest() throws Exception { - doTest("com/siyeh/igtest/bugs/covariantCompareTo/" + getTestName(true), new CovariantCompareToInspection()); + + public static void setRunOnlyEnvs(@NotNull final PyToxConfiguration configuration, @NotNull final String... tests) { + configuration.setRunOnlyEnvs(tests); } } diff --git a/resources-en/src/inspectionDescriptions/SimplifyStreamApiCallChains.html b/resources-en/src/inspectionDescriptions/SimplifyStreamApiCallChains.html index 692945ed15a2..67879aed0911 100644 --- a/resources-en/src/inspectionDescriptions/SimplifyStreamApiCallChains.html +++ b/resources-en/src/inspectionDescriptions/SimplifyStreamApiCallChains.html @@ -1,8 +1,11 @@ This inspection reports stream API call chains which can be simplified. -It allows to avoid creating redundant temporary objects without changing semantics. -
-For example, Collection.stream().forEach() can be replaced with Collection.forEach() +It allows to avoid creating redundant temporary objects when traversing a collection. +

+For example, Collection.stream().forEach() can be replaced with Collection.forEach(). +

+Note that forEachOrdered() is a special case. While the traversal order of Collection.forEach() is usually the same as with +Collection.stream().forEachOrdered(), specific implementations may override that. Please check the documentation on the collection's implementation. \ No newline at end of file diff --git a/resources-en/src/messages/QuickFixBundle.properties b/resources-en/src/messages/QuickFixBundle.properties index 091b95496c7e..229969706a68 100644 --- a/resources-en/src/messages/QuickFixBundle.properties +++ b/resources-en/src/messages/QuickFixBundle.properties @@ -223,7 +223,6 @@ orderEntry.fix.add.library.to.classpath=Add library ''{0}'' to classpath orderEntry.fix.family.add.library.to.classpath=Add library to classpath orderEntry.fix.circular.dependency.warning=Adding dependency on module ''{0}'' will introduce circular dependency between modules ''{1}'' and ''{2}''.\nAdd dependency anyway? orderEntry.fix.title.circular.dependency.warning=Circular Dependency Warning -orderEntry.fix.add.junit.jar.to.classpath=Add JUnit to classpath static.import.method.text=Static import method static.import.method.choose.method.to.import=Choose Method to Import @@ -286,4 +285,6 @@ java.8.collections.api.inspection.fix.family.name=Replace with single method cal java.8.collections.api.inspection.fix.text=Replace with ''{0}'' method call wrap.with.optional.parameter.text=Wrap {0, choice, 1#1st|2#2nd|3#3rd|4#{0,number}th} parameter using ''java.util.Optional'' -wrap.with.optional.single.parameter.text=Wrap using 'java.util.Optional' \ No newline at end of file +wrap.with.optional.single.parameter.text=Wrap using 'java.util.Optional' + +move.file.to.source.root.text=Move file to a source root diff --git a/xml/impl/src/com/intellij/codeInsight/completion/XmlSmartEnterProcessor.java b/xml/impl/src/com/intellij/codeInsight/completion/XmlSmartEnterProcessor.java index d13430d54e57..cef0afbf8b5b 100644 --- a/xml/impl/src/com/intellij/codeInsight/completion/XmlSmartEnterProcessor.java +++ b/xml/impl/src/com/intellij/codeInsight/completion/XmlSmartEnterProcessor.java @@ -121,10 +121,10 @@ public class XmlSmartEnterProcessor extends SmartEnterProcessor { } else if (probableCommaOffset >= text.length() || ((ch = text.charAt(probableCommaOffset)) != '/' && ch != '>')) { final XmlAttribute xmlAttribute = PsiTreeUtil.getParentOfType(atCaret, XmlAttribute.class, false, XmlTag.class); - final CharSequence text2insert = getClosingPart(xmlAttribute, tagAtCaret, true); + final String text2insert = getClosingPart(xmlAttribute, tagAtCaret, true); doc.insertString(insertionOffset, text2insert); - caretTo = insertionOffset + (text2insert.length() > 2 ? 1 : text2insert.length()); + caretTo = insertionOffset + text2insert.indexOf('>') + 1; } commitChanges(project, editor, psiFile, caretTo, null); diff --git a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java index a2b988c5aa2a..3e52928978d7 100644 --- a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java +++ b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlEqTypedHandler.java @@ -21,6 +21,7 @@ import com.intellij.codeInsight.completion.XmlAttributeInsertHandler; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.project.Project; +import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.psi.xml.XmlAttribute; @@ -34,7 +35,7 @@ public class XmlEqTypedHandler extends TypedHandlerDelegate { public Result beforeCharTyped(char c, Project project, Editor editor, PsiFile file, FileType fileType) { if (c == '=' && WebEditorOptions.getInstance().isInsertQuotesForAttributeValue()) { if (XmlGtTypedHandler.fileContainsXmlLanguage(file)) { - TypedHandler.commitDocumentIfCurrentCaretIsNotTheFirstOne(editor, project); + PsiDocumentManager.getInstance(project).commitDocument(editor.getDocument()); PsiElement at = file.findElementAt(editor.getCaretModel().getOffset() - 1); PsiElement atParent = at != null ? at.getParent() : null; diff --git a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java index 993447fca74c..9bf79ed3b465 100644 --- a/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java +++ b/xml/impl/src/com/intellij/codeInsight/editorActions/XmlSlashTypedHandler.java @@ -19,6 +19,7 @@ import com.intellij.application.options.editor.WebEditorOptions; import com.intellij.ide.highlighter.XmlLikeFileType; import com.intellij.lang.ASTNode; import com.intellij.lang.xml.XMLLanguage; +import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.EditorModificationUtil; import com.intellij.openapi.editor.ScrollType; @@ -26,6 +27,7 @@ import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.*; +import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.impl.source.tree.TreeUtil; import com.intellij.psi.templateLanguages.OuterLanguageElement; import com.intellij.psi.tree.IElementType; @@ -113,6 +115,7 @@ public class XmlSlashTypedHandler extends TypedHandlerDelegate { } } EditorModificationUtil.insertStringAtCaret(editor, tag.getName() + ">", false); + autoIndent(editor); return Result.STOP; } } @@ -165,4 +168,15 @@ public class XmlSlashTypedHandler extends TypedHandlerDelegate { } return false; } + + private static void autoIndent(@NotNull Editor editor) { + Project project = editor.getProject(); + if (project != null) { + PsiDocumentManager documentManager = PsiDocumentManager.getInstance(project); + Document document = editor.getDocument(); + documentManager.commitDocument(document); + int lineOffset = document.getLineStartOffset(document.getLineNumber(editor.getCaretModel().getOffset())); + CodeStyleManager.getInstance(project).adjustLineIndent(document, lineOffset); + } + } } \ No newline at end of file diff --git a/xml/impl/src/com/intellij/codeInsight/template/emmet/completion/EmmetLookupActionProvider.java b/xml/impl/src/com/intellij/codeInsight/template/emmet/completion/EmmetLookupActionProvider.java index 1f30e3572f62..bd5e734f705c 100644 --- a/xml/impl/src/com/intellij/codeInsight/template/emmet/completion/EmmetLookupActionProvider.java +++ b/xml/impl/src/com/intellij/codeInsight/template/emmet/completion/EmmetLookupActionProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -50,10 +50,8 @@ public class EmmetLookupActionProvider implements LookupActionProvider { if (project.isDisposed()) return; final Configurable generatorSpecificConfigurable = generator.createConfigurable(); - EmmetCompositeConfigurable configurable = generatorSpecificConfigurable != null - ? new EmmetCompositeConfigurable(generatorSpecificConfigurable) - : new EmmetCompositeConfigurable(new XmlEmmetConfigurable()); - ShowSettingsUtil.getInstance().editConfigurable(project, configurable); + Configurable configurable = generatorSpecificConfigurable != null ? generatorSpecificConfigurable : new XmlEmmetConfigurable(); + ShowSettingsUtil.getInstance().editConfigurable(project, new EmmetCompositeConfigurable(configurable)); }); return Result.HIDE_LOOKUP; } @@ -62,7 +60,7 @@ public class EmmetLookupActionProvider implements LookupActionProvider { consumer.consume(new LookupElementAction(AllIcons.Actions.Delete, "Disable Emmet") { @Override public Result performLookupAction() { - ApplicationManager.getApplication().invokeLater(() -> generator.disableEmmet()); + ApplicationManager.getApplication().invokeLater(generator::disableEmmet); return Result.HIDE_LOOKUP; } }); diff --git a/xml/tests/src/com/intellij/codeInsight/completion/XmlTypedHandlersTest.java b/xml/tests/src/com/intellij/codeInsight/completion/XmlTypedHandlersTest.java index 57f4573a5ee0..c3b9d4bb5b5a 100644 --- a/xml/tests/src/com/intellij/codeInsight/completion/XmlTypedHandlersTest.java +++ b/xml/tests/src/com/intellij/codeInsight/completion/XmlTypedHandlersTest.java @@ -48,8 +48,8 @@ public class XmlTypedHandlersTest extends LightPlatformCodeInsightFixtureTestCas "<\n" + "<\n" + "", '/', "\n" + - "\n" + - "\n" + + " \n" + + " \n" + ""); } @@ -68,8 +68,8 @@ public class XmlTypedHandlersTest extends LightPlatformCodeInsightFixtureTestCas "<\n" + "<\n" + "", '/', "\n" + - "\n" + - "\n" + + " \n" + + " \n" + ""); } @@ -167,6 +167,24 @@ public class XmlTypedHandlersTest extends LightPlatformCodeInsightFixtureTestCas doTest("< ?>", '?', " ?>"); } + public void testAutoindentEndTag() throws Exception { + doTest( + "

\n" + + "

\n" + + " Some text\n" + + "

\n" + + " <", + + '/', + + "
\n" + + "

\n" + + " Some text\n" + + "

\n" + + "
" + ); + } + private void doTest(String text, char c, String result) { myFixture.configureByText(XmlFileType.INSTANCE, text); myFixture.type(c); diff --git a/xml/tests/testData/psi/pallada.xml b/xml/tests/testData/psi/pallada.xml index 4f533e082980..e051e1688a5a 100644 --- a/xml/tests/testData/psi/pallada.xml +++ b/xml/tests/testData/psi/pallada.xml @@ -131,10 +131,10 @@ - + - +