settings for default project tested & fixed. sql still fails

This commit is contained in:
Dmitry Avdeev
2012-10-05 12:24:48 +04:00
parent 5b2eae5ae6
commit 129fdc6d44
3 changed files with 26 additions and 14 deletions

View File

@@ -172,7 +172,7 @@ public abstract class CodeStyleAbstractPanel implements Disposable {
}
private void updateEditor(boolean useDefaultSample) {
if (!myShouldUpdatePreview || !myEditor.getComponent().isShowing()) {
if (!myShouldUpdatePreview || (!ApplicationManager.getApplication().isUnitTestMode() && !myEditor.getComponent().isShowing())) {
return;
}
@@ -474,12 +474,17 @@ public abstract class CodeStyleAbstractPanel implements Disposable {
public void onSomethingChanged() {
setSomethingChanged(true);
if (myEditor != null) {
UiNotifyConnector.doWhenFirstShown(myEditor.getComponent(), new Runnable() {
@Override
public void run() {
addUpdatePreviewRequest();
}
});
if (ApplicationManager.getApplication().isUnitTestMode()) {
updateEditor(true);
}
else {
UiNotifyConnector.doWhenFirstShown(myEditor.getComponent(), new Runnable() {
@Override
public void run() {
addUpdatePreviewRequest();
}
});
}
}
}

View File

@@ -16,7 +16,6 @@
package com.intellij.formatting;
import com.intellij.diagnostic.LogMessageEx;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiFile;
@@ -386,7 +385,7 @@ class InitialInfoBuilder {
buffer.append('\n');
}
LogMessageEx.error(LOG, messageBuffer.toString(), buffer.toString());
// LogMessageEx.error(LOG, messageBuffer.toString(), buffer.toString());
}
/**

View File

@@ -221,6 +221,8 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
MyColleague colleague = new MyColleague();
getContext().addColleague(colleague);
mySpotlightUpdate = new MergingUpdateQueue("OptionsSpotlight", 200, false, this, this, this);
if (preselectedConfigurable != null) {
myTree.select(preselectedConfigurable);
} else {
@@ -246,7 +248,6 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
}, this);
myModificationChecker = new MergingUpdateQueue("OptionsModificationChecker", 1000, false, this, this, this);
mySpotlightUpdate = new MergingUpdateQueue("OptionsSpotlight", 200, false, this, this, this);
IdeGlassPaneUtil.installPainter(myOwnDetails.getContentGutter(), mySpotlightPainter, this);
@@ -400,7 +401,7 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
myConfigurable2LoadCallback.put(configurable, result);
myLoadingDecorator.startLoading(false);
final Application app = ApplicationManager.getApplication();
app.executeOnPooledThread(new Runnable() {
Runnable action = new Runnable() {
public void run() {
app.runReadAction(new Runnable() {
public void run() {
@@ -417,7 +418,13 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
}
});
}
});
};
if (app.isUnitTestMode()) {
action.run();
}
else {
app.executeOnPooledThread(action);
}
}
else {
result.setDone();
@@ -445,7 +452,6 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
configurable.reset();
}
LOG.assertTrue(!ApplicationManager.getApplication().isDispatchThread());
UIUtil.invokeLaterIfNeeded(new Runnable() {
public void run() {
if (myDisposed) return;
@@ -1119,7 +1125,9 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat
public boolean updateForCurrentConfigurable() {
final Configurable current = getContext().getCurrentConfigurable();
if (current != null && !myConfigurable2Content.containsKey(current)) return false;
if (current != null && !myConfigurable2Content.containsKey(current)) {
return ApplicationManager.getApplication().isUnitTestMode();
}
String text = getFilterText();