Skip to content

Commit

Permalink
Adding comment line/block support for HXML files
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Dec 29, 2023
1 parent d6bc9ec commit 3eea11c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## 1.4.21
* Added: support for comment line/block command in HXML files
* Improvement: Attempt at restoring `Member pull up` refactoring
* Improvement: Attempt at restoring `Member push down` refactoring
* Improvement: Attempt at restoring `extract to interface` refactoring
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/intellij/plugins/haxe/ide/HxmlCommenter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.intellij.plugins.haxe.ide;

import com.intellij.lang.Commenter;
/**
* @author: Fedor.Korotkov
*/
public class HxmlCommenter implements Commenter {

public static final String SINGLE_LINE_PREFIX = "#";

@Override
public String getLineCommentPrefix() {
return SINGLE_LINE_PREFIX;
}

@Override
public String getBlockCommentPrefix() {
return null;
}

@Override
public String getBlockCommentSuffix() {
return null;
}

@Override
public String getCommentedBlockCommentPrefix() {
return null;
}

@Override
public String getCommentedBlockCommentSuffix() {
return null;
}

}
1 change: 1 addition & 0 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<!-- HXML BEGIN -->
<lang.parserDefinition language="HXML" implementationClass="com.intellij.plugins.haxe.buildsystem.hxml.HXMLParserDefinition"/>
<lang.syntaxHighlighterFactory language="HXML" implementationClass="com.intellij.plugins.haxe.ide.highlight.HXMLSyntaxHighlighterFactory"/>
<lang.commenter language="HXML" implementationClass="com.intellij.plugins.haxe.ide.HxmlCommenter"/>
<colorSettingsPage implementation="com.intellij.plugins.haxe.ide.highlight.HXMLColorSettingsPage"/>
<!-- HXML END -->

Expand Down

0 comments on commit 3eea11c

Please sign in to comment.