Merge remote-tracking branch 'origin/master'

This commit is contained in:
Ekaterina Tuzova
2014-08-21 15:17:01 +04:00
6 changed files with 26 additions and 21 deletions
@@ -130,9 +130,9 @@ public class IdeEventQueue extends EventQueue {
private final Set<EventDispatcher> myDispatchers = new LinkedHashSet<EventDispatcher>();
private final Set<EventDispatcher> myPostprocessors = new LinkedHashSet<EventDispatcher>();
private final Set<EventDispatcher> myPostProcessors = new LinkedHashSet<EventDispatcher>();
private final Set<Runnable> myReady = new HashSet<Runnable>();
private boolean myKeyboardBusy;
private boolean myDispatchingFocusEvent;
@@ -148,16 +148,14 @@ public class IdeEventQueue extends EventQueue {
private IdeEventQueue() {
addIdleTimeCounterRequest();
final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
//noinspection HardCodedStringLiteral
final KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
keyboardFocusManager.addPropertyChangeListener("permanentFocusOwner", new PropertyChangeListener() {
@Override
public void propertyChange(final PropertyChangeEvent e) {
final Application application = ApplicationManager.getApplication();
if (application == null) {
// We can get focus event before application is initialized
return;
}
@@ -171,6 +169,12 @@ public class IdeEventQueue extends EventQueue {
});
addDispatcher(new WindowsAltSupressor(), null);
Application app = ApplicationManager.getApplication();
if (app != null && app.isUnitTestMode()) {
//noinspection AssignmentToStaticFieldFromInstanceMethod
ourAppIsLoaded = true;
}
}
@@ -289,11 +293,11 @@ public class IdeEventQueue extends EventQueue {
}
public void addPostprocessor(EventDispatcher dispatcher, @Nullable Disposable parent) {
_addProcessor(dispatcher, parent, myPostprocessors);
_addProcessor(dispatcher, parent, myPostProcessors);
}
public void removePostprocessor(EventDispatcher dispatcher) {
myPostprocessors.remove(dispatcher);
myPostProcessors.remove(dispatcher);
}
private static void _addProcessor(final EventDispatcher dispatcher, Disposable parent, final Set<EventDispatcher> set) {
@@ -383,7 +387,7 @@ public class IdeEventQueue extends EventQueue {
myIsInInputEvent = wasInputEvent;
myCurrentEvent = oldEvent;
for (EventDispatcher each : myPostprocessors) {
for (EventDispatcher each : myPostProcessors) {
each.dispatch(e);
}
@@ -22,20 +22,19 @@ import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.KeyboardShortcut;
import com.intellij.openapi.keymap.KeymapManager;
import com.intellij.openapi.util.Clock;
import com.intellij.testFramework.LightPlatformTestCase;
import com.intellij.testFramework.LightPlatformLangTestCase;
import javax.swing.*;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
public class ModifierKeyDoubleClickHandlerTest extends LightPlatformTestCase {
public class ModifierKeyDoubleClickHandlerTest extends LightPlatformLangTestCase {
private static final String MY_SHIFT_SHIFT_ACTION = "ModifierKeyDoubleClickHandlerTest.action1";
private static final String MY_SHIFT_KEY_ACTION = "ModifierKeyDoubleClickHandlerTest.action2";
private static final String MY_SHIFT_SHIFT_KEY_ACTION = "ModifierKeyDoubleClickHandlerTest.action3";
public static final KeyboardShortcut SHIFT_KEY_SHORTCUT = new KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE,
InputEvent.SHIFT_MASK),
null);
private static final KeyboardShortcut SHIFT_KEY_SHORTCUT =
new KeyboardShortcut(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, InputEvent.SHIFT_MASK), null);
private final JComponent myComponent = new JPanel();
+1 -1
View File
@@ -1,5 +1,5 @@
; Installer images
!define IMAGES_LOCATION ${COMMUNITY_DIR}\python\build\resources
!define IMAGES_LOCATION ${COMMUNITY_DIR}\python\build\edu\resources
;!define LICENSE_FILE ${BASE_DIR}\python\license\PyCharm_Preview_License
!define PRODUCT_PROPERTIES_FILE ${BASE_DIR}\out\pycharmEDU\layout\bin\idea.properties
!define PRODUCT_VM_OPTIONS_NAME pycharm.exe.vmoptions

Before

Width:  |  Height:  |  Size: 151 KiB

After

Width:  |  Height:  |  Size: 151 KiB

+1 -1
View File
@@ -4,7 +4,7 @@
!define PRODUCT_EXE_FILE "pycharm.exe"
!define PRODUCT_ICON_FILE "PC_instCom.ico"
!define PRODUCT_UNINST_ICON_FILE "PC_uninstCom.ico"
!define PRODUCT_LOGO_FILE "edulogo.bmp"
!define PRODUCT_LOGO_FILE "logo.bmp"
!define PRODUCT_HEADER_FILE "headerlogo.bmp"
; if SHOULD_SET_DEFAULT_INSTDIR != 0 then default installation directory will be directory where highest-numbered PyCharm build has been installed
@@ -15,9 +15,7 @@ import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.project.DumbAwareAction;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.popup.Balloon;
import com.intellij.openapi.ui.popup.BalloonBuilder;
import com.intellij.openapi.ui.popup.JBPopupFactory;
import com.intellij.openapi.ui.popup.*;
import com.intellij.openapi.util.Disposer;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.wm.IdeFocusManager;
@@ -185,7 +183,6 @@ public class StudyCheckAction extends DumbAwareAction {
IdeFocusManager.getInstance(project).requestFocus(editorToNavigate.getContentComponent(), true);
}
});
taskFileToNavigate.navigateToFirstFailedTaskWindow(editor);
}
@@ -253,12 +250,17 @@ public class StudyCheckAction extends DumbAwareAction {
private static void createTestResultPopUp(final String text, Color color, @NotNull final Project project) {
BalloonBuilder balloonBuilder =
JBPopupFactory.getInstance().createHtmlTextBalloonBuilder(text, null, color, null);
Balloon balloon = balloonBuilder.createBalloon();
final Balloon balloon = balloonBuilder.createBalloon();
StudyEditor studyEditor = StudyEditor.getSelectedStudyEditor(project);
assert studyEditor != null;
JButton checkButton = studyEditor.getCheckButton();
balloon.showInCenterOf(checkButton);
Disposer.dispose(balloon);
balloon.addListener(new JBPopupAdapter() {
@Override
public void onClosed(LightweightWindowEvent event) {
Disposer.dispose(balloon);
}
});
}
@Override