Skip to content

Commit

Permalink
Updated to work with Intellij 2020.1, release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksZhelo committed Apr 10, 2020
1 parent 5a95f8a commit ffcda0a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

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

2 changes: 1 addition & 1 deletion .idea/misc.xml

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

24 changes: 21 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'com.alekseyzhelo.evilislands'
version '1.1'
version '1.1.1'

sourceCompatibility = 1.8
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
Expand All @@ -23,17 +23,35 @@ dependencies {

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version '2019.3'
version '2020.1'
type 'IC'
plugins 'java' //, 'PsiViewer:193-SNAPSHOT'
}
patchPluginXml {
changeNotes """
Version 1.1.1:
<ul>
<li> Updated to work with Intellij 2020.1 </li>
</ul>
Version 1.1:
<ul>
<li> Implemented multiline comments </li>
<li> Improved non-Java IDE support </li>
<li> Error highlighting for unclosed strings/multiline comments </li>
</ul>"""
</ul>
Version 1.0:
<ul>
<li> Syntax checking </li>
<li> Type checking </li>
<li> Code completion, including object ID/name completion and GSGetVar/GSSetVar variable completion</li>
<li> Code formatting </li>
<li> Basic code inspections </li>
<li> Find usages </li>
<li> Customizable syntax highlighting </li>
<li> Structure view </li>
<li> Live templates </li>
<ul>
"""
sinceBuild '192'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

public class EIMobPsiFileNode extends PsiFileNode {

private final List<AbstractTreeNode> children;
private final List<AbstractTreeNode<?>> children;

EIMobPsiFileNode(Project project, @NotNull PsiFile value, ViewSettings viewSettings, PsiFileNode scriptNode) {
super(project, value, viewSettings);
Expand All @@ -26,7 +26,7 @@ public class EIMobPsiFileNode extends PsiFileNode {
}

@Override
public Collection<AbstractTreeNode> getChildrenImpl() {
public Collection<AbstractTreeNode<?>> getChildrenImpl() {
return children;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
public class EIMobStructureProvider implements TreeStructureProvider {
@NotNull
@Override
public Collection<AbstractTreeNode> modify(@NotNull AbstractTreeNode parent, @NotNull Collection<AbstractTreeNode> children, ViewSettings settings) {
public Collection<AbstractTreeNode<?>> modify(@NotNull AbstractTreeNode<?> parent,
@NotNull Collection<AbstractTreeNode<?>> children,
ViewSettings settings) {
return children.stream()
.map((x) -> convertMobNode(x, children))
.filter(Objects::nonNull)
Expand All @@ -28,11 +30,12 @@ public Collection<AbstractTreeNode> modify(@NotNull AbstractTreeNode parent, @No

@Nullable
@Override
public Object getData(@NotNull Collection<AbstractTreeNode> selected, @NotNull String dataId) {
public Object getData(@NotNull Collection<AbstractTreeNode<?>> selected, @NotNull String dataId) {
return null;
}

private AbstractTreeNode<?> convertMobNode(AbstractTreeNode<?> node, Collection<AbstractTreeNode> siblings) {
private AbstractTreeNode<?> convertMobNode(AbstractTreeNode<?> node,
Collection<AbstractTreeNode<?>> siblings) {
if (node instanceof PsiFileNode) {
VirtualFile virtualFile = ((PsiFileNode) node).getVirtualFile();
if (virtualFile != null) {
Expand Down Expand Up @@ -63,7 +66,7 @@ private AbstractTreeNode<?> convertMobNode(AbstractTreeNode<?> node, Collection<

@Nullable
private PsiFileNode findSameNamedSiblingOfType(
Collection<AbstractTreeNode> siblings,
Collection<AbstractTreeNode<?>> siblings,
VirtualFile file,
FileType fileTypeInstance
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@

public class EIFunctionParameterInfoHandler implements ParameterInfoHandlerWithTabActionSupport<EIParams, List<EIFormalParameter>, EIExpression>, DumbAware {

private static final Set<Class> ourArgumentListAllowedParentClassesSet
private static final Set<Class<?>> ourArgumentListAllowedParentClassesSet
= ContainerUtil.newHashSet(EIFunctionCall.class);
private static final Set<Class> ourStopSearch = Collections.singleton(EIScriptBlock.class);
private static final Set<Class<?>> ourStopSearch = Collections.singleton(EIScriptBlock.class);

@Override
public boolean couldShowInLookup() {
Expand Down Expand Up @@ -130,13 +130,13 @@ public IElementType getActualParametersRBraceType() {

@NotNull
@Override
public Set<Class> getArgumentListAllowedParentClasses() {
public Set<Class<?>> getArgumentListAllowedParentClasses() {
return ourArgumentListAllowedParentClassesSet;
}

@NotNull
@Override
public Set<? extends Class> getArgListStopSearchClasses() {
public Set<? extends Class<?>> getArgListStopSearchClasses() {
return ourStopSearch;
}

Expand Down

0 comments on commit ffcda0a

Please sign in to comment.