mirror of
https://github.com/microsoft/playwright-java.git
synced 2025-12-28 18:30:43 +00:00
chore: delete code for generating custom option names (#249)
This commit is contained in:
parent
d14d35610e
commit
a577e62ece
@ -114,7 +114,7 @@ public interface Keyboard {
|
||||
*
|
||||
* @param key Name of the key to press or a character to generate, such as {@code ArrowLeft} or {@code a}.
|
||||
*/
|
||||
void press(String key, PressOptions delay);
|
||||
void press(String key, PressOptions options);
|
||||
default void type(String text) {
|
||||
type(text, null);
|
||||
}
|
||||
@ -127,7 +127,7 @@ public interface Keyboard {
|
||||
*
|
||||
* @param text A text to type into a focused element.
|
||||
*/
|
||||
void type(String text, TypeOptions delay);
|
||||
void type(String text, TypeOptions options);
|
||||
/**
|
||||
* Dispatches a {@code keyup} event.
|
||||
*
|
||||
|
||||
@ -760,7 +760,7 @@ class Method extends Element {
|
||||
sections.add("");
|
||||
hasBlankLine = true;
|
||||
}
|
||||
sections.add("@param " + p.name() + " " + comment);
|
||||
sections.add("@param " + p.jsonName + " " + comment);
|
||||
}
|
||||
}
|
||||
if (jsonElement.getAsJsonObject().has("returnComment")) {
|
||||
@ -778,12 +778,6 @@ class Method extends Element {
|
||||
class Param extends Element {
|
||||
final TypeRef type;
|
||||
|
||||
private static Map<String, String> customName = new HashMap<>();
|
||||
static {
|
||||
customName.put("Keyboard.type.options", "delay");
|
||||
customName.put("Keyboard.press.options", "delay");
|
||||
}
|
||||
|
||||
Param(Method method, JsonObject jsonElement) {
|
||||
super(method, jsonElement);
|
||||
type = new TypeRef(this, jsonElement.get("type").getAsJsonObject());
|
||||
@ -793,16 +787,8 @@ class Param extends Element {
|
||||
return !jsonElement.getAsJsonObject().get("required").getAsBoolean();
|
||||
}
|
||||
|
||||
String name() {
|
||||
String name = customName.get(jsonPath);
|
||||
if (name != null) {
|
||||
return name;
|
||||
}
|
||||
return jsonName;
|
||||
}
|
||||
|
||||
String toJava() {
|
||||
return type.toJava() + " " + name();
|
||||
return type.toJava() + " " + jsonName;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user