diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/CodeFragmentFactoryContextWrapper.java b/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/CodeFragmentFactoryContextWrapper.java index 7a709aed4449..26e01417bd58 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/CodeFragmentFactoryContextWrapper.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/evaluation/CodeFragmentFactoryContextWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * 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. @@ -75,6 +75,10 @@ public class CodeFragmentFactoryContextWrapper extends CodeFragmentFactory { private PsiElement wrapContext(Project project, final PsiElement originalContext) { if (project.isDefault()) return originalContext; + //TODO [egor] : does not work for anything other than java anyway, see IDEA-132677 + if (!(myDelegate instanceof DefaultCodeFragmentFactory)) { + return originalContext; + } PsiElement context = originalContext; XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession(); if (session != null) {