Skip to content

Commit

Permalink
Merge pull request #3433 from Hannah-Sten/idea-241
Browse files Browse the repository at this point in the history
Support for 2024.1 EAP3
  • Loading branch information
PHPirates authored Feb 3, 2024
2 parents 42df1e5 + bf814d7 commit 6b8967c
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 38 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@

### Fixed

## [0.9.4-alpha.2] - 2024-02-03

### Added

* Add support for IDEA 2024.1
* Add folding settings for all folding builders
* Improve internal logging

### Fixed

* Fix autocompletion of file path arguments when text is already present

## [0.9.3] - 2024-01-16

Welcome to TeXiFy IDEA 0.9.3! This release fixes some UI freezes related to package indexing and autocompletion, and fixes a few bugs.
Expand Down Expand Up @@ -279,7 +291,8 @@ Thanks to @jojo2357 and @MisterDeenis for contributing to this release!
* Fix some intention previews. ([#2796](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2796))
* Other small bug fixes and improvements. ([#2776](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2776), [#2774](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2774), [#2765](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2765)-[#2773](https://github.com/Hannah-Sten/TeXiFy-IDEA/issues/2773))

[Unreleased]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.3...HEAD
[Unreleased]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.4-alpha.2...HEAD
[0.9.4-alpha.2]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.3...v0.9.4-alpha.2
[0.9.3]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.3...v0.9.2
[0.9.2]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.1...v0.9.2
[0.9.1]: https://github.com/Hannah-Sten/TeXiFy-IDEA/compare/v0.9.0...v0.9.1
Expand Down
21 changes: 13 additions & 8 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ plugins {
id("org.jlleitschuh.gradle.ktlint") version "12.1.0"

// Vulnerability scanning
id("org.owasp.dependencycheck") version "9.0.8"
id("org.owasp.dependencycheck") version "9.0.9"

id("org.jetbrains.changelog") version "2.2.0"

Expand Down Expand Up @@ -101,12 +101,12 @@ dependencies {

// Http requests
implementation("io.ktor:ktor-client-core:2.3.8")
implementation("io.ktor:ktor-client-cio:2.3.7")
implementation("io.ktor:ktor-client-auth:2.3.7")
implementation("io.ktor:ktor-client-content-negotiation:2.3.7")
implementation("io.ktor:ktor-server-core:2.3.7")
implementation("io.ktor:ktor-client-cio:2.3.8")
implementation("io.ktor:ktor-client-auth:2.3.8")
implementation("io.ktor:ktor-client-content-negotiation:2.3.8")
implementation("io.ktor:ktor-server-core:2.3.8")
implementation("io.ktor:ktor-server-jetty:2.3.8")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.7")
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.8")

// Comparing versions
implementation("org.apache.maven:maven-artifact:4.0.0-alpha-12")
Expand Down Expand Up @@ -205,7 +205,7 @@ intellij {
listOf(
"tanvd.grazi",
"java",
"com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer:0.15.0",
// "com.firsttimeinforever.intellij.pdf.viewer.intellij-pdf-viewer:0.15.0",
"com.jetbrains.hackathon.indices.viewer:1.25"
)
)
Expand All @@ -218,7 +218,7 @@ intellij {
// Comment out to use the latest EAP snapshot
// Docs: https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
// All snapshot versions: https://www.jetbrains.com/intellij-repository/snapshots/
version.set("2023.3")
version.set("241.10840-EAP-CANDIDATE-SNAPSHOT")
// type = "PY"

// Example to use a different, locally installed, IDE
Expand Down Expand Up @@ -291,6 +291,11 @@ tasks.useLatestVersions {

tasks {

// https://github.com/JetBrains/gradle-grammar-kit-plugin/issues/168
withType<GenerateParserTask> {
classpath(setupDependencies.flatMap { it.idea.map { idea -> idea.classes.resolve("lib/opentelemetry.jar") } })
}

val generateLatexParserTask = register<GenerateParserTask>("generateLatexParser") {
sourceFile.set(File("src/nl/hannahsten/texifyidea/grammar/Latex.bnf"))
targetRoot.set("gen")
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pluginVersion = 0.9.3
pluginVersion = 0.9.4-alpha.2

# Info about build ranges: https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html
# Note that an xyz branch corresponds to version 20xy.z and a since build of xyz.*
# means that the first possible build is the next branch number after xyz, so e.g.
# a since build of 173.* is equal to 181
pluginSinceBuild = 233
pluginSinceBuild = 241

# Token for releasing to Jetbrains using the Gradle intellij/publishPlugin task, for more information see the Gradle build file.
intellijPublishToken=mytoken
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
17 changes: 9 additions & 8 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ class LatexCodeFoldingOptionsProvider : CodeFoldingOptionsProvider, BeanConfigur

init {
val settings = instance
if (settings != null) {
checkBox("Package imports", settings::collapseImports)
checkBox("Environments", settings::foldEnvironments)
checkBox("Escaped symbols", settings::foldEscapedSymbols)
checkBox("Footnotes", settings::foldFootnotes)
checkBox("Math symbols", settings::foldMathSymbols)
checkBox("Sections", settings::foldSections)
checkBox("Symbols", settings::foldSymbols)
}
checkBox("Package imports", settings::collapseImports)
checkBox("Environments", settings::foldEnvironments)
checkBox("Escaped symbols", settings::foldEscapedSymbols)
checkBox("Footnotes", settings::foldFootnotes)
checkBox("Math symbols", settings::foldMathSymbols)
checkBox("Sections", settings::foldSections)
checkBox("Symbols", settings::foldSymbols)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ import nl.hannahsten.texifyidea.util.containsAny
import nl.hannahsten.texifyidea.util.remove
import java.util.*

@Suppress("UnstableApiUsage") // As far as I know, there is no alternative
class LatexCompileMessageTreeView(
val project: Project,
project: Project,
private val latexMessageList: MutableList<LatexLogMessage>,
private val bibtexMessageList: MutableList<BibtexLogMessage>
) :
NewErrorTreeViewPanel(project, null) {
) : NewErrorTreeViewPanel(project, null) {

fun config(): LatexErrorTreeViewConfiguration = LatexErrorTreeViewConfiguration.getInstance(myProject)
fun config(): LatexErrorTreeViewConfiguration = LatexErrorTreeViewConfiguration.getInstance(project)

override fun fillRightToolbarGroup(group: DefaultActionGroup) {
// Use myProject (from NewErrorTreeViewPanel) because somehow project is null
LatexKeywordFilter.values().forEach { group.add(FilterKeywordAction(it, myProject)) }
group.addAll(FilterBibtexAction(myProject), ExpandAllAction(), CollapseAllAction())
LatexKeywordFilter.values().forEach { group.add(FilterKeywordAction(it, project)) }
group.addAll(FilterBibtexAction(project), ExpandAllAction(), CollapseAllAction())

// Search for the information action toggle so we can remove it (as we don't use it).
val informationAction = group.childActionsOrStubs.find {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import com.intellij.ui.dsl.builder.AlignX
import com.intellij.ui.dsl.builder.RightGap
import com.intellij.ui.dsl.builder.panel
import com.intellij.ui.table.TableView
import com.intellij.ui.util.preferredWidth
import com.intellij.util.ui.AbstractTableCellEditor
import com.intellij.util.ui.JBDimension
import com.intellij.util.ui.ListTableModel
import com.intellij.util.ui.table.TableModelEditor
import nl.hannahsten.texifyidea.TexifyIcons
import java.awt.BorderLayout
import java.awt.Component
import java.awt.Dimension
import javax.swing.JComponent
import javax.swing.JPanel
import javax.swing.JTable
Expand Down Expand Up @@ -214,8 +214,8 @@ class TexifyConventionsConfigurable(project: Project) : SearchableConfigurable,
*/
private fun createAddLabelConventionDialog() {
val typeField = ComboBox(LabelConventionType.values())
val elementField = JBTextField().apply { preferredWidth = 200 }
val prefixField = JBTextField().apply { preferredWidth = 200 }
val elementField = JBTextField().apply { preferredSize = Dimension(200, preferredSize.height) }
val prefixField = JBTextField().apply { preferredSize = Dimension(200, preferredSize.height) }
val labelField = JBCheckBox()

DialogBuilder().apply {
Expand Down

0 comments on commit 6b8967c

Please sign in to comment.