mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
project leak
This commit is contained in:
+22
-12
@@ -183,18 +183,28 @@ public final class IdeKeyEventDispatcher implements Disposable {
|
|||||||
myContext.setModalContext(isModalContext);
|
myContext.setModalContext(isModalContext);
|
||||||
myContext.setInputEvent(e);
|
myContext.setInputEvent(e);
|
||||||
|
|
||||||
if (getState() == KeyState.STATE_INIT) {
|
try {
|
||||||
return inInitState();
|
if (getState() == KeyState.STATE_INIT) {
|
||||||
} else if (getState() == KeyState.STATE_PROCESSED) {
|
return inInitState();
|
||||||
return inProcessedState();
|
}
|
||||||
} else if (getState() == KeyState.STATE_WAIT_FOR_SECOND_KEYSTROKE) {
|
else if (getState() == KeyState.STATE_PROCESSED) {
|
||||||
return inWaitForSecondStrokeState();
|
return inProcessedState();
|
||||||
} else if (getState() == KeyState.STATE_SECOND_STROKE_IN_PROGRESS) {
|
}
|
||||||
return inSecondStrokeInProgressState();
|
else if (getState() == KeyState.STATE_WAIT_FOR_SECOND_KEYSTROKE) {
|
||||||
} else if (getState() == KeyState.STATE_KEY_GESTURE_PROCESSOR) {
|
return inWaitForSecondStrokeState();
|
||||||
return myKeyGestureProcessor.process();
|
}
|
||||||
} else {
|
else if (getState() == KeyState.STATE_SECOND_STROKE_IN_PROGRESS) {
|
||||||
throw new IllegalStateException("state = " + getState());
|
return inSecondStrokeInProgressState();
|
||||||
|
}
|
||||||
|
else if (getState() == KeyState.STATE_KEY_GESTURE_PROCESSOR) {
|
||||||
|
return myKeyGestureProcessor.process();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
throw new IllegalStateException("state = " + getState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
myContext.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,4 +88,12 @@ public class KeyProcessorContext {
|
|||||||
public KeyEvent getInputEvent() {
|
public KeyEvent getInputEvent() {
|
||||||
return myInputEvent;
|
return myInputEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clear() {
|
||||||
|
myInputEvent = null;
|
||||||
|
myActions.clear();
|
||||||
|
myFocusOwner = null;
|
||||||
|
myDataContext = null;
|
||||||
|
myFoundComponent = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user