Skip to content

Commit

Permalink
Merge pull request #21 from zephir-lang/fix/updated-api
Browse files Browse the repository at this point in the history
Replaced usage of deprecated API by new one
  • Loading branch information
sergeyklay authored May 12, 2020
2 parents 67dd2b0 + 9dbd9bb commit 56c39c2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 28 deletions.
9 changes: 7 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin url="https://github.com/zephir-lang/idea-plugin">
<id>com.zephir</id>
<name>Zephir</name>
<version>0.3.3</version>
<version>0.3.4</version>
<vendor email="[email protected]" url="https://zephir-lang.com">Zephir Team</vendor>

<description><![CDATA[
Expand All @@ -28,6 +28,7 @@
<change-notes><![CDATA[
<html lang="en">
<ul>
<li><b>0.3.4</b>: Replaced usage of deprecated API by new one</li>
<li><b>0.3.3</b>: Fixed recognizing strings with regular expressions</li>
<li><b>0.3.2</b>: Completion list now shows members of class. Improved syntax support</li>
<li><b>0.3.1</b>: Fixed much bugs with syntax recognition, fixed extra space in completion for method params</li>
Expand All @@ -48,7 +49,11 @@
<depends>com.intellij.modules.lang</depends>

<extensions defaultExtensionNs="com.intellij">
<fileTypeFactory implementation="com.zephir.ZephirFileTypeFactory"/>
<fileType name="Zephir"
language="Zephir"
implementationClass="com.zephir.ZephirFileType"
fieldName="INSTANCE"
extensions="zep"/>

<lang.parserDefinition language="Zephir" implementationClass="com.zephir.ZephirParserDefinition"/>
<lang.commenter language="Zephir" implementationClass="com.zephir.lang.ZephirCommenter"/>
Expand Down
20 changes: 0 additions & 20 deletions src/com/zephir/ZephirFileTypeFactory.java

This file was deleted.

5 changes: 0 additions & 5 deletions src/com/zephir/ZephirParserDefinition.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,4 @@ public PsiElement createElement(ASTNode node) {
public PsiFile createFile(FileViewProvider provider) {
return new ZephirFile(provider);
}

@Override
public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode astNode, ASTNode astNode2) {
return SpaceRequirements.MAY;
}
}
2 changes: 1 addition & 1 deletion src/com/zephir/actions/ZephirNewClassAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected String getActionName(PsiDirectory directory, String name, String templ

@Override
protected PsiFile createFile(String name, String templateName, PsiDirectory dir) {
final FileTemplate template = FileTemplateManager.getInstance().getInternalTemplate(templateName);
final FileTemplate template = FileTemplateManager.getInstance(dir.getProject()).getInternalTemplate(templateName);
return createFileFromTemplate(name, template, dir);
}
}

0 comments on commit 56c39c2

Please sign in to comment.