Skip to content

Commit

Permalink
bugfix: error when deleting file
Browse files Browse the repository at this point in the history
  • Loading branch information
tilen-fiser committed Oct 25, 2023
1 parent ca2ceae commit 0b63cc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ManicTime Plugin Changelog

## [1.1.0] - 2023-10-25

Bugfix: error when deleting file


## [1.0.0] - 2023-10-24

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = org.jetbrains.plugins.template
pluginName = ManicTime
pluginRepositoryUrl = https://github.com/manictime/manictime-intellij
# SemVer format -> https://semver.org
pluginVersion = 1.0.0
pluginVersion = 1.1.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/org/manictime/plugin/ManicTimeEventListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ public ManicTimeEventListener(final Project project) {

@Override
public void selectionChanged(FileEditorManagerEvent event) {
var filePath = event.getNewFile().getPath();
var file = event.getNewFile().getName();
serverManager.send("idea64", "ManicTime/Files", filePath, file);

var file = event.getNewFile();
if(file != null) {
var filePath = file.getPath();
var fileName = file.getName();
serverManager.send("idea64", "ManicTime/Files", filePath, fileName);
}
if(myStatusBar != null)
myStatusBar.updateWidget("ManicTimeStatusBar");
}
Expand Down

0 comments on commit 0b63cc3

Please sign in to comment.