Skip to content

Commit feb189a

Browse files
committed
0.1.8
1 parent fd9efa7 commit feb189a

29 files changed

+1447
-927
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@
44

55
## [Unreleased]
66

7+
## [0.1.8]
8+
9+
### Added
10+
- Asynchronous operations now include modal progress
11+
- Added "retry last" and generic "append" and "insert" operations
12+
- Added SCSS support
13+
14+
## [0.1.7]
15+
16+
### Added
17+
- All API calls are handled asynchronously - no UI thread blocking!
18+
719
## [0.1.6]
820

921
### Added

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pluginGroup = com.github.simiacryptus
44
pluginName = intellij-aicoder
55
pluginRepositoryUrl = https://github.com/SimiaCryptus/intellij-aicoder
66
# SemVer format -> https://semver.org
7-
pluginVersion = 0.1.6
7+
pluginVersion = 0.1.8
88

99
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010
pluginSinceBuild = 203

src/main/java/com/github/simiacryptus/aicoder/ComputerLanguage.java

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.github.simiacryptus.aicoder;
22

3-
import com.github.simiacryptus.aicoder.text.BlockComment;
4-
import com.github.simiacryptus.aicoder.text.LineComment;
5-
import com.github.simiacryptus.aicoder.text.TextBlockFactory;
3+
import com.github.simiacryptus.aicoder.util.BlockComment;
4+
import com.github.simiacryptus.aicoder.util.LineComment;
5+
import com.github.simiacryptus.aicoder.util.TextBlockFactory;
66
import org.jetbrains.annotations.Nullable;
77

88
import java.util.Arrays;
@@ -21,6 +21,9 @@ public enum ComputerLanguage {
2121
.setBlockComments(new BlockComment.Factory("/*", "", "*/"))
2222
.setDocComments(new BlockComment.Factory("/**", "*", "*/"))
2323
.setFileExtensions("cpp")),
24+
Bash(new Configuration()
25+
.setLineComments(new LineComment.Factory("#"))
26+
.setFileExtensions("sh")),
2427
Markdown(new Configuration()
2528
.setDocumentationStyle("Markdown")
2629
.setLineComments(new BlockComment.Factory("<!--", "", "-->"))
@@ -42,9 +45,6 @@ public enum ComputerLanguage {
4245
.setBlockComments(new BlockComment.Factory("/*", "", "*/"))
4346
.setDocComments(new BlockComment.Factory("/**", "*", "*/"))
4447
.setFileExtensions("basic", "bs")),
45-
Bash(new Configuration()
46-
.setLineComments(new LineComment.Factory("#"))
47-
.setFileExtensions("sh")),
4848
C(new Configuration()
4949
.setDocumentationStyle("Doxygen")
5050
.setLineComments(new LineComment.Factory("//"))
@@ -221,6 +221,12 @@ public enum ComputerLanguage {
221221
.setBlockComments(new BlockComment.Factory("/*", "", "*/"))
222222
.setDocComments(new BlockComment.Factory("/**", "*", "*/"))
223223
.setFileExtensions("scheme")),
224+
SCSS(new Configuration()
225+
.setDocumentationStyle("SCSS")
226+
.setLineComments(new LineComment.Factory("//"))
227+
.setBlockComments(new BlockComment.Factory("/*", "", "*/"))
228+
.setDocComments(new LineComment.Factory("///"))
229+
.setFileExtensions("scss")),
224230
SQL(new Configuration()
225231
.setLineComments(new LineComment.Factory("--"))
226232
.setBlockComments(new BlockComment.Factory("/*", "", "*/"))
@@ -259,7 +265,7 @@ public enum ComputerLanguage {
259265
.setLineComments(new LineComment.Factory("#"))
260266
.setFileExtensions("zsh"));
261267

262-
public final List<String> extensions;
268+
public final List<CharSequence> extensions;
263269
public final String docStyle;
264270
public final TextBlockFactory<?> lineComment;
265271
public final TextBlockFactory<?> blockComment;
@@ -274,26 +280,26 @@ public enum ComputerLanguage {
274280
}
275281

276282
@Nullable
277-
public static ComputerLanguage findByExtension(String extension) {
283+
public static ComputerLanguage findByExtension(CharSequence extension) {
278284
return Arrays.stream(values()).filter(x -> x.extensions.contains(extension)).findAny().orElse(null);
279285
}
280286

281-
public String getMultilineCommentSuffix() {
287+
public CharSequence getMultilineCommentSuffix() {
282288
if (docComment instanceof BlockComment.Factory) {
283289
return ((BlockComment.Factory) docComment).blockSuffix;
284290
}
285291
return null;
286292
}
287293

288294
public TextBlockFactory<?> getCommentModel(String text) {
289-
if(docComment.looksLike(text)) return docComment;
290-
if(blockComment.looksLike(text)) return blockComment;
295+
if (docComment.looksLike(text)) return docComment;
296+
if (blockComment.looksLike(text)) return blockComment;
291297
return lineComment;
292298
}
293299

294300
static class Configuration {
295301
private String documentationStyle = "";
296-
private String[] fileExtensions = new String[] {};
302+
private CharSequence[] fileExtensions = new CharSequence[]{};
297303
private TextBlockFactory<?> lineComments = null;
298304
private TextBlockFactory<?> blockComments = null;
299305
private TextBlockFactory<?> docComments = null;
@@ -307,11 +313,11 @@ public Configuration setDocumentationStyle(String documentationStyle) {
307313
return this;
308314
}
309315

310-
public String[] getFileExtensions() {
316+
public CharSequence[] getFileExtensions() {
311317
return fileExtensions;
312318
}
313319

314-
public Configuration setFileExtensions(String... fileExtensions) {
320+
public Configuration setFileExtensions(CharSequence... fileExtensions) {
315321
this.fileExtensions = fileExtensions;
316322
return this;
317323
}

0 commit comments

Comments
 (0)