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

This commit is contained in:
Eugene Kudelevsky
2010-06-28 19:46:34 +04:00
5 changed files with 27 additions and 17 deletions
@@ -54,6 +54,7 @@ public class PerformanceWatcher implements ApplicationComponent {
private List<StackTraceElement> myStacktraceCommonPart;
private int UNRESPONSIVE_THRESHOLD = 5;
private int UNRESPONSIVE_INTERVAL = 5;
@NotNull
public String getComponentName() {
@@ -72,7 +73,16 @@ public class PerformanceWatcher implements ApplicationComponent {
// ignore
}
}
if (UNRESPONSIVE_THRESHOLD == 0) {
final String interval = System.getProperty("performance.watcher.interval");
if (interval != null) {
try {
UNRESPONSIVE_INTERVAL = Integer.parseInt(interval);
}
catch (NumberFormatException e) {
// ignore
}
}
if (UNRESPONSIVE_THRESHOLD == 0 || UNRESPONSIVE_INTERVAL == 0) {
return;
}
@@ -145,7 +155,7 @@ public class PerformanceWatcher implements ApplicationComponent {
private void checkEDTResponsiveness() {
while(true) {
try {
if (myShutdownSemaphore.tryAcquire(1, TimeUnit.SECONDS)) {
if (myShutdownSemaphore.tryAcquire(UNRESPONSIVE_INTERVAL, TimeUnit.SECONDS)) {
break;
}
}
@@ -435,8 +435,6 @@
<className>com.intellij.codeInsight.intention.impl.EditFoldingOptionsAction</className>
</intentionAction>
<resolveScopeEnlarger implementation="com.intellij.psi.NonClasspathResolveScopeEnlarger"/>
<!-- CodeInsightSettings -->
<editorActionHandler action="EditorEnter" implementationClass="com.intellij.codeInsight.editorActions.EnterHandler"/>
<editorActionHandler action="EditorLineEnd" implementationClass="com.intellij.codeInsight.editorActions.EndHandler"/>
@@ -20,9 +20,9 @@ import com.intellij.openapi.Disposable;
import com.intellij.openapi.command.CommandAdapter;
import com.intellij.openapi.command.CommandEvent;
import com.intellij.openapi.command.CommandProcessor;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.vcs.actions.VcsContextFactory;
import com.intellij.openapi.vcs.changes.ChangeListManager;
import com.intellij.openapi.vfs.*;
@@ -276,10 +276,16 @@ public abstract class VcsVFSListener implements Disposable {
public void beforePropertyChange(final VirtualFilePropertyEvent event) {
if (!isEventIgnored(event) && event.getPropertyName().equalsIgnoreCase(VirtualFile.PROP_NAME)) {
final VirtualFile file = event.getFile();
final VirtualFile parent = file.getParent();
if (parent != null) {
addFileToMove(file, parent.getPath(), (String)event.getNewValue());
String oldName = (String) event.getOldValue();
String newName = (String) event.getNewValue();
// in order to force a reparse of a file, the rename event can be fired with old name equal to new name -
// such events needn't be handled by the VCS
if (!Comparing.equal(oldName, newName)) {
final VirtualFile file = event.getFile();
final VirtualFile parent = file.getParent();
if (parent != null) {
addFileToMove(file, parent.getPath(), newName);
}
}
}
}
@@ -17,14 +17,12 @@ package com.intellij.spellchecker.inspections;
import com.intellij.openapi.progress.ProgressManager;
import com.intellij.openapi.util.TextRange;
import com.intellij.spellchecker.util.Strings;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -134,11 +132,7 @@ public abstract class BaseSplitter implements Splitter {
}
public static void checkCancelled() {
try {
ProgressManager.checkCanceled();
}
catch (Throwable ignored) {
}
ProgressManager.checkCanceled();
}
+3 -1
View File
@@ -1135,7 +1135,9 @@
serviceImplementation="com.intellij.profile.codeInspection.JavaAwareInspectionProfileManager"/>
<exportable serviceInterface="com.intellij.profile.codeInspection.InspectionProfileManager"/>
<schemeOwner serviceInterface="com.intellij.profile.codeInspection.InspectionProfileManager"/>
</extensions>
<resolveScopeEnlarger implementation="com.intellij.psi.NonClasspathResolveScopeEnlarger"/>
</extensions>
<xi:include href="/META-INF/xdebugger.xml" xpointer="xpointer(/root/*)"/>
<extensions defaultExtensionNs="com.intellij">