mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -46,17 +46,15 @@ public class AnActionEvent implements PlaceProvider<String> {
|
||||
private static final Map<String, String> ourInjectedIds = new HashMap<String, String>();
|
||||
|
||||
/**
|
||||
* @throws IllegalArgumentException <code>dataContext</code> is <code>null</code> or
|
||||
* @throws IllegalArgumentException if <code>dataContext</code> is <code>null</code> or
|
||||
* <code>place</code> is <code>null</code> or <code>presentation</code> is <code>null</code>
|
||||
*/
|
||||
public AnActionEvent(
|
||||
InputEvent inputEvent,
|
||||
@NotNull DataContext dataContext,
|
||||
@NotNull @NonNls String place,
|
||||
@NotNull Presentation presentation,
|
||||
ActionManager actionManager,
|
||||
@JdkConstants.InputEventMask int modifiers
|
||||
){
|
||||
public AnActionEvent(InputEvent inputEvent,
|
||||
@NotNull DataContext dataContext,
|
||||
@NotNull @NonNls String place,
|
||||
@NotNull Presentation presentation,
|
||||
ActionManager actionManager,
|
||||
@JdkConstants.InputEventMask int modifiers) {
|
||||
// TODO[vova,anton] make this constructor package local. No one is allowed to create AnActionEvents
|
||||
myInputEvent = inputEvent;
|
||||
myActionManager = actionManager;
|
||||
@@ -96,7 +94,7 @@ public class AnActionEvent implements PlaceProvider<String> {
|
||||
}
|
||||
|
||||
@NonNls
|
||||
public static String uninjectedId(String dataId) {
|
||||
public static String uninjectedId(@NotNull String dataId) {
|
||||
return StringUtil.trimStart(dataId, ourInjectedPrefix);
|
||||
}
|
||||
|
||||
@@ -112,6 +110,7 @@ public class AnActionEvent implements PlaceProvider<String> {
|
||||
return myDataContext;
|
||||
}
|
||||
return new DataContext() {
|
||||
@Override
|
||||
@Nullable
|
||||
public Object getData(@NonNls String dataId) {
|
||||
Object injected = myDataContext.getData(injectedId(dataId));
|
||||
@@ -140,6 +139,7 @@ public class AnActionEvent implements PlaceProvider<String> {
|
||||
* @return the place identifier
|
||||
* @see ActionPlaces
|
||||
*/
|
||||
@Override
|
||||
@NotNull
|
||||
public String getPlace() {
|
||||
return myPlace;
|
||||
@@ -176,7 +176,7 @@ public class AnActionEvent implements PlaceProvider<String> {
|
||||
return myWorksInInjected;
|
||||
}
|
||||
|
||||
public void accept(AnActionEventVisitor visitor) {
|
||||
public void accept(@NotNull AnActionEventVisitor visitor) {
|
||||
visitor.visitEvent(this);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-3
@@ -18,6 +18,7 @@ package com.intellij.openapi.keymap.impl.keyGestures;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.AnActionEventVisitor;
|
||||
import com.intellij.openapi.actionSystem.ActionManager;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GestureActionEvent extends AnActionEvent {
|
||||
public GestureActionEvent(KeyboardGestureProcessor processor) {
|
||||
@@ -34,7 +35,7 @@ public class GestureActionEvent extends AnActionEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(final AnActionEventVisitor visitor) {
|
||||
public void accept(@NotNull final AnActionEventVisitor visitor) {
|
||||
visitor.visitGestureInitEvent(this);
|
||||
}
|
||||
}
|
||||
@@ -45,7 +46,7 @@ public class GestureActionEvent extends AnActionEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(final AnActionEventVisitor visitor) {
|
||||
public void accept(@NotNull final AnActionEventVisitor visitor) {
|
||||
visitor.visitGesturePerformedEvent(this);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +57,7 @@ public class GestureActionEvent extends AnActionEvent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(final AnActionEventVisitor visitor) {
|
||||
public void accept(@NotNull final AnActionEventVisitor visitor) {
|
||||
visitor.visitGestureFinishEvent(this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user