Skip to content

Commit

Permalink
using java langs SoftReference
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed May 15, 2023
1 parent 2c4793b commit d45a68d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
6 changes: 6 additions & 0 deletions TODOs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- Rewrite haxeLib updater to conform with read/write thread mechanics & activities
- Fix issue with annotation/ metadata breaking refactoring (pull members up)
- rewrite compiler/run/debug logic , do it the way jetbrains recommends.
- rework CodeStyleSettings (get rid of INSERT_OVERRIDE_ANNOTATION)

- add support for Abstract classes (rename current abstract "class" type to avoid confusion)
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
package com.intellij.plugins.haxe;

import com.intellij.AbstractBundle;
import com.intellij.CommonBundle;
import com.intellij.reference.SoftReference;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.PropertyKey;

import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;

/**
Expand All @@ -47,7 +46,7 @@ private static ResourceBundle getBundle() {

if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginName = Haxe Toolkit Support
pluginRepositoryUrl = https://github.com/HaxeFoundation/intellij-haxe

# SemVer format -> https://semver.org
pluginVersion = 1.4.0
pluginVersion = 1.4.0 (Beta 10)

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
platformType = IU
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/intellij/plugins/haxe/HaxeBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@
package com.intellij.plugins.haxe;

import com.intellij.AbstractBundle;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import com.intellij.reference.SoftReference;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.PropertyKey;

import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;

public class HaxeBundle extends DynamicBundle {
Expand All @@ -49,7 +47,7 @@ private static ResourceBundle getBundle() {

if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@

import com.intellij.AbstractBundle;
import com.intellij.DynamicBundle;
import com.intellij.reference.SoftReference;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.PropertyKey;

import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;

public class HaxeProjectBundle extends DynamicBundle {
Expand All @@ -48,7 +48,7 @@ private static ResourceBundle getBundle() {

if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import com.intellij.AbstractBundle;
import com.intellij.CommonBundle;
import com.intellij.DynamicBundle;
import com.intellij.reference.SoftReference;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.PropertyKey;

import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.util.ResourceBundle;

public class HaxeRefactoringBundle extends DynamicBundle {
Expand All @@ -49,7 +49,7 @@ private static ResourceBundle getBundle() {

if (bundle == null) {
bundle = ResourceBundle.getBundle(BUNDLE);
ourBundle = new SoftReference<ResourceBundle>(bundle);
ourBundle = new SoftReference<>(bundle);
}
return bundle;
}
Expand Down

0 comments on commit d45a68d

Please sign in to comment.