Commit 840b8d7e authored by Roman Shevchenko's avatar Roman Shevchenko
Browse files

Merge remote-tracking branch 'origin/master'

parents 89a53390 6e7123f9
Branches unavailable Tags unavailable
No related merge requests found
Showing with 29 additions and 19 deletions
+29 -19
......@@ -50,6 +50,7 @@ public class ViewTextAction extends XFetchValueActionBase {
@NotNull
@Override
protected ValueCollector createCollector(@NotNull AnActionEvent e) {
XValueNodeImpl node = getStringNode(e);
return new ValueCollector(XDebuggerTree.getTree(e.getDataContext())) {
MyDialog dialog = null;
......@@ -57,7 +58,6 @@ public class ViewTextAction extends XFetchValueActionBase {
public void handleInCollector(Project project, String value, XDebuggerTree tree) {
String text = StringUtil.unquoteString(value);
if (dialog == null) {
XValueNodeImpl node = getStringNode(e);
dialog = new MyDialog(project, text, node);
dialog.setTitle(ActionsBundle.message(node != null ? "action.Debugger.ViewEditText.text" : "action.Debugger.ViewText.text"));
dialog.show();
......
......@@ -17,10 +17,7 @@ package com.intellij.debugger.impl;
import com.intellij.debugger.DebuggerBundle;
import com.intellij.debugger.DebuggerManagerEx;
import com.intellij.debugger.engine.DebugProcessImpl;
import com.intellij.debugger.engine.DebuggerManagerThreadImpl;
import com.intellij.debugger.engine.JavaExecutionStack;
import com.intellij.debugger.engine.SuspendContextImpl;
import com.intellij.debugger.engine.*;
import com.intellij.debugger.jdi.VirtualMachineProxyImpl;
import com.intellij.debugger.ui.breakpoints.BreakpointManager;
import com.intellij.openapi.diagnostic.Logger;
......@@ -168,7 +165,10 @@ class ReloadClassesWorker {
processException(e);
}
debugProcess.getPositionManager().clearCache();
CompoundPositionManager positionManager = debugProcess.getPositionManager();
if (positionManager != null) {
positionManager.clearCache();
}
DebuggerContextImpl context = myDebuggerSession.getContextManager().getContext();
SuspendContextImpl suspendContext = context.getSuspendContext();
......
......@@ -18,6 +18,7 @@ package com.intellij.psi.codeStyle;
import com.intellij.configurationStore.UnknownElementCollector;
import com.intellij.configurationStore.UnknownElementWriter;
import com.intellij.lang.Language;
import com.intellij.lang.LanguageUtil;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Document;
import com.intellij.openapi.extensions.ExtensionException;
......@@ -672,6 +673,14 @@ public class CodeStyleSettings extends CommonCodeStyleSettings implements Clonea
}
}
}
Language language = LanguageUtil.getLanguageForPsi(file.getProject(), file.getVirtualFile());
if (language != null) {
IndentOptions options = getIndentOptions(language);
if (options != null) {
return options;
}
}
return getIndentOptions(file.getFileType());
}
......@@ -699,6 +708,11 @@ public class CodeStyleSettings extends CommonCodeStyleSettings implements Clonea
private IndentOptions getLanguageIndentOptions(@Nullable FileType fileType) {
if (fileType == null || !(fileType instanceof LanguageFileType)) return null;
Language lang = ((LanguageFileType)fileType).getLanguage();
return getIndentOptions(lang);
}
@Nullable
private IndentOptions getIndentOptions(Language lang) {
CommonCodeStyleSettings langSettings = getCommonSettings(lang);
return langSettings == this ? null : langSettings.getIndentOptions();
}
......
......@@ -32,6 +32,11 @@ public class FreezeLogger {
private static final int MAX_ALLOWED_TIME = 500;
public static void runUnderPerformanceMonitor(@Nullable Project project, @NotNull Runnable action) {
if (ApplicationManager.getApplication().isUnitTestMode()) {
action.run();
return;
}
final ModalityState initial = ModalityState.current();
ALARM.cancelAllRequests();
ALARM.addRequest(() -> dumpThreads(project, initial), MAX_ALLOWED_TIME);
......
......@@ -204,7 +204,9 @@ def find_user_password(self, realm, authuri):
else:
return None
newMerc = isNewer3_8_3()
# After mercurial 3.8.3 urllib2.HTTPPasswordmgrwithdefaultrealm.find_user_password etc were changed to appropriate methods
# in util.urlreq module with slightly different semantics
newMerc = False if isinstance(self, urllib2.HTTPPasswordMgrWithDefaultRealm) else True
if newMerc:
user, password = util.urlreq.httppasswordmgrwithdefaultrealm().find_user_password(realm, authuri)
else:
......@@ -221,15 +223,4 @@ def find_user_password(self, realm, authuri):
raise util.Abort(_('http authorization required'))
user, passwd = retrievedPass
pmWithRealm.add_password(realm, authuri, user, passwd)
return retrievedPass
def isNewer3_8_3():
# After mercurial 3.8.3 urllib2.HTTPPasswordmgrwithdefaultrealm.find_user_password etc were changed to appropriate methods
# in util.urlreq module with slightly different semantics
try:
from mercurial.url import urlreq
return True
except ImportError:
pass
return False
\ No newline at end of file
return retrievedPass
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment