Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Add optional dependencies for com.intellij.modules.java and org.intel…
Browse files Browse the repository at this point in the history
…lij.scala (#115)
  • Loading branch information
saturn4er authored Feb 24, 2021
1 parent 2cbdc72 commit 41e12f9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ subprojects {

apply plugin: 'org.jetbrains.intellij'
intellij {
version ideaVersion
plugins = ['copyright', 'java']
version project.property("ideaVersion")
plugins = ['copyright', 'java', 'org.intellij.scala:2020.3.19']
downloadSources Boolean.valueOf(sources)
sameSinceUntilBuild Boolean.valueOf(isEAP)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ideaVersion = IC-2020.3.1
ideaVersion = 2020.3.1
sources = true
isEAP = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import com.intellij.ide.structureView.StructureViewModel;
import com.intellij.ide.structureView.StructureViewModelBase;
import com.intellij.ide.structureView.StructureViewTreeElement;
import com.intellij.ide.structureView.impl.java.VisibilitySorter;
import com.intellij.ide.util.treeView.smartTree.*;
import com.intellij.plugins.thrift.lang.psi.ThriftDeclaration;
import com.intellij.plugins.thrift.lang.psi.ThriftSubDeclaration;
Expand All @@ -36,7 +35,7 @@
public class ThriftStructureViewModel extends StructureViewModelBase implements StructureViewModel.ElementInfoProvider {
public ThriftStructureViewModel(@NotNull PsiFile psiFile) {
super(psiFile, new ThriftStructureViewElement(psiFile));
withSorters(Sorter.ALPHA_SORTER, VisibilitySorter.INSTANCE);
withSorters(Sorter.ALPHA_SORTER);
withSuitableClasses(ThriftDeclaration.class);
}

Expand Down
6 changes: 3 additions & 3 deletions thrift/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
<depends>com.intellij.modules.vcs</depends>
<depends>com.intellij.modules.xml</depends>
<depends>com.intellij.modules.xdebugger</depends>
<depends optional="true" config-file="withJava.xml">com.intellij.modules.java</depends>
<depends optional="true" config-file="withScala.xml">org.intellij.scala</depends>

<application-components>
<!-- Add your application components here -->
Expand Down Expand Up @@ -187,9 +189,7 @@

<frameworkSupport implementation="com.intellij.plugins.thrift.config.facet.ThriftFacetSupportProvider"/>
<facetType implementation="com.intellij.plugins.thrift.config.facet.ThriftFacetType"/>
<compileServer.plugin classpath="thrift-jps.jar;commons-io-2.4.jar"/>
<codeInsight.lineMarkerProvider language="Scala" implementationClass="com.intellij.plugins.thrift.editor.GoToThriftDefinitionMarkerProvider"/>
<codeInsight.lineMarkerProvider language="JAVA" implementationClass="com.intellij.plugins.thrift.editor.GoToThriftDefinitionMarkerProvider"/>
<compileServer.plugin classpath="thrift-jps.jar" />
</extensions>

<actions>
Expand Down
6 changes: 6 additions & 0 deletions thrift/src/main/resources/META-INF/withJava.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<idea-plugin>
<extensions defaultExtensionNs="com.intellij">
<codeInsight.lineMarkerProvider language="JAVA"
implementationClass="com.intellij.plugins.thrift.editor.GoToThriftDefinitionMarkerProvider"/>
</extensions>
</idea-plugin>
6 changes: 6 additions & 0 deletions thrift/src/main/resources/META-INF/withScala.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<idea-plugin>
<extensions defaultExtensionNs="com.intellij">
<codeInsight.lineMarkerProvider language="Scala"
implementationClass="com.intellij.plugins.thrift.editor.GoToThriftDefinitionMarkerProvider"/>
</extensions>
</idea-plugin>

0 comments on commit 41e12f9

Please sign in to comment.