mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
fixed intentions description
This commit is contained in:
@@ -127,7 +127,6 @@ INTN.join.if.text=Join two if's
|
||||
|
||||
INTN.convert.dict.constructor.to.dict.literal=Convert dict constructor to dict literal form
|
||||
INTN.convert.dict.literal.to.dict.constructor=Convert dict literal to dict constructor
|
||||
INTN.convert.dict=Convert dict back and forth between literal dict and dict(**kwargs)
|
||||
|
||||
INTN.quoted.string=Convert between single-quoted and double-quoted strings
|
||||
INTN.quoted.string.single.to.double=Convert single-quoted string to double-quoted string
|
||||
|
||||
+8
-1
@@ -14,13 +14,20 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* User: catherine
|
||||
* Intention to convert dict constructor to dict literal expression with only explicit keyword arguments
|
||||
* For instance,
|
||||
* dict() -> {}
|
||||
* dict(a=3, b=5) -> {'a': 3, 'b': 5}
|
||||
* dict(foo) -> no transformation
|
||||
* dict(**foo) -> no transformation
|
||||
*/
|
||||
public class PyDictConstructorToLiteralFormIntention extends BaseIntentionAction {
|
||||
@NotNull
|
||||
public String getFamilyName() {
|
||||
return PyBundle.message("INTN.convert.dict");
|
||||
return PyBundle.message("INTN.convert.dict.constructor.to.dict.literal");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getText() {
|
||||
return PyBundle.message("INTN.convert.dict.constructor.to.dict.literal");
|
||||
}
|
||||
|
||||
+8
-3
@@ -8,19 +8,24 @@ import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.jetbrains.python.PyBundle;
|
||||
import com.jetbrains.python.psi.*;
|
||||
import com.jetbrains.python.psi.types.PyType;
|
||||
import com.jetbrains.python.psi.types.TypeEvalContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* User: catherine
|
||||
*
|
||||
* Intention to convert dict literal expression to dict constructor if the keys are all string constants on a literal dict.
|
||||
* For instance,
|
||||
* {} -> dict
|
||||
* {'a': 3, 'b': 5} -> dict(a=3, b=5)
|
||||
* {a: 3, b: 5} -> no transformation
|
||||
*/
|
||||
public class PyDictLiteralFormToConstructorIntention extends BaseIntentionAction {
|
||||
@NotNull
|
||||
public String getFamilyName() {
|
||||
return PyBundle.message("INTN.convert.dict");
|
||||
return PyBundle.message("INTN.convert.dict.literal.to.dict.constructor");
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getText() {
|
||||
return PyBundle.message("INTN.convert.dict.literal.to.dict.constructor");
|
||||
}
|
||||
|
||||
@@ -13,6 +13,14 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* User: catherine
|
||||
* Intention to merge the if clauses in the case of nested ifs where only the inner if contains code (the outer if only contains the inner one)
|
||||
* For instance,
|
||||
* if a:
|
||||
* if b:
|
||||
* # stuff here
|
||||
* into
|
||||
* if a and b:
|
||||
* #stuff here
|
||||
*/
|
||||
public class PyJoinIfIntention extends BaseIntentionAction {
|
||||
@NotNull
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* User: catherine
|
||||
* Intention to convert between single-quoted and double-quoted strings
|
||||
*/
|
||||
public class PyQuotedStringIntention extends BaseIntentionAction {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user