diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ShowTypesAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/ShowTypesAction.java
new file mode 100644
index 000000000000..116dcc43e050
--- /dev/null
+++ b/java/debugger/impl/src/com/intellij/debugger/actions/ShowTypesAction.java
@@ -0,0 +1,53 @@
+/*
+ * 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.debugger.actions;
+
+import com.intellij.debugger.engine.JavaDebugProcess;
+import com.intellij.openapi.actionSystem.AnActionEvent;
+import com.intellij.openapi.actionSystem.RegistryToggleAction;
+import com.intellij.openapi.project.Project;
+import com.intellij.xdebugger.XDebugSession;
+import com.intellij.xdebugger.XDebuggerManager;
+import com.intellij.xdebugger.impl.XDebuggerUtilImpl;
+import org.jetbrains.annotations.NotNull;
+
+/**
+ * @author egor
+ */
+public class ShowTypesAction extends RegistryToggleAction {
+ public ShowTypesAction() {
+ super("debugger.showTypes");
+ }
+
+ @Override
+ public void doWhenDone(AnActionEvent e) {
+ XDebuggerUtilImpl.rebuildAllSessionsViews(e.getProject());
+ }
+
+ @Override
+ public void update(@NotNull AnActionEvent e) {
+ Project project = e.getProject();
+ if (project != null) {
+ XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
+ if (session != null && session.getDebugProcess() instanceof JavaDebugProcess) {
+ e.getPresentation().setEnabledAndVisible(true);
+ super.update(e);
+ return;
+ }
+ }
+ e.getPresentation().setEnabledAndVisible(false);
+ }
+}
diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ValueDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ValueDescriptorImpl.java
index 17b8e7e91a52..bb922a298e6d 100644
--- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ValueDescriptorImpl.java
+++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ValueDescriptorImpl.java
@@ -33,6 +33,7 @@ import com.intellij.debugger.ui.tree.render.*;
import com.intellij.debugger.ui.tree.render.Renderer;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
+import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiExpression;
@@ -138,7 +139,7 @@ public abstract class ValueDescriptorImpl extends NodeDescriptorImpl implements
}
public boolean isShowIdLabel() {
- return myShowIdLabel;
+ return myShowIdLabel && Registry.is("debugger.showTypes");
}
public void setShowIdLabel(boolean showIdLabel) {
diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties
index 199ee3e4b330..4df755a10ce8 100644
--- a/platform/util/resources/misc/registry.properties
+++ b/platform/util/resources/misc/registry.properties
@@ -180,6 +180,8 @@ ide.mac.retina.disableDrawingFix=false
ide.mac.fix.font.fallback=false
ide.mac.fix.font.fallback.description=Fix font fallback mechanism by using a more elaborate procedure to check whether specific font can display a particular character (when Apple JDK is used)
+debugger.showTypes=true
+debugger.showTypes.description=Show types in variables tree
debugger.valueTooltipAutoShow=true
debugger.valueTooltipAutoShow.description=Auto show tooltip on mouse over.
debugger.valueTooltipAutoShowOnSelection=false
diff --git a/resources/src/idea/JavaActions.xml b/resources/src/idea/JavaActions.xml
index 5748001c5cbe..2f511f16f876 100644
--- a/resources/src/idea/JavaActions.xml
+++ b/resources/src/idea/JavaActions.xml
@@ -181,6 +181,9 @@
+
+
+