rollback: broken installers

Signed-off-by: Konstantin Bulenkov <kb@jetbrains.com>
This commit is contained in:
Konstantin Bulenkov
2017-05-22 10:53:27 +03:00
parent 582830c5a3
commit 75276367ec
4 changed files with 48 additions and 44 deletions
@@ -84,7 +84,6 @@ import com.intellij.ui.components.JBLayeredPane;
import com.intellij.ui.components.JBScrollBar;
import com.intellij.ui.components.JBScrollPane;
import com.intellij.ui.mac.MacGestureSupportForEditor;
import com.intellij.ui.mac.MacGestureSupportUtils;
import com.intellij.util.Alarm;
import com.intellij.util.ArrayUtil;
import com.intellij.util.IJSwingUtilities;
@@ -555,7 +554,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
updateCaretCursor();
if (MacGestureSupportUtils.isSupported()) {
if (SystemInfo.isJavaVersionAtLeast("1.8") && SystemInfo.isMacIntel64 && SystemInfo.isJetBrainsJvm && Registry.is("ide.mac.forceTouch")) {
new MacGestureSupportForEditor(getComponent());
}
backwardCompatibilityWithSoftWrapAppliancePlaces(mySettings, kind);
@@ -15,12 +15,11 @@
*/
package com.intellij.openapi.keymap.impl.ui;
import com.apple.eawt.event.GestureUtilities;
import com.apple.eawt.event.PressureListener;
import com.intellij.openapi.actionSystem.MouseShortcut;
import com.intellij.openapi.actionSystem.PressureShortcut;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.ui.JBColor;
import com.intellij.ui.mac.MacGestureSupportUtils;
import com.intellij.ui.mac.MacGestureSupportForMouseShortcutPanel;
import java.awt.BorderLayout;
import java.awt.event.MouseAdapter;
@@ -71,13 +70,8 @@ public final class MouseShortcutPanel extends ShortcutPanel<MouseShortcut> {
myClickCount = allowDoubleClick ? 2 : 1;
addMouseListener(myMouseListener);
addMouseWheelListener(myMouseListener);
if (MacGestureSupportUtils.isSupported()) {
GestureUtilities.addGestureListenerTo(this, (PressureListener)e -> {
if (e.getStage() == 2) {
setShortcut(new PressureShortcut(e.getStage()));
myMouseShortcut = null;
}
});
if (SystemInfo.isJavaVersionAtLeast("1.8") && SystemInfo.isMacIntel64 && SystemInfo.isJetBrainsJvm && Registry.is("ide.mac.forceTouch")) {
new MacGestureSupportForMouseShortcutPanel(this, () -> myMouseShortcut = null);
}
setBackground(BACKGROUND);
setOpaque(true);
@@ -0,0 +1,42 @@
/*
* Copyright 2000-2017 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.ui.mac;
/*
* @author denis
*/
import com.apple.eawt.event.GestureListener;
import com.apple.eawt.event.GestureUtilities;
import com.apple.eawt.event.PressureEvent;
import com.apple.eawt.event.PressureListener;
import com.intellij.openapi.actionSystem.PressureShortcut;
import com.intellij.openapi.keymap.impl.ui.MouseShortcutPanel;
public class MacGestureSupportForMouseShortcutPanel {
public MacGestureSupportForMouseShortcutPanel(MouseShortcutPanel panel, Runnable runnable) {
GestureListener pressureListener = new PressureListener() {
@Override
public void pressure(PressureEvent e) {
if (e.getStage() == 2) {
panel.setShortcut(new PressureShortcut(e.getStage()));
runnable.run();
}
}
};
GestureUtilities.addGestureListenerTo(panel, pressureListener);
}
}
@@ -1,31 +0,0 @@
/*
* Copyright 2000-2017 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.ui.mac;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.registry.Registry;
/**
* @author Konstantin Bulenkov
*/
public class MacGestureSupportUtils {
public static boolean isSupported() {
return SystemInfo.isJavaVersionAtLeast("1.8")
&& SystemInfo.isMacIntel64
&& SystemInfo.isJetBrainsJvm
&& Registry.is("ide.mac.forceTouch");
}
}