mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-23279, PY-9963: fixed according to IDEA-CR-19921
This commit is contained in:
@@ -22,6 +22,10 @@
|
||||
elementTypeClass = 'com.jetbrains.commandInterface.commandLine.CommandLineElementType'
|
||||
|
||||
|
||||
//TODO: I would suggest making this pattern negative rather than positive in order to support all the characters like ? and others
|
||||
//TODO: This lexer doesn't support multi-line arguments and options. LabelsReplyCreate issue
|
||||
//TODO: This lexer doesn't support escaping.
|
||||
//TODO: This parser doesn't support - --no-option - -nonoption.
|
||||
tokens=[
|
||||
space='regexp:\s+' // WARNING: Comment out or remove this (space) before generating Flex file! It is here only for live preview.
|
||||
EQ = '='
|
||||
|
||||
+3
@@ -84,6 +84,9 @@ final class CommandLinePsiImplUtils {
|
||||
@NotNull
|
||||
static String getValueNoQuotes(@NotNull final CommandLineArgument argument) {
|
||||
final char[] chars = argument.getText().toCharArray();
|
||||
if (chars.length == 0) {
|
||||
return "";
|
||||
}
|
||||
final char firstChar = chars[0];
|
||||
if (firstChar == chars[chars.length - 1] && firstChar == '"' || firstChar == '\'') {
|
||||
return argument.getText().substring(1, argument.getTextLength() - 1);
|
||||
|
||||
@@ -117,7 +117,7 @@ private fun findVFSItemRoot(virtualFile: VirtualFile, project: Project): Virtual
|
||||
|
||||
|
||||
/**
|
||||
* Emulates command line processor by parsing command line to arguments that can be provided as argv.
|
||||
* Emulates command line processor (cmd, bash) by parsing command line to arguments that can be provided as argv.
|
||||
* Escape chars are not supported but quotes work.
|
||||
* @throws ExecutionException if can't be parsed
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user