Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea_2019_1_support #28

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin version="2">
<idea-plugin>
<id>com.christofferklang.pyxl</id>
<name>Pyxl Support</name>
<version>1.2</version>
<version>1.3</version>
<vendor email="[email protected]">Christoffer Klang</vendor>

<description><![CDATA[
Expand All @@ -16,7 +16,7 @@

<change-notes><![CDATA[
<ul>
<li>IDEA 2016.1 support</li>
<li>Added IDEA 2019.1 support. Should also be backwards compatible with 2018 IDEA</li>
</ul>
]]>
</change-notes>
Expand Down
17 changes: 13 additions & 4 deletions pycharm-pyxl.iml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PLUGIN_MODULE" version="4">
<component name="DevKit.ModuleBuildProperties" url="file://$MODULE_DIR$/META-INF/plugin.xml" />
<component name="NewModuleRootManager" inherit-compiler-output="true">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
</content>
<orderEntry type="jdk" jdkName="IntelliJ IDEA Community Edition" jdkType="IDEA JDK" />
<orderEntry type="library" scope="PROVIDED" name="Python Plugin JAR" level="application" />
<orderEntry type="jdk" jdkName="IntelliJ IDEA IU-191.6183.87" jdkType="IDEA JDK" />
<orderEntry type="module-library" scope="PROVIDED">
<library>
<CLASSES>
<root url="jar://$MODULE_DIR$/python.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file modified pycharm-pyxl.jar
Binary file not shown.
12 changes: 6 additions & 6 deletions testdata/Attributes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PyFile:Attributes.py(0,255)
PsiElement(Py:EQ)('=')(29,30)
PyBinaryExpression(30,40)
PyBinaryExpression(30,39)
PyStringLiteralExpression: value(30,37)
PyStringLiteralExpression: (30,37)
PsiElement(Py:SINGLE_QUOTED_STRING)('"value"')(30,37)
PsiWhiteSpace(' ')(37,38)
PsiElement(Py:DIV)('/')(38,39)
Expand All @@ -38,7 +38,7 @@ PyFile:Attributes.py(0,255)
PsiElement(Py:PYXL ATTRNAME)('attribute')(46,55)
PsiElement(Py:EQ)('=')(55,56)
PsiElement(Py:PYXL PYTHON EMBED BEGIN {)('{')(56,57)
PyStringLiteralExpression: no wrapping quotes(57,77)
PyStringLiteralExpression: (57,77)
PsiElement(Py:SINGLE_QUOTED_STRING)('"no wrapping quotes"')(57,77)
PsiElement(Py:PYXL PYTHON EMBED END })('}')(77,78)
PsiWhiteSpace(' ')(78,79)
Expand All @@ -61,7 +61,7 @@ PyFile:Attributes.py(0,255)
PsiElement(Py:EQ)('=')(96,97)
PyBinaryExpression(97,128)
PyBinaryExpression(97,127)
PyStringLiteralExpression: {"wrapping single quotes"}(97,125)
PyStringLiteralExpression: (97,125)
PsiElement(Py:SINGLE_QUOTED_STRING)(''{"wrapping single quotes"}'')(97,125)
PsiWhiteSpace(' ')(125,126)
PsiElement(Py:DIV)('/')(126,127)
Expand All @@ -84,7 +84,7 @@ PyFile:Attributes.py(0,255)
PsiElement(Py:EQ)('=')(143,144)
PsiElement(Py:PYXL ATTRVALUE BEGIN)('"')(144,145)
PsiElement(Py:PYXL PYTHON EMBED BEGIN {)('{')(145,146)
PyStringLiteralExpression: wrapping double quotes(146,170)
PyStringLiteralExpression: (146,170)
PsiElement(Py:SINGLE_QUOTED_STRING)('"wrapping double quotes"')(146,170)
PsiElement(Py:PYXL PYTHON EMBED END })('}')(170,171)
PsiElement(Py:PYXL ATTRVALUE END)('"')(171,172)
Expand All @@ -107,7 +107,7 @@ PyFile:Attributes.py(0,255)
PsiElement(Py:IDENTIFIER)('attribute')(181,190)
PsiElement(Py:EQ)('=')(190,191)
PyBinaryExpression(191,199)
PyStringLiteralExpression: {(191,194)
PyStringLiteralExpression: (191,194)
PsiElement(Py:SINGLE_QUOTED_STRING)('"{"')(191,194)
PsiElement(Py:LT)('<')(194,195)
PyReferenceExpression: fake(195,199)
Expand All @@ -133,7 +133,7 @@ PyFile:Attributes.py(0,255)
<empty list>
PsiElement(Py:GT)('>')(212,213)
PyBinaryExpression(213,218)
PyStringLiteralExpression: }(213,216)
PyStringLiteralExpression: (213,216)
PsiElement(Py:SINGLE_QUOTED_STRING)('"}"')(213,216)
PsiWhiteSpace(' ')(216,217)
PsiElement(Py:DIV)('/')(217,218)
Expand Down
6 changes: 3 additions & 3 deletions testdata/ParsingTestData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ PyFile:ParsingTestData.py(0,978)
PsiElement(Py:PYXL ATTRVALUE)('Zasdf ')(272,278)
PsiElement(Py:PYXL PYTHON EMBED BEGIN {)('{')(278,279)
PsiWhiteSpace(' ')(279,280)
PyStringLiteralExpression: (280,283)
PyStringLiteralExpression: (280,283)
PsiElement(Py:SINGLE_QUOTED_STRING)('" "')(280,283)
PsiWhiteSpace(' ')(283,284)
PsiElement(Py:PYXL PYTHON EMBED END })('}')(284,285)
Expand Down Expand Up @@ -242,7 +242,7 @@ PyFile:ParsingTestData.py(0,978)
PsiWhiteSpace(' ')(462,463)
PsiElement(Py:EQ)('=')(463,464)
PsiWhiteSpace(' ')(464,465)
PyStringLiteralExpression: abcdefg(465,474)
PyStringLiteralExpression: (465,474)
PsiElement(Py:SINGLE_QUOTED_STRING)('"abcdefg"')(465,474)
PsiWhiteSpace('\n ')(474,479)
PyReturnStatement(479,638)
Expand Down Expand Up @@ -382,7 +382,7 @@ PyFile:ParsingTestData.py(0,978)
PsiElement(Py:PYXL ATTRVALUE)('string over two lines without backslash\n ')(771,819)
PsiElement(Py:PYXL PYTHON EMBED BEGIN {)('{')(819,820)
PyConditionalExpression(820,836)
PyStringLiteralExpression: a(820,823)
PyStringLiteralExpression: (820,823)
PsiElement(Py:SINGLE_QUOTED_STRING)(''a'')(820,823)
PsiWhiteSpace(' ')(823,824)
PsiElement(Py:IF_KEYWORD)('if')(824,826)
Expand Down
10 changes: 5 additions & 5 deletions testdata/WithStatements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ PyFile:WithStatements.py(0,133)
PsiElement(Py:IDENTIFIER)('open')(21,25)
PyArgumentList(25,42)
PsiElement(Py:LPAR)('(')(25,26)
PyStringLiteralExpression: file.txt(26,36)
PyStringLiteralExpression: (26,36)
PsiElement(Py:SINGLE_QUOTED_STRING)(''file.txt'')(26,36)
PsiElement(Py:COMMA)(',')(36,37)
PsiWhiteSpace(' ')(37,38)
PyStringLiteralExpression: r(38,41)
PyStringLiteralExpression: (38,41)
PsiElement(Py:SINGLE_QUOTED_STRING)(''r'')(38,41)
PsiElement(Py:RPAR)(')')(41,42)
PsiWhiteSpace(' ')(42,43)
Expand Down Expand Up @@ -48,7 +48,7 @@ PyFile:WithStatements.py(0,133)
PsiElement(Py:IDENTIFIER)('open')(84,88)
PyArgumentList(88,99)
PsiElement(Py:LPAR)('(')(88,89)
PyStringLiteralExpression: foo.txt(89,98)
PyStringLiteralExpression: (89,98)
PsiElement(Py:SINGLE_QUOTED_STRING)(''foo.txt'')(89,98)
PsiElement(Py:RPAR)(')')(98,99)
PsiElement(Py:COMMA)(',')(99,100)
Expand All @@ -58,7 +58,7 @@ PyFile:WithStatements.py(0,133)
PsiElement(Py:IDENTIFIER)('open')(101,105)
PyArgumentList(105,116)
PsiElement(Py:LPAR)('(')(105,106)
PyStringLiteralExpression: bar.txt(106,115)
PyStringLiteralExpression: (106,115)
PsiElement(Py:SINGLE_QUOTED_STRING)(''bar.txt'')(106,115)
PsiElement(Py:RPAR)(')')(115,116)
PsiElement(Py:COLON)(':')(116,117)
Expand All @@ -67,5 +67,5 @@ PyFile:WithStatements.py(0,133)
PyPrintStatement(122,133)
PsiElement(Py:PRINT_KEYWORD)('print')(122,127)
PsiWhiteSpace(' ')(127,128)
PyStringLiteralExpression: baz(128,133)
PyStringLiteralExpression: (128,133)
PsiElement(Py:SINGLE_QUOTED_STRING)('"baz"')(128,133)
4 changes: 2 additions & 2 deletions testdata/nestedembed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ PyFile:nestedembed.py(0,274)
PyDictLiteralExpression(83,105)
PsiElement(Py:LBRACE)('{')(83,84)
PyKeyValueExpression(84,102)
PyStringLiteralExpression: choice1(84,93)
PyStringLiteralExpression: (84,93)
PsiElement(Py:SINGLE_QUOTED_STRING)(''choice1'')(84,93)
PsiElement(Py:COLON)(':')(93,94)
PyStringLiteralExpression: value1(94,102)
PyStringLiteralExpression: (94,102)
PsiElement(Py:SINGLE_QUOTED_STRING)(''value1'')(94,102)
PsiElement(Py:COMMA)(',')(102,103)
PsiWhiteSpace(' ')(103,104)
Expand Down
2 changes: 1 addition & 1 deletion tests/PyxlParsingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected void setUp() throws Exception {
}
@Override
protected String getTestDataPath() {
return "../pycharm-pyxl/testdata/";
return "./testdata/";
}

@Override
Expand Down